正在查看: bbinstant v6.24.0 应用的 MoEPushReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: bbinstant v6.24.0 应用的 MoEPushReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.moengage.pushbase.internal;
import android.app.NotificationManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import androidx.annotation.Keep;
import com.moengage.core.internal.logger.f;
import in.juspay.hyper.constants.LogCategory;
import kotlin.jvm.internal.v;
import kotlin.jvm.internal.w;
@Keep
public final class MoEPushReceiver extends BroadcastReceiver {
private final String tag = "PushBase_6.8.1_MoEPushReceiver";
static final class a extends w implements kotlin.jvm.functions.a {
a() {
super(0);
}
public final String invoke() {
return v.stringPlus(MoEPushReceiver.this.tag, " handleNotification() : ");
}
}
static final class b extends w implements kotlin.jvm.functions.a {
b() {
super(0);
}
public final String invoke() {
return v.stringPlus(MoEPushReceiver.this.tag, " handleNotificationDismiss() : Will try to dismiss notification.");
}
}
static final class c extends w implements kotlin.jvm.functions.a {
c() {
super(0);
}
public final String invoke() {
return v.stringPlus(MoEPushReceiver.this.tag, " onReceive() : ");
}
}
static final class d extends w implements kotlin.jvm.functions.a {
final String $action;
d(String str) {
super(0);
this.$action = str;
}
public final String invoke() {
return MoEPushReceiver.this.tag + " onReceive() : Action: " + ((Object) this.$action);
}
}
static final class e extends w implements kotlin.jvm.functions.a {
e() {
super(0);
}
public final String invoke() {
return v.stringPlus(MoEPushReceiver.this.tag, " onReceive() : Not a valid action type.");
}
}
static final class f extends w implements kotlin.jvm.functions.a {
f() {
super(0);
}
public final String invoke() {
return v.stringPlus(MoEPushReceiver.this.tag, " onReceive() : ");
}
}
private final void handleNotification(Context context, Bundle bundle) {
f.a.print$default(com.moengage.core.internal.logger.f.Companion, 0, null, new a(), 3, null);
PushHelper.Companion.getInstance().handlePushPayload(context, bundle);
}
private final void handleNotificationDismiss(Context context, Bundle bundle) {
f.a.print$default(com.moengage.core.internal.logger.f.Companion, 0, null, new b(), 3, null);
int i2 = bundle.getInt("MOE_ACTION_NOTIFICATION_AUTO_DISMISS", -1);
if (i2 > 0) {
Object systemService = context.getSystemService("notification");
if (systemService == null) {
throw new NullPointerException("null cannot be cast to non-null type android.app.NotificationManager");
}
((NotificationManager) systemService).cancel(i2);
}
}
@Override
public void onReceive(Context context, Intent intent) {
v.checkNotNullParameter(context, LogCategory.CONTEXT);
v.checkNotNullParameter(intent, "intent");
try {
f.a aVar = com.moengage.core.internal.logger.f.Companion;
f.a.print$default(aVar, 0, null, new c(), 3, null);
Bundle extras = intent.getExtras();
if (extras == null) {
return;
}
String action = intent.getAction();
f.a.print$default(aVar, 0, null, new d(action), 3, null);
if (action != null && !kotlin.text.p.isBlank(action)) {
com.moengage.core.internal.utils.d.logBundle(this.tag, extras);
if (v.areEqual(action, "MOE_ACTION_NOTIFICATION_AUTO_DISMISS")) {
handleNotificationDismiss(context, extras);
} else if (v.areEqual(action, "MOE_ACTION_SHOW_NOTIFICATION")) {
handleNotification(context, extras);
} else {
f.a.print$default(aVar, 0, null, new e(), 3, null);
}
}
} catch (Exception e2) {
com.moengage.core.internal.logger.f.Companion.print(1, e2, new f());
}
}
}