正在查看: MX Player v1.97.8 应用的 CTInboxActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: MX Player v1.97.8 应用的 CTInboxActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.clevertap.android.sdk.inbox;
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.fragment.app.FragmentManager;
import androidx.fragment.app.m;
import androidx.viewpager.widget.ViewPager;
import com.clevertap.android.sdk.CTInboxStyleConfig;
import com.clevertap.android.sdk.CleverTapAPI;
import com.clevertap.android.sdk.CleverTapInstanceConfig;
import com.clevertap.android.sdk.InAppNotificationActivity;
import com.clevertap.android.sdk.customviews.MediaPlayerRecyclerView;
import com.clevertap.android.sdk.inbox.a;
import com.google.android.exoplayer2.f;
import com.google.android.gms.cast.framework.R;
import com.google.android.material.tabs.TabLayout;
import defpackage.by1;
import defpackage.cy1;
import defpackage.hw1;
import defpackage.lo4;
import defpackage.tqa;
import defpackage.tx1;
import defpackage.wx1;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
public class CTInboxActivity extends m implements a.b, lo4 {
public static int l;
public wx1 b;
public CTInboxStyleConfig c;
public TabLayout d;
public ViewPager f;
public CleverTapInstanceConfig g;
public WeakReference<c> h;
public CleverTapAPI i;
public com.clevertap.android.sdk.a j;
public WeakReference<InAppNotificationActivity.d> k;
public class a implements View.OnClickListener {
public a() {
}
@Override
public final void onClick(View view) {
CTInboxActivity.this.finish();
}
}
public class b implements TabLayout.d {
public b() {
}
public final void a(TabLayout.g gVar) {
wx1 wx1Var = CTInboxActivity.this.b;
MediaPlayerRecyclerView mediaPlayerRecyclerView = ((com.clevertap.android.sdk.inbox.a) wx1Var.m[gVar.d]).h;
if (mediaPlayerRecyclerView == null || mediaPlayerRecyclerView.I0 != null) {
return;
}
mediaPlayerRecyclerView.S0(mediaPlayerRecyclerView.G0);
mediaPlayerRecyclerView.T0();
}
public final void b(TabLayout.g gVar) {
f fVar;
MediaPlayerRecyclerView mediaPlayerRecyclerView = ((com.clevertap.android.sdk.inbox.a) CTInboxActivity.this.b.m[gVar.d]).h;
if (mediaPlayerRecyclerView == null || (fVar = mediaPlayerRecyclerView.F0) == null) {
return;
}
fVar.setPlayWhenReady(false);
}
}
public interface c {
void w(CTInboxMessage cTInboxMessage);
void x(CTInboxMessage cTInboxMessage, Bundle bundle, HashMap hashMap);
}
@Override
public final void D5(boolean z) {
this.j.a(z, this.k.get());
}
public final c R5() {
c cVar;
try {
cVar = this.h.get();
} catch (Throwable unused) {
cVar = null;
}
if (cVar == null) {
tqa d = this.g.d();
String str = this.g.b;
d.getClass();
tqa.o(str, "InboxActivityListener is null for notification inbox ");
}
return cVar;
}
@Override
public final void W(int i, CTInboxMessage cTInboxMessage, Bundle bundle, HashMap hashMap, int i2) {
c R5 = R5();
if (R5 != null) {
R5.x(cTInboxMessage, bundle, hashMap);
}
}
public final void onCreate(Bundle bundle) {
int i;
super.onCreate(bundle);
try {
Bundle extras = getIntent().getExtras();
if (extras == null) {
throw new IllegalArgumentException();
}
this.c = (CTInboxStyleConfig) extras.getParcelable("styleConfig");
Bundle bundle2 = extras.getBundle("configBundle");
if (bundle2 != null) {
this.g = (CleverTapInstanceConfig) bundle2.getParcelable("config");
}
CleverTapAPI k = CleverTapAPI.k(getApplicationContext(), this.g);
this.i = k;
if (k != null) {
this.h = new WeakReference<>(k);
this.k = new WeakReference<>(CleverTapAPI.k(this, this.g).b.j);
this.j = new com.clevertap.android.sdk.a(this, this.g);
}
l = getResources().getConfiguration().orientation;
setContentView(2131559224);
this.i.b.b.getClass();
new WeakReference(this);
Toolbar findViewById = findViewById(R.id.toolbar);
findViewById.setTitle(this.c.g);
findViewById.setTitleTextColor(Color.parseColor(this.c.h));
findViewById.setBackgroundColor(Color.parseColor(this.c.f));
Resources resources = getResources();
ThreadLocal threadLocal = zue.a;
Drawable a2 = a.a(resources, 2131233902, (Resources.Theme) null);
if (a2 != null) {
a2.setColorFilter(Color.parseColor(this.c.b), PorterDuff.Mode.SRC_IN);
}
findViewById.setNavigationIcon(a2);
findViewById.setNavigationOnClickListener(new a());
LinearLayout linearLayout = (LinearLayout) findViewById(2131364008);
linearLayout.setBackgroundColor(Color.parseColor(this.c.d));
this.d = linearLayout.findViewById(2131366403);
this.f = linearLayout.findViewById(2131367686);
TextView textView = (TextView) findViewById(2131365165);
Bundle bundle3 = new Bundle();
bundle3.putParcelable("config", this.g);
bundle3.putParcelable("styleConfig", this.c);
String[] strArr = this.c.n;
int i2 = 0;
if (strArr != null && strArr.length > 0) {
this.f.setVisibility(0);
String[] strArr2 = this.c.n;
ArrayList arrayList = strArr2 == null ? new ArrayList() : new ArrayList(Arrays.asList(strArr2));
this.b = new wx1(getSupportFragmentManager(), arrayList.size() + 1);
this.d.setVisibility(0);
this.d.setTabGravity(0);
this.d.setTabMode(1);
this.d.setSelectedTabIndicatorColor(Color.parseColor(this.c.l));
this.d.setTabTextColors(Color.parseColor(this.c.o), Color.parseColor(this.c.k));
this.d.setBackgroundColor(Color.parseColor(this.c.m));
Bundle bundle4 = (Bundle) bundle3.clone();
bundle4.putInt("position", 0);
com.clevertap.android.sdk.inbox.a aVar = new com.clevertap.android.sdk.inbox.a();
aVar.setArguments(bundle4);
wx1 wx1Var = this.b;
String str = this.c.c;
wx1Var.m[0] = aVar;
wx1Var.n.add(str);
while (i2 < arrayList.size()) {
String str2 = (String) arrayList.get(i2);
i2++;
Bundle bundle5 = (Bundle) bundle3.clone();
bundle5.putInt("position", i2);
bundle5.putString("filter", str2);
com.clevertap.android.sdk.inbox.a aVar2 = new com.clevertap.android.sdk.inbox.a();
aVar2.setArguments(bundle5);
wx1 wx1Var2 = this.b;
wx1Var2.m[i2] = aVar2;
wx1Var2.n.add(str2);
this.f.setOffscreenPageLimit(i2);
}
this.f.setAdapter(this.b);
this.b.notifyDataSetChanged();
this.f.b(new TabLayout.h(this.d));
this.d.a(new b());
this.d.setupWithViewPager(this.f);
return;
}
this.f.setVisibility(8);
this.d.setVisibility(8);
CleverTapAPI cleverTapAPI = this.i;
if (cleverTapAPI != null) {
synchronized (cleverTapAPI.b.g.b) {
try {
tx1 tx1Var = cleverTapAPI.b.i.e;
if (tx1Var != null) {
i = tx1Var.d().size();
} else {
tqa f = cleverTapAPI.f();
String c2 = cleverTapAPI.c();
f.getClass();
tqa.e(c2, "Notification Inbox not initialized");
i = -1;
}
} finally {
}
}
if (i == 0) {
textView.setBackgroundColor(Color.parseColor(this.c.d));
textView.setVisibility(0);
textView.setText(this.c.i);
textView.setTextColor(Color.parseColor(this.c.j));
return;
}
}
((FrameLayout) findViewById(2131364599)).setVisibility(0);
textView.setVisibility(8);
boolean z = false;
for (Fragment fragment : getSupportFragmentManager().c.f()) {
if (fragment.getTag() != null) {
if (!fragment.getTag().equalsIgnoreCase(this.g.b + ":CT_INBOX_LIST_VIEW_FRAGMENT")) {
z = true;
}
}
}
if (z) {
return;
}
com.clevertap.android.sdk.inbox.a aVar3 = new com.clevertap.android.sdk.inbox.a();
aVar3.setArguments(bundle3);
FragmentManager supportFragmentManager = getSupportFragmentManager();
androidx.fragment.app.a h = km4.h(supportFragmentManager, supportFragmentManager);
h.f(2131364599, aVar3, z31.h(new StringBuilder(), this.g.b, ":CT_INBOX_LIST_VIEW_FRAGMENT"), 1);
h.j(false);
} catch (Throwable th) {
tqa.l("Cannot find a valid notification inbox bundle to show!", th);
}
}
public final void onDestroy() {
this.i.b.b.getClass();
new WeakReference(null);
String[] strArr = this.c.n;
if (strArr != null && strArr.length > 0) {
for (Fragment fragment : getSupportFragmentManager().c.f()) {
if (fragment instanceof com.clevertap.android.sdk.inbox.a) {
tqa.i("Removing fragment - " + fragment.toString());
getSupportFragmentManager().c.f().remove(fragment);
}
}
}
super.onDestroy();
}
public final void onRequestPermissionsResult(int i, @NonNull String[] strArr, @NonNull int[] iArr) {
super.onRequestPermissionsResult(i, strArr, iArr);
cy1.a(this, this.g);
cy1.c = false;
hw1.b(this.g).a().b("updateCacheToDisk", new by1(this));
if (i == 102) {
if (iArr.length <= 0 || iArr[0] != 0) {
this.k.get().c();
} else {
this.k.get().b();
}
}
}
public final void onResume() {
super.onResume();
if (!this.j.d || Build.VERSION.SDK_INT < 33) {
return;
}
if (qm3.checkSelfPermission(this, "android.permission.POST_NOTIFICATIONS") == 0) {
this.k.get().b();
} else {
this.k.get().c();
}
}
@Override
public final void w(CTInboxMessage cTInboxMessage) {
tqa.i("CTInboxActivity:messageDidShow() called with: data = [null], inboxMessage = [" + cTInboxMessage.n + "]");
tqa.i("CTInboxActivity:didShow() called with: data = [null], inboxMessage = [" + cTInboxMessage.n + "]");
c R5 = R5();
if (R5 != null) {
R5.w(cTInboxMessage);
}
}
}