正在查看: MedEd v5.3.6 应用的 QuizQuestionsActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: MedEd v5.3.6 应用的 QuizQuestionsActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.penpencil.physicswallah.feature.quiz.presentation.activity;
import android.R;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.drawable.ColorDrawable;
import android.net.Uri;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.os.Handler;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Chronometer;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import androidx.cardview.widget.CardView;
import androidx.compose.ui.platform.ComposeView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.widget.NestedScrollView;
import androidx.lifecycle.I;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.bumptech.glide.Glide;
import com.freshchat.consumer.sdk.e.Naw.jpUapeaBzcqRhD;
import com.google.android.material.bottomsheet.b;
import com.google.android.material.button.MaterialButton;
import com.google.android.material.slider.hwjb.PPBOHKTwZMfdl;
import com.google.android.material.textfield.TextInputLayout;
import com.google.gson.Gson;
import com.penpencil.network.models.DrmLicensePayload;
import com.penpencil.network.models.ExercisePauseResponse;
import com.penpencil.network.models.PlayerModel;
import com.penpencil.network.models.QuestionsResponse;
import com.penpencil.network.models.QuestionsResponses;
import com.penpencil.network.response.BatchData;
import com.penpencil.network.response.BatchTopicsData;
import com.penpencil.network.response.Image;
import com.penpencil.network.response.Option;
import com.penpencil.network.response.Question;
import com.penpencil.network.response.Questions;
import com.penpencil.network.response.Solution;
import com.penpencil.network.response.Subject;
import com.penpencil.network.response.VideoDetails;
import com.penpencil.physicswallah.dialog.test_series_qbank.ReportQuestionDialogNew;
import com.penpencil.physicswallah.dialog.test_series_qbank.WarningDialog;
import com.penpencil.physicswallah.feature.bookmark.data.model.NeetBookmarkPayload;
import com.penpencil.physicswallah.feature.bookmark.domain.model.PostBookmarkResponse;
import com.penpencil.physicswallah.feature.bookmark.domain.usecase.BookmarkQuestionsPayload;
import com.penpencil.physicswallah.feature.home.presentation.ui.AppNavigationContainerActivity;
import com.penpencil.physicswallah.feature.quiz.presentation.dialog.MoreDialog;
import com.penpencil.physicswallah.feature.quiz.presentation.dialog.QBankCompletedDialog;
import com.penpencil.player.models.BatchCredential;
import com.penpencil.player.models.CourseCredential;
import defpackage.CN1;
import defpackage.HI1;
import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
import kotlin.Pair;
import kotlin.coroutines.CoroutineContext;
import kotlin.jvm.internal.Intrinsics;
public class QuizQuestionsActivity extends pR0 implements WarningDialog.a, MoreDialog.a, QBankCompletedDialog.a, a, a, p22 {
public static final int J1 = 0;
public String A1;
public String B1;
public String C1;
public String D1;
public String E1;
public int F1;
public Zm2 I0;
public nP1 J0;
public nN1 K0;
public kT1 L0;
public ImageView M0;
public String N0;
public String O0;
public String P0;
public int Q0;
public List<Questions> R0;
public Questions S0;
public h93 T0;
public CN1 U0;
public QuestionsResponse V0;
public String Y0;
@BindView
EditText answerEt;
@BindView
TextView answerTv;
@BindView
ImageView bookmarkLabel;
@BindView
ImageView bookmarkLabelResult;
@BindView
RelativeLayout bookmarkLl;
@BindView
ProgressBar bookmarkProgress;
@BindView
RelativeLayout bookmarkResultLl;
@BindView
TextView bookmarkResultTv;
@BindView
TextView bookmarkTv;
@BindView
RelativeLayout bottomRl;
@BindView
TextView correctPercentile;
@BindView
CardView correctPercentileCard;
@BindView
ImageView gridViewIv;
public boolean k1;
public Handler l1;
public JR1 m1;
@BindView
LinearLayout moreLl;
public GR1 n1;
@BindView
LinearLayout nextLl;
@BindView
TextView nextSkipSubmitTv;
public TextView o1;
@BindView
ImageView openCalculater;
@BindView
RecyclerView optionsRcv;
public ImageView p1;
public RelativeLayout q1;
@BindView
TextView quesNotv;
@BindView
ImageView questionIv;
@BindView
LinearLayout questionLl;
@BindView
RecyclerView questionNoRcv;
@BindView
NestedScrollView questionNsv;
@BindView
ConstraintLayout questionParentLL;
@BindView
ComposeView questionWebView;
public CountDownTimer r1;
public long s1;
@BindView
CardView solutionCv;
@BindView
ImageView solutionIv;
@BindView
LinearLayout solutionLl;
@BindView
ComposeView solutionWebView;
@BindView
MaterialButton submitQbankBtn;
public String t1;
@BindView
TextView tagNameTv;
@BindView
Chronometer testTimerCm;
@BindView
TextView testTimerTv;
@BindView
TextInputLayout textInputLayout;
public String u1;
public String v1;
@BindView
LinearLayout videoSolnLl;
@BindView
View view;
@BindView
ImageView viewAnsArrowIv;
@BindView
CardView viewAnswerCv;
public String w1;
public SharedPreferences y1;
public String z1;
@BindView
ImageView zoomClickHere;
public Boolean W0 = Boolean.FALSE;
public final Handler X0 = new Handler();
public String Z0 = "";
public String a1 = "";
public String b1 = "";
public String c1 = " ";
public String d1 = "";
public String e1 = "";
public Image f1 = null;
public Solution g1 = null;
public BatchCredential h1 = null;
public CourseCredential i1 = null;
public Xz j1 = null;
public Boolean x1 = Boolean.TRUE;
public boolean G1 = false;
public boolean H1 = false;
public boolean I1 = false;
public static void U0(QuizQuestionsActivity quizQuestionsActivity, PostBookmarkResponse postBookmarkResponse) {
quizQuestionsActivity.getClass();
if (!postBookmarkResponse.isSuccess() || postBookmarkResponse.getError() != null) {
if (postBookmarkResponse.isSuccess() || postBookmarkResponse.getError() == null) {
quizQuestionsActivity.bookmarkProgress.setVisibility(8);
Toast.makeText((Context) quizQuestionsActivity, (CharSequence) quizQuestionsActivity.getString(2132020607), 0).show();
return;
} else {
quizQuestionsActivity.bookmarkProgress.setVisibility(8);
Toast.makeText((Context) quizQuestionsActivity, (CharSequence) postBookmarkResponse.getError(), 0).show();
return;
}
}
quizQuestionsActivity.bookmarkProgress.setVisibility(8);
quizQuestionsActivity.S0.getQuestion().setQBGBookmarked(postBookmarkResponse.isBookMarked());
if (quizQuestionsActivity.S0.getQuestion().getQBGBookmarked()) {
quizQuestionsActivity.bookmarkLabel.setImageResource(2131233297);
quizQuestionsActivity.bookmarkTv.setText("Bookmarked");
quizQuestionsActivity.bookmarkTv.setTextColor(quizQuestionsActivity.getResources().getColor(2131099943));
quizQuestionsActivity.bookmarkLabelResult.setImageResource(2131233297);
quizQuestionsActivity.bookmarkResultTv.setText("Bookmarked");
quizQuestionsActivity.bookmarkResultTv.setTextColor(quizQuestionsActivity.getResources().getColor(2131099943));
Toast.makeText((Context) quizQuestionsActivity, (CharSequence) "Bookmarked", 0).show();
return;
}
quizQuestionsActivity.bookmarkLabel.setImageResource(2131232549);
quizQuestionsActivity.bookmarkTv.setText("Bookmark");
quizQuestionsActivity.bookmarkTv.setTextColor(quizQuestionsActivity.getResources().getColor(2131099754));
quizQuestionsActivity.bookmarkLabelResult.setImageResource(2131232549);
quizQuestionsActivity.bookmarkResultTv.setText("Bookmark");
quizQuestionsActivity.bookmarkResultTv.setTextColor(quizQuestionsActivity.getResources().getColor(2131099754));
Toast.makeText((Context) quizQuestionsActivity, (CharSequence) "Un-Bookmarked", 0).show();
}
public static void V0(QuizQuestionsActivity quizQuestionsActivity) {
if (quizQuestionsActivity.S0 != null) {
quizQuestionsActivity.bookmarkProgress.setVisibility(0);
quizQuestionsActivity.X0(quizQuestionsActivity.S0.getQuestion(), quizQuestionsActivity.S0.getQuestionId());
quizQuestionsActivity.K0.e(quizQuestionsActivity.S0.getQuestion().get_id(), "question", quizQuestionsActivity.S0.getQuestion().getQbgSubjectId());
}
}
public static void W0(QuizQuestionsActivity quizQuestionsActivity) {
if (quizQuestionsActivity.S0 != null) {
quizQuestionsActivity.bookmarkProgress.setVisibility(0);
quizQuestionsActivity.X0(quizQuestionsActivity.S0.getQuestion(), quizQuestionsActivity.S0.getQuestionId());
quizQuestionsActivity.K0.e(quizQuestionsActivity.S0.getQuestion().get_id(), "question", quizQuestionsActivity.S0.getQuestion().getQbgSubjectId());
}
}
public final void Y0(int i) {
if (!this.k1) {
this.viewAnswerCv.setVisibility(i);
return;
}
this.solutionCv.setVisibility(i);
this.q1.setVisibility(i);
if (i != 0) {
if (this.S0.getQuestion().isQBGQuestion()) {
this.bookmarkLl.setVisibility(0);
this.bookmarkResultLl.setVisibility(8);
return;
} else {
this.bookmarkLl.setVisibility(8);
this.bookmarkResultLl.setVisibility(8);
return;
}
}
if (this.S0.getQuestion().isQBGQuestion()) {
this.bookmarkLl.setVisibility(8);
this.bookmarkResultLl.setVisibility(0);
} else {
this.bookmarkLl.setVisibility(8);
this.bookmarkResultLl.setVisibility(8);
}
JR1 jr1 = this.m1;
if (jr1 != null) {
jr1.d = Boolean.FALSE;
jr1.notifyDataSetChanged();
}
}
public final void Z0(String str) {
String str2;
str2 = "";
if (!this.S0.isOptionSelected() && this.S0.getMarkedSolutions() != null && this.S0.getMarkedSolutions().size() > 0) {
Iterator<Option> it = this.S0.getQuestion().getOptions().iterator();
while (true) {
if (!it.hasNext()) {
break;
}
Option next = it.next();
if (next.get_id().equals(this.S0.getMarkedSolutions().get(0))) {
this.e1 = next.getText();
this.f1 = next.getImageId();
break;
}
}
} else {
this.e1 = "";
this.f1 = null;
this.g1 = null;
}
this.solutionCv.setVisibility(8);
this.q1.setVisibility(8);
this.viewAnsArrowIv.setImageResource(2131231159);
str.hashCode();
switch (str) {
case "Viewed":
case "NotViewed":
Y0(8);
this.videoSolnLl.setVisibility(8);
break;
case "Attempted":
this.videoSolnLl.setVisibility(0);
Y0(0);
this.correctPercentileCard.setVisibility(8);
if (this.S0.getCorrectPercentile() != null) {
Map correctPercentile = this.S0.getCorrectPercentile();
Iterator it2 = correctPercentile.entrySet().iterator();
Float f = (Float) correctPercentile.get(it2.hasNext() ? (String) ((Map.Entry) it2.next()).getKey() : null);
if (this.S0.isSubmitted() && this.S0.isAttempted() && f != null) {
this.correctPercentile.setText(sd2.a(String.valueOf(Math.round(f.floatValue())), "%"));
this.correctPercentileCard.setVisibility(0);
}
}
if (this.S0.getQuestion().getSolutionDescription() == null) {
Y0(8);
this.videoSolnLl.setVisibility(8);
break;
} else if (this.S0.getQuestion().getSolutionDescription().size() == 0) {
Y0(8);
this.videoSolnLl.setVisibility(8);
break;
} else {
String str3 = "";
for (Solution solution : this.S0.getQuestion().getSolutionDescription()) {
if (!TextUtils.isEmpty(solution.getText())) {
this.e1 = solution.getText();
}
if (solution.getImageId() != null) {
this.f1 = solution.getImageId();
}
if (solution.getVideoDetails() != null) {
this.g1 = solution;
}
if (solution.getReference() != null) {
str2 = solution.getReference().getName();
if (solution.getReference().getImageId() != null) {
str3 = solution.getReference().getImageId().getImageUrl();
}
}
}
Solution solution2 = this.g1;
if (solution2 == null) {
this.videoSolnLl.setVisibility(8);
} else {
PlayerModel F = o11.F(solution2);
if (TextUtils.isEmpty(F.getVideoType()) && TextUtils.isEmpty(F.getVideoUrl())) {
this.videoSolnLl.setVisibility(8);
}
}
if (TextUtils.isEmpty(this.e1) && this.f1 == null && this.g1 == null) {
Y0(8);
} else if (this.f1 == null && this.k1 && getResources().getBoolean(2131034120)) {
LinearLayout linearLayout = (LinearLayout) findViewById(2131363777);
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) linearLayout.getLayoutParams();
layoutParams.addRule(21);
layoutParams.setMargins(0, 0, 0, 0);
linearLayout.setLayoutParams(layoutParams);
}
if (!this.k1 || (TextUtils.isEmpty(str2) && TextUtils.isEmpty(str3))) {
this.q1.setVisibility(8);
} else {
this.q1.setVisibility(0);
Ac3.b(this.o1, str2, 63);
if (hi.m(this)) {
Glide.b(this).c(this).r(str3).F(this.p1);
}
}
if (this.k1) {
r1();
break;
}
}
break;
}
}
public final void a1(List<Option> list, List<String> list2, List<String> list3, boolean z, String str) {
Boolean valueOf = Boolean.valueOf(z);
jV1 jv1 = ((rp) this).C0;
GR1 gr1 = new GR1();
ArrayList arrayList = new ArrayList();
gr1.c = arrayList;
gr1.g = -1;
gr1.h = Boolean.FALSE;
gr1.e = this;
arrayList.clear();
arrayList.addAll(list);
gr1.l = this;
gr1.i = list2;
gr1.j = list3;
gr1.d = valueOf;
gr1.f = str;
gr1.k = jv1;
this.n1 = gr1;
}
public final void b1(List<Option> list, String str, String str2, boolean z, String str3, boolean z2) {
Boolean valueOf = Boolean.valueOf(z);
jV1 jv1 = ((rp) this).C0;
JR1 jr1 = new JR1();
ArrayList arrayList = new ArrayList();
jr1.c = arrayList;
jr1.g = -1;
Boolean bool = Boolean.FALSE;
jr1.h = bool;
jr1.i = bool;
jr1.e = this;
arrayList.clear();
arrayList.addAll(list);
jr1.m = this;
jr1.j = str;
jr1.k = str2;
jr1.d = valueOf;
jr1.f = str3;
jr1.i = Boolean.valueOf(z2);
jr1.l = jv1;
this.m1 = jr1;
}
public final void c1() {
String str;
List<Questions> list;
if (this.S0 == null && (list = this.R0) != null) {
int size = list.size();
int i = this.Q0 - 1;
if (size > i) {
this.S0 = this.R0.get(i);
}
}
m1();
e1();
((rp) this).C0.c().a.B(this.O0);
List arrayList = new ArrayList();
QuestionsResponse questionsResponse = this.V0;
if (questionsResponse != null) {
arrayList = questionsResponse.getQuestionsResponses();
}
Questions questions = this.S0;
if (questions != null) {
str = questions.getQuestion().get_id();
} else {
List<Questions> u = ((rp) this).C0.c().u(this.O0);
this.R0 = u;
if (u != null && u.size() > 0) {
this.S0 = this.R0.get(this.Q0 - 1);
}
Questions questions2 = this.S0;
str = questions2 != null ? questions2.getQuestion().get_id() : "";
}
this.T0.h(this.P0, new ExercisePauseResponse(this.P0, str, arrayList)).f(this, new kL0(this, 1));
if (TextUtils.isEmpty(((rp) this).C0.c().v())) {
return;
}
String v = ((rp) this).C0.c().v();
v.getClass();
if (v.equals("librarySubjects")) {
finish();
overridePendingTransition(2130772020, 2130772021);
} else {
if (!v.equals("resumeSubjects")) {
finish();
return;
}
Intent intent = new Intent((Context) this, (Class<?>) AppNavigationContainerActivity.class);
intent.setFlags(67108864);
startActivity(intent);
overridePendingTransition(2130772020, 2130772021);
}
}
public final void d1() {
WarningDialog.b1(qe.a(new StringBuilder("Are you sure to Leave the "), this.t1, "?"), "Leave " + this.t1, "warningQBankLeave").show(getSupportFragmentManager(), "Leave " + this.t1);
}
public final void e1() {
if (this.R0 == null) {
finish();
return;
}
ArrayList arrayList = new ArrayList();
int i = 0;
while (true) {
if (i >= this.R0.size()) {
break;
}
Questions questions = this.R0.get(i);
String notes = TextUtils.isEmpty(questions.getNotes()) ? "" : questions.getNotes();
String status = questions.getStatus();
if (status != null && status.equals("Attempted") && (questions.getMarkedSolutions() == null || questions.getMarkedSolutions().isEmpty())) {
status = "Viewed";
}
String str = status;
List arrayList2 = questions.getMarkedSolutions() == null ? new ArrayList() : questions.getMarkedSolutions();
if (questions.getQuestionId() == null) {
rm2.b("At QuizQuestionActivity:", new Exception("question Id fetched is null"));
} else {
arrayList.add(new QuestionsResponses(questions.getQuestion() == null ? false : questions.getQuestion().isBookmarked(), arrayList2, questions.getMarkedSolutionText(), str, questions.getTimeTaken(), questions.getQuestionId(), notes));
}
i++;
}
Questions questions2 = this.S0;
this.V0 = new QuestionsResponse(arrayList, this.P0, questions2 != null ? questions2.getQuestionId() : "", "user");
}
public final void f1(String str) {
switch (str) {
case "clickedLeaveQBank":
d1();
break;
case "clickedReAttempt":
WarningDialog.b1("Are you sure to Reattempt " + this.t1 + "\nYour Previous Responses will be Reset", "Reset & Reattempt", "warningQBankReattempt").show(getSupportFragmentManager(), "Reset & Reattempt");
break;
case "clicked":
WarningDialog.b1("Are you sure you want to Submit " + this.t1, "Submit " + this.t1, "warningSubmitQBank").show(getSupportFragmentManager(), "Submit " + this.t1);
break;
case "clickedPause":
m1();
e1();
ExercisePauseResponse exercisePauseResponse = new ExercisePauseResponse(this.P0, this.S0.getQuestion().get_id(), this.V0.getQuestionsResponses());
T0("Pausing " + this.t1);
this.T0.h(this.P0, exercisePauseResponse).f(this, new tl1(this, 3));
break;
case "clickedReportQues":
l1();
break;
case "clickedPrev":
m1();
this.Q0--;
n1();
break;
}
}
public final void g1(String str) {
if (str == null) {
o1("Submit ");
this.S0.setOptionSelected(false);
this.S0.setSubmitted(true);
this.nextLl.setVisibility(0);
this.S0.setMarkedSolutions(new ArrayList());
this.S0.setMarkedSolutionText("");
if (this.k1) {
this.l1.postDelayed(new b(this), 300L);
return;
}
return;
}
if (this.S0.isSubmitted()) {
return;
}
CountDownTimer countDownTimer = this.r1;
if (countDownTimer != null) {
countDownTimer.cancel();
}
if (TextUtils.isEmpty(str)) {
o1("Skip ");
this.S0.setOptionSelected(false);
} else {
o1("Submit ");
this.S0.setOptionSelected(true);
}
this.nextLl.setVisibility(0);
ArrayList arrayList = new ArrayList();
arrayList.add(str);
this.S0.setMarkedSolutions(arrayList);
this.S0.setMarkedSolutionText("");
if (this.k1) {
this.l1.postDelayed(new c(this), 300L);
}
}
public final void h1(List<String> list) {
if (this.S0.isSubmitted()) {
return;
}
if (list == null) {
o1("Skip ");
this.S0.setOptionSelected(false);
} else if (list.size() == 0) {
o1("Skip ");
this.S0.setOptionSelected(false);
} else {
o1("Submit ");
this.S0.setOptionSelected(true);
}
this.S0.setMarkedSolutions(list);
this.S0.setMarkedSolutionText("");
if (this.k1) {
this.l1.postDelayed(new d(this), 300L);
}
}
public final void i0() {
u1();
}
public final void i1() {
this.S0.setSubmitted(true);
this.S0.setStatus("Attempted");
m1();
p1();
}
public final void j1() {
try {
if (((rp) this).C0.c().v().toLowerCase().contains("QUIZ_ENTRY_POINT_BOOKMARK".toLowerCase())) {
if (hi.l(this)) {
this.nextLl.setVisibility(8);
T0("Loading more Questions");
CN1 cn1 = this.U0;
BookmarkQuestionsPayload bookmarkQuestionsPayload = new BookmarkQuestionsPayload(this.z1, this.A1, this.B1, this.D1, this.C1, this.F1, 20);
cn1.getClass();
Intrinsics.checkNotNullParameter(bookmarkQuestionsPayload, "bookmarkPayload");
lH1 lh1 = new lH1();
Lx.q(Qa1.b(cn1), (CoroutineContext) null, (mV) null, new EN1(false, cn1, bookmarkQuestionsPayload, lh1, (iT) null), 3);
lh1.f(this, new b(this));
} else {
S0();
this.nextSkipSubmitTv.setText("Complete ");
}
}
} catch (Exception e) {
rm2.b("BOOKMARK_LOAD_MORE_QUESTIONS -> ", e);
}
}
public final void k1() {
Zm2 zm2 = this.I0;
String str = this.a1;
String str2 = this.N0;
String str3 = this.u1;
zm2.getClass();
Pair[] pairArr = new Pair[3];
if (str == null) {
str = UW2.e(QW2.a);
}
pairArr[0] = new Pair("subject_name", str);
if (str2 == null) {
str2 = UW2.e(QW2.a);
}
pairArr[1] = new Pair("topic_name", str2);
if (str3 == null) {
str3 = UW2.e(QW2.a);
}
pairArr[2] = new Pair("source", str3);
zm2.c("neet_qbank_submit", Ls1.i(pairArr));
String str4 = this.N0;
String str5 = this.O0;
String str6 = this.P0;
String str7 = this.d1;
String str8 = this.c1;
String str9 = this.Y0;
String str10 = this.t1;
String str11 = this.a1;
String str12 = this.u1;
Intrinsics.checkNotNullParameter(this, "context");
Intrinsics.checkNotNullParameter(str4, "testTitle");
Intrinsics.checkNotNullParameter(str5, "testId");
Intrinsics.checkNotNullParameter(str6, "testMappingId");
Intrinsics.checkNotNullParameter(str7, "programId");
Intrinsics.checkNotNullParameter(str9, "quizEntryPoint");
Intrinsics.checkNotNullParameter(str10, "quizOrQbank");
Intrinsics.checkNotNullParameter(str12, "source");
Intent intent = new Intent((Context) this, (Class<?>) NeetPGQuizFeedbackActivity.class);
intent.putExtra("test_id", str5);
intent.putExtra("test_title", str4);
intent.putExtra("testMappingId", str6);
intent.putExtra("programId", str7);
intent.putExtra("entryPoint", str9);
intent.putExtra("QUIZ_OR_QBANK", str10);
if (str8 != null) {
intent.putExtra("topicName", str8);
}
if (str11 != null) {
intent.putExtra("subjectName", str11);
}
intent.putExtra("source", str12);
startActivity(intent);
finish();
}
public final void l1() {
ReportQuestionDialogNew reportQuestionDialogNew;
m1();
String v = ((rp) this).C0.c().v();
if (v.contains("batch") || v.equals("TODAY_CLASSES") || v.equals("ALL_CLASSES") || v.equals("WEEKLY_SCHEDULE") || v.equals("khazana_quiz")) {
String questionId = this.S0.getQuestionId();
String str = this.c1;
String str2 = this.b1;
String str3 = this.a1;
String str4 = this.Z0;
String str5 = this.N0;
int i = this.Q0;
ReportQuestionDialogNew reportQuestionDialogNew2 = new ReportQuestionDialogNew();
Bundle bundle = new Bundle();
bundle.putString("topicName", str);
bundle.putString("batchName", str2);
bundle.putString("subjectName", str3);
bundle.putString("chapterName", str4);
bundle.putString("exerciseName", str5);
bundle.putString("questionId", questionId);
bundle.putInt("Question Number", i);
bundle.putString("type", "BATCH");
reportQuestionDialogNew2.setArguments(bundle);
reportQuestionDialogNew = reportQuestionDialogNew2;
} else {
String questionId2 = this.S0.getQuestionId();
String str6 = this.c1;
String str7 = this.a1;
String str8 = this.Z0;
String str9 = this.N0;
int i2 = this.Q0;
reportQuestionDialogNew = new ReportQuestionDialogNew();
Bundle bundle2 = new Bundle();
bundle2.putString("topicName", str6);
bundle2.putString("subjectName", str7);
bundle2.putString("chapterName", str8);
bundle2.putString("exerciseName", str9);
bundle2.putString("questionId", questionId2);
bundle2.putInt("Question Number", i2);
bundle2.putString("type", "subject");
reportQuestionDialogNew.setArguments(bundle2);
}
reportQuestionDialogNew.show(getSupportFragmentManager(), "ReportedBookmarkedDialog");
}
public final void m1() {
List<Questions> list = this.R0;
if (list == null) {
return;
}
int size = list.size();
int i = this.Q0;
if (size <= i - 1) {
return;
}
this.R0.set(i - 1, this.S0);
((rp) this).C0.c().Q(this.O0, this.R0);
}
public final void n(String str) {
str.getClass();
switch (str) {
case "warningSubmitQBank":
if (this.Y0.equalsIgnoreCase("QUIZ_ENTRY_POINT_BOOKMARK")) {
finish();
break;
} else {
u1();
break;
}
case "warningQBankReattempt":
T0("Recreating " + this.t1);
bp1 c = ((rp) this).C0.c();
String str2 = this.O0;
c.getClass();
if (!TextUtils.isEmpty(str2)) {
List a = pK0.a(Questions.class, c.a.m(str2));
ArrayList arrayList = new ArrayList();
for (int i = 0; i < a.size(); i++) {
Questions questions = (Questions) a.get(i);
questions.setMarkedSolutionText("");
questions.setTimeTaken(0L);
questions.setStatus("NotViewed");
questions.setMarkedSolutions(new ArrayList());
questions.setOptionSelected(false);
questions.setSubmitted(false);
arrayList.add(questions);
}
c.Q(str2, arrayList);
}
S0();
this.Q0 = 1;
n1();
break;
case "warningQBankLeave":
c1();
break;
}
}
public final void n1() {
this.correctPercentileCard.setVisibility(8);
List<Questions> u = ((rp) this).C0.c().u(this.O0);
this.R0 = u;
if (u == null) {
return;
}
try {
boolean z = true;
Questions questions = u.get(this.Q0 - 1);
this.S0 = questions;
if (!questions.isOptionSelected() && this.S0.getMarkedSolutions() != null && !this.S0.getMarkedSolutions().isEmpty()) {
this.S0.setSubmitted(true);
this.S0.setOptionSelected(true);
this.S0.setStatus("Attempted");
}
if (this.Q0 != this.R0.size()) {
z = false;
}
this.W0 = Boolean.valueOf(z);
if (this.S0.isOptionSelected()) {
this.bottomRl.setVisibility(0);
} else {
this.bottomRl.setVisibility(8);
}
String name = this.S0.getQuestion().getSubTags() == null ? this.N0 : this.S0.getQuestion().getSubTags().isEmpty() ? this.N0 : this.S0.getQuestion().getSubTags().get(0).getName();
Questions questions2 = this.S0;
if (questions2 != null) {
questions2.getQuestion();
this.S0.getQuestion().setType("Single");
}
this.tagNameTv.setText(name);
this.tagNameTv.setVisibility(8);
this.quesNotv.setText(String.valueOf(this.Q0));
if (this.S0 == null) {
return;
}
q1();
p1();
t1();
} catch (Exception e) {
rm2.b("QuizQuestionsActivity :-", e);
}
}
@OnClick
public void nextSubmitQues(View view) {
if (this.S0 == null) {
return;
}
if (!this.nextSkipSubmitTv.getText().equals("Next ") && !this.nextSkipSubmitTv.getText().equals("Skip ")) {
if (this.nextSkipSubmitTv.getText().equals("Submit ")) {
i1();
return;
} else {
if (this.nextSkipSubmitTv.getText().equals("Complete ")) {
finish();
return;
}
return;
}
}
m1();
this.Q0++;
n1();
if (this.S0.isOptionSelected()) {
this.bottomRl.setVisibility(0);
} else {
this.bottomRl.setVisibility(8);
}
}
public final void o1(String str) {
int hashCode = str.hashCode();
char c = 65535;
if (hashCode != -203138328) {
if (hashCode != 75162477) {
if (hashCode == 79944289 && str.equals("Skip ")) {
c = 2;
}
} else if (str.equals("Next ")) {
c = 1;
}
} else if (str.equals("Submit ")) {
c = 0;
}
if (c == 0) {
if (this.Y0.equalsIgnoreCase("QUIZ_ENTRY_POINT_BOOKMARK")) {
this.nextSkipSubmitTv.setText("Complete ");
this.nextLl.setVisibility(0);
return;
} else {
this.nextSkipSubmitTv.setText("Submit ");
this.nextLl.setVisibility(8);
return;
}
}
if (c != 1) {
if (c != 2) {
return;
}
this.nextSkipSubmitTv.setText("Skip ");
this.nextLl.setVisibility(8);
return;
}
this.nextSkipSubmitTv.setText("Next ");
if (!this.W0.booleanValue()) {
this.nextLl.setVisibility(0);
return;
}
if (!this.Y0.equalsIgnoreCase("QUIZ_ENTRY_POINT_BOOKMARK")) {
this.nextLl.setVisibility(8);
return;
}
this.nextLl.setVisibility(0);
if (getResources().getBoolean(2131034120)) {
return;
}
this.M0.setVisibility(8);
}
public final void onBackPressed() {
if (this.Y0.equalsIgnoreCase("QUIZ_ENTRY_POINT_BOOKMARK")) {
finish();
return;
}
if (this.H1) {
ViewGroup viewGroup = (ViewGroup) findViewById(R.id.content);
viewGroup.removeView(viewGroup.findViewWithTag("leave_qbank_bottom_sheet"));
this.H1 = false;
} else {
dx3.a(this, "Leave " + this.t1, qe.a(new StringBuilder("Are you sure you want to leave this "), this.t1, "?"), new yl2(this, 13), new SW0(this, 18));
this.H1 = true;
}
}
public final void onCreate(Bundle bundle) {
super/*rp*/.onCreate(bundle);
if (bundle != null) {
this.I1 = true;
}
setContentView(2131558468);
ButterKnife.b(this);
Kv0 a = kw2.a();
mw2 mw2Var = mw2.a;
this.s1 = a.h.f("quiz_max_attempt_time_ms");
if (!getResources().getBoolean(2131034120)) {
this.M0 = (ImageView) findViewById(2131363282);
}
this.k1 = true;
this.l1 = new Handler();
LinearLayout linearLayout = (LinearLayout) findViewById(2131363606);
LinearLayout linearLayout2 = (LinearLayout) findViewById(2131363739);
this.o1 = (TextView) findViewById(2131363598);
this.p1 = (ImageView) findViewById(2131363597);
this.q1 = (RelativeLayout) findViewById(2131363599);
linearLayout.setOnClickListener(new jY2(this, 5));
linearLayout2.setOnClickListener(new Tq3(this, 3, Objects.equals(((rp) this).C0.c().v(), "batchRecorded") ? "quiz" : "qbank"));
this.questionLl.setOnClickListener(new p02(this, 5));
this.solutionLl.setOnClickListener(new FK1(this, 6));
this.zoomClickHere.setOnClickListener(new Fu(this, 4));
this.bookmarkLl.setOnClickListener(new e1(this, 5));
this.bookmarkResultLl.setOnClickListener(new f1(this, 5));
if (nR.a.booleanValue()) {
this.E1 = "landscape";
} else {
this.E1 = "portrait";
}
this.y1 = getSharedPreferences("quiz_cache", 0);
if (getIntent().hasExtra("topicName")) {
this.c1 = getIntent().getStringExtra("topicName");
}
this.z1 = getIntent().getStringExtra("QBZ_SUBJECT_ID");
this.A1 = getIntent().getStringExtra("QBZ_CHAPTER_ID");
this.B1 = getIntent().getStringExtra("BOOKMARK_TYPE");
this.D1 = getIntent().getStringExtra("BOOKMARK_SORT");
this.C1 = getIntent().getStringExtra("BOOKMARK_SORTING_ORDER");
this.F1 = getIntent().getIntExtra("BOOKMARK_QUESTIONS_SKIP_LIMIT", 0);
this.Y0 = ((rp) this).C0.c().v();
this.N0 = getIntent().getStringExtra("exerciseName");
this.a1 = getIntent().getStringExtra("subjectName");
this.c1 = getIntent().getStringExtra("topicName");
boolean booleanExtra = getIntent().getBooleanExtra("IS_CALCULATOR", false);
String stringExtra = getIntent().getStringExtra("programId");
this.d1 = stringExtra;
if (TextUtils.isEmpty(stringExtra)) {
this.d1 = ((rp) this).C0.c().t();
}
this.O0 = getIntent().getStringExtra("exerciseId");
this.P0 = getIntent().getStringExtra("testMappingId");
this.Q0 = getIntent().getIntExtra("currQuestNo", 1);
this.G1 = getIntent().getBooleanExtra("isNegativeTimerDisabled", false);
String str = this.Y0;
str.getClass();
str.hashCode();
switch (str) {
case "TODAY_CLASSES":
case "batchLive":
case "WEEKLY_SCHEDULE":
case "batchRecorded":
case "ALL_CLASSES":
if (!TextUtils.isEmpty(((rp) this).C0.c().d())) {
this.b1 = ((BatchData) new Gson().d(BatchData.class, ((rp) this).C0.c().d())).getName();
}
if (!TextUtils.isEmpty(((rp) this).C0.c().y())) {
this.a1 = ((Subject) new Gson().d(Subject.class, ((rp) this).C0.c().y())).getSubject();
}
bp1 c = ((rp) this).C0.c();
a aVar = a.O;
if (!TextUtils.isEmpty(c.a.l(aVar))) {
this.Z0 = ((BatchTopicsData) new Gson().d(BatchTopicsData.class, ((rp) this).C0.c().a.l(aVar))).getName();
break;
}
break;
}
ct3.f(this.openCalculater, booleanExtra);
Intrinsics.checkNotNullParameter(this, "owner");
Qt3 viewModelStore = getViewModelStore();
I.c c2 = Pt3.c(this);
SW b = Pt3.b(this);
Intrinsics.checkNotNullParameter(viewModelStore, "store");
Intrinsics.checkNotNullParameter(c2, "factory");
Ot3 b2 = Yd.b(b, "defaultCreationExtras", viewModelStore, c2, b);
EG b3 = Y0.b(h93.class, "modelClass", h93.class, "<this>", h93.class);
Intrinsics.checkNotNullParameter(b3, "modelClass");
this.T0 = Ot3.b(b2, b3);
Intrinsics.checkNotNullParameter(this, "owner");
Qt3 viewModelStore2 = getViewModelStore();
I.c c3 = Pt3.c(this);
SW b4 = Pt3.b(this);
Intrinsics.checkNotNullParameter(viewModelStore2, "store");
Intrinsics.checkNotNullParameter(c3, "factory");
Ot3 b5 = Yd.b(b4, "defaultCreationExtras", viewModelStore2, c3, b4);
EG b6 = Y0.b(CN1.class, "modelClass", CN1.class, "<this>", CN1.class);
Intrinsics.checkNotNullParameter(b6, "modelClass");
this.U0 = Ot3.b(b5, b6);
this.answerEt.addTextChangedListener(new c(this));
n1();
if (this.Y0.contains("BATCH".toLowerCase()) && !TextUtils.isEmpty(((rp) this).C0.g().a())) {
this.h1 = (BatchCredential) new Gson().d(BatchCredential.class, ((rp) this).C0.g().a());
} else if (!TextUtils.isEmpty(((rp) this).C0.g().b())) {
this.i1 = (CourseCredential) new Gson().d(CourseCredential.class, ((rp) this).C0.g().b());
}
if (this.Y0.equalsIgnoreCase("QUIZ_ENTRY_POINT_BOOKMARK")) {
this.submitQbankBtn.setText("Exit ");
}
this.t1 = "Quiz";
if (this.Y0.toLowerCase().contains("QBank".toLowerCase())) {
this.t1 = "Qbank";
}
if (this.Y0.toLowerCase().contains("home_page".toLowerCase())) {
this.t1 = "Qbank";
}
if (this.Y0.toLowerCase().contains("neetpgSearchLanding".toLowerCase())) {
this.t1 = "Qbank";
}
if (this.Y0.toLowerCase().contains("QUIZ_ENTRY_POINT_BOOKMARK".toLowerCase())) {
this.t1 = "Qbank";
}
this.u1 = "quiz";
if (this.Y0.toLowerCase().contains("QBank".toLowerCase())) {
this.u1 = "qbank";
}
if (this.Y0.toLowerCase().contains("home_page".toLowerCase())) {
this.u1 = "home";
}
if (this.Y0.toLowerCase().contains("neetpgSearchLanding".toLowerCase())) {
this.u1 = "search";
}
if (this.Y0.toLowerCase().contains("QUIZ_ENTRY_POINT_BOOKMARK".toLowerCase())) {
this.u1 = "bookmark";
}
Zm2 zm2 = this.I0;
String str2 = this.a1;
String str3 = this.c1;
String str4 = this.N0;
String str5 = this.u1;
zm2.getClass();
Pair[] pairArr = new Pair[4];
if (str2 == null) {
str2 = UW2.e(QW2.a);
}
pairArr[0] = new Pair("subject_name", str2);
if (str3 == null) {
str3 = UW2.e(QW2.a);
}
pairArr[1] = new Pair("chapter_name", str3);
if (str4 == null) {
str4 = UW2.e(QW2.a);
}
pairArr[2] = new Pair("topic_name", str4);
if (str5 == null) {
str5 = UW2.e(QW2.a);
}
pairArr[3] = new Pair("source", str5);
zm2.c("neet_qbank_start", Ls1.i(pairArr));
}
public final void onDestroy() {
this.X0.removeCallbacks(null);
super/*xP0*/.onDestroy();
CountDownTimer countDownTimer = this.r1;
if (countDownTimer != null) {
countDownTimer.cancel();
}
}
public final void onPause() {
this.X0.removeCallbacks(null);
super/*androidx.fragment.app.e*/.onPause();
}
public final void onResume() {
super/*androidx.fragment.app.e*/.onResume();
}
public final void onStop() {
this.X0.removeCallbacks(null);
super/*ag*/.onStop();
}
@OnClick
public void openCalculater(View view) {
Xz xz = this.j1;
if (xz == null || xz.getDialog() == null || !this.j1.getDialog().isShowing() || this.j1.isRemoving()) {
Bundle bundle = new Bundle();
Xz xz2 = new Xz();
xz2.setArguments(bundle);
this.j1 = xz2;
xz2.show(getSupportFragmentManager(), Xz.class.getName());
}
}
@OnClick
public void openMoreDialog(View view) {
boolean isBookmarked;
Questions questions = this.S0;
if (questions != null) {
isBookmarked = questions.getQuestion().isBookmarked();
} else {
List<Questions> u = ((rp) this).C0.c().u(this.O0);
this.R0 = u;
if (u == null) {
return;
}
int size = u.size();
int i = this.Q0;
if (size <= i - 1) {
return;
}
Questions questions2 = this.R0.get(i - 1);
this.S0 = questions2;
isBookmarked = questions2 != null ? questions2.getQuestion().isBookmarked() : false;
}
int i2 = this.Q0;
MoreDialog moreDialog = new MoreDialog(this, 0);
((b) moreDialog).n = moreDialog.getContext().getTheme().obtainStyledAttributes(new int[]{Co2.enableEdgeToEdge}).getBoolean(0, false);
moreDialog.q = this;
moreDialog.r = i2;
moreDialog.s = isBookmarked;
moreDialog.t = "quiz";
Window window = moreDialog.getWindow();
Objects.requireNonNull(window);
window.setBackgroundDrawable(new ColorDrawable(0));
moreDialog.show();
moreDialog.getWindow().setLayout(-1, -1);
WindowManager.LayoutParams attributes = moreDialog.getWindow().getAttributes();
attributes.dimAmount = 0.75f;
moreDialog.getWindow().setAttributes(attributes);
moreDialog.getWindow().addFlags(2);
}
public final void p1() {
throw new UnsupportedOperationException("Method not decompiled: com.penpencil.physicswallah.feature.quiz.presentation.activity.QuizQuestionsActivity.p1():void");
}
@OnClick
public void playSolutionVideo(View view) {
String str;
String str2;
String str3;
String str4;
String str5;
String str6;
String str7;
String str8;
String str9;
Solution solution = this.g1;
if (solution == null) {
Toast.makeText((Context) this, (CharSequence) "No Solution Available for this Question", 0).show();
return;
}
if (TextUtils.isEmpty(solution.getVideoType()) && TextUtils.isEmpty(this.g1.getVideoUrl()) && this.g1.getVideoDetails() == null) {
Toast.makeText((Context) this, (CharSequence) "No Solution Available for this Question", 0).show();
return;
}
if (this.Y0.contains("BATCH".toLowerCase())) {
str = this.h1.c();
str2 = this.h1.m();
Rp3 rp3 = Rp3.b;
str3 = this.S0.getQuestionId();
str4 = "BATCH_QUIZ_QUESTION";
} else if (this.i1 != null) {
str = ((rp) this).C0.c().t();
str2 = this.i1.getSubjectId();
Rp3 rp32 = Rp3.b;
str3 = this.S0.getQuestionId();
str4 = "QBANKS";
} else {
str = "";
str2 = "";
str3 = str2;
str4 = str3;
}
if (this.Y0.equalsIgnoreCase("QUIZ_ENTRY_POINT_BOOKMARK")) {
String typeId = this.S0.getQuestion().getTypeId();
Rp3 rp33 = Rp3.b;
str7 = typeId;
str9 = null;
str5 = null;
str6 = "BOOKMARKS";
str8 = null;
} else {
str5 = str3;
str6 = str4;
str7 = this.O0;
str8 = str;
str9 = str2;
}
String t = ((rp) this).C0.c().t();
Wg0[] wg0Arr = Wg0.a;
HI1.c(this, this.g1, new e(this, new DrmLicensePayload(t, str9, str7, "QBANKS"), str8, str7, str9, str5, str6), this.O0, this.S0.getQuestionId(), this.N0, this.Q0, this.b1, this.a1, this.Z0);
String str10 = Objects.equals(this.u1, "quiz") ? "quiz_solution" : "qbank_solution";
kT1 kt1 = this.L0;
String str11 = this.E1;
VideoDetails videoDetails = this.g1.getVideoDetails();
Objects.requireNonNull(videoDetails);
kt1.e(str11, videoDetails.get_id(), str10);
}
public final void q1() {
String text = this.S0.getQuestion().getText();
if (TextUtils.isEmpty(text)) {
this.questionWebView.setVisibility(8);
} else {
this.questionWebView.setVisibility(0);
String n = hi.n(hi.e(text));
this.v1 = n;
if (!n.isEmpty()) {
this.zoomClickHere.setVisibility(0);
} else if (this.S0.getQuestion().getImageId() == null) {
this.zoomClickHere.setVisibility(8);
} else if (this.S0.getQuestion().getImageId().getImageUrl().isEmpty()) {
this.zoomClickHere.setVisibility(8);
} else {
this.zoomClickHere.setVisibility(0);
}
Af.j(this.questionWebView, text);
}
this.questionIv.layout(0, 0, 0, 0);
if (this.S0.getQuestion().getImageId() != null) {
this.questionIv.setVisibility(0);
File file = new File(iu0.c(this) + "/" + this.O0 + "/" + this.S0.getQuestion().getImageId().get_id() + ".png");
if (TextUtils.isEmpty(((rp) this).C0.c().a.m(this.S0.getQuestion().getImageId().get_id() + ".png"))) {
String str = this.S0.getQuestion().getImageId().getBaseUrl() + this.S0.getQuestion().getImageId().getKey();
if (hi.m(this)) {
Glide.b(this).c(this).r(str).F(this.questionIv);
}
} else if (hi.m(this)) {
Glide.b(this).c(this).o(Uri.fromFile(file)).B(qy2.B()).B(qy2.A(db0.a)).F(this.questionIv);
}
} else {
this.questionIv.setVisibility(8);
}
if (this.S0.getQuestion().isQBGQuestion()) {
this.bookmarkLl.setVisibility(0);
} else {
this.bookmarkLl.setVisibility(8);
}
if (this.S0.getQuestion().getQBGBookmarked()) {
this.bookmarkLabel.setImageResource(2131233297);
this.bookmarkTv.setText("Bookmarked");
this.bookmarkTv.setTextColor(getResources().getColor(2131099943));
this.bookmarkLabelResult.setImageResource(2131233297);
this.bookmarkResultTv.setText("Bookmarked");
this.bookmarkResultTv.setTextColor(getResources().getColor(2131099943));
return;
}
this.bookmarkLabel.setImageResource(2131232549);
this.bookmarkTv.setText("Bookmark");
this.bookmarkTv.setTextColor(getResources().getColor(2131099754));
this.bookmarkLabelResult.setImageResource(2131232549);
this.bookmarkResultTv.setText("Bookmark");
this.bookmarkResultTv.setTextColor(getResources().getColor(2131099754));
}
public final void r1() {
if (TextUtils.isEmpty(this.e1)) {
this.solutionWebView.setVisibility(8);
} else {
this.solutionWebView.setVisibility(0);
this.w1 = hi.n(hi.e(this.e1));
Af.j(this.solutionWebView, this.e1);
}
if (this.f1 == null) {
this.solutionIv.setVisibility(8);
return;
}
this.solutionIv.setVisibility(0);
File file = new File(iu0.c(this) + "/" + this.O0 + "/" + this.f1.get_id() + ".png");
if (file.exists()) {
if (hi.m(this)) {
Glide.f(getApplicationContext()).p(file).B(qy2.B()).B(qy2.A(db0.a)).F(this.solutionIv);
return;
}
return;
}
String str = this.f1.getBaseUrl() + this.f1.getKey();
if (hi.m(this)) {
Glide.b(this).c(this).r(str).F(this.solutionIv);
}
}
public final void s1() {
CountDownTimer countDownTimer = this.r1;
if (countDownTimer != null) {
countDownTimer.cancel();
}
this.r1 = new f(this).start();
}
public final void t1() {
CountDownTimer countDownTimer = this.r1;
if (countDownTimer != null) {
countDownTimer.cancel();
}
Questions questions = this.S0;
if (questions == null || !questions.isSubmitted()) {
this.r1 = new a(this, this.s1 - this.S0.getTimeTaken()).start();
return;
}
long timeTaken = this.s1 - this.S0.getTimeTaken();
Locale locale = Locale.getDefault();
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
this.testTimerTv.setText(String.format(locale, "%02d:%02d", Long.valueOf(timeUnit.toMinutes(timeTaken)), Long.valueOf(timeUnit.toSeconds(timeTaken) - TimeUnit.MINUTES.toSeconds(timeUnit.toMinutes(timeTaken)))));
}
public final void u1() {
if (this.S0 != null) {
m1();
}
e1();
T0("Submitting " + this.t1);
if (!hi.l(this)) {
S0();
Toast.makeText((Context) this, 2132019605, 0).show();
return;
}
h93 h93Var = this.T0;
String str = this.P0;
QuestionsResponse questionsResponse = this.V0;
U23 e = h93Var.b.e();
e.getClass();
lH1 lh1 = new lH1();
e.a.b().submitTest(str, questionsResponse).d(VF2.a()).a(Jc.a()).c(new Q23(lh1));
lh1.f(this, new jo2(this));
}
public final void v1(WZ0 wz0) {
if (wz0 == WZ0.b) {
this.y1.edit().putBoolean("TIME_INFORMATION", true).apply();
s1();
} else if (wz0 == WZ0.a) {
this.x1 = Boolean.valueOf(!this.x1.booleanValue());
s1();
}
}
@OnClick
public void viewAnswer(View view) {
if (this.solutionCv.getVisibility() == 0) {
this.solutionCv.setVisibility(8);
this.viewAnsArrowIv.setImageResource(2131231159);
} else {
this.viewAnsArrowIv.setImageResource(2131231180);
r1();
}
}
public final void X0(Question question, String str) {
NeetBookmarkPayload neetBookmarkPayload;
String str2;
CN1 cn1 = this.U0;
if (((rp) this).C0.c().v().toLowerCase().contains("QUIZ_ENTRY_POINT_BOOKMARK".toLowerCase())) {
String module = question.getModule();
String moduleId = question.getModuleId();
String moduleType = question.getModuleType();
String typeId = question.getTypeId();
String qbgSubjectId = question.getQbgSubjectId();
String qbgChapterId = question.getQbgChapterId();
String qbgTopicId = question.getQbgTopicId();
String testId = question.getTestId();
String subjectId = question.getSubjectId();
String chapterId = question.getChapterId();
String topicId = question.getTopicId();
String qbgQuestionId = question.getQbgQuestionId();
if (question.getQBGBookmarked()) {
QK1[] qk1Arr = QK1.a;
str2 = "DELETE";
} else {
QK1[] qk1Arr2 = QK1.a;
str2 = "CREATE";
}
neetBookmarkPayload = new NeetBookmarkPayload(module, moduleId, moduleType, typeId, qbgSubjectId, qbgChapterId, qbgTopicId, (String) null, testId, subjectId, chapterId, topicId, qbgQuestionId, str2);
} else {
QK1[] qk1Arr3 = QK1.a;
neetBookmarkPayload = new NeetBookmarkPayload("PROGRAM", ((rp) this).C0.c().t(), this.Y0.equalsIgnoreCase("batchRecorded") ? "DPP_QUES" : jpUapeaBzcqRhD.bdX, str, question.getQbgSubjectId(), question.getQbgChapterId(), question.getQbgTopicId() == null ? "" : question.getQbgTopicId(), (String) null, this.O0, question.getSubjectId() == null ? "" : question.getSubjectId(), question.getChapterId() == null ? "" : question.getChapterId(), question.getTopicId() == null ? "" : question.getTopicId(), question.getQbgQuestionId() != null ? question.getQbgQuestionId() : "", question.getQBGBookmarked() ? "DELETE" : "CREATE");
}
NeetBookmarkPayload neetBookmarkPayload2 = neetBookmarkPayload;
boolean z = !this.S0.getQuestion().getQBGBookmarked();
cn1.getClass();
Intrinsics.checkNotNullParameter(neetBookmarkPayload2, "bookmarkPayload");
lH1 lh1 = new lH1();
Lx.q(Qa1.b(cn1), (CoroutineContext) null, (mV) null, new BN1(cn1, neetBookmarkPayload2, z, lh1, (iT) null), 3);
lh1.f(this, new QK0(this, 1));
}
@OnClick
public void onLeaveQBank() {
if (!this.k1) {
d1();
return;
}
if (this.Y0.equalsIgnoreCase("QUIZ_ENTRY_POINT_BOOKMARK")) {
finish();
return;
}
if (this.H1) {
ViewGroup viewGroup = (ViewGroup) findViewById(R.id.content);
viewGroup.removeView(viewGroup.findViewWithTag(PPBOHKTwZMfdl.LVzqDq));
this.H1 = false;
} else {
dx3.a(this, "Submit " + this.t1, qe.a(new StringBuilder("Are you sure you want to submit this "), this.t1, "?"), new wl2(this, 11), new JX1(this, 14));
this.H1 = true;
}
}
}