Skip to content

Commit 0ef1aea

Browse files
committed
Attempt to fix super.NotFound ANR reports...
1 parent 652f3ff commit 0ef1aea

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ android {
2626
applicationId "com.maxieds.chameleonminilivedebugger"
2727
minSdkVersion 21
2828
targetSdkVersion 27
29-
versionCode 41
30-
versionName "0.4.1"
29+
versionCode 42
30+
versionName "0.4.2"
3131
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
3232
multiDexEnabled true
3333
}

app/src/main/java/com/maxieds/chameleonminilivedebugger/LiveLoggerActivity.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ public void uncaughtException(Thread thread, Throwable ex) {
189189
String msgParam = "An unknown error happened in the app. Please upgrade to the latest version if a newer one is available, or ";
190190
msgParam += "contact the developer at maxieds@gmail.com to report whatever action you took to generate this error!";
191191
appendNewLog(LogEntryMetadataRecord.createDefaultEventRecord("UNRECOGNIZED EXCEPTION", msgParam));
192+
System.exit(-1);
192193
}
193194
};
194195

@@ -201,11 +202,11 @@ public void uncaughtException(Thread thread, Throwable ex) {
201202
protected void onCreate(Bundle savedInstanceState) {
202203

203204
// fix bug where the tabs are blank when the application is relaunched:
205+
super.onCreate(savedInstanceState); // should fix most of the crashes in the ANR report on Play Store
206+
if(!BuildConfig.DEBUG)
207+
Fabric.with(this, new Crashlytics());
204208
if(runningActivity == null || !isTaskRoot()) {
205-
super.onCreate(savedInstanceState);
206209
Thread.setDefaultUncaughtExceptionHandler(unCaughtExceptionHandler);
207-
if(!BuildConfig.DEBUG)
208-
Fabric.with(this, new Crashlytics());
209210
}
210211
if(!isTaskRoot()) {
211212
Log.w(TAG, "ReLaunch Intent Action: " + getIntent().getAction());

0 commit comments

Comments
 (0)