show notification if KeyListActivity is spawned with an EXTRA_RESULT

Closes #1029

Conflicts:
	OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListActivity.java
This commit is contained in:
Vincent Breitmoser 2015-01-16 13:50:25 +01:00
parent 09e992081b
commit b6f0fb91da
2 changed files with 11 additions and 1 deletions

View File

@ -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);
}
}

View File

@ -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);
}