正在查看: Clash Legends v0.0.1 应用的 FCMBroadcastReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Clash Legends v0.0.1 应用的 FCMBroadcastReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.onesignal.notifications.receivers;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import com.google.firebase.messaging.Constants;
import com.onesignal.OneSignal;
import com.onesignal.notifications.internal.bundle.INotificationBundleProcessor;
import com.payu.upisdk.util.UpiConstant;
import kotlin.Metadata;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\u0018\u0000 \u000b2\u00020\u0001:\u0001\u000bB\u0005¢\u0006\u0002\u0010\u0002J\u0018\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\bH\u0016J\b\u0010\t\u001a\u00020\u0004H\u0002J\b\u0010\n\u001a\u00020\u0004H\u0002¨\u0006\f"}, d2 = {"Lcom/onesignal/notifications/receivers/FCMBroadcastReceiver;", "Landroid/content/BroadcastReceiver;", "()V", "onReceive", "", "context", "Landroid/content/Context;", UpiConstant.UPI_INTENT_S, "Landroid/content/Intent;", "setAbort", "setSuccessfulResultCode", "Companion", "com.onesignal.notifications"}, k = 1, mv = {1, 7, 1}, xi = 48)
public final class FCMBroadcastReceiver extends BroadcastReceiver {
public static final Companion INSTANCE = new Companion(null);
private static final String FCM_RECEIVE_ACTION = "com.google.android.c2dm.intent.RECEIVE";
private static final String FCM_TYPE = "gcm";
private static final String MESSAGE_TYPE_EXTRA_KEY = "message_type";
@Override
public void onReceive(Context context, Intent intent) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(intent, "intent");
Bundle bundle = intent.getExtras();
if (bundle == null || Intrinsics.areEqual("google.com/iid", bundle.getString(Constants.MessagePayloadKeys.FROM))) {
return;
}
Context applicationContext = context.getApplicationContext();
Intrinsics.checkNotNullExpressionValue(applicationContext, "context.applicationContext");
if (!OneSignal.initWithContext(applicationContext)) {
return;
}
OneSignal this_$iv = OneSignal.INSTANCE;
INotificationBundleProcessor bundleProcessor = (INotificationBundleProcessor) this_$iv.getServices().getService(INotificationBundleProcessor.class);
if (!INSTANCE.isFCMMessage(intent)) {
setSuccessfulResultCode();
return;
}
INotificationBundleProcessor.ProcessedBundleResult processedResult = bundleProcessor.processBundleFromReceiver(context, bundle);
Intrinsics.checkNotNull(processedResult);
if (processedResult.getIsWorkManagerProcessing()) {
setAbort();
} else {
setSuccessfulResultCode();
}
}
private final void setSuccessfulResultCode() {
if (isOrderedBroadcast()) {
setResultCode(-1);
}
}
private final void setAbort() {
if (isOrderedBroadcast()) {
abortBroadcast();
setResultCode(-1);
}
}
@Metadata(d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0000\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0010\u0010\u0007\u001a\u00020\b2\u0006\u0010\t\u001a\u00020\nH\u0002R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082T¢\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0004X\u0082T¢\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0004X\u0082T¢\u0006\u0002\n\u0000¨\u0006\u000b"}, d2 = {"Lcom/onesignal/notifications/receivers/FCMBroadcastReceiver$Companion;", "", "()V", "FCM_RECEIVE_ACTION", "", "FCM_TYPE", "MESSAGE_TYPE_EXTRA_KEY", "isFCMMessage", "", UpiConstant.UPI_INTENT_S, "Landroid/content/Intent;", "com.onesignal.notifications"}, k = 1, mv = {1, 7, 1}, xi = 48)
public static final class Companion {
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final boolean isFCMMessage(Intent intent) {
if (!Intrinsics.areEqual(FCMBroadcastReceiver.FCM_RECEIVE_ACTION, intent.getAction())) {
return false;
}
String messageType = intent.getStringExtra("message_type");
return messageType == null || Intrinsics.areEqual("gcm", messageType);
}
}
}