导航菜单

页面标题

页面副标题

Aplazo v2.4.68 - CTInboxActivity.java 源代码

正在查看: Aplazo v2.4.68 应用的 CTInboxActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.clevertap.android.sdk.inbox;

import A2.AbstractC0007g;
import A2.y0;
import B9.N;
import F1.b;
import G1.k;
import I5.A;
import I5.C0356j;
import I5.F;
import I5.Q;
import I5.T;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.C1142a;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.G;
import androidx.fragment.app.L;
import androidx.viewpager.widget.ViewPager;
import b6.r;
import b6.s;
import b6.w;
import com.clevertap.android.sdk.CTInboxStyleConfig;
import com.clevertap.android.sdk.CleverTapInstanceConfig;
import com.clevertap.android.sdk.inapp.V;
import com.google.android.material.tabs.TabLayout;
import com.google.android.material.tabs.h;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Arrays;
import kotlin.jvm.internal.l;
import n6.AbstractC2307a;

public class CTInboxActivity extends L implements r, I5.L {

    public static int f21350J;

    public w f21351A;

    public CTInboxStyleConfig f21352B;

    public TabLayout f21353C;

    public ViewPager f21354D;

    public CleverTapInstanceConfig f21355E;

    public WeakReference f21356F;

    public A f21357G;

    public y0 f21358H;

    public WeakReference f21359I;

    @Override
    public final void g(boolean z6) {
        this.f21358H.c(z6, (Q) this.f21359I.get());
    }

