导航菜单

页面标题

页面副标题

Meta Wolf v1.0.12 - ServiceAbility.java 源代码

正在查看: Meta Wolf v1.0.12 应用的 ServiceAbility.java JAVA 源代码文件

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


package top.bienvenido.saas.i18n.ability;

import android.R;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
import android.content.Intent;
import android.os.Build;
import android.os.IBinder;
import defpackage.AbstractC0933e;
import defpackage.AbstractC1422ln;
import defpackage.AbstractC2048vk;
import defpackage.C1181hw;

public final class ServiceAbility extends Service {
    public static Notification a(ServiceAbility serviceAbility) {
        Object systemService = serviceAbility.getSystemService("notification");
        AbstractC1422ln.g(systemService, "null cannot be cast to non-null type android.app.NotificationManager");
        NotificationManager notificationManager = (NotificationManager) systemService;
        PendingIntent activity = PendingIntent.getActivity(serviceAbility, 0, new Intent(serviceAbility, (Class<?>) MainAbility.class), 67108864);
        C1181hw c1181hw = new C1181hw(serviceAbility, "default_channel");
        c1181hw.g = activity;
        c1181hw.q.icon = R.mipmap.sym_def_app_icon;
        c1181hw.e = C1181hw.b("App Daemon");
        c1181hw.f = C1181hw.b("No further details.");
        c1181hw.n = 1;
        c1181hw.q.flags |= 2;
        c1181hw.l = "service";
        c1181hw.h = -1;
        if (Build.VERSION.SDK_INT >= 26) {
            AbstractC0933e.m();
            NotificationChannel a = AbstractC2048vk.a();
            a.setLockscreenVisibility(-1);
            notificationManager.createNotificationChannel(a);
            c1181hw.o = "default_channel";
        }
        return c1181hw.a();
    }

    @Override
    public final IBinder onBind(Intent intent) {
        return null;
    }

    @Override
    public final int onStartCommand(Intent intent, int i, int i2) {
        String action;
        if (intent != null) {
            try {
                action = intent.getAction();
            } catch (Exception unused) {
            }
        } else {
            action = null;
        }
        if (!AbstractC1422ln.b(action, "stopForeground")) {
            if (Build.VERSION.SDK_INT >= 34) {
                startForeground(12580, a(this), 1073741824);
            } else {
                startForeground(12580, a(this));
            }
            return super.onStartCommand(intent, i, i2);
        }
        if (Build.VERSION.SDK_INT >= 24) {
            stopForeground(1);
        } else {
            stopForeground(true);
        }
        stopSelf();
        return 2;
    }
}