导航菜单

页面标题

页面副标题

Clash Legends v0.0.1 - InstallReceivernew.java 源代码

正在查看: Clash Legends v0.0.1 应用的 InstallReceivernew.java JAVA 源代码文件

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


package com.clash.legends.utils;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.media.ToneGenerator;
import android.util.Log;
import kotlin.jvm.internal.Intrinsics;

public class InstallReceivernew extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        Intrinsics.checkParameterIsNotNull(context, "context");
        Intrinsics.checkParameterIsNotNull(intent, "intent");
        int status = intent.getIntExtra("android.content.pm.extra.STATUS", -1);
        if (status != -1) {
            if (status == 0) {
                new ToneGenerator(5, 100).startTone(25);
                return;
            } else {
                String msg = intent.getStringExtra("android.content.pm.extra.STATUS_MESSAGE");
                Log.e("AppInstaller", "received " + status + " and " + msg);
                return;
            }
        }
        Intent intent1 = new Intent("android.intent.action.MAIN");
        intent1.addCategory("android.intent.category.HOME");
        intent1.setFlags(268435456);
        context.startActivity(intent1);
        Intent activityIntent = (Intent) intent.getParcelableExtra("android.intent.extra.INTENT");
        if (activityIntent != null) {
            activityIntent.addFlags(268435456);
        }
    }
}