正在查看: Baubap v3.9.7 应用的 BrazeNotificationUtils.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Baubap v3.9.7 应用的 BrazeNotificationUtils.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.braze.push;
import a0.a;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.AlarmManager;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.UiModeManager;
import android.content.Context;
import android.content.Intent;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.PowerManager;
import android.os.SystemClock;
import androidx.core.app.b0;
import androidx.core.app.r0;
import androidx.datastore.preferences.protobuf.r1;
import com.braze.Braze;
import com.braze.BrazeInternal;
import com.braze.Constants;
import com.braze.IBrazeNotificationFactory;
import com.braze.configuration.BrazeConfigurationProvider;
import com.braze.enums.BrazePushEventType;
import com.braze.enums.BrazeViewBounds;
import com.braze.enums.Channel;
import com.braze.events.BrazePushEvent;
import com.braze.models.push.BrazeNotificationPayload;
import com.braze.push.support.HtmlUtils;
import com.braze.support.BrazeLogger;
import com.braze.support.IntentUtils;
import com.braze.support.JsonUtils;
import com.braze.support.PermissionUtils;
import com.braze.ui.BrazeDeeplinkHandler;
import com.braze.ui.actions.UriAction;
import com.braze.ui.support.UriUtils;
import h40.q;
import j3.j0;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.json.JSONObject;
import xu.b;
public final class BrazeNotificationUtils {
private static final String SOURCE_KEY = "source";
public static final BrazeNotificationUtils INSTANCE = new BrazeNotificationUtils();
private static final String TAG = BrazeLogger.getBrazeLogTag((Class<?>) BrazeNotificationUtils.class);
public enum BrazeNotificationBroadcastType {
OPENED(BrazePushEventType.NOTIFICATION_OPENED),
RECEIVED(BrazePushEventType.NOTIFICATION_RECEIVED),
DELETED(BrazePushEventType.NOTIFICATION_DELETED);
private final BrazePushEventType brazePushEventType;
BrazeNotificationBroadcastType(BrazePushEventType brazePushEventType) {
this.brazePushEventType = brazePushEventType;
}
public final BrazePushEventType getBrazePushEventType() {
return this.brazePushEventType;
}
}
public class WhenMappings {
public static final int[] $EnumSwitchMapping$0;
static {
int[] iArr = new int[BrazeNotificationBroadcastType.values().length];
try {
iArr[BrazeNotificationBroadcastType.OPENED.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
iArr[BrazeNotificationBroadcastType.RECEIVED.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
iArr[BrazeNotificationBroadcastType.DELETED.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
$EnumSwitchMapping$0 = iArr;
}
}
private BrazeNotificationUtils() {
}
public static final void cancelNotification(Context context, int i) {
b.y(context, "context");
try {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, new BrazeNotificationUtils$cancelNotification$1(i), 3, (Object) null);
Intent intent = new Intent(Constants.BRAZE_CANCEL_NOTIFICATION_ACTION).setClass(context, getNotificationReceiverClass());
b.x(intent, "Intent(Constants.BRAZE_C…otificationReceiverClass)");
intent.setPackage(context.getPackageName());
intent.putExtra(Constants.BRAZE_PUSH_NOTIFICATION_ID, i);
IntentUtils.addComponentAndSendBroadcast(context, intent);
} catch (Exception e) {
BrazeLogger.INSTANCE.brazelog(INSTANCE, BrazeLogger.Priority.E, e, BrazeNotificationUtils$cancelNotification$2.INSTANCE);
}
}
public static final IBrazeNotificationFactory getActiveNotificationFactory() {
IBrazeNotificationFactory customBrazeNotificationFactory = Braze.Companion.getCustomBrazeNotificationFactory();
return customBrazeNotificationFactory == null ? BrazeNotificationFactory.Companion.getInstance() : customBrazeNotificationFactory;
}
public static final int getNotificationId(BrazeNotificationPayload brazeNotificationPayload) {
b.y(brazeNotificationPayload, "payload");
Integer customNotificationId = brazeNotificationPayload.getCustomNotificationId();
if (customNotificationId != null) {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, new BrazeNotificationUtils$getNotificationId$1(customNotificationId), 3, (Object) null);
return customNotificationId.intValue();
}
String titleText = brazeNotificationPayload.getTitleText();
if (titleText == null) {
titleText = "";
}
String contentText = brazeNotificationPayload.getContentText();
if (contentText != null) {
titleText = a.n(titleText, contentText);
}
int hashCode = titleText != null ? titleText.hashCode() : 0;
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, new BrazeNotificationUtils$getNotificationId$4(hashCode), 3, (Object) null);
return hashCode;
}
public static final int getNotificationPriority(BrazeNotificationPayload brazeNotificationPayload) {
b.y(brazeNotificationPayload, "payload");
Integer notificationPriorityInt = brazeNotificationPayload.getNotificationPriorityInt();
Integer notificationPriorityInt2 = brazeNotificationPayload.getNotificationPriorityInt();
if (notificationPriorityInt2 == null) {
return 0;
}
int intValue = notificationPriorityInt2.intValue();
if (-2 <= intValue && intValue < 3) {
return intValue;
}
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, BrazeLogger.Priority.W, (Throwable) null, new BrazeNotificationUtils$getNotificationPriority$1$1(notificationPriorityInt), 2, (Object) null);
return 0;
}
public static final Class<?> getNotificationReceiverClass() {
return Constants.isAmazonDevice() ? BrazeAmazonDeviceMessagingReceiver.class : BrazePushReceiver.class;
}
public static final String getOrCreateNotificationChannelId(BrazeNotificationPayload brazeNotificationPayload) {
b.y(brazeNotificationPayload, "payload");
String notificationChannelId = brazeNotificationPayload.getNotificationChannelId();
if (Build.VERSION.SDK_INT < 26) {
return notificationChannelId == null ? Constants.BRAZE_PUSH_DEFAULT_NOTIFICATION_CHANNEL_ID : notificationChannelId;
}
Context context = brazeNotificationPayload.getContext();
BrazeConfigurationProvider configurationProvider = brazeNotificationPayload.getConfigurationProvider();
Object systemService = context != null ? context.getSystemService("notification") : null;
b.w(systemService, "null cannot be cast to non-null type android.app.NotificationManager");
NotificationManager notificationManager = (NotificationManager) systemService;
if (notificationChannelId != null) {
if (b0.e(notificationManager, notificationChannelId) != null) {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, new BrazeNotificationUtils$getOrCreateNotificationChannelId$1(notificationChannelId), 3, (Object) null);
return notificationChannelId;
}
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, new BrazeNotificationUtils$getOrCreateNotificationChannelId$2(notificationChannelId), 3, (Object) null);
}
if (b0.d(notificationManager) == null) {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$getOrCreateNotificationChannelId$3.INSTANCE, 3, (Object) null);
j0.l();
NotificationChannel g = b0.g(configurationProvider != null ? configurationProvider.getDefaultNotificationChannelName() : null);
b0.v(g, configurationProvider != null ? configurationProvider.getDefaultNotificationChannelDescription() : null);
j0.m(notificationManager, g);
}
return Constants.BRAZE_PUSH_DEFAULT_NOTIFICATION_CHANNEL_ID;
}
private final PendingIntent getPushActionPendingIntent(Context context, String str, Bundle bundle) {
Intent intent = new Intent(str).setClass(context, NotificationTrampolineActivity.class);
b.x(intent, "Intent(action).setClass(…lineActivity::class.java)");
if (bundle != null) {
intent.putExtras(bundle);
}
PendingIntent activity = PendingIntent.getActivity(context, IntentUtils.getRequestCode(), intent, 1073741824 | IntentUtils.getImmutablePendingIntentFlags());
b.x(activity, "getActivity(context, get… pushActionIntent, flags)");
return activity;
}
@TargetApi(26)
public static final NotificationChannel getValidNotificationChannel(NotificationManager notificationManager, Bundle bundle) {
b.y(notificationManager, "notificationManager");
if (bundle == null) {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$getValidNotificationChannel$1.INSTANCE, 3, (Object) null);
return null;
}
String string = bundle.getString(Constants.BRAZE_PUSH_NOTIFICATION_CHANNEL_ID_KEY, null);
if (string != null && !q.R(string)) {
NotificationChannel e = b0.e(notificationManager, string);
if (e != null) {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, new BrazeNotificationUtils$getValidNotificationChannel$2(string), 3, (Object) null);
return e;
}
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, new BrazeNotificationUtils$getValidNotificationChannel$3(string), 3, (Object) null);
}
NotificationChannel d = b0.d(notificationManager);
if (d != null) {
return d;
}
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$getValidNotificationChannel$4.INSTANCE, 3, (Object) null);
return null;
}
public static final void handleCancelNotificationAction(Context context, Intent intent) {
b.y(context, "context");
b.y(intent, "intent");
try {
if (intent.hasExtra(Constants.BRAZE_PUSH_NOTIFICATION_ID)) {
int intExtra = intent.getIntExtra(Constants.BRAZE_PUSH_NOTIFICATION_ID, -1);
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, new BrazeNotificationUtils$handleCancelNotificationAction$1(intExtra), 3, (Object) null);
Object systemService = context.getSystemService("notification");
b.w(systemService, "null cannot be cast to non-null type android.app.NotificationManager");
((NotificationManager) systemService).cancel(Constants.BRAZE_PUSH_NOTIFICATION_TAG, intExtra);
}
} catch (Exception e) {
BrazeLogger.INSTANCE.brazelog(INSTANCE, BrazeLogger.Priority.E, e, BrazeNotificationUtils$handleCancelNotificationAction$2.INSTANCE);
}
}
public static final void handleContentCardsSerializedCardIfPresent(BrazeNotificationPayload brazeNotificationPayload) {
b.y(brazeNotificationPayload, "payload");
String contentCardSyncData = brazeNotificationPayload.getContentCardSyncData();
String contentCardSyncUserId = brazeNotificationPayload.getContentCardSyncUserId();
Context context = brazeNotificationPayload.getContext();
if (contentCardSyncData == null || context == null) {
return;
}
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, new BrazeNotificationUtils$handleContentCardsSerializedCardIfPresent$1(contentCardSyncUserId, contentCardSyncData), 3, (Object) null);
BrazeInternal.addSerializedContentCardToStorage(context, contentCardSyncData, contentCardSyncUserId);
}
public static final void handleNotificationDeleted(Context context, Intent intent) {
b.y(context, "context");
b.y(intent, "intent");
try {
BrazeLogger brazeLogger = BrazeLogger.INSTANCE;
BrazeNotificationUtils brazeNotificationUtils = INSTANCE;
BrazeLogger.brazelog$default(brazeLogger, brazeNotificationUtils, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$handleNotificationDeleted$1.INSTANCE, 3, (Object) null);
Bundle extras = intent.getExtras();
if (extras != null) {
brazeNotificationUtils.sendPushActionIntent(context, BrazeNotificationBroadcastType.DELETED, extras, new BrazeNotificationPayload(extras, null, context, null, 10, null));
} else {
sendPushActionIntent$default(brazeNotificationUtils, context, BrazeNotificationBroadcastType.DELETED, extras, null, 8, null);
}
} catch (Exception e) {
BrazeLogger.INSTANCE.brazelog(INSTANCE, BrazeLogger.Priority.E, e, BrazeNotificationUtils$handleNotificationDeleted$2.INSTANCE);
}
}
public static final void handleNotificationOpened(Context context, Intent intent) {
b.y(context, "context");
b.y(intent, "intent");
try {
Braze.Companion.getInstance(context).logPushNotificationOpened(intent);
sendNotificationOpenedBroadcast(context, intent);
if (BrazeInternal.INSTANCE.getConfigurationProvider(context).getDoesHandlePushDeepLinksAutomatically()) {
routeUserWithNotificationOpenedIntent(context, intent);
} else {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, BrazeLogger.Priority.I, (Throwable) null, BrazeNotificationUtils$handleNotificationOpened$1.INSTANCE, 2, (Object) null);
}
} catch (Exception e) {
BrazeLogger.INSTANCE.brazelog(INSTANCE, BrazeLogger.Priority.E, e, BrazeNotificationUtils$handleNotificationOpened$2.INSTANCE);
}
}
public static final void handlePushStoryPageClicked(android.content.Context r7, android.content.Intent r8) {
throw new UnsupportedOperationException("Method not decompiled: com.braze.push.BrazeNotificationUtils.handlePushStoryPageClicked(android.content.Context, android.content.Intent):void");
}
public static final boolean isBrazePushMessage(Intent intent) {
b.y(intent, "<this>");
Bundle extras = intent.getExtras();
if (extras == null) {
return false;
}
return q.K("true", extras.getString(Constants.BRAZE_PUSH_BRAZE_KEY));
}
public static final boolean isNotificationMessage(Intent intent) {
b.y(intent, "intent");
Bundle extras = intent.getExtras();
return extras != null && extras.containsKey(Constants.BRAZE_PUSH_TITLE_KEY) && extras.containsKey(Constants.BRAZE_PUSH_CONTENT_KEY);
}
public static final boolean isUninstallTrackingPush(Bundle bundle) {
b.y(bundle, "notificationExtras");
try {
if (bundle.containsKey(Constants.BRAZE_PUSH_UNINSTALL_TRACKING_KEY)) {
return true;
}
Bundle bundle2 = bundle.getBundle(Constants.BRAZE_PUSH_EXTRAS_KEY);
if (bundle2 != null) {
return bundle2.containsKey(Constants.BRAZE_PUSH_UNINSTALL_TRACKING_KEY);
}
return false;
} catch (Exception e) {
BrazeLogger.INSTANCE.brazelog(INSTANCE, BrazeLogger.Priority.E, e, BrazeNotificationUtils$isUninstallTrackingPush$1.INSTANCE);
return false;
}
}
@TargetApi(21)
public static final boolean isValidNotificationVisibility(int i) {
return i == -1 || i == 0 || i == 1;
}
public static final void logBaiduNotificationClick(Context context, String str) {
if (str == null) {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, BrazeLogger.Priority.W, (Throwable) null, BrazeNotificationUtils$logBaiduNotificationClick$1.INSTANCE, 2, (Object) null);
return;
}
if (context == null) {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, BrazeLogger.Priority.W, (Throwable) null, BrazeNotificationUtils$logBaiduNotificationClick$2.INSTANCE, 2, (Object) null);
return;
}
try {
JSONObject jSONObject = new JSONObject(str);
String optionalString = JsonUtils.getOptionalString(jSONObject, SOURCE_KEY);
String optionalString2 = JsonUtils.getOptionalString(jSONObject, Constants.BRAZE_PUSH_CAMPAIGN_ID_KEY);
if (optionalString == null || !b.n(optionalString, Constants.BRAZE) || optionalString2 == null) {
return;
}
Braze.Companion.getInstance(context).logPushNotificationOpened(optionalString2);
} catch (Exception e) {
BrazeLogger.INSTANCE.brazelog(INSTANCE, BrazeLogger.Priority.E, e, new BrazeNotificationUtils$logBaiduNotificationClick$3(str));
}
}
public static final void prefetchBitmapsIfNewlyReceivedStoryPush(BrazeNotificationPayload brazeNotificationPayload) {
b.y(brazeNotificationPayload, "payload");
Context context = brazeNotificationPayload.getContext();
if (context != null && brazeNotificationPayload.isPushStory() && brazeNotificationPayload.isNewlyReceivedPushStory()) {
List<BrazeNotificationPayload.PushStoryPage> pushStoryPages = brazeNotificationPayload.getPushStoryPages();
ArrayList<String> arrayList = new ArrayList();
Iterator<T> it = pushStoryPages.iterator();
while (it.hasNext()) {
String bitmapUrl = ((BrazeNotificationPayload.PushStoryPage) it.next()).getBitmapUrl();
if (bitmapUrl != null) {
arrayList.add(bitmapUrl);
}
}
for (String str : arrayList) {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, BrazeLogger.Priority.V, (Throwable) null, new BrazeNotificationUtils$prefetchBitmapsIfNewlyReceivedStoryPush$2$1(str), 2, (Object) null);
Braze.Companion.getInstance(context).getImageLoader().getPushBitmapFromUrl(context, brazeNotificationPayload.getBrazeExtras(), str, BrazeViewBounds.NOTIFICATION_ONE_IMAGE_STORY);
}
brazeNotificationPayload.setNewlyReceivedPushStory(false);
}
}
public static final boolean refreshFeatureFlagsIfAppropriate(BrazeNotificationPayload brazeNotificationPayload) {
b.y(brazeNotificationPayload, "payload");
Context context = brazeNotificationPayload.getContext();
if (!brazeNotificationPayload.getShouldRefreshFeatureFlags() || context == null) {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, BrazeLogger.Priority.V, (Throwable) null, BrazeNotificationUtils$refreshFeatureFlagsIfAppropriate$2.INSTANCE, 2, (Object) null);
return false;
}
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$refreshFeatureFlagsIfAppropriate$1.INSTANCE, 3, (Object) null);
BrazeInternal.refreshFeatureFlags(context);
return true;
}
public static final boolean requestGeofenceRefreshIfAppropriate(BrazeNotificationPayload brazeNotificationPayload) {
b.y(brazeNotificationPayload, "payload");
Context context = brazeNotificationPayload.getContext();
if (!brazeNotificationPayload.getShouldSyncGeofences() || context == null) {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$requestGeofenceRefreshIfAppropriate$2.INSTANCE, 3, (Object) null);
return false;
}
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$requestGeofenceRefreshIfAppropriate$1.INSTANCE, 3, (Object) null);
BrazeInternal.requestGeofenceRefresh(context, true);
return true;
}
public static final void routeUserWithNotificationOpenedIntent(Context context, Intent intent) {
b.y(context, "context");
b.y(intent, "intent");
BrazeLogger brazeLogger = BrazeLogger.INSTANCE;
BrazeNotificationUtils brazeNotificationUtils = INSTANCE;
BrazeLogger.brazelog$default(brazeLogger, brazeNotificationUtils, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$routeUserWithNotificationOpenedIntent$1.INSTANCE, 3, (Object) null);
Bundle bundleExtra = intent.getBundleExtra(Constants.BRAZE_PUSH_EXTRAS_KEY);
if (bundleExtra == null) {
bundleExtra = new Bundle();
}
bundleExtra.putString(Constants.BRAZE_PUSH_CAMPAIGN_ID_KEY, intent.getStringExtra(Constants.BRAZE_PUSH_CAMPAIGN_ID_KEY));
bundleExtra.putString(SOURCE_KEY, Constants.BRAZE);
brazeNotificationUtils.routeUserWithNotificationOpenedIntent(context, bundleExtra, intent.getStringExtra("uri"), q.K("true", intent.getStringExtra(Constants.BRAZE_PUSH_OPEN_URI_IN_WEBVIEW_KEY)));
}
public static final void sendNotificationOpenedBroadcast(Context context, Intent intent) {
b.y(context, "context");
b.y(intent, "intent");
BrazeLogger brazeLogger = BrazeLogger.INSTANCE;
BrazeNotificationUtils brazeNotificationUtils = INSTANCE;
BrazeLogger.brazelog$default(brazeLogger, brazeNotificationUtils, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$sendNotificationOpenedBroadcast$1.INSTANCE, 3, (Object) null);
Bundle extras = intent.getExtras();
if (extras == null) {
sendPushActionIntent$default(brazeNotificationUtils, context, BrazeNotificationBroadcastType.OPENED, extras, null, 8, null);
} else {
brazeNotificationUtils.sendPushActionIntent(context, BrazeNotificationBroadcastType.OPENED, extras, new BrazeNotificationPayload(extras, null, context, null, 10, null));
}
}
private final void sendPushActionIntent(Context context, BrazeNotificationBroadcastType brazeNotificationBroadcastType, Bundle bundle, BrazeNotificationPayload brazeNotificationPayload) {
Intent intent;
int i = WhenMappings.$EnumSwitchMapping$0[brazeNotificationBroadcastType.ordinal()];
if (i == 1) {
intent = new Intent(Constants.BRAZE_PUSH_INTENT_NOTIFICATION_OPENED).setPackage(context.getPackageName());
b.x(intent, "{\n Intent…ackageName)\n }");
} else if (i == 2) {
intent = new Intent(Constants.BRAZE_PUSH_INTENT_NOTIFICATION_RECEIVED).setPackage(context.getPackageName());
b.x(intent, "{\n Intent…ackageName)\n }");
} else {
if (i != 3) {
throw new r1();
}
intent = new Intent(Constants.BRAZE_PUSH_INTENT_NOTIFICATION_DELETED).setPackage(context.getPackageName());
b.x(intent, "{\n Intent…ackageName)\n }");
}
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.V, (Throwable) null, new BrazeNotificationUtils$sendPushActionIntent$1(brazeNotificationBroadcastType), 2, (Object) null);
sendPushActionIntent(context, intent, bundle);
if (brazeNotificationPayload != null) {
BrazeInternal.INSTANCE.publishBrazePushAction(context, brazeNotificationBroadcastType.getBrazePushEventType(), brazeNotificationPayload);
}
}
public static void sendPushActionIntent$default(BrazeNotificationUtils brazeNotificationUtils, Context context, BrazeNotificationBroadcastType brazeNotificationBroadcastType, Bundle bundle, BrazeNotificationPayload brazeNotificationPayload, int i, Object obj) {
if ((i & 8) != 0) {
brazeNotificationPayload = null;
}
brazeNotificationUtils.sendPushActionIntent(context, brazeNotificationBroadcastType, bundle, brazeNotificationPayload);
}
public static final void sendPushMessageReceivedBroadcast(Context context, Bundle bundle, BrazeNotificationPayload brazeNotificationPayload) {
b.y(context, "context");
b.y(bundle, "notificationExtras");
b.y(brazeNotificationPayload, "payload");
BrazeLogger brazeLogger = BrazeLogger.INSTANCE;
BrazeNotificationUtils brazeNotificationUtils = INSTANCE;
BrazeLogger.brazelog$default(brazeLogger, brazeNotificationUtils, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$sendPushMessageReceivedBroadcast$1.INSTANCE, 3, (Object) null);
brazeNotificationUtils.sendPushActionIntent(context, BrazeNotificationBroadcastType.RECEIVED, bundle, brazeNotificationPayload);
}
public static final void setAccentColorIfPresentAndSupported(r0 r0Var, BrazeNotificationPayload brazeNotificationPayload) {
b.y(r0Var, "notificationBuilder");
b.y(brazeNotificationPayload, "payload");
Integer accentColor = brazeNotificationPayload.getAccentColor();
if (accentColor != null) {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$setAccentColorIfPresentAndSupported$1.INSTANCE, 3, (Object) null);
r0Var.s = accentColor.intValue();
return;
}
BrazeConfigurationProvider configurationProvider = brazeNotificationPayload.getConfigurationProvider();
if (configurationProvider != null) {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$setAccentColorIfPresentAndSupported$2$1.INSTANCE, 3, (Object) null);
r0Var.s = configurationProvider.getDefaultNotificationAccentColor();
}
}
public static final void setCategoryIfPresentAndSupported(r0 r0Var, BrazeNotificationPayload brazeNotificationPayload) {
b.y(r0Var, "notificationBuilder");
b.y(brazeNotificationPayload, "payload");
String notificationCategory = brazeNotificationPayload.getNotificationCategory();
if (notificationCategory == null) {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$setCategoryIfPresentAndSupported$2.INSTANCE, 3, (Object) null);
} else {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$setCategoryIfPresentAndSupported$1.INSTANCE, 3, (Object) null);
r0Var.q = notificationCategory;
}
}
public static final void setContentIfPresent(r0 r0Var, BrazeNotificationPayload brazeNotificationPayload) {
BrazeConfigurationProvider configurationProvider;
b.y(r0Var, "notificationBuilder");
b.y(brazeNotificationPayload, "payload");
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$setContentIfPresent$1.INSTANCE, 3, (Object) null);
String contentText = brazeNotificationPayload.getContentText();
if (contentText == null || (configurationProvider = brazeNotificationPayload.getConfigurationProvider()) == null) {
return;
}
r0Var.f = r0.c(HtmlUtils.getHtmlSpannedTextIfEnabled(contentText, configurationProvider));
}
public static final void setContentIntentIfPresent(Context context, r0 r0Var, Bundle bundle) {
b.y(context, "context");
b.y(r0Var, "notificationBuilder");
try {
r0Var.g = INSTANCE.getPushActionPendingIntent(context, Constants.BRAZE_PUSH_CLICKED_ACTION, bundle);
} catch (Exception e) {
BrazeLogger.INSTANCE.brazelog(INSTANCE, BrazeLogger.Priority.E, e, BrazeNotificationUtils$setContentIntentIfPresent$1.INSTANCE);
}
}
public static final void setDeleteIntent(Context context, r0 r0Var, Bundle bundle) {
b.y(context, "context");
b.y(r0Var, "notificationBuilder");
try {
Intent intent = new Intent(Constants.BRAZE_PUSH_DELETED_ACTION).setClass(context, getNotificationReceiverClass());
b.x(intent, "Intent(Constants.BRAZE_P…otificationReceiverClass)");
if (bundle != null) {
intent.putExtras(bundle);
}
r0Var.C.deleteIntent = PendingIntent.getBroadcast(context, IntentUtils.getRequestCode(), intent, IntentUtils.getImmutablePendingIntentFlags() | 1073741824);
} catch (Exception e) {
BrazeLogger.INSTANCE.brazelog(INSTANCE, BrazeLogger.Priority.E, e, BrazeNotificationUtils$setDeleteIntent$1.INSTANCE);
}
}
public static final boolean setLargeIconIfPresentAndSupported(r0 r0Var, BrazeNotificationPayload brazeNotificationPayload) {
BrazeConfigurationProvider configurationProvider;
BrazeLogger brazeLogger;
BrazeNotificationUtils brazeNotificationUtils;
String largeIcon;
b.y(r0Var, "notificationBuilder");
b.y(brazeNotificationPayload, "payload");
if (brazeNotificationPayload.isPushStory()) {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$setLargeIconIfPresentAndSupported$1.INSTANCE, 3, (Object) null);
return false;
}
Context context = brazeNotificationPayload.getContext();
if (context == null || (configurationProvider = brazeNotificationPayload.getConfigurationProvider()) == null) {
return false;
}
try {
brazeLogger = BrazeLogger.INSTANCE;
brazeNotificationUtils = INSTANCE;
BrazeLogger.brazelog$default(brazeLogger, brazeNotificationUtils, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$setLargeIconIfPresentAndSupported$2.INSTANCE, 3, (Object) null);
largeIcon = brazeNotificationPayload.getLargeIcon();
} catch (Exception e) {
BrazeLogger.INSTANCE.brazelog(INSTANCE, BrazeLogger.Priority.E, e, BrazeNotificationUtils$setLargeIconIfPresentAndSupported$6.INSTANCE);
}
if (largeIcon != null) {
r0Var.f(Braze.Companion.getInstance(context).getImageLoader().getPushBitmapFromUrl(context, null, largeIcon, BrazeViewBounds.NOTIFICATION_LARGE_ICON));
return true;
}
BrazeLogger.brazelog$default(brazeLogger, brazeNotificationUtils, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$setLargeIconIfPresentAndSupported$4.INSTANCE, 3, (Object) null);
int largeNotificationIconResourceId = configurationProvider.getLargeNotificationIconResourceId();
if (largeNotificationIconResourceId != 0) {
r0Var.f(BitmapFactory.decodeResource(context.getResources(), largeNotificationIconResourceId));
return true;
}
BrazeLogger.brazelog$default(brazeLogger, brazeNotificationUtils, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$setLargeIconIfPresentAndSupported$5.INSTANCE, 3, (Object) null);
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$setLargeIconIfPresentAndSupported$7.INSTANCE, 3, (Object) null);
return false;
}
public static final void setNotificationBadgeNumberIfPresent(r0 r0Var, BrazeNotificationPayload brazeNotificationPayload) {
b.y(r0Var, "notificationBuilder");
b.y(brazeNotificationPayload, "payload");
if (Build.VERSION.SDK_INT < 26) {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$setNotificationBadgeNumberIfPresent$1.INSTANCE, 3, (Object) null);
return;
}
Integer notificationBadgeNumber = brazeNotificationPayload.getNotificationBadgeNumber();
if (notificationBadgeNumber != null) {
r0Var.i = notificationBadgeNumber.intValue();
}
}
public static final void setNotificationDurationAlarm(Context context, Class<?> cls, int i, int i2) {
b.y(context, "context");
Intent intent = new Intent(context, cls);
intent.setAction(Constants.BRAZE_CANCEL_NOTIFICATION_ACTION);
intent.putExtra(Constants.BRAZE_PUSH_NOTIFICATION_ID, i);
PendingIntent broadcast = PendingIntent.getBroadcast(context, 0, intent, 134217728 | IntentUtils.getImmutablePendingIntentFlags());
Object systemService = context.getSystemService("alarm");
b.w(systemService, "null cannot be cast to non-null type android.app.AlarmManager");
AlarmManager alarmManager = (AlarmManager) systemService;
if (i2 >= 1000) {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, new BrazeNotificationUtils$setNotificationDurationAlarm$1(i2), 3, (Object) null);
alarmManager.set(3, SystemClock.elapsedRealtime() + i2, broadcast);
}
}
public static final void setPriorityIfPresentAndSupported(r0 r0Var, BrazeNotificationPayload brazeNotificationPayload) {
b.y(r0Var, "notificationBuilder");
b.y(brazeNotificationPayload, "payload");
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$setPriorityIfPresentAndSupported$1.INSTANCE, 3, (Object) null);
r0Var.j = getNotificationPriority(brazeNotificationPayload);
}
public static final void setPublicVersionIfPresentAndSupported(r0 r0Var, BrazeNotificationPayload brazeNotificationPayload) {
b.y(r0Var, "notificationBuilder");
b.y(brazeNotificationPayload, "payload");
Context context = brazeNotificationPayload.getContext();
BrazeConfigurationProvider configurationProvider = brazeNotificationPayload.getConfigurationProvider();
if (context == null || brazeNotificationPayload.getPublicNotificationExtras() == null || configurationProvider == null) {
return;
}
String orCreateNotificationChannelId = getOrCreateNotificationChannelId(brazeNotificationPayload);
Bundle parseJsonObjectIntoBundle = JsonUtils.parseJsonObjectIntoBundle(brazeNotificationPayload.getPublicNotificationExtras());
if (parseJsonObjectIntoBundle.isEmpty()) {
return;
}
BrazeNotificationPayload brazeNotificationPayload2 = new BrazeNotificationPayload(parseJsonObjectIntoBundle, null, context, configurationProvider, 2, null);
r0 r0Var2 = new r0(context, orCreateNotificationChannelId);
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, new BrazeNotificationUtils$setPublicVersionIfPresentAndSupported$2(brazeNotificationPayload2), 3, (Object) null);
setContentIfPresent(r0Var2, brazeNotificationPayload2);
setTitleIfPresent(r0Var2, brazeNotificationPayload2);
setSummaryTextIfPresentAndSupported(r0Var2, brazeNotificationPayload2);
setSmallIcon(configurationProvider, r0Var2);
setAccentColorIfPresentAndSupported(r0Var2, brazeNotificationPayload2);
r0Var.u = r0Var2.b();
}
public static final void setSetShowWhen(r0 r0Var, BrazeNotificationPayload brazeNotificationPayload) {
b.y(r0Var, "notificationBuilder");
b.y(brazeNotificationPayload, "payload");
if (brazeNotificationPayload.isPushStory()) {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$setSetShowWhen$1.INSTANCE, 3, (Object) null);
r0Var.k = false;
}
}
public static final int setSmallIcon(BrazeConfigurationProvider brazeConfigurationProvider, r0 r0Var) {
b.y(brazeConfigurationProvider, "appConfigurationProvider");
b.y(r0Var, "notificationBuilder");
int smallNotificationIconResourceId = brazeConfigurationProvider.getSmallNotificationIconResourceId();
if (smallNotificationIconResourceId == 0) {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$setSmallIcon$1.INSTANCE, 3, (Object) null);
smallNotificationIconResourceId = brazeConfigurationProvider.getApplicationIconResourceId();
} else {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$setSmallIcon$2.INSTANCE, 3, (Object) null);
}
r0Var.C.icon = smallNotificationIconResourceId;
return smallNotificationIconResourceId;
}
public static final void setSoundIfPresentAndSupported(r0 r0Var, BrazeNotificationPayload brazeNotificationPayload) {
b.y(r0Var, "notificationBuilder");
b.y(brazeNotificationPayload, "payload");
String notificationSound = brazeNotificationPayload.getNotificationSound();
if (notificationSound == null) {
return;
}
if (b.n(notificationSound, Constants.BRAZE_PUSH_NOTIFICATION_SOUND_DEFAULT_VALUE)) {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$setSoundIfPresentAndSupported$1.INSTANCE, 3, (Object) null);
r0Var.d(1);
} else {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$setSoundIfPresentAndSupported$2.INSTANCE, 3, (Object) null);
r0Var.g(Uri.parse(notificationSound));
}
}
public static final void setSummaryTextIfPresentAndSupported(r0 r0Var, BrazeNotificationPayload brazeNotificationPayload) {
b.y(r0Var, "notificationBuilder");
b.y(brazeNotificationPayload, "payload");
String summaryText = brazeNotificationPayload.getSummaryText();
if (summaryText == null) {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$setSummaryTextIfPresentAndSupported$2.INSTANCE, 3, (Object) null);
} else {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$setSummaryTextIfPresentAndSupported$1.INSTANCE, 3, (Object) null);
r0Var.m = r0.c(summaryText);
}
}
public static final void setTickerIfPresent(r0 r0Var, BrazeNotificationPayload brazeNotificationPayload) {
b.y(r0Var, "notificationBuilder");
b.y(brazeNotificationPayload, "payload");
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$setTickerIfPresent$1.INSTANCE, 3, (Object) null);
String titleText = brazeNotificationPayload.getTitleText();
if (titleText == null) {
return;
}
r0Var.C.tickerText = r0.c(titleText);
}
public static final void setTitleIfPresent(r0 r0Var, BrazeNotificationPayload brazeNotificationPayload) {
BrazeConfigurationProvider configurationProvider;
b.y(r0Var, "notificationBuilder");
b.y(brazeNotificationPayload, "payload");
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$setTitleIfPresent$1.INSTANCE, 3, (Object) null);
String titleText = brazeNotificationPayload.getTitleText();
if (titleText == null || (configurationProvider = brazeNotificationPayload.getConfigurationProvider()) == null) {
return;
}
r0Var.e = r0.c(HtmlUtils.getHtmlSpannedTextIfEnabled(titleText, configurationProvider));
}
public static final void setVisibilityIfPresentAndSupported(r0 r0Var, BrazeNotificationPayload brazeNotificationPayload) {
b.y(r0Var, "notificationBuilder");
b.y(brazeNotificationPayload, "payload");
Integer notificationVisibility = brazeNotificationPayload.getNotificationVisibility();
if (notificationVisibility != null) {
if (!isValidNotificationVisibility(notificationVisibility.intValue())) {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, BrazeLogger.Priority.W, (Throwable) null, new BrazeNotificationUtils$setVisibilityIfPresentAndSupported$2(notificationVisibility), 2, (Object) null);
} else {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$setVisibilityIfPresentAndSupported$1.INSTANCE, 3, (Object) null);
r0Var.t = notificationVisibility.intValue();
}
}
}
public static final boolean wakeScreenIfAppropriate(Context context, BrazeConfigurationProvider brazeConfigurationProvider, Bundle bundle) {
b.y(context, "context");
b.y(brazeConfigurationProvider, "configurationProvider");
return wakeScreenIfAppropriate(new BrazeNotificationPayload(bundle, null, context, brazeConfigurationProvider, 2, null));
}
@SuppressLint({"WakelockTimeout"})
public static final boolean wakeScreenIfAppropriate(BrazeNotificationPayload brazeNotificationPayload) {
BrazeConfigurationProvider configurationProvider;
b.y(brazeNotificationPayload, "payload");
Context context = brazeNotificationPayload.getContext();
if (context == null || (configurationProvider = brazeNotificationPayload.getConfigurationProvider()) == null) {
return false;
}
Bundle notificationExtras = brazeNotificationPayload.getNotificationExtras();
if (!PermissionUtils.hasPermission(context, "android.permission.WAKE_LOCK") || !configurationProvider.isPushWakeScreenForNotificationEnabled()) {
return false;
}
try {
Object systemService = context.getSystemService("uimode");
b.w(systemService, "null cannot be cast to non-null type android.app.UiModeManager");
if (((UiModeManager) systemService).getCurrentModeType() == 4) {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$wakeScreenIfAppropriate$1.INSTANCE, 3, (Object) null);
return false;
}
} catch (Exception e) {
BrazeLogger.INSTANCE.brazelog(INSTANCE, BrazeLogger.Priority.E, e, BrazeNotificationUtils$wakeScreenIfAppropriate$2.INSTANCE);
}
if (Build.VERSION.SDK_INT >= 26) {
Object systemService2 = context.getSystemService("notification");
b.w(systemService2, "null cannot be cast to non-null type android.app.NotificationManager");
NotificationChannel validNotificationChannel = getValidNotificationChannel((NotificationManager) systemService2, notificationExtras);
if (validNotificationChannel == null) {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$wakeScreenIfAppropriate$3.INSTANCE, 3, (Object) null);
return false;
}
if (b0.b(validNotificationChannel) == 1) {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, new BrazeNotificationUtils$wakeScreenIfAppropriate$4(validNotificationChannel), 3, (Object) null);
return false;
}
} else if (getNotificationPriority(brazeNotificationPayload) == -2) {
return false;
}
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, INSTANCE, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$wakeScreenIfAppropriate$5.INSTANCE, 3, (Object) null);
Object systemService3 = context.getSystemService("power");
b.w(systemService3, "null cannot be cast to non-null type android.os.PowerManager");
PowerManager.WakeLock newWakeLock = ((PowerManager) systemService3).newWakeLock(268435482, TAG);
newWakeLock.acquire();
newWakeLock.release();
return true;
}
public static final void routeUserWithNotificationOpenedIntent(Context context, BrazePushEvent brazePushEvent) {
b.y(context, "context");
b.y(brazePushEvent, "brazePush");
BrazeLogger brazeLogger = BrazeLogger.INSTANCE;
BrazeNotificationUtils brazeNotificationUtils = INSTANCE;
BrazeLogger.brazelog$default(brazeLogger, brazeNotificationUtils, (BrazeLogger.Priority) null, (Throwable) null, BrazeNotificationUtils$routeUserWithNotificationOpenedIntent$2.INSTANCE, 3, (Object) null);
Bundle brazeExtras = brazePushEvent.getNotificationPayload().getBrazeExtras();
brazeExtras.putString(Constants.BRAZE_PUSH_CAMPAIGN_ID_KEY, brazePushEvent.getNotificationPayload().getCampaignId());
brazeExtras.putString(SOURCE_KEY, Constants.BRAZE);
String deeplink = brazePushEvent.getNotificationPayload().getDeeplink();
Boolean useWebView = brazePushEvent.getNotificationPayload().getUseWebView();
brazeNotificationUtils.routeUserWithNotificationOpenedIntent(context, brazeExtras, deeplink, useWebView != null ? useWebView.booleanValue() : false);
}
private final void sendPushActionIntent(Context context, Intent intent, Bundle bundle) {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.V, (Throwable) null, new BrazeNotificationUtils$sendPushActionIntent$2(intent), 2, (Object) null);
if (bundle != null) {
intent.putExtras(bundle);
}
IntentUtils.addComponentAndSendBroadcast(context, intent);
}
private final void routeUserWithNotificationOpenedIntent(Context context, Bundle bundle, String str, boolean z) {
if (str != null && !q.R(str)) {
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, (BrazeLogger.Priority) null, (Throwable) null, new BrazeNotificationUtils$routeUserWithNotificationOpenedIntent$3(str, z), 3, (Object) null);
bundle.putString("uri", str);
bundle.putBoolean(Constants.BRAZE_PUSH_OPEN_URI_IN_WEBVIEW_KEY, z);
BrazeDeeplinkHandler.Companion companion = BrazeDeeplinkHandler.Companion;
UriAction createUriActionFromUrlString = companion.getInstance().createUriActionFromUrlString(str, bundle, z, Channel.PUSH);
if (createUriActionFromUrlString != null) {
companion.getInstance().gotoUri(context, createUriActionFromUrlString);
return;
}
return;
}
Intent mainActivityIntent = UriUtils.getMainActivityIntent(context, bundle);
BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, (BrazeLogger.Priority) null, (Throwable) null, new BrazeNotificationUtils$routeUserWithNotificationOpenedIntent$5(mainActivityIntent), 3, (Object) null);
context.startActivity(mainActivityIntent);
}
}