From b6f0fb91dad78506f6498eec60de7ea9040e0276 Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Fri, 16 Jan 2015 13:50:25 +0100 Subject: show notification if KeyListActivity is spawned with an EXTRA_RESULT Closes #1029 Conflicts: OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListActivity.java --- .../org/sufficientlysecure/keychain/ui/FirstTimeActivity.java | 3 ++- .../java/org/sufficientlysecure/keychain/ui/KeyListActivity.java | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'OpenKeychain') 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 e5db48304..e487c8947 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/FirstTimeActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/FirstTimeActivity.java @@ -98,7 +98,7 @@ public class FirstTimeActivity extends BaseActivity { if (srcData != null) { intent.putExtras(srcData); } - startActivityForResult(intent, 0); + startActivity(intent); finish(); } @@ -107,4 +107,5 @@ public class FirstTimeActivity extends BaseActivity { 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 7d037f85d..0b06bd06f 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListActivity.java @@ -64,6 +64,15 @@ public class KeyListActivity extends DrawerActivity { mExportHelper = new ExportHelper(this); + 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); } -- cgit v1.2.3