diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2014-04-17 15:29:46 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2014-04-17 15:30:16 +0200 |
commit | 2a34d0e0e4ea86b153eb7ae8d6f7ab5cbaca1efd (patch) | |
tree | 1c0faec06db2cee4580bb504247da12ec4911fc7 /OpenKeychain/src/main/java/org | |
parent | fda9bd13866ff5561725151d0fe25b5a3c9d6342 (diff) | |
download | open-keychain-2a34d0e0e4ea86b153eb7ae8d6f7ab5cbaca1efd.tar.gz open-keychain-2a34d0e0e4ea86b153eb7ae8d6f7ab5cbaca1efd.tar.bz2 open-keychain-2a34d0e0e4ea86b153eb7ae8d6f7ab5cbaca1efd.zip |
add up navigation in ViewCertActivity
Fixes #567
Diffstat (limited to 'OpenKeychain/src/main/java/org')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainContract.java | 4 | ||||
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewCertActivity.java | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainContract.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainContract.java index 08b4412af..78aa4263e 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainContract.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainContract.java @@ -127,6 +127,10 @@ public class KeychainContract { return CONTENT_URI.buildUpon().appendPath(masterKeyId).build(); } + public static Uri buildGenericKeyRingUri(Uri uri) { + return CONTENT_URI.buildUpon().appendPath(uri.getPathSegments().get(1)).build(); + } + public static Uri buildUnifiedKeyRingUri(String masterKeyId) { return CONTENT_URI.buildUpon().appendPath(masterKeyId).appendPath(PATH_UNIFIED).build(); } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewCertActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewCertActivity.java index bd2785fad..899d9864e 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewCertActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewCertActivity.java @@ -22,6 +22,7 @@ import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.support.v4.app.LoaderManager; +import android.support.v4.app.NavUtils; import android.support.v4.content.CursorLoader; import android.support.v4.content.Loader; import android.support.v7.app.ActionBar; @@ -226,6 +227,12 @@ public class ViewCertActivity extends ActionBarActivity @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { + case android.R.id.home: { + Intent viewIntent = NavUtils.getParentActivityIntent(this); + viewIntent.setData(KeyRings.buildGenericKeyRingUri(mDataUri)); + NavUtils.navigateUpTo(this, viewIntent); + return true; + } case R.id.menu_view_cert_view_signer: // can't do this before the data is initialized Intent viewIntent = new Intent(this, ViewKeyActivity.class); |