导航菜单

页面标题

页面副标题

Crafto v9.3.3 - NotificationForeGroundService.java 源代码

正在查看: Crafto v9.3.3 应用的 NotificationForeGroundService.java JAVA 源代码文件

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


package com.crafto.android.utility;

import Ab.C;
import Hk.q;
import Mk.e;
import Mk.i;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.drawable.GradientDrawable;
import android.os.Build;
import android.os.Bundle;
import android.os.IBinder;
import androidx.lifecycle.J;
import com.crafto.android.utility.a;
import dl.H;
import dl.T;
import dl.g;
import do.a;
import java.util.List;
import java.util.Locale;
import kotlin.Metadata;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.coroutines.CoroutineContext;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;

@Metadata
public final class NotificationForeGroundService extends Hilt_NotificationForeGroundService implements C {
    public NotificationManager e;
    public PendingIntent f;
    public PendingIntent g;
    public Bundle h;
    public String i;
    public b j;

    @e(c = "com.crafto.android.utility.NotificationForeGroundService$onStartCommand$1", f = "NotificationForeGroundService.kt", l = {130}, m = "invokeSuspend")
    public static final class a extends i implements Function2<H, Kk.c<? super Unit>, Object> {
        public int a;

        public a(Kk.c<? super a> cVar) {
            super(2, cVar);
        }

        public final Kk.c<Unit> create(Object obj, Kk.c<?> cVar) {
            return NotificationForeGroundService.this.new a(cVar);
        }

        public final Object invoke(Object obj, Object obj2) {
            return create((H) obj, (Kk.c) obj2).invokeSuspend(Unit.a);
        }

        public final Object invokeSuspend(Object obj) {
            Bundle bundle;
            NotificationForeGroundService notificationForeGroundService = NotificationForeGroundService.this;
            Lk.a aVar = Lk.a.COROUTINE_SUSPENDED;
            int i = this.a;
            try {
                if (i == 0) {
                    q.b(obj);
                    this.a = 1;
                    if (T.b(2500L, this) == aVar) {
                        return aVar;
                    }
                } else {
                    if (i != 1) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    q.b(obj);
                }
                Bundle bundle2 = notificationForeGroundService.h;
                if ((bundle2 != null ? bundle2.getString("wzrk_bp") : null) != null && (bundle = notificationForeGroundService.h) != null) {
                    notificationForeGroundService.b().l(bundle);
                }
            } catch (Exception e) {
                do.a.a.e(e);
            }
            return Unit.a;
        }
    }

    @Override
    public final void a() {
        try {
            do.a.a.c("stopForegroundService service.", new Object[0]);
            if (Build.VERSION.SDK_INT >= 24) {
                stopForeground(2);
            } else {
                stopForeground(true);
            }
            stopSelf();
        } catch (Exception e) {
            do.a.a.e(e);
        }
    }

    public final void attachBaseContext(@NotNull Context context) {
        Intrinsics.checkNotNullParameter(context, "context");
        try {
            do.a.a.c("attachBaseContext", new Object[0]);
            super/*android.app.Service*/.attachBaseContext(context);
            Locale locale = new Locale("hi");
            Locale.setDefault(locale);
            Configuration configuration = new Configuration();
            configuration.locale = locale;
            context.getResources().updateConfiguration(configuration, context.getResources().getDisplayMetrics());
        } catch (Exception e) {
            do.a.a.e(e);
        }
    }

    @NotNull
    public final b b() {
        b bVar = this.j;
        if (bVar != null) {
            return bVar;
        }
        Intrinsics.throwUninitializedPropertyAccessException("customNotificationHelper");
        return null;
    }

    public final IBinder onBind(@NotNull Intent intent) {
        Intrinsics.checkNotNullParameter(intent, "intent");
        do.a.a.c("onBind", new Object[0]);
        super.onBind(intent);
        return null;
    }

    @Override
    public final void onCreate() {
        try {
            do.a.a.c("onCreate", new Object[0]);
            super.onCreate();
            if (Build.VERSION.SDK_INT >= 29) {
                List<Pair<int[], GradientDrawable.Orientation>> list = a.b.a;
                startForeground(1101, b().j(), 1);
            } else {
                List<Pair<int[], GradientDrawable.Orientation>> list2 = a.b.a;
                startForeground(1101, b().j());
            }
        } catch (Exception e) {
            do.a.a.e(e);
        }
    }

    public final void onDestroy() {
        do.a.a.c("onDestroy", new Object[0]);
        super.onDestroy();
    }

    public final int onStartCommand(Intent intent, int i, int i2) {
        a.a aVar = do.a.a;
        aVar.c("onStartCommand1", new Object[0]);
        super.onStartCommand(intent, i, i2);
        try {
            aVar.c("onStartCommand", new Object[0]);
            if (this.e == null) {
                Object systemService = getApplicationContext().getSystemService("notification");
                Intrinsics.checkNotNull(systemService, "null cannot be cast to non-null type android.app.NotificationManager");
                this.e = (NotificationManager) systemService;
            }
            if (intent != null) {
                this.h = (Bundle) intent.getParcelableExtra("remote_message");
                intent.getStringExtra("url_data");
                List<Pair<int[], GradientDrawable.Orientation>> list = a.b.a;
                this.i = intent.getStringExtra("tag");
                intent.getStringExtra("click_action_bundle");
                intent.getStringExtra("param_channel_id");
                this.g = (PendingIntent) intent.getParcelableExtra("pending_intent");
                this.f = (PendingIntent) intent.getParcelableExtra("pending_delete_intent");
            }
            b().j = this.g;
            b().o = this;
            b().l = this.f;
            b().p = this.i;
            b().q = true;
            g.b(J.a(this), (CoroutineContext) null, (dl.J) null, new a(null), 3);
            if (Build.VERSION.SDK_INT >= 29) {
                List<Pair<int[], GradientDrawable.Orientation>> list2 = a.b.a;
                startForeground(1101, b().j(), 1);
                return 2;
            }
            List<Pair<int[], GradientDrawable.Orientation>> list3 = a.b.a;
            startForeground(1101, b().j());
            return 2;
        } catch (Exception e) {
            e.printStackTrace();
            do.a.a.e(e);
            return 2;
        }
    }
}