正在查看: Zepto v25.1.4 应用的 PendingIntentFactory.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Zepto v25.1.4 应用的 PendingIntentFactory.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.clevertap.android.pushtemplates.content;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.os.Parcelable;
import androidx.datastore.preferences.protobuf.Field;
import com.amazonaws.mobileconnectors.remoteconfiguration.internal.ArcusThrottler;
import com.clevertap.android.pushtemplates.PTPushNotificationReceiver;
import com.clevertap.android.pushtemplates.PushTemplateReceiver;
import com.clevertap.android.pushtemplates.TemplateRenderer;
import com.clevertap.android.sdk.Utils;
import com.clevertap.android.sdk.pushnotification.CTNotificationIntentService;
import com.clevertap.android.sdk.pushnotification.LaunchPendingIntentFactory;
import java.util.ArrayList;
import java.util.Random;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
@Metadata
public final class PendingIntentFactory {
public static Intent f11464a;
public static final PendingIntent a(Context context, Bundle bundle, String str, int i) {
Class<CTNotificationIntentService> cls;
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(bundle, "extras");
Intrinsics.checkNotNullParameter(str, "dl");
try {
cls = CTNotificationIntentService.class;
String str2 = CTNotificationIntentService.MAIN_ACTION;
} catch (ClassNotFoundException unused) {
cls = null;
}
boolean i2 = Utils.i(context, cls);
int i3 = Build.VERSION.SDK_INT;
if (i3 >= 31 || !i2) {
bundle.putString("wzrk_dl", str);
PendingIntent a2 = LaunchPendingIntentFactory.a(context, bundle);
Intrinsics.checkNotNullExpressionValue(a2, "{\n extras.put…xtras, context)\n }");
return a2;
}
bundle.putBoolean("autoCancel", true);
bundle.putInt("notificationId", i);
Intent intent = new Intent("com.clevertap.PUSH_EVENT");
f11464a = intent;
intent.putExtras(bundle);
Intent intent2 = f11464a;
Intrinsics.e(intent2);
intent2.putExtra("dl", str);
Intent intent3 = f11464a;
Intrinsics.e(intent3);
intent3.setPackage(context.getPackageName());
Intent intent4 = f11464a;
Intrinsics.e(intent4);
intent4.putExtra("ct_type", "com.clevertap.ACTION_BUTTON_CLICK");
int i4 = i3 >= 23 ? 201326592 : 134217728;
int nextInt = new Random().nextInt();
Intent intent5 = f11464a;
Intrinsics.e(intent5);
PendingIntent service = PendingIntent.getService(context, nextInt, intent5, i4);
Intrinsics.checkNotNullExpressionValue(service, "{\n extras.put…t\n )\n }");
return service;
}
public static final PendingIntent b(Context context, int i, Bundle bundle, boolean z, int i2, TemplateRenderer templateRenderer) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(bundle, "extras");
f11464a = null;
if (z && Build.VERSION.SDK_INT < 31) {
f11464a = new Intent(context, (Class<?>) PTPushNotificationReceiver.class);
} else if (!z) {
f11464a = new Intent(context, (Class<?>) PushTemplateReceiver.class);
}
int i3 = Build.VERSION.SDK_INT;
int i4 = i3 >= 23 ? 67108864 : 0;
int nextInt = new Random().nextInt();
int i5 = 2;
switch (i2) {
case 1:
case 2:
case 3:
break;
case 4:
Intent intent = f11464a;
Intrinsics.e(intent);
intent.putExtra("right_swipe", true);
Intent intent2 = f11464a;
Intrinsics.e(intent2);
intent2.putExtra("notificationId", i);
Intent intent3 = f11464a;
Intrinsics.e(intent3);
intent3.putExtras(bundle);
return d(context, i, bundle, f11464a, nextInt);
case 5:
Intent intent4 = f11464a;
Intrinsics.e(intent4);
intent4.putExtra("right_swipe", false);
Intent intent5 = f11464a;
Intrinsics.e(intent5);
intent5.putExtra("notificationId", i);
Intent intent6 = f11464a;
Intrinsics.e(intent6);
intent6.putExtras(bundle);
return d(context, i, bundle, f11464a, nextInt);
case 6:
return c(context, new Intent(context, (Class<?>) PushTemplateReceiver.class), bundle);
case 7:
bundle.putString("wzrk_dl", templateRenderer != null ? templateRenderer.s : null);
return i3 < 31 ? d(context, i, bundle, f11464a, nextInt) : LaunchPendingIntentFactory.a(context, bundle);
case Field.PACKED_FIELD_NUMBER:
case Field.OPTIONS_FIELD_NUMBER:
case 10:
case 11:
case 12:
switch (i2) {
case Field.PACKED_FIELD_NUMBER:
i5 = 1;
break;
case Field.OPTIONS_FIELD_NUMBER:
break;
case 10:
i5 = 3;
break;
case 11:
i5 = 4;
break;
default:
i5 = 5;
break;
}
Intent intent7 = f11464a;
Intrinsics.e(intent7);
intent7.putExtras(bundle);
Intent intent8 = f11464a;
Intrinsics.e(intent8);
intent8.putExtra("click" + i5, true);
Intent intent9 = f11464a;
Intrinsics.e(intent9);
intent9.putExtra("clickedStar", i5);
Intent intent10 = f11464a;
Intrinsics.e(intent10);
intent10.putExtra("notificationId", i);
Intent intent11 = f11464a;
Intrinsics.e(intent11);
intent11.putExtra("config", (Parcelable) null);
int[] intArray = bundle.getIntArray("requestCodes");
Integer valueOf = intArray != null ? Integer.valueOf(intArray[i5 - 1]) : null;
Intrinsics.e(valueOf);
int intValue = valueOf.intValue();
Intent intent12 = f11464a;
Intrinsics.e(intent12);
return PendingIntent.getBroadcast(context, intValue, intent12, i4);
case 13:
bundle.putString("wzrk_dl", null);
return d(context, i, bundle, f11464a, nextInt);
default:
switch (i2) {
case 19:
Intent intent13 = f11464a;
Intrinsics.e(intent13);
intent13.putExtra("close", true);
Intent intent14 = f11464a;
Intrinsics.e(intent14);
intent14.putExtra("notificationId", i);
Intent intent15 = f11464a;
Intrinsics.e(intent15);
intent15.putExtras(bundle);
Intent intent16 = f11464a;
Intrinsics.e(intent16);
return PendingIntent.getBroadcast(context, nextInt, intent16, i4);
case ArcusThrottler.CAUSE_FAILED_SYNC:
case 29:
case ArcusThrottler.CAUSE_THROTTLED_SYNC:
case 31:
break;
case 21:
Intent intent17 = f11464a;
Intrinsics.e(intent17);
intent17.putExtras(bundle);
Intent intent18 = f11464a;
Intrinsics.e(intent18);
intent18.putExtra("pt_current_position", 0);
Intent intent19 = f11464a;
Intrinsics.e(intent19);
intent19.putExtra("notificationId", i);
Intent intent20 = f11464a;
Intrinsics.e(intent20);
ArrayList arrayList = templateRenderer != null ? templateRenderer.l : null;
Intrinsics.e(arrayList);
intent20.putExtra("pt_buy_now_dl", (String) arrayList.get(0));
Intent intent21 = f11464a;
Intrinsics.e(intent21);
return PendingIntent.getBroadcast(context, nextInt, intent21, i4);
case 22:
Intent intent22 = f11464a;
Intrinsics.e(intent22);
intent22.putExtras(bundle);
Intent intent23 = f11464a;
Intrinsics.e(intent23);
intent23.putExtra("pt_current_position", 1);
Intent intent24 = f11464a;
Intrinsics.e(intent24);
intent24.putExtra("notificationId", i);
Intent intent25 = f11464a;
Intrinsics.e(intent25);
ArrayList arrayList2 = templateRenderer != null ? templateRenderer.l : null;
Intrinsics.e(arrayList2);
intent25.putExtra("pt_buy_now_dl", (String) arrayList2.get(1));
Intent intent26 = f11464a;
Intrinsics.e(intent26);
return PendingIntent.getBroadcast(context, nextInt, intent26, i4);
case 23:
Intent intent27 = f11464a;
Intrinsics.e(intent27);
intent27.putExtras(bundle);
Intent intent28 = f11464a;
Intrinsics.e(intent28);
intent28.putExtra("pt_current_position", 2);
Intent intent29 = f11464a;
Intrinsics.e(intent29);
intent29.putExtra("notificationId", i);
Intent intent30 = f11464a;
Intrinsics.e(intent30);
ArrayList arrayList3 = templateRenderer != null ? templateRenderer.l : null;
Intrinsics.e(arrayList3);
intent30.putExtra("pt_buy_now_dl", (String) arrayList3.get(2));
Intent intent31 = f11464a;
Intrinsics.e(intent31);
return PendingIntent.getBroadcast(context, nextInt, intent31, i4);
case 24:
ArrayList arrayList4 = templateRenderer != null ? templateRenderer.l : null;
Intrinsics.e(arrayList4);
bundle.putString("wzrk_dl", (String) arrayList4.get(0));
return d(context, i, bundle, f11464a, nextInt);
case 25:
ArrayList arrayList5 = templateRenderer != null ? templateRenderer.l : null;
Intrinsics.e(arrayList5);
bundle.putString("wzrk_dl", (String) arrayList5.get(1));
return d(context, i, bundle, f11464a, nextInt);
case 26:
ArrayList arrayList6 = templateRenderer != null ? templateRenderer.l : null;
Intrinsics.e(arrayList6);
bundle.putString("wzrk_dl", (String) arrayList6.get(2));
return d(context, i, bundle, f11464a, nextInt);
case 27:
Intent intent32 = f11464a;
Intrinsics.e(intent32);
intent32.putExtra("img1", true);
Intent intent33 = f11464a;
Intrinsics.e(intent33);
intent33.putExtra("notificationId", i);
Intent intent34 = f11464a;
Intrinsics.e(intent34);
ArrayList arrayList7 = templateRenderer != null ? templateRenderer.l : null;
Intrinsics.e(arrayList7);
intent34.putExtra("pt_buy_now_dl", (String) arrayList7.get(0));
Intent intent35 = f11464a;
Intrinsics.e(intent35);
intent35.putExtra("buynow", true);
Intent intent36 = f11464a;
Intrinsics.e(intent36);
intent36.putExtra("config", (Parcelable) null);
Intent intent37 = f11464a;
Intrinsics.e(intent37);
intent37.putExtras(bundle);
Intent intent38 = f11464a;
Intrinsics.e(intent38);
return PendingIntent.getBroadcast(context, nextInt, intent38, i4);
case 28:
return c(context, new Intent(context, (Class<?>) PushTemplateReceiver.class), bundle);
case 32:
ArrayList arrayList8 = templateRenderer != null ? templateRenderer.l : null;
Intrinsics.e(arrayList8);
if (arrayList8.size() > 0) {
ArrayList arrayList9 = templateRenderer != null ? templateRenderer.l : null;
Intrinsics.e(arrayList9);
bundle.putString("wzrk_dl", (String) arrayList9.get(0));
}
Intent intent39 = f11464a;
Intrinsics.e(intent39);
intent39.putExtra("pt_input_feedback", templateRenderer != null ? templateRenderer.x : null);
Intent intent40 = f11464a;
Intrinsics.e(intent40);
intent40.putExtra("pt_input_auto_open", templateRenderer != null ? templateRenderer.y : null);
Intent intent41 = f11464a;
Intrinsics.e(intent41);
intent41.putExtra("config", (Parcelable) null);
if (templateRenderer.l == null) {
bundle.putString("wzrk_dl", null);
}
return d(context, i, bundle, f11464a, nextInt);
default:
throw new IllegalArgumentException("invalid pendingIntentType");
}
}
if ((templateRenderer != null ? templateRenderer.l : null) != null) {
ArrayList arrayList10 = templateRenderer.l;
Intrinsics.e(arrayList10);
if (arrayList10.size() > 0) {
ArrayList arrayList11 = templateRenderer.l;
Intrinsics.e(arrayList11);
bundle.putString("wzrk_dl", (String) arrayList11.get(0));
return d(context, i, bundle, f11464a, nextInt);
}
}
if (bundle.get("wzrk_dl") == null) {
bundle.putString("wzrk_dl", null);
}
return d(context, i, bundle, f11464a, nextInt);
}
public static final PendingIntent c(Context context, Intent intent, Bundle bundle) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(bundle, "extras");
Intrinsics.checkNotNullParameter(intent, "intent");
intent.putExtras(bundle);
intent.putExtra("pt_dismiss_intent", true);
PendingIntent broadcast = PendingIntent.getBroadcast(context, new Random().nextInt(), intent, Build.VERSION.SDK_INT >= 23 ? 335544320 : 268435456);
Intrinsics.checkNotNullExpressionValue(broadcast, "getBroadcast(\n …chPendingIntent\n )");
return broadcast;
}
public static final PendingIntent d(Context context, int i, Bundle bundle, Intent intent, int i2) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(bundle, "extras");
Object obj = bundle.get("wzrk_dl");
bundle.putInt("notificationId", i);
if (obj != null) {
bundle.putBoolean("default_dl", true);
}
if (intent == null) {
PendingIntent a2 = LaunchPendingIntentFactory.a(context, bundle);
Intrinsics.checkNotNullExpressionValue(a2, "getActivityIntent(extras, context)");
return a2;
}
intent.putExtras(bundle);
intent.removeExtra("wzrk_acts");
intent.putExtra("wzrk_from", "CTPushNotificationReceiver");
intent.setFlags(872415232);
int i3 = 134217728;
if (Build.VERSION.SDK_INT >= 23) {
i3 = 134217728 | (intent.hasExtra("pt_input_feedback") ? 33554432 : 67108864);
}
PendingIntent broadcast = PendingIntent.getBroadcast(context, i2, intent, i3);
Intrinsics.checkNotNullExpressionValue(broadcast, "getBroadcast(\n …ndingIntent\n )");
return broadcast;
}
}