diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java index db3c5736c..5942eadab 100644 --- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java +++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java @@ -48,15 +48,15 @@ import com.google.zxing.integration.android.IntentIntegrator; import com.google.zxing.integration.android.IntentResult; public class ImportKeysActivity extends SherlockFragmentActivity { - public static final String ACTION_KEY_IMPORT = Constants.INTENT_PREFIX + "KEY_IMPORT"; - public static final String ACTION_KEY_IMPORT_FROM_QR_CODE = Constants.INTENT_PREFIX - + "KEY_IMPORT_FROM_QR_CODE"; + public static final String ACTION_IMPORT_KEY = Constants.INTENT_PREFIX + "IMPORT_KEY"; + public static final String ACTION_IMPORT_KEY_FROM_QR_CODE = Constants.INTENT_PREFIX + + "IMPORT_KEY_FROM_QR_CODE"; // Actions for internal use only: - public static final String ACTION_KEY_IMPORT_FROM_FILE = Constants.INTENT_PREFIX - + "KEY_IMPORT_FROM_FILE"; - public static final String ACTION_KEY_IMPORT_FROM_NFC = Constants.INTENT_PREFIX - + "KEY_IMPORT_FROM_NFC"; + public static final String ACTION_IMPOR_KEY_FROM_FILE = Constants.INTENT_PREFIX + + "IMPORT_KEY_FROM_FILE"; + public static final String ACTION_IMPORT_KEY_FROM_NFC = Constants.INTENT_PREFIX + + "IMPORT_KEY_FROM_NFC"; // only used by IMPORT public static final String EXTRA_KEYRING_BYTES = "keyring_bytes"; @@ -145,13 +145,13 @@ public class ImportKeysActivity extends SherlockFragmentActivity { if (Intent.ACTION_VIEW.equals(action)) { // Android's Action when opening file associated to Keychain (see AndroidManifest.xml) // override action to delegate it to Keychains ACTION_IMPORT - action = ACTION_KEY_IMPORT; + action = ACTION_IMPORT_KEY; } /** * APG's own Actions */ - if (ACTION_KEY_IMPORT.equals(action)) { + if (ACTION_IMPORT_KEY.equals(action)) { if ("file".equals(intent.getScheme()) && intent.getDataString() != null) { mImportFilename = intent.getData().getPath(); mImportData = null; @@ -160,15 +160,15 @@ public class ImportKeysActivity extends SherlockFragmentActivity { mImportFilename = null; } loadKeyListFragment(); - } else if (ACTION_KEY_IMPORT_FROM_FILE.equals(action)) { + } else if (ACTION_IMPOR_KEY_FROM_FILE.equals(action)) { if ("file".equals(intent.getScheme()) && intent.getDataString() != null) { mImportFilename = intent.getData().getPath(); mImportData = null; } showImportFromFileDialog(); - } else if (ACTION_KEY_IMPORT_FROM_QR_CODE.equals(action)) { + } else if (ACTION_IMPORT_KEY_FROM_QR_CODE.equals(action)) { importFromQrCode(); - } else if (ACTION_KEY_IMPORT_FROM_NFC.equals(action)) { + } else if (ACTION_IMPORT_KEY_FROM_NFC.equals(action)) { importFromNfc(); } } diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListActivity.java index 08b4f6131..c0a2f12ff 100644 --- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListActivity.java +++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListActivity.java @@ -154,7 +154,7 @@ public class KeyListActivity extends SherlockFragmentActivity { case Id.menu.option.import_from_file: { Intent intentImportFromFile = new Intent(this, ImportKeysActivity.class); - intentImportFromFile.setAction(ImportKeysActivity.ACTION_KEY_IMPORT_FROM_FILE); + intentImportFromFile.setAction(ImportKeysActivity.ACTION_IMPOR_KEY_FROM_FILE); startActivityForResult(intentImportFromFile, 0); return true; } diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListPublicActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListPublicActivity.java index a839fd057..ed6c74b78 100644 --- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListPublicActivity.java +++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListPublicActivity.java @@ -67,7 +67,7 @@ public class KeyListPublicActivity extends KeyListActivity { } case Id.menu.option.import_from_file: { Intent intentImportFromFile = new Intent(this, ImportKeysActivity.class); - intentImportFromFile.setAction(ImportKeysActivity.ACTION_KEY_IMPORT_FROM_FILE); + intentImportFromFile.setAction(ImportKeysActivity.ACTION_IMPOR_KEY_FROM_FILE); startActivityForResult(intentImportFromFile, 0); return true; @@ -75,7 +75,7 @@ public class KeyListPublicActivity extends KeyListActivity { case Id.menu.option.import_from_qr_code: { Intent intentImportFromFile = new Intent(this, ImportKeysActivity.class); - intentImportFromFile.setAction(ImportKeysActivity.ACTION_KEY_IMPORT_FROM_QR_CODE); + intentImportFromFile.setAction(ImportKeysActivity.ACTION_IMPORT_KEY_FROM_QR_CODE); startActivityForResult(intentImportFromFile, Id.request.import_from_qr_code); return true; @@ -83,7 +83,7 @@ public class KeyListPublicActivity extends KeyListActivity { case Id.menu.option.import_from_nfc: { Intent intentImportFromFile = new Intent(this, ImportKeysActivity.class); - intentImportFromFile.setAction(ImportKeysActivity.ACTION_KEY_IMPORT_FROM_NFC); + intentImportFromFile.setAction(ImportKeysActivity.ACTION_IMPORT_KEY_FROM_NFC); startActivityForResult(intentImportFromFile, 0); return true; diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyServerQueryActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyServerQueryActivity.java index a5145d3df..b36b8818e 100644 --- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyServerQueryActivity.java +++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyServerQueryActivity.java @@ -227,7 +227,7 @@ public class KeyServerQueryActivity extends SherlockFragmentActivity { if (mKeyData != null) { Intent intent = new Intent(KeyServerQueryActivity.this, ImportKeysActivity.class); - intent.setAction(ImportKeysActivity.ACTION_KEY_IMPORT); + intent.setAction(ImportKeysActivity.ACTION_IMPORT_KEY); intent.putExtra(ImportKeysActivity.EXTRA_KEYRING_BYTES, mKeyData.getBytes()); startActivity(intent); } diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ShareNfcBeamActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ShareNfcBeamActivity.java index 692cef749..7a20bdbad 100644 --- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ShareNfcBeamActivity.java +++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ShareNfcBeamActivity.java @@ -115,7 +115,7 @@ public class ShareNfcBeamActivity extends SherlockFragmentActivity implements byte[] receivedKeyringBytes = msg.getRecords()[0].getPayload(); Intent importIntent = new Intent(this, ImportKeysActivity.class); - importIntent.setAction(ImportKeysActivity.ACTION_KEY_IMPORT); + importIntent.setAction(ImportKeysActivity.ACTION_IMPORT_KEY); importIntent.putExtra(ImportKeysActivity.EXTRA_KEYRING_BYTES, receivedKeyringBytes); finish(); diff --git a/README.md b/README.md index dca5361e7..50e781427 100644 --- a/README.md +++ b/README.md @@ -50,17 +50,17 @@ These Intents require user interaction! All Intents start with ``org.sufficientlysecure.keychain.action.`` -* ``KEY_IMPORT`` - * Extras: ``keyring_bytes`` - * or Uri in data with file schema -* ``KEY_IMPORT_FROM_QR_CODE`` - * without extras * ``ENCRYPT`` * TODO: explain extras (see source) * ``ENCRYPT_FILE`` * ``DECRYPT`` * TODO: explain extras (see source) * ``DECRYPT_FILE`` +* ``IMPORT_KEY`` + * Extras: ``keyring_bytes`` (``byte[]``) + * or Uri in data with file schema +* ``IMPORT_KEY_FROM_QR_CODE`` + * without extras TODO: - new intent REGISTER_APP?