Skip to content
This repository has been archived by the owner on Dec 21, 2021. It is now read-only.

Commit

Permalink
Fix another NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
Cj-Malone committed Jan 27, 2017
1 parent 6cda614 commit 23554bd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "uk.co.keepawayfromfire.screens"
minSdkVersion 24
targetSdkVersion 25
versionCode 6
versionName "5.1"
versionCode 7
versionName "5.1.1"
resValue("string", "versionName", versionName)
resValue("string", "version", "Version " + versionName)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,8 @@ public void loadIntent(Intent intent) {
return;
}

if (intent.getStringExtra(INTENT_TYPE).equals(INTENT_TYPE_INTENTS)) {
primaryIntent = intent.getParcelableExtra(ShortcutActivity.INTENT_EXTRA_1);
secondaryIntent = intent.getParcelableExtra(ShortcutActivity.INTENT_EXTRA_2);

if (primaryIntent == null || secondaryIntent == null) {
goHome();
return;
}
} else { //INTENT_TYPE_PACKAGES
if (intent.getStringExtra(INTENT_TYPE) == null || intent.getStringExtra(INTENT_TYPE)
.equals(INTENT_TYPE_PACKAGES)) {
String pkg1 = intent.getStringExtra(INTENT_EXTRA_PACKAGE_1);
String pkg2 = intent.getStringExtra(INTENT_EXTRA_PACKAGE_2);

Expand All @@ -117,6 +110,14 @@ public void loadIntent(Intent intent) {

secondaryIntent.addFlags(Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT);
secondaryIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
} else if (intent.getStringExtra(INTENT_TYPE).equals(INTENT_TYPE_INTENTS)) {
primaryIntent = intent.getParcelableExtra(ShortcutActivity.INTENT_EXTRA_1);
secondaryIntent = intent.getParcelableExtra(ShortcutActivity.INTENT_EXTRA_2);

if (primaryIntent == null || secondaryIntent == null) {
goHome();
return;
}
}
}

Expand Down

0 comments on commit 23554bd

Please sign in to comment.