mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-30 12:32:17 -05:00
GET_KEY: also return PendingIntent to key view
This commit is contained in:
parent
e14ce09186
commit
2a33eae9eb
@ -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) {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user