导航菜单

页面标题

页面副标题

Kickcash v16.1 - DefaultErrorScreen.java 源代码

正在查看: Kickcash v16.1 应用的 DefaultErrorScreen.java JAVA 源代码文件

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


package com.masteratul.exceptionhandler;

import android.app.Activity;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class DefaultErrorScreen extends Activity {
    private static String F0 = "RN_ERROR_HANDLER";
    private TextView E0;
    private Button X;
    private Button Y;
    private Button Z;

    class a implements View.OnClickListener {
        a() {
        }

        @Override
        public void onClick(View view) {
            if (DefaultErrorScreen.this.E0.getVisibility() == 0) {
                DefaultErrorScreen.this.E0.setVisibility(8);
                DefaultErrorScreen.this.Z.setText("SHOW DETAILS");
            } else {
                DefaultErrorScreen.this.E0.setVisibility(0);
                DefaultErrorScreen.this.Z.setText("HIDE DETAILS");
            }
        }
    }

    class b implements View.OnClickListener {
        b() {
        }

        @Override
        public void onClick(View view) {
            DefaultErrorScreen.c(DefaultErrorScreen.this.getApplicationContext());
        }
    }

    class c implements View.OnClickListener {
        c() {
        }

        @Override
        public void onClick(View view) {
            System.exit(0);
        }
    }

    public static void c(Context context) {
        try {
            if (context == null) {
                throw new Exception("Was not able to restart application, Context null");
            }
            PackageManager packageManager = context.getPackageManager();
            if (packageManager == null) {
                throw new Exception("Was not able to restart application, PM null");
            }
            Intent launchIntentForPackage = packageManager.getLaunchIntentForPackage(context.getPackageName());
            if (launchIntentForPackage == null) {
                throw new Exception("Was not able to restart application, mStartActivity null");
            }
            launchIntentForPackage.addFlags(67108864);
            ((AlarmManager) context.getSystemService("alarm")).set(1, System.currentTimeMillis() + 100, PendingIntent.getActivity(context, 654311, launchIntentForPackage, 268435456));
            System.exit(0);
        } catch (Exception unused) {
            Log.e(F0, "Was not able to restart application");
        }
    }

    @Override
    protected void onCreate(Bundle bundle) {
        String str;
        super.onCreate(bundle);
        try {
            str = getIntent().getExtras().getString("stack_trace_string");
        } catch (Exception e) {
            Log.e(F0, String.format("Was not able to get StackTrace: %s", e.getMessage()));
            str = "StackTrace unavailable";
        }
        setContentView(R.layout.default_error_screen);
        this.X = (Button) findViewById(R.id.eh_quit_button);
        this.Y = (Button) findViewById(R.id.eh_restart_button);
        this.Z = (Button) findViewById(R.id.eh_show_details_button);
        TextView textView = (TextView) findViewById(R.id.eh_stack_trace_text_view);
        this.E0 = textView;
        textView.setText(str);
        this.Z.setOnClickListener(new a());
        this.Y.setOnClickListener(new b());
        this.X.setOnClickListener(new c());
    }
}