导航菜单

页面标题

页面副标题

bbinstant v6.24.0 - MoEFireBaseMessagingService.java 源代码

正在查看: bbinstant v6.24.0 应用的 MoEFireBaseMessagingService.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.moengage.firebase;

import android.content.Context;
import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.RemoteMessage;
import com.moengage.core.internal.logger.f;
import com.moengage.firebase.internal.j;
import com.moengage.firebase.internal.m;
import java.util.Map;
import kotlin.jvm.internal.v;
import kotlin.jvm.internal.w;

public final class MoEFireBaseMessagingService extends FirebaseMessagingService {
    private final String tag = "FCM_6.4.0_MoEFireBaseMessagingService";

    static final class a extends w implements kotlin.jvm.functions.a {
        a() {
            super(0);
        }

        public final String invoke() {
            return v.stringPlus(MoEFireBaseMessagingService.this.tag, " onMessageReceived() : Will try to show push");
        }
    }

    static final class b extends w implements kotlin.jvm.functions.a {
        b() {
            super(0);
        }

        public final String invoke() {
            return v.stringPlus(MoEFireBaseMessagingService.this.tag, " onMessageReceived() : Not a MoEngage Payload.");
        }
    }

    static final class c extends w implements kotlin.jvm.functions.a {
        c() {
            super(0);
        }

        public final String invoke() {
            return v.stringPlus(MoEFireBaseMessagingService.this.tag, " onMessageReceived() : ");
        }
    }

    static final class d extends w implements kotlin.jvm.functions.a {
        final String $token;

        d(String str) {
            super(0);
            this.$token = str;
        }

        public final String invoke() {
            return MoEFireBaseMessagingService.this.tag + " onNewToken() : Push Token " + this.$token;
        }
    }

    static final class e extends w implements kotlin.jvm.functions.a {
        e() {
            super(0);
        }

        public final String invoke() {
            return v.stringPlus(MoEFireBaseMessagingService.this.tag, " onNewToken() : ");
        }
    }

    @Override
    public void onMessageReceived(RemoteMessage remoteMessage) {
        v.checkNotNullParameter(remoteMessage, "remoteMessage");
        try {
            Map<String, String> data = remoteMessage.getData();
            v.checkNotNullExpressionValue(data, "remoteMessage.data");
            if (com.moengage.pushbase.b.Companion.getInstance().isFromMoEngagePlatform(data)) {
                f.a.print$default(f.Companion, 0, null, new a(), 3, null);
                com.moengage.firebase.a c0112a = com.moengage.firebase.a.Companion.getInstance();
                Context applicationContext = getApplicationContext();
                v.checkNotNullExpressionValue(applicationContext, "applicationContext");
                c0112a.passPushPayload(applicationContext, data);
            } else {
                f.a.print$default(f.Companion, 0, null, new b(), 3, null);
                j.notifyNonMoEngagePush(remoteMessage);
            }
        } catch (Exception e2) {
            f.Companion.print(1, e2, new c());
        }
    }

    @Override
    public void onNewToken(String str) {
        v.checkNotNullParameter(str, "token");
        try {
            f.a.print$default(f.Companion, 0, null, new d(str), 3, null);
            m mVar = m.INSTANCE;
            Context applicationContext = getApplicationContext();
            v.checkNotNullExpressionValue(applicationContext, "applicationContext");
            mVar.processPushToken(applicationContext, str);
        } catch (Exception e2) {
            f.Companion.print(1, e2, new e());
        }
    }
}