导航菜单

页面标题

页面副标题

Minits v4.9.3.32 - AppForegroundServiceClickReceiver.java 源代码

正在查看: Minits v4.9.3.32 应用的 AppForegroundServiceClickReceiver.java JAVA 源代码文件

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


package com.xone.android.framework.receivers;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Build;

public final class AppForegroundServiceClickReceiver extends BroadcastReceiver {
    public static void a(Context context) {
        Context applicationContext = context.getApplicationContext();
        if (applicationContext == null) {
            return;
        }
        String packageName = applicationContext.getPackageName();
        Intent intent = new Intent("android.settings.APP_NOTIFICATION_SETTINGS");
        intent.addFlags(268435456);
        if (Build.VERSION.SDK_INT >= 26) {
            intent.putExtra("android.provider.extra.APP_PACKAGE", packageName);
        } else {
            intent.putExtra("app_package", packageName);
            intent.putExtra("app_uid", applicationContext.getApplicationInfo().uid);
        }
        applicationContext.startActivity(intent);
    }

    @Override
    public void onReceive(Context context, Intent intent) {
        Context applicationContext;
        if (context == null || (applicationContext = context.getApplicationContext()) == null) {
            return;
        }
        try {
            a(applicationContext);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}