导航菜单

页面标题

页面副标题

Zepto v25.1.4 - FiveIconStyle.java 源代码

正在查看: Zepto v25.1.4 应用的 FiveIconStyle.java JAVA 源代码文件

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


package com.clevertap.android.pushtemplates.styles;

import android.app.PendingIntent;
import android.content.Context;
import android.os.Bundle;
import android.widget.RemoteViews;
import com.clevertap.android.pushtemplates.PTConstants;
import com.clevertap.android.pushtemplates.R;
import com.clevertap.android.pushtemplates.TemplateRenderer;
import com.clevertap.android.pushtemplates.Utils;
import com.clevertap.android.pushtemplates.content.ContentView;
import com.clevertap.android.pushtemplates.content.FiveIconBigContentView;
import com.clevertap.android.pushtemplates.content.FiveIconSmallContentView;
import com.clevertap.android.pushtemplates.content.PendingIntentFactory;
import com.clevertap.android.sdk.pushnotification.LaunchPendingIntentFactory;
import java.util.ArrayList;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;

@Metadata
public final class FiveIconStyle extends Style {

    public TemplateRenderer f11467b;

    public Bundle f11468c;
    public ContentView d;
    public ContentView e;

    @Override
    public final RemoteViews b(Context context, TemplateRenderer templateRenderer) {
        Intrinsics.checkNotNullParameter(context, "context");
        Intrinsics.checkNotNullParameter(templateRenderer, "renderer");
        Intrinsics.checkNotNullParameter(context, "context");
        Intrinsics.checkNotNullParameter(templateRenderer, "renderer");
        Bundle bundle = this.f11468c;
        Intrinsics.checkNotNullParameter(bundle, "extras");
        FiveIconBigContentView fiveIconBigContentView = new FiveIconBigContentView(R.layout.five_cta_expanded, context, templateRenderer);
        String str = templateRenderer.f11440c;
        if (str == null || str.length() == 0) {
            templateRenderer.f11440c = Utils.f(context);
        }
        fiveIconBigContentView.c(templateRenderer.r);
        ArrayList arrayList = templateRenderer.k;
        Intrinsics.e(arrayList);
        int size = arrayList.size();
        for (int i = 0; i < size; i++) {
            if (i == 0) {
                fiveIconBigContentView.f11463c.setViewVisibility(R.id.cta1, 0);
                int i2 = R.id.cta1;
                ArrayList arrayList2 = templateRenderer.k;
                Intrinsics.e(arrayList2);
                Utils.q(i2, (String) arrayList2.get(i), fiveIconBigContentView.f11463c, context);
                if (PTConstants.f11428a) {
                    fiveIconBigContentView.f11463c.setViewVisibility(R.id.cta1, 8);
                    fiveIconBigContentView.d++;
                }
            } else if (i == 1) {
                fiveIconBigContentView.f11463c.setViewVisibility(R.id.cta2, 0);
                int i3 = R.id.cta2;
                ArrayList arrayList3 = templateRenderer.k;
                Intrinsics.e(arrayList3);
                Utils.q(i3, (String) arrayList3.get(i), fiveIconBigContentView.f11463c, context);
                if (PTConstants.f11428a) {
                    fiveIconBigContentView.d++;
                    fiveIconBigContentView.f11463c.setViewVisibility(R.id.cta2, 8);
                }
            } else if (i == 2) {
                fiveIconBigContentView.f11463c.setViewVisibility(R.id.cta3, 0);
                int i4 = R.id.cta3;
                ArrayList arrayList4 = templateRenderer.k;
                Intrinsics.e(arrayList4);
                Utils.q(i4, (String) arrayList4.get(i), fiveIconBigContentView.f11463c, context);
                if (PTConstants.f11428a) {
                    fiveIconBigContentView.d++;
                    fiveIconBigContentView.f11463c.setViewVisibility(R.id.cta3, 8);
                }
            } else if (i == 3) {
                fiveIconBigContentView.f11463c.setViewVisibility(R.id.cta4, 0);
                int i5 = R.id.cta4;
                ArrayList arrayList5 = templateRenderer.k;
                Intrinsics.e(arrayList5);
                Utils.q(i5, (String) arrayList5.get(i), fiveIconBigContentView.f11463c, context);
                if (PTConstants.f11428a) {
                    fiveIconBigContentView.d++;
                    fiveIconBigContentView.f11463c.setViewVisibility(R.id.cta4, 8);
                }
            } else if (i == 4) {
                fiveIconBigContentView.f11463c.setViewVisibility(R.id.cta5, 0);
                int i6 = R.id.cta5;
                ArrayList arrayList6 = templateRenderer.k;
                Intrinsics.e(arrayList6);
                Utils.q(i6, (String) arrayList6.get(i), fiveIconBigContentView.f11463c, context);
                if (PTConstants.f11428a) {
                    fiveIconBigContentView.d++;
                    fiveIconBigContentView.f11463c.setViewVisibility(R.id.cta5, 8);
                }
            }
        }
        fiveIconBigContentView.f11463c.setImageViewResource(R.id.close, R.drawable.pt_close);
        bundle.putInt("notificationId", templateRenderer.Q);
        bundle.putBoolean("close_system_dialogs", true);
        Object clone = bundle.clone();
        Intrinsics.f(clone, "null cannot be cast to non-null type android.os.Bundle");
        Bundle bundle2 = (Bundle) clone;
        bundle2.putBoolean("cta1", true);
        ArrayList arrayList7 = templateRenderer.l;
        bundle2.putString("wzrk_dl", arrayList7 != null ? (String) arrayList7.get(0) : null);
        StringBuilder sb = new StringBuilder("5cta_1_");
        ArrayList arrayList8 = templateRenderer.l;
        sb.append(arrayList8 != null ? (String) arrayList8.get(0) : null);
        bundle2.putString("wzrk_c2a", sb.toString());
        fiveIconBigContentView.f11463c.setOnClickPendingIntent(R.id.cta1, LaunchPendingIntentFactory.b(context, bundle2));
        Object clone2 = bundle.clone();
        Intrinsics.f(clone2, "null cannot be cast to non-null type android.os.Bundle");
        Bundle bundle3 = (Bundle) clone2;
        bundle3.putBoolean("cta2", true);
        ArrayList arrayList9 = templateRenderer.l;
        bundle3.putString("wzrk_dl", arrayList9 != null ? (String) arrayList9.get(1) : null);
        StringBuilder sb2 = new StringBuilder("5cta_2_");
        ArrayList arrayList10 = templateRenderer.l;
        sb2.append(arrayList10 != null ? (String) arrayList10.get(1) : null);
        bundle3.putString("wzrk_c2a", sb2.toString());
        fiveIconBigContentView.f11463c.setOnClickPendingIntent(R.id.cta2, LaunchPendingIntentFactory.b(context, bundle3));
        Object clone3 = bundle.clone();
        Intrinsics.f(clone3, "null cannot be cast to non-null type android.os.Bundle");
        Bundle bundle4 = (Bundle) clone3;
        bundle4.putBoolean("cta3", true);
        ArrayList arrayList11 = templateRenderer.l;
        bundle4.putString("wzrk_dl", arrayList11 != null ? (String) arrayList11.get(2) : null);
        StringBuilder sb3 = new StringBuilder("5cta_3_");
        ArrayList arrayList12 = templateRenderer.l;
        sb3.append(arrayList12 != null ? (String) arrayList12.get(2) : null);
        bundle4.putString("wzrk_c2a", sb3.toString());
        fiveIconBigContentView.f11463c.setOnClickPendingIntent(R.id.cta3, LaunchPendingIntentFactory.b(context, bundle4));
        ArrayList arrayList13 = templateRenderer.l;
        if (arrayList13 != null && arrayList13.size() > 3) {
            Object clone4 = bundle.clone();
            Intrinsics.f(clone4, "null cannot be cast to non-null type android.os.Bundle");
            Bundle bundle5 = (Bundle) clone4;
            bundle5.putBoolean("cta4", true);
            ArrayList arrayList14 = templateRenderer.l;
            bundle5.putString("wzrk_dl", arrayList14 != null ? (String) arrayList14.get(3) : null);
            StringBuilder sb4 = new StringBuilder("5cta_4_");
            ArrayList arrayList15 = templateRenderer.l;
            sb4.append(arrayList15 != null ? (String) arrayList15.get(3) : null);
            bundle5.putString("wzrk_c2a", sb4.toString());
            fiveIconBigContentView.f11463c.setOnClickPendingIntent(R.id.cta4, LaunchPendingIntentFactory.b(context, bundle5));
        }
        ArrayList arrayList16 = templateRenderer.l;
        if (arrayList16 != null && arrayList16.size() > 4) {
            Object clone5 = bundle.clone();
            Intrinsics.f(clone5, "null cannot be cast to non-null type android.os.Bundle");
            Bundle bundle6 = (Bundle) clone5;
            bundle6.putBoolean("cta5", true);
            ArrayList arrayList17 = templateRenderer.l;
            bundle6.putString("wzrk_dl", arrayList17 != null ? (String) arrayList17.get(4) : null);
            StringBuilder sb5 = new StringBuilder("5cta_5_");
            ArrayList arrayList18 = templateRenderer.l;
            sb5.append(arrayList18 != null ? (String) arrayList18.get(4) : null);
            bundle6.putString("wzrk_c2a", sb5.toString());
            fiveIconBigContentView.f11463c.setOnClickPendingIntent(R.id.cta5, LaunchPendingIntentFactory.b(context, bundle6));
        }
        fiveIconBigContentView.f11463c.setOnClickPendingIntent(R.id.close, PendingIntentFactory.b(context, templateRenderer.Q, bundle, false, 19, templateRenderer));
        Intrinsics.checkNotNullParameter(fiveIconBigContentView, "<set-?>");
        this.e = fiveIconBigContentView;
        return fiveIconBigContentView.f11463c;
    }

