正在查看: Chaupal v3.2 应用的 OnBoardActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Chaupal v3.2 应用的 OnBoardActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.yupptv.ott.activity;
import ac.b;
import ac.c;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import androidx.appcompat.widget.AppCompatButton;
import androidx.viewpager2.widget.ViewPager2;
import bc.n;
import com.google.gson.d;
import com.yupptv.ott.OTTApplication;
import com.yupptv.ott.enums.ScreenType;
import com.yupptv.ottsdk.model.user.Configs;
import hd.a;
import hd.a0;
import hd.r;
import hd.u;
import hd.x;
import java.util.ArrayList;
import java.util.List;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.j;
import oc.m;
import org.jetbrains.annotations.NotNull;
import sc.h;
public final class OnBoardActivity extends com.yupptv.ott.activity.a {
private ic.a e;
@NotNull
private List<h.a> f = new ArrayList();
private int g = -1;
@NotNull
private final Handler h = new Handler();
private Runnable i;
private LinearLayout j;
private a0 k;
public static final class a extends ViewPager2.i {
a() {
}
public void c(int i) {
super.c(i);
if (OnBoardActivity.this.a0() == i) {
return;
}
OnBoardActivity.this.h0(i);
OnBoardActivity onBoardActivity = OnBoardActivity.this;
onBoardActivity.k0(i, onBoardActivity.b0());
}
}
public static final void d0(OnBoardActivity onBoardActivity, Configs configs, View view) {
Intrinsics.checkNotNullParameter(onBoardActivity, "this$0");
u.f0(onBoardActivity, r.G1, configs != null ? configs.getPrivacyPolicyPageUrl() : null, onBoardActivity.getResources().getString(2131952679));
}
public static final void e0(OnBoardActivity onBoardActivity, View view) {
Intrinsics.checkNotNullParameter(onBoardActivity, "this$0");
u.Q(onBoardActivity, ScreenType.SIGNIN, r.i1, "", 33, false, false);
}
public static final void f0(OnBoardActivity onBoardActivity, m mVar, View view) {
Intrinsics.checkNotNullParameter(onBoardActivity, "this$0");
onBoardActivity.j0(true);
if (mVar != null) {
mVar.g();
}
a0 a0Var = onBoardActivity.k;
if (a0Var != null) {
a0Var.R(false);
}
onBoardActivity.finish();
}
public static final void g0(OnBoardActivity onBoardActivity) {
ViewPager2 viewPager2;
Intrinsics.checkNotNullParameter(onBoardActivity, "this$0");
if (onBoardActivity.g == onBoardActivity.f.size() - 1) {
onBoardActivity.g = -1;
}
ic.a aVar = onBoardActivity.e;
if (aVar == null || (viewPager2 = aVar.e) == null) {
return;
}
viewPager2.setCurrentItem(onBoardActivity.g + 1);
}
public final void Z(int i, LinearLayout linearLayout) {
for (int i2 = 0; i2 < i; i2++) {
ImageView imageView = new ImageView(this);
imageView.setImageResource(2131232361);
imageView.setPadding(12, 0, 12, 0);
if (linearLayout != null) {
linearLayout.addView(imageView);
}
}
}
public final int a0() {
return this.g;
}
public final LinearLayout b0() {
return this.j;
}
public final void c0(boolean z) {
if (z) {
Handler handler = this.h;
if (handler == null || this.i == null) {
if (handler != null) {
handler.removeCallbacksAndMessages(null);
}
} else {
handler.removeCallbacksAndMessages(null);
Handler handler2 = this.h;
Runnable runnable = this.i;
Intrinsics.e(runnable);
handler2.postDelayed(runnable, 3000L);
}
}
}
public final void h0(int i) {
this.g = i;
}
public final void i0() {
if (j.s("chaupal", "chaupal", true) || OTTApplication.k0) {
setRequestedOrientation(1);
} else {
setRequestedOrientation(-1);
}
}
public final void j0(boolean z) {
ProgressBar progressBar;
if (z) {
ic.a aVar = this.e;
progressBar = aVar != null ? aVar.g : null;
if (progressBar == null) {
return;
}
progressBar.setVisibility(0);
return;
}
ic.a aVar2 = this.e;
progressBar = aVar2 != null ? aVar2.g : null;
if (progressBar == null) {
return;
}
progressBar.setVisibility(8);
}
public final void k0(int i, LinearLayout linearLayout) {
Integer valueOf = linearLayout != null ? Integer.valueOf(linearLayout.getChildCount()) : null;
Intrinsics.e(valueOf);
int intValue = valueOf.intValue();
for (int i2 = 0; i2 < intValue; i2++) {
View childAt = linearLayout.getChildAt(i2);
Intrinsics.f(childAt, "null cannot be cast to non-null type android.widget.ImageView");
ImageView imageView = (ImageView) childAt;
if (i == i2) {
imageView.setImageResource(2131232361);
} else {
imageView.setImageResource(2131232362);
}
}
}
public void onBackPressed() {
super/*androidx.activity.ComponentActivity*/.onBackPressed();
finishAffinity();
System.exit(0);
}
protected void onCreate(Bundle bundle) {
AppCompatButton appCompatButton;
TextView textView;
TextView textView2;
ViewPager2 viewPager2;
super/*androidx.fragment.app.h*/.onCreate(bundle);
i0();
ic.a c = ic.a.c(getLayoutInflater());
this.e = c;
setContentView(c != null ? c.b() : null);
j0(false);
ic.a aVar = this.e;
setSupportActionBar(aVar != null ? aVar.j : null);
ic.a aVar2 = this.e;
this.j = aVar2 != null ? aVar2.h : null;
this.k = a0.y(this);
a.C0133a c0133a = hd.a.a;
Context o = OTTApplication.o();
Intrinsics.checkNotNullExpressionValue(o, "getContext(...)");
Configs c2 = c0133a.c(o);
if (c2 != null && c2.getIntroPageMetaData() != null) {
h hVar = (h) new d().h(c2.getIntroPageMetaData(), h.class);
List<h.a> b = hVar.b();
Intrinsics.checkNotNullExpressionValue(b, "getOnBoardItems(...)");
this.f = b;
ic.a aVar3 = this.e;
AppCompatButton appCompatButton2 = aVar3 != null ? aVar3.d : null;
if (appCompatButton2 != null) {
appCompatButton2.setText(hVar.a());
}
}
n nVar = new n(this, this.f);
ic.a aVar4 = this.e;
ViewPager2 viewPager22 = aVar4 != null ? aVar4.e : null;
if (viewPager22 != null) {
viewPager22.setOffscreenPageLimit(2);
}
ic.a aVar5 = this.e;
ViewPager2 viewPager23 = aVar5 != null ? aVar5.e : null;
if (viewPager23 != null) {
viewPager23.setAdapter(nVar);
}
if (!this.f.isEmpty()) {
Z(this.f.size(), this.j);
k0(0, this.j);
ic.a aVar6 = this.e;
if (aVar6 != null && (viewPager2 = aVar6.e) != null) {
viewPager2.j(new a());
}
}
ic.a aVar7 = this.e;
if (aVar7 != null && (textView2 = aVar7.f) != null) {
textView2.setOnClickListener(new b(this, c2));
}
ic.a aVar8 = this.e;
if (aVar8 != null && (textView = aVar8.i) != null) {
textView.setOnClickListener(new ac.a(this));
}
m a2 = x.b().a();
ic.a aVar9 = this.e;
if (aVar9 != null && (appCompatButton = aVar9.d) != null) {
appCompatButton.setOnClickListener(new c(this, a2));
}
this.i = new ac.d(this);
}
public boolean onCreateOptionsMenu(@NotNull Menu menu) {
Intrinsics.checkNotNullParameter(menu, "menu");
MenuInflater menuInflater = getMenuInflater();
Intrinsics.checkNotNullExpressionValue(menuInflater, "getMenuInflater(...)");
menuInflater.inflate(2131689476, menu);
return true;
}
public boolean onOptionsItemSelected(@NotNull MenuItem menuItem) {
Intrinsics.checkNotNullParameter(menuItem, "item");
int itemId = menuItem.getItemId();
if (itemId == 2131428195) {
u.e0(this, r.K1, null);
return true;
}
if (itemId != 2131428389) {
return super/*android.app.Activity*/.onOptionsItemSelected(menuItem);
}
u.e0(this, r.b1, null);
return true;
}
protected void onPause() {
super/*androidx.fragment.app.h*/.onPause();
c0(false);
}
protected void onResume() {
super/*androidx.fragment.app.h*/.onResume();
i0();
}
}