导航菜单

页面标题

页面副标题

RummyCircle v11000.89 - DefaultErrorScreen.java 源代码

正在查看: RummyCircle v11000.89 应用的 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 {
    public static final int e = 0;
    public Button a;
    public Button b;
    public Button c;
    public TextView d;

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

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

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

        @Override
        public final void onClick(View view) {
            Context applicationContext = DefaultErrorScreen.this.getApplicationContext();
            int i = DefaultErrorScreen.e;
            try {
                if (applicationContext == null) {
                    throw new Exception("Was not able to restart application, Context null");
                }
                PackageManager packageManager = applicationContext.getPackageManager();
                if (packageManager == null) {
                    throw new Exception("Was not able to restart application, PM null");
                }
                Intent launchIntentForPackage = packageManager.getLaunchIntentForPackage(applicationContext.getPackageName());
                if (launchIntentForPackage == null) {
                    throw new Exception("Was not able to restart application, mStartActivity null");
                }
                launchIntentForPackage.addFlags(67108864);
                ((AlarmManager) applicationContext.getSystemService("alarm")).set(1, System.currentTimeMillis() + 100, PendingIntent.getActivity(applicationContext, 654311, launchIntentForPackage, 301989888));
                System.exit(0);
            } catch (Exception unused) {
                Log.e("RN_ERROR_HANDLER", "Was not able to restart application");
            }
        }
    }

    public class c implements View.OnClickListener {
        @Override
        public final void onClick(View view) {
            System.exit(0);
        }
    }

    @Override
    public final void onCreate(Bundle bundle) {
        String str;
        super.onCreate(bundle);
        try {
            str = getIntent().getExtras().getString("stack_trace_string");
        } catch (Exception e2) {
            Log.e("RN_ERROR_HANDLER", String.format("Was not able to get StackTrace: %s", e2.getMessage()));
            str = "StackTrace unavailable";
        }
        setContentView(com.masteratul.exceptionhandler.c.default_error_screen);
        this.a = (Button) findViewById(com.masteratul.exceptionhandler.b.eh_quit_button);
        this.b = (Button) findViewById(com.masteratul.exceptionhandler.b.eh_restart_button);
        this.c = (Button) findViewById(com.masteratul.exceptionhandler.b.eh_show_details_button);
        TextView textView = (TextView) findViewById(com.masteratul.exceptionhandler.b.eh_stack_trace_text_view);
        this.d = textView;
        textView.setText(str);
        this.c.setOnClickListener(new a());
        this.b.setOnClickListener(new b());
        this.a.setOnClickListener(new c());
    }
}