正在查看: Kickcash v16.1 应用的 CTInboxActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Kickcash v16.1 应用的 CTInboxActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.clevertap.android.sdk.inbox;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.ViewPager;
import com.clevertap.android.sdk.CTInboxStyleConfig;
import com.clevertap.android.sdk.CleverTapInstanceConfig;
import com.clevertap.android.sdk.InAppNotificationActivity;
import com.clevertap.android.sdk.R;
import com.clevertap.android.sdk.inbox.g;
import com.clevertap.android.sdk.v;
import com.clevertap.android.sdk.x;
import com.google.android.material.tabs.TabLayout;
import com.microsoft.clarity.w6.z;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.HashMap;
public class CTInboxActivity extends androidx.fragment.app.d implements g.b, z {
public static int L0;
ViewPager E0;
private CleverTapInstanceConfig F0;
private WeakReference<c> G0;
private com.clevertap.android.sdk.h H0;
private com.microsoft.clarity.w6.e I0 = null;
private x J0;
private WeakReference<InAppNotificationActivity.e> K0;
j X;
CTInboxStyleConfig Y;
TabLayout Z;
class a implements View.OnClickListener {
a() {
}
@Override
public void onClick(View view) {
CTInboxActivity.this.finish();
}
}
public interface c {
void a(CTInboxActivity cTInboxActivity, CTInboxMessage cTInboxMessage, Bundle bundle);
void b(CTInboxActivity cTInboxActivity, int i, CTInboxMessage cTInboxMessage, Bundle bundle, HashMap<String, String> hashMap, int i2);
}
private String S() {
return this.F0.d() + ":CT_INBOX_LIST_VIEW_FRAGMENT";
}
@Override
public void D(Context context, int i, CTInboxMessage cTInboxMessage, Bundle bundle, HashMap<String, String> hashMap, int i2) {
Q(bundle, i, cTInboxMessage, hashMap, i2);
}
@Override
public void I(boolean z) {
W(z);
}
void Q(Bundle bundle, int i, CTInboxMessage cTInboxMessage, HashMap<String, String> hashMap, int i2) {
c T = T();
if (T != null) {
T.b(this, i, cTInboxMessage, bundle, hashMap, i2);
}
}
void R(Bundle bundle, CTInboxMessage cTInboxMessage) {
v.r("CTInboxActivity:didShow() called with: data = [" + bundle + "], inboxMessage = [" + cTInboxMessage.f() + "]");
c T = T();
if (T != null) {
T.a(this, cTInboxMessage, bundle);
}
}
c T() {
c cVar;
try {
cVar = this.G0.get();
} catch (Throwable unused) {
cVar = null;
}
if (cVar == null) {
this.F0.o().v(this.F0.d(), "InboxActivityListener is null for notification inbox ");
}
return cVar;
}
void U(c cVar) {
this.G0 = new WeakReference<>(cVar);
}
public void V(InAppNotificationActivity.e eVar) {
this.K0 = new WeakReference<>(eVar);
}
public void W(boolean z) {
this.J0.i(z, this.K0.get());
}
@Override
public void o(Context context, CTInboxMessage cTInboxMessage, Bundle bundle) {
v.r("CTInboxActivity:messageDidShow() called with: data = [" + bundle + "], inboxMessage = [" + cTInboxMessage.f() + "]");
R(bundle, cTInboxMessage);
}
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
try {
Bundle extras = getIntent().getExtras();
if (extras == null) {
throw new IllegalArgumentException();
}
this.Y = (CTInboxStyleConfig) extras.getParcelable("styleConfig");
Bundle bundle2 = extras.getBundle("configBundle");
if (bundle2 != null) {
this.F0 = (CleverTapInstanceConfig) bundle2.getParcelable("config");
}
com.clevertap.android.sdk.h F0 = com.clevertap.android.sdk.h.F0(getApplicationContext(), this.F0);
this.H0 = F0;
if (F0 != null) {
U(F0);
V(com.clevertap.android.sdk.h.F0(this, this.F0).Z().n());
this.J0 = new x(this, this.F0);
}
L0 = getResources().getConfiguration().orientation;
setContentView(R.layout.inbox_activity);
this.H0.Z().i().K(this);
Toolbar findViewById = findViewById(R.id.toolbar);
findViewById.setTitle(this.Y.e());
findViewById.setTitleTextColor(Color.parseColor(this.Y.f()));
findViewById.setBackgroundColor(Color.parseColor(this.Y.d()));
Drawable f = androidx.core.content.res.b.f(getResources(), R.drawable.ct_ic_arrow_back_white_24dp, (Resources.Theme) null);
if (f != null) {
f.setColorFilter(Color.parseColor(this.Y.a()), PorterDuff.Mode.SRC_IN);
}
findViewById.setNavigationIcon(f);
findViewById.setNavigationOnClickListener(new a());
LinearLayout linearLayout = (LinearLayout) findViewById(R.id.inbox_linear_layout);
linearLayout.setBackgroundColor(Color.parseColor(this.Y.c()));
this.Z = (TabLayout) linearLayout.findViewById(R.id.tab_layout);
this.E0 = linearLayout.findViewById(R.id.view_pager);
TextView textView = (TextView) findViewById(R.id.no_message_view);
Bundle bundle3 = new Bundle();
bundle3.putParcelable("config", this.F0);
bundle3.putParcelable("styleConfig", this.Y);
int i = 0;
if (!this.Y.o()) {
this.E0.setVisibility(8);
this.Z.setVisibility(8);
com.clevertap.android.sdk.h hVar = this.H0;
if (hVar != null && hVar.m0() == 0) {
textView.setBackgroundColor(Color.parseColor(this.Y.c()));
textView.setVisibility(0);
textView.setText(this.Y.g());
textView.setTextColor(Color.parseColor(this.Y.h()));
return;
}
((FrameLayout) findViewById(R.id.list_view_fragment)).setVisibility(0);
textView.setVisibility(8);
for (Fragment fragment : getSupportFragmentManager().v0()) {
if (fragment.d0() != null && !fragment.d0().equalsIgnoreCase(S())) {
i = 1;
}
}
if (i == 0) {
g gVar = new g();
gVar.O1(bundle3);
getSupportFragmentManager().m().c(R.id.list_view_fragment, gVar, S()).i();
return;
}
return;
}
this.E0.setVisibility(0);
ArrayList<String> m = this.Y.m();
this.X = new j(getSupportFragmentManager(), m.size() + 1);
this.Z.setVisibility(0);
this.Z.setTabGravity(0);
this.Z.setTabMode(1);
this.Z.setSelectedTabIndicatorColor(Color.parseColor(this.Y.k()));
this.Z.L(Color.parseColor(this.Y.n()), Color.parseColor(this.Y.j()));
this.Z.setBackgroundColor(Color.parseColor(this.Y.l()));
Bundle bundle4 = (Bundle) bundle3.clone();
bundle4.putInt("position", 0);
g gVar2 = new g();
gVar2.O1(bundle4);
this.X.w(gVar2, this.Y.b(), 0);
while (i < m.size()) {
String str = m.get(i);
i++;
Bundle bundle5 = (Bundle) bundle3.clone();
bundle5.putInt("position", i);
bundle5.putString("filter", str);
g gVar3 = new g();
gVar3.O1(bundle5);
this.X.w(gVar3, str, i);
this.E0.setOffscreenPageLimit(i);
}
this.E0.setAdapter(this.X);
this.X.j();
this.E0.c(new TabLayout.h(this.Z));
this.Z.d(new b());
this.Z.setupWithViewPager(this.E0);
} catch (Throwable th) {
v.u("Cannot find a valid notification inbox bundle to show!", th);
}
}
protected void onDestroy() {
this.H0.Z().i().K(null);
if (this.Y.o()) {
for (Fragment fragment : getSupportFragmentManager().v0()) {
if (fragment instanceof g) {
v.r("Removing fragment - " + fragment.toString());
getSupportFragmentManager().v0().remove(fragment);
}
}
}
super.onDestroy();
}
public void onRequestPermissionsResult(int i, @NonNull String[] strArr, @NonNull int[] iArr) {
super.onRequestPermissionsResult(i, strArr, iArr);
boolean z = false;
com.microsoft.clarity.w6.i.c(this, this.F0).e(false);
com.microsoft.clarity.w6.i.f(this, this.F0);
if (i == 102) {
if (iArr.length > 0 && iArr[0] == 0) {
z = true;
}
if (z) {
this.K0.get().c();
} else {
this.K0.get().b();
}
}
}
protected void onResume() {
super.onResume();
if (!this.J0.c() || Build.VERSION.SDK_INT < 33) {
return;
}
if (androidx.core.content.a.a(this, "android.permission.POST_NOTIFICATIONS") == 0) {
this.K0.get().c();
} else {
this.K0.get().b();
}
}
class b implements TabLayout.d {
b() {
}
@Override
public void b(TabLayout.g gVar) {
g gVar2 = (g) CTInboxActivity.this.X.t(gVar.g());
if (gVar2.k2() != null) {
gVar2.k2().D1();
}
}
@Override
public void c(TabLayout.g gVar) {
g gVar2 = (g) CTInboxActivity.this.X.t(gVar.g());
if (gVar2.k2() != null) {
gVar2.k2().C1();
}
}
@Override
public void a(TabLayout.g gVar) {
}
}
}