    @Override
    public final void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        try {
            Bundle extras = getIntent().getExtras();
            if (extras == null) {
                throw new IllegalArgumentException();
            }
            this.f21352B = (CTInboxStyleConfig) extras.getParcelable("styleConfig");
            Bundle bundle2 = extras.getBundle("configBundle");
            if (bundle2 != null) {
                this.f21355E = (CleverTapInstanceConfig) bundle2.getParcelable("config");
            }
            A s6 = A.s(getApplicationContext(), this.f21355E);
            this.f21357G = s6;
            if (s6 != null) {
                this.f21356F = new WeakReference(s6);
                this.f21359I = new WeakReference(A.s(this, this.f21355E).f6341b.f6413l);
                this.f21358H = new y0(this, this.f21355E);
            }
            f21350J = getResources().getConfiguration().orientation;
            setContentView(2131558478);
            F f3 = this.f21357G.f6341b.f6405c;
            f3.getClass();
            f3.f6382a = new WeakReference(this);
            Toolbar toolbar = (Toolbar) findViewById(2131363386);
            toolbar.setTitle(this.f21352B.f21126g);
            toolbar.setTitleTextColor(Color.parseColor(this.f21352B.f21127h));
            toolbar.setBackgroundColor(Color.parseColor(this.f21352B.f21125f));
            Drawable d9 = k.d(getResources(), 2131231115, null);
            if (d9 != null) {
                d9.setColorFilter(Color.parseColor(this.f21352B.f21122c), PorterDuff.Mode.SRC_IN);
            }
            toolbar.setNavigationIcon(d9);
            toolbar.setNavigationOnClickListener(new N(this, 5));
            LinearLayout linearLayout = (LinearLayout) findViewById(2131362682);
            linearLayout.setBackgroundColor(Color.parseColor(this.f21352B.f21124e));
            this.f21353C = (TabLayout) linearLayout.findViewById(2131363328);
            this.f21354D = (ViewPager) linearLayout.findViewById(2131363586);
            TextView textView = (TextView) findViewById(2131363006);
            Bundle bundle3 = new Bundle();
            bundle3.putParcelable("config", this.f21355E);
            bundle3.putParcelable("styleConfig", this.f21352B);
            String[] strArr = this.f21352B.f21132n;
            int i10 = 0;
            if (!(strArr != null && strArr.length > 0)) {
                this.f21354D.setVisibility(8);
                this.f21353C.setVisibility(8);
                A a2 = this.f21357G;
                if (a2 != null && a2.o() == 0) {
                    textView.setBackgroundColor(Color.parseColor(this.f21352B.f21124e));
                    textView.setVisibility(0);
                    textView.setText(this.f21352B.f21128i);
                    textView.setTextColor(Color.parseColor(this.f21352B.f21129j));
                    return;
                }
                ((FrameLayout) findViewById(2131362865)).setVisibility(0);
                textView.setVisibility(8);
                boolean z6 = false;
                for (G g10 : getSupportFragmentManager().f18622c.f()) {
                    if (g10.getTag() != null) {
                        if (!g10.getTag().equalsIgnoreCase(this.f21355E.f21134c + ":CT_INBOX_LIST_VIEW_FRAGMENT")) {
                            z6 = true;
                        }
                    }
                }
                if (z6) {
                    return;
                }
                s sVar = new s();
                sVar.setArguments(bundle3);
                FragmentManager supportFragmentManager = getSupportFragmentManager();
                supportFragmentManager.getClass();
                C1142a c1142a = new C1142a(supportFragmentManager);
                c1142a.g(2131362865, sVar, AbstractC0007g.l(new StringBuilder(), this.f21355E.f21134c, ":CT_INBOX_LIST_VIEW_FRAGMENT"), 1);
                c1142a.n(false);
                return;
            }
            this.f21354D.setVisibility(0);
            CTInboxStyleConfig cTInboxStyleConfig = this.f21352B;
            ArrayList arrayList = cTInboxStyleConfig.f21132n == null ? new ArrayList() : new ArrayList(Arrays.asList(cTInboxStyleConfig.f21132n));
            this.f21351A = new w(getSupportFragmentManager(), arrayList.size() + 1);
            this.f21353C.setVisibility(0);
            this.f21353C.setTabGravity(0);
            this.f21353C.setTabMode(1);
            this.f21353C.setSelectedTabIndicatorColor(Color.parseColor(this.f21352B.f21130l));
            this.f21353C.setTabTextColors(Color.parseColor(this.f21352B.f21133o), Color.parseColor(this.f21352B.k));
            this.f21353C.setBackgroundColor(Color.parseColor(this.f21352B.f21131m));
            Bundle bundle4 = (Bundle) bundle3.clone();
            bundle4.putInt("position", 0);
            s sVar2 = new s();
            sVar2.setArguments(bundle4);
            w wVar = this.f21351A;
            String str = this.f21352B.f21123d;
            wVar.f20421f[0] = sVar2;
            wVar.f20422g.add(str);
            while (i10 < arrayList.size()) {
                String str2 = (String) arrayList.get(i10);
                i10++;
                Bundle bundle5 = (Bundle) bundle3.clone();
                bundle5.putInt("position", i10);
                bundle5.putString("filter", str2);
                s sVar3 = new s();
                sVar3.setArguments(bundle5);
                w wVar2 = this.f21351A;
                wVar2.f20421f[i10] = sVar3;
                wVar2.f20422g.add(str2);
                this.f21354D.setOffscreenPageLimit(i10);
            }
            this.f21354D.setAdapter(this.f21351A);
            this.f21351A.notifyDataSetChanged();
            this.f21354D.b(new h(this.f21353C));
            this.f21353C.setupWithViewPager(this.f21354D);
        } catch (Throwable th) {
            T.r("Cannot find a valid notification inbox bundle to show!", th);
        }
    }

    @Override
    public final void onDestroy() {
        F f3 = this.f21357G.f6341b.f6405c;
        f3.getClass();
        f3.f6382a = new WeakReference(null);
        String[] strArr = this.f21352B.f21132n;
        if (strArr != null && strArr.length > 0) {
            for (G g10 : getSupportFragmentManager().f18622c.f()) {
                if (g10 instanceof s) {
                    T.o("Removing fragment - " + g10.toString());
                    getSupportFragmentManager().f18622c.f().remove(g10);
                }
            }
        }
        super.onDestroy();
    }

    @Override
    public final void onRequestPermissionsResult(int i10, String[] strArr, int[] iArr) {
        super.onRequestPermissionsResult(i10, strArr, iArr);
        C0356j.f6538a.a(this, this.f21355E);
        C0356j.f6540c = false;
        CleverTapInstanceConfig cleverTapInstanceConfig = this.f21355E;
        l.e(cleverTapInstanceConfig, "config");
        AbstractC2307a.a(cleverTapInstanceConfig).a().u("updateCacheToDisk", new B4.h(this, 3));
        if (i10 == 102) {
            if (iArr.length <= 0 || iArr[0] != 0) {
                ((V) ((Q) this.f21359I.get())).l(false);
            } else {
                ((V) ((Q) this.f21359I.get())).l(true);
            }
        }
    }

    @Override
    public final void onResume() {
        super.onResume();
        if (!this.f21358H.f472d || Build.VERSION.SDK_INT < 33) {
            return;
        }
        if (b.a(this, "android.permission.POST_NOTIFICATIONS") == 0) {
            ((V) ((Q) this.f21359I.get())).l(true);
        } else {
            ((V) ((Q) this.f21359I.get())).l(false);
        }
    }

    public final b6.h r() {
        b6.h hVar;
        try {
            hVar = (b6.h) this.f21356F.get();
        } catch (Throwable unused) {
            hVar = null;
        }
        if (hVar == null) {
            T o10 = this.f21355E.o();
            String str = this.f21355E.f21134c;
            o10.getClass();
            T.u(str, "InboxActivityListener is null for notification inbox ");
        }
        return hVar;
    }
}