aboutsummaryrefslogtreecommitdiffstats
path: root/APG/src/org/thialfihar/android/apg/ui
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2012-12-14 18:22:03 +0100
committerDominik Schürmann <dominik@dominikschuermann.de>2012-12-14 18:22:03 +0100
commitbe4e3a10b008dfb33caf593b6e68bb7018c2a41c (patch)
tree781e16e6964cc2482f9eeac7e123659b5bafded8 /APG/src/org/thialfihar/android/apg/ui
parent2dcaad3d3b6f8757f01e4abd2295431f24cdfed5 (diff)
downloadopen-keychain-be4e3a10b008dfb33caf593b6e68bb7018c2a41c.tar.gz
open-keychain-be4e3a10b008dfb33caf593b6e68bb7018c2a41c.tar.bz2
open-keychain-be4e3a10b008dfb33caf593b6e68bb7018c2a41c.zip
AIDL API changes
Diffstat (limited to 'APG/src/org/thialfihar/android/apg/ui')
-rw-r--r--APG/src/org/thialfihar/android/apg/ui/KeyListSecretFragment.java23
1 files changed, 10 insertions, 13 deletions
diff --git a/APG/src/org/thialfihar/android/apg/ui/KeyListSecretFragment.java b/APG/src/org/thialfihar/android/apg/ui/KeyListSecretFragment.java
index 12a0bb131..0d12f5fe4 100644
--- a/APG/src/org/thialfihar/android/apg/ui/KeyListSecretFragment.java
+++ b/APG/src/org/thialfihar/android/apg/ui/KeyListSecretFragment.java
@@ -17,9 +17,10 @@
package org.thialfihar.android.apg.ui;
+import java.util.ArrayList;
+
import org.thialfihar.android.apg.Id;
import org.thialfihar.android.apg.R;
-import org.thialfihar.android.apg.helper.PGPHelper;
import org.thialfihar.android.apg.provider.ProviderHelper;
import org.thialfihar.android.apg.provider.ApgContract.KeyRings;
import org.thialfihar.android.apg.provider.ApgContract.UserIds;
@@ -87,25 +88,21 @@ public class KeyListSecretFragment extends KeyListFragment implements
int groupPosition = ExpandableListView.getPackedPositionGroup(expInfo.packedPosition);
long keyRingRowId = getExpandableListAdapter().getGroupId(groupPosition);
+ // get master key id using row id
+ long masterKeyId = ProviderHelper
+ .getSecretMasterKeyId(mKeyListSecretActivity, keyRingRowId);
+
switch (item.getItemId()) {
case Id.menu.edit:
- // TODO: do it better directly with keyRingRowId?
- long masterKeyId = ProviderHelper.getSecretMasterKeyId(mKeyListSecretActivity,
- keyRingRowId);
-
mKeyListSecretActivity.checkPassPhraseAndEdit(masterKeyId);
- return true;
+ return true;
case Id.menu.share_qr_code:
- // TODO: do it better directly with keyRingRowId?
- long masterKeyId2 = ProviderHelper.getSecretMasterKeyId(mKeyListSecretActivity,
- keyRingRowId);
-
- String msg = PGPHelper.getPubkeyAsArmoredString(mKeyListSecretActivity, masterKeyId2);
+ ArrayList<String> keyringArmored = ProviderHelper.getPublicKeyRingsAsArmoredString(
+ mKeyListSecretActivity, new long[] { masterKeyId });
+ new IntentIntegrator(mKeyListSecretActivity).shareText(keyringArmored.get(0));
- new IntentIntegrator(mKeyListSecretActivity).shareText(msg);
return true;
-
default:
return super.onContextItemSelected(item);