导航菜单

页面标题

页面副标题

Housing v14.7.8 - MoEPushReceiver.java 源代码

正在查看: Housing v14.7.8 应用的 MoEPushReceiver.java JAVA 源代码文件

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


package com.moengage.pushbase.internal;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import androidx.annotation.Keep;
import com.moengage.core.MoEConstants;
import com.moengage.core.internal.logger.Logger;
import com.moengage.core.internal.utils.CoreUtils;
import kotlin.Metadata;
import kotlin.jvm.internal.r;
import kotlin.text.q;
import org.jetbrains.annotations.NotNull;

@Keep
@Metadata(d1 = {"\u00000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0002\b\u0003\b\u0007\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003J\u001f\u0010\t\u001a\u00020\b2\u0006\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0007\u001a\u00020\u0006H\u0002¢\u0006\u0004\b\t\u0010\nJ\u001f\u0010\u000b\u001a\u00020\b2\u0006\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0007\u001a\u00020\u0006H\u0002¢\u0006\u0004\b\u000b\u0010\nJ\u001f\u0010\u000e\u001a\u00020\b2\u0006\u0010\u0005\u001a\u00020\u00042\u0006\u0010\r\u001a\u00020\fH\u0016¢\u0006\u0004\b\u000e\u0010\u000fR\u0014\u0010\u0011\u001a\u00020\u00108\u0002X\u0082D¢\u0006\u0006\n\u0004\b\u0011\u0010\u0012¨\u0006\u0013"}, d2 = {"Lcom/moengage/pushbase/internal/MoEPushReceiver;", "Landroid/content/BroadcastReceiver;", "<init>", "()V", "Landroid/content/Context;", "context", "Landroid/os/Bundle;", "extras", "Lzp/j0;", "handleNotificationDismiss", "(Landroid/content/Context;Landroid/os/Bundle;)V", "handleNotification", "Landroid/content/Intent;", "intent", "onReceive", "(Landroid/content/Context;Landroid/content/Intent;)V", "", "tag", "Ljava/lang/String;", "pushbase_defaultRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
public final class MoEPushReceiver extends BroadcastReceiver {

    @NotNull
    private final String tag = "PushBase_8.3.1_MoEPushReceiver";

    private final void handleNotification(Context context, Bundle extras) {
        Logger.Companion.print$default(Logger.INSTANCE, 0, null, null, new MoEPushReceiver$handleNotification$1(this), 7, null);
        PushHelper.INSTANCE.getInstance().handlePushPayload(context, extras);
    }

    private final void handleNotificationDismiss(Context context, Bundle extras) {
        String string = extras.getString(MoEConstants.PUSH_NOTIFICATION_CAMPAIGN_ID, "");
        r.j(string, "getString(...)");
        String notificationTagFromCampaignId = UtilsKt.getNotificationTagFromCampaignId(string);
        Logger.Companion companion = Logger.INSTANCE;
        Logger.Companion.print$default(companion, 0, null, null, new MoEPushReceiver$handleNotificationDismiss$1(this, notificationTagFromCampaignId), 7, null);
        if (q.D(notificationTagFromCampaignId)) {
            return;
        }
        UtilsKt.removeNotificationFromDrawer(context, PushConstantsInternal.DEFAULT_NOTIFICATION_ID, notificationTagFromCampaignId);
        Logger.Companion.print$default(companion, 0, null, null, new MoEPushReceiver$handleNotificationDismiss$2(this, notificationTagFromCampaignId), 7, null);
    }

    @Override
    public void onReceive(@NotNull Context context, @NotNull Intent intent) {
        r.k(context, "context");
        r.k(intent, "intent");
        try {
            Logger.Companion companion = Logger.INSTANCE;
            Logger.Companion.print$default(companion, 0, null, null, new MoEPushReceiver$onReceive$1(this), 7, null);
            Bundle extras = intent.getExtras();
            if (extras == null) {
                return;
            }
            String action = intent.getAction();
            Logger.Companion.print$default(companion, 0, null, null, new MoEPushReceiver$onReceive$2(this, action), 7, null);
            if (action != null && !q.D(action)) {
                CoreUtils.logBundle(this.tag, extras);
                if (r.f(action, PushConstantsInternal.ACTION_NOTIFICATION_DISMISS)) {
                    handleNotificationDismiss(context, extras);
                } else if (r.f(action, PushConstantsInternal.ACTION_SHOW_NOTIFICATION)) {
                    handleNotification(context, extras);
                } else {
                    Logger.Companion.print$default(companion, 0, null, null, new MoEPushReceiver$onReceive$3(this), 7, null);
                }
            }
        } catch (Exception e) {
            Logger.Companion.print$default(Logger.INSTANCE, 1, e, null, new MoEPushReceiver$onReceive$4(this), 4, null);
        }
    }
}