mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-12-24 07:58:50 -05:00
parent
fda9bd1386
commit
2a34d0e0e4
@ -90,7 +90,7 @@
|
||||
<activity
|
||||
android:name=".ui.ViewCertActivity"
|
||||
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
|
||||
android:label="View Certificate Details"
|
||||
android:label="@string/title_view_cert"
|
||||
android:parentActivityName=".ui.ViewKeyActivity">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -538,5 +538,6 @@
|
||||
<string name="no_subkey">subkey unavailable</string>
|
||||
<string name="key_stripped">stripped</string>
|
||||
<string name="secret_cannot_multiple">Secret keys can only be deleted individually!</string>
|
||||
<string name="title_view_cert">View Certificate Details</string>
|
||||
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user