导航菜单

页面标题

页面副标题

Housing v14.7.8 - MoERichPushIntentService.java 源代码

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

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


package com.moengage.richnotification.internal;

import android.app.IntentService;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import com.moengage.core.internal.global.IntentProcessorKt;
import com.moengage.core.internal.logger.Logger;
import com.moengage.core.internal.model.SdkInstance;
import com.moengage.core.internal.utils.CoreUtils;
import com.moengage.pushbase.internal.PushConstantsInternal;
import com.moengage.pushbase.internal.PushHelper;
import kotlin.Metadata;
import kotlin.jvm.internal.k0;
import kotlin.jvm.internal.r;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@Metadata(d1 = {"\u0000\"\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0003\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003J\u0019\u0010\u0007\u001a\u00020\u00062\b\u0010\u0005\u001a\u0004\u0018\u00010\u0004H\u0014¢\u0006\u0004\b\u0007\u0010\bR\u0014\u0010\n\u001a\u00020\t8\u0002X\u0082D¢\u0006\u0006\n\u0004\b\n\u0010\u000b¨\u0006\f"}, d2 = {"Lcom/moengage/richnotification/internal/MoERichPushIntentService;", "Landroid/app/IntentService;", "<init>", "()V", "Landroid/content/Intent;", "intent", "Lzp/j0;", "onHandleIntent", "(Landroid/content/Intent;)V", "", "tag", "Ljava/lang/String;", "rich-notification_defaultRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
public final class MoERichPushIntentService extends IntentService {

    @NotNull
    private final String tag;

    public MoERichPushIntentService() {
        super("RichPushIntentService");
        this.tag = "RichPush_5.1.1_MoERichPushIntentService";
    }

    @Override
    public void onHandleIntent(@Nullable Intent intent) {
        Bundle extras;
        try {
            Logger.Companion companion = Logger.INSTANCE;
            Logger.Companion.print$default(companion, 0, null, null, new MoERichPushIntentService$onHandleIntent$1(this), 7, null);
            if (intent != null && (extras = intent.getExtras()) != null) {
                CoreUtils.logBundle(this.tag, extras);
                IntentProcessorKt.notifyPreProcessListenerIfRequired(extras);
                PushHelper.Companion companion2 = PushHelper.INSTANCE;
                SdkInstance sdkInstanceForPayload = companion2.getInstance().getSdkInstanceForPayload(extras);
                if (sdkInstanceForPayload == null) {
                    Logger.Companion.print$default(companion, 0, null, null, new MoERichPushIntentService$onHandleIntent$2(this), 7, null);
                    return;
                }
                k0 k0Var = new k0();
                k0Var.element = extras.getInt(RichPushConstantsKt.IMAGE_INDEX, -1);
                int i = extras.getInt(RichPushConstantsKt.TOTAL_IMAGE_COUNT, -1);
                String string = extras.getString(RichPushConstantsKt.NAVIGATION_DIRECTION, RichPushConstantsKt.NAVIGATION_DIRECTION_NEXT);
                Logger.log$default(sdkInstanceForPayload.logger, 0, null, null, new MoERichPushIntentService$onHandleIntent$3(this, string, k0Var, i), 7, null);
                if (i == -1) {
                    return;
                }
                extras.putBoolean(PushConstantsInternal.KEY_RE_NOTIFY, true);
                if (k0Var.element == -1) {
                    Logger.log$default(sdkInstanceForPayload.logger, 0, null, null, new MoERichPushIntentService$onHandleIntent$4(this), 7, null);
                    extras.putInt(RichPushConstantsKt.IMAGE_INDEX, 0);
                    PushHelper companion3 = companion2.getInstance();
                    Context applicationContext = getApplicationContext();
                    r.j(applicationContext, "getApplicationContext(...)");
                    companion3.handlePushPayload(applicationContext, extras);
                    return;
                }
                if (r.f(string, RichPushConstantsKt.NAVIGATION_DIRECTION_NEXT)) {
                    int i2 = k0Var.element + 1;
                    k0Var.element = i2;
                    if (i2 >= i) {
                        k0Var.element = 0;
                    }
                } else {
                    if (!r.f(string, RichPushConstantsKt.NAVIGATION_DIRECTION_PREVIOUS)) {
                        throw new IllegalStateException("Not a valid direction");
                    }
                    int i3 = k0Var.element - 1;
                    k0Var.element = i3;
                    if (i3 < 0) {
                        k0Var.element = i - 1;
                    }
                }
                Logger.log$default(sdkInstanceForPayload.logger, 0, null, null, new MoERichPushIntentService$onHandleIntent$5(this, k0Var), 7, null);
                extras.putInt(RichPushConstantsKt.IMAGE_INDEX, k0Var.element);
                PushHelper companion4 = companion2.getInstance();
                Context applicationContext2 = getApplicationContext();
                r.j(applicationContext2, "getApplicationContext(...)");
                companion4.handlePushPayload(applicationContext2, extras);
            }
        } catch (Throwable th) {
            Logger.Companion.print$default(Logger.INSTANCE, 1, th, null, new MoERichPushIntentService$onHandleIntent$6(this), 4, null);
        }
    }
}