GET_KEY: also return PendingIntent to key view
This commit is contained in:
@@ -42,6 +42,7 @@ import org.sufficientlysecure.keychain.provider.ProviderHelper;
|
|||||||
import org.sufficientlysecure.keychain.remote.ui.RemoteServiceActivity;
|
import org.sufficientlysecure.keychain.remote.ui.RemoteServiceActivity;
|
||||||
import org.sufficientlysecure.keychain.service.PassphraseCacheService;
|
import org.sufficientlysecure.keychain.service.PassphraseCacheService;
|
||||||
import org.sufficientlysecure.keychain.ui.ImportKeysActivity;
|
import org.sufficientlysecure.keychain.ui.ImportKeysActivity;
|
||||||
|
import org.sufficientlysecure.keychain.ui.ViewKeyActivity;
|
||||||
import org.sufficientlysecure.keychain.util.InputData;
|
import org.sufficientlysecure.keychain.util.InputData;
|
||||||
import org.sufficientlysecure.keychain.util.Log;
|
import org.sufficientlysecure.keychain.util.Log;
|
||||||
|
|
||||||
@@ -417,7 +418,15 @@ public class OpenPgpService extends RemoteService {
|
|||||||
Intent result = new Intent();
|
Intent result = new Intent();
|
||||||
result.putExtra(OpenPgpApi.RESULT_CODE, OpenPgpApi.RESULT_CODE_SUCCESS);
|
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;
|
return result;
|
||||||
} catch (ProviderHelper.NotFoundException e) {
|
} catch (ProviderHelper.NotFoundException e) {
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public class ViewKeyActivity extends ActionBarActivity implements
|
|||||||
|
|
||||||
protected Uri mDataUri;
|
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_MAIN = 0;
|
||||||
public static final int TAB_SHARE = 1;
|
public static final int TAB_SHARE = 1;
|
||||||
public static final int TAB_KEYS = 2;
|
public static final int TAB_KEYS = 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user