aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2014-05-07 14:53:35 +0200
committerDominik Schürmann <dominik@dominikschuermann.de>2014-05-07 14:53:35 +0200
commit2a33eae9ebad8b24326ad30b262e6062f47be80f (patch)
tree1a58e00d8a80963950d9c3d5a5bd7933771e9cf4 /OpenKeychain
parente14ce09186cde662ec24312a1722692cac25d5c3 (diff)
downloadopen-keychain-2a33eae9ebad8b24326ad30b262e6062f47be80f.tar.gz
open-keychain-2a33eae9ebad8b24326ad30b262e6062f47be80f.tar.bz2
open-keychain-2a33eae9ebad8b24326ad30b262e6062f47be80f.zip
GET_KEY: also return PendingIntent to key view
Diffstat (limited to 'OpenKeychain')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java11
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java2
2 files changed, 11 insertions, 2 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java
index 1e0cfaa8e..5691d2fe2 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java
@@ -42,6 +42,7 @@ import org.sufficientlysecure.keychain.provider.ProviderHelper;
import org.sufficientlysecure.keychain.remote.ui.RemoteServiceActivity;
import org.sufficientlysecure.keychain.service.PassphraseCacheService;
import org.sufficientlysecure.keychain.ui.ImportKeysActivity;
+import org.sufficientlysecure.keychain.ui.ViewKeyActivity;
import org.sufficientlysecure.keychain.util.InputData;
import org.sufficientlysecure.keychain.util.Log;
@@ -417,7 +418,15 @@ public class OpenPgpService extends RemoteService {
Intent result = new Intent();
result.putExtra(OpenPgpApi.RESULT_CODE, OpenPgpApi.RESULT_CODE_SUCCESS);
- // TODO: also return PendingIntent that opens the key view activity
+ // also return PendingIntent that opens the key view activity
+ Intent intent = new Intent(getBaseContext(), ViewKeyActivity.class);
+ intent.setData(KeyRings.buildGenericKeyRingUri(Long.toString(masterKeyId)));
+
+ PendingIntent pi = PendingIntent.getActivity(getBaseContext(), 0,
+ intent,
+ PendingIntent.FLAG_CANCEL_CURRENT);
+
+ result.putExtra(OpenPgpApi.RESULT_INTENT, pi);
return result;
} catch (ProviderHelper.NotFoundException e) {
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java
index 1955c122d..8c52e6f22 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java
@@ -67,7 +67,7 @@ public class ViewKeyActivity extends ActionBarActivity implements
protected Uri mDataUri;
- public static final String EXTRA_SELECTED_TAB = "selectedTab";
+ public static final String EXTRA_SELECTED_TAB = "selected_tab";
public static final int TAB_MAIN = 0;
public static final int TAB_SHARE = 1;
public static final int TAB_KEYS = 2;