Skip to content
This repository has been archived by the owner on Sep 17, 2023. It is now read-only.

Commit

Permalink
Fixed a potential NullPointerException after recreate() is called whe…
Browse files Browse the repository at this point in the history
…n setting a new theme
  • Loading branch information
maxieds committed Jun 29, 2019
1 parent 9608bf1 commit 119f4ba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ android {
applicationId "com.maxieds.chameleonminilivedebugger"
minSdkVersion 26
targetSdkVersion 28
versionCode 59
versionName "0.5.9"
versionCode 60
versionName "0.6.0"
//multiDexEnabled true

buildConfigField "String", "GIT_COMMIT_HASH", "\"" + getGitCommitHash() + "\""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,11 @@ public void onReceive(Context context, Intent intent) {
@Override
public void recreate() {

unregisterReceiver(usbActionReceiver);
usbReceiversRegistered = false;
runningActivity = null;

if(usbActionReceiver != null) {
unregisterReceiver(usbActionReceiver);
usbReceiversRegistered = false;
}
//runningActivity = null;
//super.recreate();
Intent intent = getIntent();
intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
Expand Down

0 comments on commit 119f4ba

Please sign in to comment.