    @Override
    public final PendingIntent c(Context context, Bundle bundle, int i) {
        Intrinsics.checkNotNullParameter(context, "context");
        Intrinsics.checkNotNullParameter(bundle, "extras");
        return null;
    }

    @Override
    public final PendingIntent d(Context context, Bundle bundle, int i) {
        Intrinsics.checkNotNullParameter(context, "context");
        Intrinsics.checkNotNullParameter(bundle, "extras");
        return PendingIntentFactory.b(context, i, bundle, true, 13, this.f11467b);
    }

    @Override
    public final RemoteViews e(Context context, TemplateRenderer templateRenderer) {
        Intrinsics.checkNotNullParameter(context, "context");
        Intrinsics.checkNotNullParameter(templateRenderer, "renderer");
        Intrinsics.checkNotNullParameter(context, "context");
        Intrinsics.checkNotNullParameter(templateRenderer, "renderer");
        Bundle bundle = this.f11468c;
        Intrinsics.checkNotNullParameter(bundle, "extras");
        FiveIconSmallContentView fiveIconSmallContentView = new FiveIconSmallContentView(R.layout.five_cta_collapsed, context, templateRenderer);
        String str = templateRenderer.f11440c;
        if (str == null || str.length() == 0) {
            templateRenderer.f11440c = Utils.f(context);
        }
        fiveIconSmallContentView.c(templateRenderer.r);
        ArrayList arrayList = templateRenderer.k;
        Intrinsics.e(arrayList);
        int size = arrayList.size();
        for (int i = 0; i < size; i++) {
            if (i == 0) {
                fiveIconSmallContentView.f11463c.setViewVisibility(R.id.cta1, 0);
                int i2 = R.id.cta1;
                ArrayList arrayList2 = templateRenderer.k;
                Intrinsics.e(arrayList2);
                Utils.q(i2, (String) arrayList2.get(i), fiveIconSmallContentView.f11463c, context);
                if (PTConstants.f11428a) {
                    fiveIconSmallContentView.f11463c.setViewVisibility(R.id.cta1, 8);
                    fiveIconSmallContentView.d++;
                }
            } else if (i == 1) {
                fiveIconSmallContentView.f11463c.setViewVisibility(R.id.cta2, 0);
                int i3 = R.id.cta2;
                ArrayList arrayList3 = templateRenderer.k;
                Intrinsics.e(arrayList3);
                Utils.q(i3, (String) arrayList3.get(i), fiveIconSmallContentView.f11463c, context);
                if (PTConstants.f11428a) {
                    fiveIconSmallContentView.d++;
                    fiveIconSmallContentView.f11463c.setViewVisibility(R.id.cta2, 8);
                }
            } else if (i == 2) {
                fiveIconSmallContentView.f11463c.setViewVisibility(R.id.cta3, 0);
                int i4 = R.id.cta3;
                ArrayList arrayList4 = templateRenderer.k;
                Intrinsics.e(arrayList4);
                Utils.q(i4, (String) arrayList4.get(i), fiveIconSmallContentView.f11463c, context);
                if (PTConstants.f11428a) {
                    fiveIconSmallContentView.d++;
                    fiveIconSmallContentView.f11463c.setViewVisibility(R.id.cta3, 8);
                }
            } else if (i == 3) {
                fiveIconSmallContentView.f11463c.setViewVisibility(R.id.cta4, 0);
                int i5 = R.id.cta4;
                ArrayList arrayList5 = templateRenderer.k;
                Intrinsics.e(arrayList5);
                Utils.q(i5, (String) arrayList5.get(i), fiveIconSmallContentView.f11463c, context);
                if (PTConstants.f11428a) {
                    fiveIconSmallContentView.d++;
                    fiveIconSmallContentView.f11463c.setViewVisibility(R.id.cta4, 8);
                }
            } else if (i == 4) {
                fiveIconSmallContentView.f11463c.setViewVisibility(R.id.cta5, 0);
                int i6 = R.id.cta5;
                ArrayList arrayList6 = templateRenderer.k;
                Intrinsics.e(arrayList6);
                Utils.q(i6, (String) arrayList6.get(i), fiveIconSmallContentView.f11463c, context);
                if (PTConstants.f11428a) {
                    fiveIconSmallContentView.d++;
                    fiveIconSmallContentView.f11463c.setViewVisibility(R.id.cta5, 8);
                }
            }
        }
        fiveIconSmallContentView.f11463c.setImageViewResource(R.id.close, R.drawable.pt_close);
        bundle.putInt("notificationId", templateRenderer.Q);
        bundle.putBoolean("close_system_dialogs", true);
        Object clone = bundle.clone();
        Intrinsics.f(clone, "null cannot be cast to non-null type android.os.Bundle");
        Bundle bundle2 = (Bundle) clone;
        bundle2.putBoolean("cta1", true);
        ArrayList arrayList7 = templateRenderer.l;
        bundle2.putString("wzrk_dl", arrayList7 != null ? (String) arrayList7.get(0) : null);
        StringBuilder sb = new StringBuilder("5cta_1_");
        ArrayList arrayList8 = templateRenderer.l;
        sb.append(arrayList8 != null ? (String) arrayList8.get(0) : null);
        bundle2.putString("wzrk_c2a", sb.toString());
        fiveIconSmallContentView.f11463c.setOnClickPendingIntent(R.id.cta1, LaunchPendingIntentFactory.b(context, bundle2));
        Object clone2 = bundle.clone();
        Intrinsics.f(clone2, "null cannot be cast to non-null type android.os.Bundle");
        Bundle bundle3 = (Bundle) clone2;
        bundle3.putBoolean("cta2", true);
        ArrayList arrayList9 = templateRenderer.l;
        bundle3.putString("wzrk_dl", arrayList9 != null ? (String) arrayList9.get(1) : null);
        StringBuilder sb2 = new StringBuilder("5cta_2_");
        ArrayList arrayList10 = templateRenderer.l;
        sb2.append(arrayList10 != null ? (String) arrayList10.get(1) : null);
        bundle3.putString("wzrk_c2a", sb2.toString());
        fiveIconSmallContentView.f11463c.setOnClickPendingIntent(R.id.cta2, LaunchPendingIntentFactory.b(context, bundle3));
        Object clone3 = bundle.clone();
        Intrinsics.f(clone3, "null cannot be cast to non-null type android.os.Bundle");
        Bundle bundle4 = (Bundle) clone3;
        bundle4.putBoolean("cta3", true);
        ArrayList arrayList11 = templateRenderer.l;
        bundle4.putString("wzrk_dl", arrayList11 != null ? (String) arrayList11.get(2) : null);
        StringBuilder sb3 = new StringBuilder("5cta_3_");
        ArrayList arrayList12 = templateRenderer.l;
        sb3.append(arrayList12 != null ? (String) arrayList12.get(2) : null);
        bundle4.putString("wzrk_c2a", sb3.toString());
        fiveIconSmallContentView.f11463c.setOnClickPendingIntent(R.id.cta3, LaunchPendingIntentFactory.b(context, bundle4));
        ArrayList arrayList13 = templateRenderer.l;
        if (arrayList13 != null && arrayList13.size() > 3) {
            Object clone4 = bundle.clone();
            Intrinsics.f(clone4, "null cannot be cast to non-null type android.os.Bundle");
            Bundle bundle5 = (Bundle) clone4;
            bundle5.putBoolean("cta4", true);
            ArrayList arrayList14 = templateRenderer.l;
            bundle5.putString("wzrk_dl", arrayList14 != null ? (String) arrayList14.get(3) : null);
            StringBuilder sb4 = new StringBuilder("5cta_4_");
            ArrayList arrayList15 = templateRenderer.l;
            sb4.append(arrayList15 != null ? (String) arrayList15.get(3) : null);
            bundle5.putString("wzrk_c2a", sb4.toString());
            fiveIconSmallContentView.f11463c.setOnClickPendingIntent(R.id.cta4, LaunchPendingIntentFactory.b(context, bundle5));
        }
        ArrayList arrayList16 = templateRenderer.l;
        if (arrayList16 != null && arrayList16.size() > 4) {
            Object clone5 = bundle.clone();
            Intrinsics.f(clone5, "null cannot be cast to non-null type android.os.Bundle");
            Bundle bundle6 = (Bundle) clone5;
            bundle6.putBoolean("cta5", true);
            ArrayList arrayList17 = templateRenderer.l;
            bundle6.putString("wzrk_dl", arrayList17 != null ? (String) arrayList17.get(4) : null);
            StringBuilder sb5 = new StringBuilder("5cta_5_");
            ArrayList arrayList18 = templateRenderer.l;
            sb5.append(arrayList18 != null ? (String) arrayList18.get(4) : null);
            bundle6.putString("wzrk_c2a", sb5.toString());
            fiveIconSmallContentView.f11463c.setOnClickPendingIntent(R.id.cta5, LaunchPendingIntentFactory.b(context, bundle6));
        }
        fiveIconSmallContentView.f11463c.setOnClickPendingIntent(R.id.close, PendingIntentFactory.b(context, templateRenderer.Q, bundle, false, 19, templateRenderer));
        Intrinsics.checkNotNullParameter(fiveIconSmallContentView, "<set-?>");
        this.d = fiveIconSmallContentView;
        return fiveIconSmallContentView.f11463c;
    }
}