正在查看: Hopscotch v9.7.2 应用的 PushTemplateReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Hopscotch v9.7.2 应用的 PushTemplateReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.clevertap.android.pushtemplates;
import android.annotation.SuppressLint;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.text.Html;
import android.text.format.DateUtils;
import android.widget.RemoteViews;
import androidx.core.app.j0;
import androidx.core.app.t;
import androidx.core.app.w;
import com.clevertap.android.sdk.CleverTapInstanceConfig;
import com.clevertap.android.sdk.n1;
import com.clevertap.android.sdk.pushnotification.CTNotificationIntentService;
import com.clevertap.android.sdk.u;
import com.facebook.common.util.UriUtil;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.concurrent.Callable;
public class PushTemplateReceiver extends BroadcastReceiver {
private u cleverTapAPI;
private CleverTapInstanceConfig config;
private RemoteViews contentViewBig;
private RemoteViews contentViewManualCarousel;
private RemoteViews contentViewRating;
private RemoteViews contentViewSmall;
private NotificationManager notificationManager;
private String pt_big_img;
private String pt_big_img_alt;
private boolean pt_dismiss_intent;
private String pt_id;
private String pt_meta_clr;
private String pt_msg;
private String pt_msg_summary;
private String pt_product_display_linear;
private String pt_rating_default_dl;
private String pt_rating_toast;
private String pt_small_icon_clr;
private String pt_subtitle;
private String pt_title;
private boolean requiresChannelId;
private i templateType;
public final boolean a = true;
private ArrayList<String> imageList = new ArrayList<>();
private ArrayList<String> deepLinkList = new ArrayList<>();
private ArrayList<String> bigTextList = new ArrayList<>();
private ArrayList<String> smallTextList = new ArrayList<>();
private ArrayList<String> priceList = new ArrayList<>();
private int smallIcon = 0;
public class a implements Callable<Void> {
public final Context a;
public final Intent b;
public final Bundle c;
public a(Context context, Intent intent, Bundle bundle) {
this.a = context;
this.b = intent;
this.c = bundle;
}
@Override
public final Void call() throws Exception {
PushTemplateReceiver pushTemplateReceiver = PushTemplateReceiver.this;
try {
boolean z = pushTemplateReceiver.pt_dismiss_intent;
Intent intent = this.b;
Context context = this.a;
if (z) {
k.c(context);
k.b(context, intent);
} else if (pushTemplateReceiver.templateType != null) {
int i = b.a[pushTemplateReceiver.templateType.ordinal()];
Bundle bundle = this.c;
if (i == 1) {
PushTemplateReceiver.c(pushTemplateReceiver, context, intent, bundle);
} else if (i == 2) {
PushTemplateReceiver.d(pushTemplateReceiver, context, bundle);
} else if (i == 3) {
PushTemplateReceiver.e(pushTemplateReceiver, context, bundle);
} else if (i == 4) {
PushTemplateReceiver.f(pushTemplateReceiver, context, intent, bundle);
} else if (i == 5) {
PushTemplateReceiver.g(pushTemplateReceiver, context, bundle);
}
}
return null;
} catch (Throwable th) {
com.clevertap.android.pushtemplates.b.b("Couldn't render notification: " + th.getLocalizedMessage());
return null;
}
}
}
public static class b {
public static final int[] a;
static {
int[] iArr = new int[i.values().length];
a = iArr;
try {
iArr[i.RATING.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
a[i.FIVE_ICONS.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
a[i.PRODUCT_DISPLAY.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
a[i.INPUT_BOX.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
a[i.MANUAL_CAROUSEL.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
}
}
public static void c(PushTemplateReceiver pushTemplateReceiver, Context context, Intent intent, Bundle bundle) {
Class<CTNotificationIntentService> cls;
pushTemplateReceiver.getClass();
try {
int i = bundle.getInt("notificationId");
if (bundle.getBoolean("default_dl", false)) {
pushTemplateReceiver.config = (CleverTapInstanceConfig) bundle.getParcelable("config");
pushTemplateReceiver.notificationManager.cancel(i);
try {
cls = CTNotificationIntentService.class;
String str = CTNotificationIntentService.MAIN_ACTION;
} catch (ClassNotFoundException unused) {
com.clevertap.android.pushtemplates.b.a("No Intent Service found");
cls = null;
}
if (n1.g(context, cls)) {
Intent intent2 = new Intent(CTNotificationIntentService.MAIN_ACTION);
intent2.setPackage(context.getPackageName());
intent2.putExtra("ct_type", CTNotificationIntentService.TYPE_BUTTON_CLICK);
intent2.putExtras(bundle);
intent2.putExtra("dl", pushTemplateReceiver.pt_rating_default_dl);
context.startService(intent2);
return;
}
Intent intent3 = new Intent("android.intent.action.VIEW", Uri.parse(pushTemplateReceiver.pt_rating_default_dl));
intent3.removeExtra("wzrk_acts");
intent3.putExtra("wzrk_from", "CTPushNotificationReceiver");
intent3.setFlags(872415232);
CleverTapInstanceConfig cleverTapInstanceConfig = pushTemplateReceiver.config;
u G = cleverTapInstanceConfig != null ? u.G(context, cleverTapInstanceConfig, null) : u.v(context, null);
if (G != null) {
G.T(bundle);
}
intent3.putExtras(bundle);
intent3.putExtra("wzrk_dl", pushTemplateReceiver.pt_rating_default_dl);
context.startActivity(intent3);
return;
}
String str2 = pushTemplateReceiver.deepLinkList.get(0);
if (1 == bundle.getInt("clickedStar", 0)) {
bundle.putString("wzrk_c2a", "rating_1");
if (pushTemplateReceiver.deepLinkList.size() > 0) {
str2 = pushTemplateReceiver.deepLinkList.get(0);
}
}
if (2 == bundle.getInt("clickedStar", 0)) {
bundle.putString("wzrk_c2a", "rating_2");
str2 = pushTemplateReceiver.deepLinkList.size() > 1 ? pushTemplateReceiver.deepLinkList.get(1) : pushTemplateReceiver.deepLinkList.get(0);
}
if (3 == bundle.getInt("clickedStar", 0)) {
bundle.putString("wzrk_c2a", "rating_3");
str2 = pushTemplateReceiver.deepLinkList.size() > 2 ? pushTemplateReceiver.deepLinkList.get(2) : pushTemplateReceiver.deepLinkList.get(0);
}
if (4 == bundle.getInt("clickedStar", 0)) {
bundle.putString("wzrk_c2a", "rating_4");
str2 = pushTemplateReceiver.deepLinkList.size() > 3 ? pushTemplateReceiver.deepLinkList.get(3) : pushTemplateReceiver.deepLinkList.get(0);
}
if (5 == bundle.getInt("clickedStar", 0)) {
bundle.putString("wzrk_c2a", "rating_5");
str2 = pushTemplateReceiver.deepLinkList.size() > 4 ? pushTemplateReceiver.deepLinkList.get(4) : pushTemplateReceiver.deepLinkList.get(0);
}
int i2 = Build.VERSION.SDK_INT;
if (i2 < 23) {
bundle.putString("extras_from", "PTReceiver");
Bundle bundle2 = (Bundle) bundle.clone();
com.clevertap.android.sdk.interfaces.d z = u.z();
if (z != null) {
z.a(context, "FCM", bundle);
bundle2.putString("wzrk_dl", str2);
k.q(context, pushTemplateReceiver.config, k.a(bundle));
pushTemplateReceiver.h(context, bundle2, i, str2, pushTemplateReceiver.config);
return;
}
return;
}
Notification m = k.m(i, context);
if (m == null) {
com.clevertap.android.pushtemplates.b.b("Rating Notification is null, returning");
return;
}
pushTemplateReceiver.contentViewRating = m.bigContentView;
pushTemplateReceiver.contentViewSmall = m.contentView;
if (1 == bundle.getInt("clickedStar", 0)) {
pushTemplateReceiver.contentViewRating.setImageViewResource(e.star1, d.pt_star_filled);
} else {
pushTemplateReceiver.contentViewRating.setImageViewResource(e.star1, d.pt_star_outline);
}
if (2 == bundle.getInt("clickedStar", 0)) {
RemoteViews remoteViews = pushTemplateReceiver.contentViewRating;
int i3 = e.star1;
int i4 = d.pt_star_filled;
remoteViews.setImageViewResource(i3, i4);
pushTemplateReceiver.contentViewRating.setImageViewResource(e.star2, i4);
} else {
pushTemplateReceiver.contentViewRating.setImageViewResource(e.star2, d.pt_star_outline);
}
if (3 == bundle.getInt("clickedStar", 0)) {
RemoteViews remoteViews2 = pushTemplateReceiver.contentViewRating;
int i5 = e.star1;
int i6 = d.pt_star_filled;
remoteViews2.setImageViewResource(i5, i6);
pushTemplateReceiver.contentViewRating.setImageViewResource(e.star2, i6);
pushTemplateReceiver.contentViewRating.setImageViewResource(e.star3, i6);
} else {
pushTemplateReceiver.contentViewRating.setImageViewResource(e.star3, d.pt_star_outline);
}
if (4 == bundle.getInt("clickedStar", 0)) {
RemoteViews remoteViews3 = pushTemplateReceiver.contentViewRating;
int i7 = e.star1;
int i8 = d.pt_star_filled;
remoteViews3.setImageViewResource(i7, i8);
pushTemplateReceiver.contentViewRating.setImageViewResource(e.star2, i8);
pushTemplateReceiver.contentViewRating.setImageViewResource(e.star3, i8);
pushTemplateReceiver.contentViewRating.setImageViewResource(e.star4, i8);
} else {
pushTemplateReceiver.contentViewRating.setImageViewResource(e.star4, d.pt_star_outline);
}
if (5 == bundle.getInt("clickedStar", 0)) {
RemoteViews remoteViews4 = pushTemplateReceiver.contentViewRating;
int i9 = e.star1;
int i10 = d.pt_star_filled;
remoteViews4.setImageViewResource(i9, i10);
pushTemplateReceiver.contentViewRating.setImageViewResource(e.star2, i10);
pushTemplateReceiver.contentViewRating.setImageViewResource(e.star3, i10);
pushTemplateReceiver.contentViewRating.setImageViewResource(e.star4, i10);
pushTemplateReceiver.contentViewRating.setImageViewResource(e.star5, i10);
} else {
pushTemplateReceiver.contentViewRating.setImageViewResource(e.star5, d.pt_star_outline);
}
int i11 = i2 >= 23 ? 201326592 : 134217728;
for (int i12 : intent.getIntArrayExtra("requestCodes")) {
PendingIntent.getBroadcast(context, i12, intent, i11).cancel();
}
bundle.putString("wzrk_dl", str2);
pushTemplateReceiver.contentViewRating.setOnClickPendingIntent(e.tVRatingConfirmation, com.clevertap.android.sdk.pushnotification.f.a(context, bundle));
pushTemplateReceiver.k(context);
w wVar = new w(context, m);
Notification notification = wVar.P;
PendingIntent c = com.clevertap.android.pushtemplates.content.g.c(context, bundle, new Intent(context, (Class<?>) PushTemplateReceiver.class));
if (pushTemplateReceiver.notificationManager != null) {
notification.icon = pushTemplateReceiver.smallIcon;
wVar.G = pushTemplateReceiver.contentViewSmall;
wVar.H = pushTemplateReceiver.contentViewRating;
wVar.e = w.b(pushTemplateReceiver.pt_title);
notification.deleteIntent = c;
wVar.d(16, true);
pushTemplateReceiver.notificationManager.notify(i, wVar.a());
}
k.q(context, pushTemplateReceiver.config, k.a(bundle));
if (Build.VERSION.SDK_INT < 31) {
pushTemplateReceiver.h(context, bundle, i, str2, pushTemplateReceiver.config);
}
} catch (Throwable th) {
com.clevertap.android.pushtemplates.b.c("Error creating rating notification ", th);
}
}
public static void d(PushTemplateReceiver pushTemplateReceiver, Context context, Bundle bundle) {
pushTemplateReceiver.getClass();
int i = bundle.getInt("notificationId");
bundle.putString("wzrk_dl", null);
if (pushTemplateReceiver.a == bundle.getBoolean("close")) {
bundle.putString("wzrk_c2a", "5cta_close");
pushTemplateReceiver.notificationManager.cancel(i);
}
CleverTapInstanceConfig cleverTapInstanceConfig = pushTemplateReceiver.config;
u G = cleverTapInstanceConfig != null ? u.G(context, cleverTapInstanceConfig, null) : u.v(context, null);
if (G != null) {
G.T(bundle);
}
}
public static void e(com.clevertap.android.pushtemplates.PushTemplateReceiver r13, android.content.Context r14, android.os.Bundle r15) {
throw new UnsupportedOperationException("Method not decompiled: com.clevertap.android.pushtemplates.PushTemplateReceiver.e(com.clevertap.android.pushtemplates.PushTemplateReceiver, android.content.Context, android.os.Bundle):void");
}
public static void f(PushTemplateReceiver pushTemplateReceiver, Context context, Intent intent, Bundle bundle) {
androidx.core.app.u uVar;
Intent launchIntentForPackage;
pushTemplateReceiver.getClass();
Bundle b2 = j0.a.b(intent);
PendingIntent c = com.clevertap.android.pushtemplates.content.g.c(context, bundle, new Intent(context, (Class<?>) PushTemplateReceiver.class));
pushTemplateReceiver.config = (CleverTapInstanceConfig) bundle.getParcelable("config");
if (b2 != null) {
CharSequence charSequence = b2.getCharSequence("pt_input_reply");
int i = bundle.getInt("notificationId");
if (charSequence == null) {
com.clevertap.android.pushtemplates.b.b("PushTemplateReceiver: Input is Empty");
return;
}
com.clevertap.android.pushtemplates.b.b("Processing Input from Input Template");
bundle.putString("pt_input_reply", charSequence.toString());
CleverTapInstanceConfig cleverTapInstanceConfig = pushTemplateReceiver.config;
u G = cleverTapInstanceConfig != null ? u.G(context, cleverTapInstanceConfig, null) : u.v(context, null);
String string = bundle.getString("pt_input_reply");
HashMap hashMap = new HashMap();
for (String str : bundle.keySet()) {
if (str.contains("pt_event_property")) {
if (bundle.getString(str) == null || bundle.getString(str).isEmpty()) {
com.clevertap.android.pushtemplates.b.b("Property Key is Empty. Skipping Property: ".concat(str));
} else if (str.contains("pt_event_property_")) {
String[] split = str.split("pt_event_property_");
if (bundle.getString(str).equalsIgnoreCase("pt_input_reply")) {
hashMap.put(split[1], string);
} else {
hashMap.put(split[1], bundle.getString(str));
}
} else {
com.clevertap.android.pushtemplates.b.b("Property " + str + " does not have the separator");
}
}
}
String j = k.j(bundle);
if (j != null && !j.isEmpty()) {
if (G != null) {
G.R(j, hashMap);
} else {
com.clevertap.android.pushtemplates.b.a("CleverTap instance is NULL, not raising the event");
}
}
w wVar = pushTemplateReceiver.requiresChannelId ? new w(context, "pt_silent_sound_channel") : new w(context);
pushTemplateReceiver.k(context);
if (Build.VERSION.SDK_INT >= 31) {
wVar.q = w.b(pushTemplateReceiver.pt_subtitle);
}
int i2 = pushTemplateReceiver.smallIcon;
Notification notification = wVar.P;
notification.icon = i2;
wVar.e = w.b(pushTemplateReceiver.pt_title);
wVar.f = w.b(bundle.getString("pt_input_feedback"));
wVar.M = 1300L;
notification.deleteIntent = c;
notification.when = System.currentTimeMillis();
wVar.d(16, true);
String str2 = pushTemplateReceiver.pt_big_img_alt;
if (str2 == null || !str2.startsWith(UriUtil.HTTP_SCHEME)) {
androidx.core.app.u uVar2 = new androidx.core.app.u();
uVar2.l(bundle.getString("pt_input_feedback"));
uVar = uVar2;
} else {
try {
Bitmap l = k.l(context, str2);
if (l == null) {
throw new Exception("Failed to fetch big picture!");
}
t tVar = new t();
tVar.o(bundle.getString("pt_input_feedback"));
tVar.n(l);
uVar = tVar;
} catch (Throwable th) {
androidx.core.app.u uVar3 = new androidx.core.app.u();
uVar3.l(bundle.getString("pt_input_feedback"));
com.clevertap.android.pushtemplates.b.c("Falling back to big text notification, couldn't fetch big picture", th);
uVar = uVar3;
}
}
wVar.h(uVar);
pushTemplateReceiver.notificationManager.notify(i, wVar.a());
if (Build.VERSION.SDK_INT < 31) {
if (bundle.getString("pt_input_auto_open") != null || bundle.getBoolean("pt_input_auto_open")) {
try {
Thread.sleep(1300L);
} catch (InterruptedException e) {
e.printStackTrace();
}
if (!bundle.containsKey("wzrk_dl") || bundle.getString("wzrk_dl") == null) {
launchIntentForPackage = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName());
if (launchIntentForPackage == null) {
return;
}
} else {
launchIntentForPackage = new Intent("android.intent.action.VIEW", Uri.parse(intent.getStringExtra("wzrk_dl")));
k.s(context, launchIntentForPackage);
}
launchIntentForPackage.putExtras(bundle);
launchIntentForPackage.putExtra("pt_reply", charSequence);
launchIntentForPackage.removeExtra("wzrk_acts");
launchIntentForPackage.setFlags(872415232);
context.startActivity(launchIntentForPackage);
}
}
}
}
public static void g(PushTemplateReceiver pushTemplateReceiver, Context context, Bundle bundle) {
int size;
pushTemplateReceiver.getClass();
try {
if (Build.VERSION.SDK_INT < 23) {
bundle.putString("extras_from", "PTReceiver");
com.clevertap.android.sdk.interfaces.d z = u.z();
if (z != null) {
z.a(context, "FCM", bundle);
return;
}
return;
}
int i = bundle.getInt("notificationId");
Notification m = k.m(i, context);
if (m == null) {
com.clevertap.android.pushtemplates.b.b("Manual Carousel Notification is null, returning");
return;
}
RemoteViews remoteViews = m.bigContentView;
pushTemplateReceiver.contentViewManualCarousel = remoteViews;
pushTemplateReceiver.contentViewSmall = m.contentView;
pushTemplateReceiver.i(remoteViews, context);
boolean z2 = bundle.getBoolean("right_swipe");
pushTemplateReceiver.imageList = bundle.getStringArrayList("pt_image_list");
pushTemplateReceiver.deepLinkList = bundle.getStringArrayList("pt_deeplink_list");
int i2 = bundle.getInt("pt_manual_carousel_current");
if (z2) {
pushTemplateReceiver.contentViewManualCarousel.showNext(e.carousel_image);
pushTemplateReceiver.contentViewManualCarousel.showNext(e.carousel_image_right);
pushTemplateReceiver.contentViewManualCarousel.showNext(e.carousel_image_left);
size = i2 == pushTemplateReceiver.imageList.size() - 1 ? 0 : i2 + 1;
} else {
pushTemplateReceiver.contentViewManualCarousel.showPrevious(e.carousel_image);
pushTemplateReceiver.contentViewManualCarousel.showPrevious(e.carousel_image_right);
pushTemplateReceiver.contentViewManualCarousel.showPrevious(e.carousel_image_left);
size = i2 == 0 ? pushTemplateReceiver.imageList.size() - 1 : i2 - 1;
}
String str = "";
ArrayList<String> arrayList = pushTemplateReceiver.deepLinkList;
if (arrayList == null || arrayList.size() != pushTemplateReceiver.imageList.size()) {
ArrayList<String> arrayList2 = pushTemplateReceiver.deepLinkList;
if (arrayList2 == null || arrayList2.size() != 1) {
ArrayList<String> arrayList3 = pushTemplateReceiver.deepLinkList;
if (arrayList3 == null || arrayList3.size() <= size) {
ArrayList<String> arrayList4 = pushTemplateReceiver.deepLinkList;
if (arrayList4 != null && arrayList4.size() < size) {
str = pushTemplateReceiver.deepLinkList.get(0);
}
} else {
str = pushTemplateReceiver.deepLinkList.get(size);
}
} else {
str = pushTemplateReceiver.deepLinkList.get(0);
}
} else {
str = pushTemplateReceiver.deepLinkList.get(size);
}
bundle.putInt("pt_manual_carousel_current", size);
bundle.remove("right_swipe");
bundle.putString("wzrk_dl", str);
bundle.putInt("manual_carousel_from", i2);
pushTemplateReceiver.contentViewManualCarousel.setOnClickPendingIntent(e.rightArrowPos0, com.clevertap.android.pushtemplates.content.g.b(context, i, bundle, false, 4, null));
pushTemplateReceiver.contentViewManualCarousel.setOnClickPendingIntent(e.leftArrowPos0, com.clevertap.android.pushtemplates.content.g.b(context, i, bundle, false, 5, null));
PendingIntent b2 = com.clevertap.android.pushtemplates.content.g.b(context, i, bundle, true, 3, null);
w wVar = new w(context, m);
PendingIntent b3 = com.clevertap.android.pushtemplates.content.g.b(context, i, bundle, false, 6, null);
pushTemplateReceiver.k(context);
pushTemplateReceiver.j(wVar, pushTemplateReceiver.contentViewSmall, pushTemplateReceiver.contentViewManualCarousel, pushTemplateReceiver.pt_title, b2, b3);
pushTemplateReceiver.notificationManager.notify(i, wVar.a());
} catch (Throwable th) {
com.clevertap.android.pushtemplates.b.c("Error creating manual carousel notification ", th);
}
}
@SuppressLint({"MissingPermission"})
public final void h(Context context, Bundle bundle, int i, String str, CleverTapInstanceConfig cleverTapInstanceConfig) throws InterruptedException {
Intent launchIntentForPackage;
Thread.sleep(1000L);
this.notificationManager.cancel(i);
String str2 = this.pt_rating_toast;
if (str2 != null && !str2.isEmpty() && cleverTapInstanceConfig != null) {
com.clevertap.android.sdk.task.b b2 = com.clevertap.android.sdk.task.a.b(cleverTapInstanceConfig);
b2.d(b2.b, b2.c, "Main").d("PushTemplatesUtils#showToast", new j(str2, context));
}
context.sendBroadcast(new Intent("android.intent.action.CLOSE_SYSTEM_DIALOGS"));
if (bundle.containsKey("wzrk_dl")) {
launchIntentForPackage = new Intent("android.intent.action.VIEW", Uri.parse(bundle.getString("wzrk_dl")));
n1.i(context, launchIntentForPackage);
} else {
launchIntentForPackage = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName());
if (launchIntentForPackage == null) {
return;
}
}
launchIntentForPackage.putExtras(bundle);
launchIntentForPackage.putExtra("wzrk_dl", str);
launchIntentForPackage.removeExtra("wzrk_acts");
launchIntentForPackage.putExtra("wzrk_from", "CTPushNotificationReceiver");
launchIntentForPackage.setFlags(872415232);
context.startActivity(launchIntentForPackage);
}
public final void i(RemoteViews remoteViews, Context context) {
int i = e.app_name;
remoteViews.setTextViewText(i, k.e(context));
int i2 = e.timestamp;
remoteViews.setTextViewText(i2, DateUtils.formatDateTime(context, System.currentTimeMillis(), 1));
String str = this.pt_subtitle;
if (str == null || str.isEmpty()) {
remoteViews.setViewVisibility(e.subtitle, 8);
remoteViews.setViewVisibility(e.sep_subtitle, 8);
} else if (Build.VERSION.SDK_INT >= 24) {
remoteViews.setTextViewText(e.subtitle, Html.fromHtml(this.pt_subtitle, 0));
} else {
remoteViews.setTextViewText(e.subtitle, Html.fromHtml(this.pt_subtitle));
}
String str2 = this.pt_meta_clr;
if (str2 == null || str2.isEmpty()) {
return;
}
remoteViews.setTextColor(i, k.h(this.pt_meta_clr, "#A6A6A6"));
remoteViews.setTextColor(i2, k.h(this.pt_meta_clr, "#A6A6A6"));
remoteViews.setTextColor(e.subtitle, k.h(this.pt_meta_clr, "#A6A6A6"));
}
public final void j(w wVar, RemoteViews remoteViews, RemoteViews remoteViews2, String str, PendingIntent pendingIntent, PendingIntent pendingIntent2) {
wVar.P.icon = this.smallIcon;
wVar.G = remoteViews;
wVar.H = remoteViews2;
wVar.e = w.b(Html.fromHtml(str));
Notification notification = wVar.P;
notification.deleteIntent = pendingIntent2;
wVar.g = pendingIntent;
wVar.c(5);
notification.when = System.currentTimeMillis();
wVar.d(16, true);
}
public final void k(Context context) {
try {
String str = null;
try {
Object obj = context.getPackageManager().getApplicationInfo(context.getPackageName(), 128).metaData.get("CLEVERTAP_NOTIFICATION_ICON");
if (obj != null) {
str = obj.toString();
}
} catch (Throwable unused) {
}
if (str == null) {
throw new IllegalArgumentException();
}
int identifier = context.getResources().getIdentifier(str, "drawable", context.getPackageName());
this.smallIcon = identifier;
if (identifier == 0) {
throw new IllegalArgumentException();
}
} catch (Throwable unused2) {
this.smallIcon = context.getApplicationInfo().icon;
}
}
@Override
public final void onReceive(android.content.Context r10, android.content.Intent r11) {
throw new UnsupportedOperationException("Method not decompiled: com.clevertap.android.pushtemplates.PushTemplateReceiver.onReceive(android.content.Context, android.content.Intent):void");
}
}