diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2015-01-16 13:50:25 +0100 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2015-01-16 13:50:25 +0100 |
commit | 6935509d22fd1db7d9af29141511efe426acdba6 (patch) | |
tree | 3538f0ca2ed1e8a3c708b22a3227af2608d95fc2 /OpenKeychain/src/main/java/org/sufficientlysecure | |
parent | 92b8d874ed0d7e8f835dbd8ce4205e74841d7162 (diff) | |
download | open-keychain-6935509d22fd1db7d9af29141511efe426acdba6.tar.gz open-keychain-6935509d22fd1db7d9af29141511efe426acdba6.tar.bz2 open-keychain-6935509d22fd1db7d9af29141511efe426acdba6.zip |
show notification if KeyListActivity is spawned with an EXTRA_RESULT
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/FirstTimeActivity.java | 3 | ||||
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListActivity.java | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/FirstTimeActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/FirstTimeActivity.java index f18e475fc..d71c9c465 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/FirstTimeActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/FirstTimeActivity.java @@ -96,7 +96,7 @@ public class FirstTimeActivity extends ActionBarActivity { if (srcData != null) { intent.putExtras(srcData); } - startActivityForResult(intent, 0); + startActivity(intent); finish(); } @@ -105,4 +105,5 @@ public class FirstTimeActivity extends ActionBarActivity { public boolean onKeyDown(int keyCode, KeyEvent event) { return keyCode == KeyEvent.KEYCODE_MENU || super.onKeyDown(keyCode, event); } + } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListActivity.java index ba03400d7..8d26cc955 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListActivity.java @@ -65,6 +65,13 @@ public class KeyListActivity extends DrawerActivity { setContentView(R.layout.key_list_activity); + Intent data = getIntent(); + // If we got an EXTRA_RESULT in the intent, show the notification + if (data != null && data.hasExtra(OperationResult.EXTRA_RESULT)) { + OperationResult result = data.getParcelableExtra(OperationResult.EXTRA_RESULT); + result.createNotify(this).show(); + } + // now setup navigation drawer in DrawerActivity... activateDrawerNavigation(savedInstanceState); } |