|
|
@@ -17,6 +17,8 @@ public class CustomCrashActivity extends Activity {
|
|
|
private Button mRestartBtn,mCloseBtn;
|
|
|
private ImageView mErrorIv;
|
|
|
private AnimationDrawable animationDrawable;
|
|
|
+ private Intent intent;
|
|
|
+ private String stackTraceString;
|
|
|
@Override
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
super.onCreate(savedInstanceState);
|
|
|
@@ -26,20 +28,20 @@ public class CustomCrashActivity extends Activity {
|
|
|
mCloseBtn = (Button) findViewById(R.id.close_btn);
|
|
|
mErrorIv = (ImageView) findViewById(R.id.error_image);
|
|
|
|
|
|
-// animationDrawable = (AnimationDrawable) mErrorIv.getBackground();
|
|
|
-// animationDrawable.start();
|
|
|
-
|
|
|
- final Class<? extends Activity> activityClassFromIntent = CustomActivityOnCrash.getRestartActivityClassFromIntent(getIntent());
|
|
|
- final CustomActivityOnCrash.EventListener listenerFromIntent = CustomActivityOnCrash.getEventListenerFromIntent(getIntent());
|
|
|
+ intent = getIntent();
|
|
|
+// stackTraceString = CustomActivityOnCrash.getStackTraceFromIntent(intent);
|
|
|
+ stackTraceString = CustomActivityOnCrash.getAllErrorDetailsFromIntent(this,intent);
|
|
|
+ /*if (stackTraceString != null){
|
|
|
+ Toast.makeText(this,stackTraceString,Toast.LENGTH_LONG).show();
|
|
|
+ }*/
|
|
|
+ final Class<? extends Activity> activityClassFromIntent = CustomActivityOnCrash.getRestartActivityClassFromIntent(intent);
|
|
|
+ final CustomActivityOnCrash.EventListener listenerFromIntent = CustomActivityOnCrash.getEventListenerFromIntent(intent);
|
|
|
|
|
|
mRestartBtn.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
|
Intent intent = new Intent(CustomCrashActivity.this,activityClassFromIntent);
|
|
|
CustomActivityOnCrash.restartApplicationWithIntent(CustomCrashActivity.this,intent,listenerFromIntent);
|
|
|
-// Intent intent = new Intent(CustomCrashActivity.this,MainActivity.class);
|
|
|
-// startActivity(intent);
|
|
|
-// finish();
|
|
|
}
|
|
|
});
|
|
|
|