rename extra of import

This commit is contained in:
Dominik Schürmann 2013-09-10 00:39:41 +02:00
parent e7a4297651
commit 56e09b0550
4 changed files with 7 additions and 7 deletions

View File

@ -59,7 +59,7 @@ public class ImportKeysActivity extends SherlockFragmentActivity {
+ "IMPORT_KEY_FROM_NFC"; + "IMPORT_KEY_FROM_NFC";
// only used by IMPORT // only used by IMPORT
public static final String EXTRA_KEYRING_BYTES = "keyring_bytes"; public static final String EXTRA_KEY_BYTES = "key_bytes";
// TODO: import keys from server // TODO: import keys from server
// public static final String EXTRA_KEY_ID = "keyId"; // public static final String EXTRA_KEY_ID = "keyId";
@ -162,8 +162,8 @@ public class ImportKeysActivity extends SherlockFragmentActivity {
if ("file".equals(intent.getScheme()) && intent.getDataString() != null) { if ("file".equals(intent.getScheme()) && intent.getDataString() != null) {
mImportFilename = intent.getData().getPath(); mImportFilename = intent.getData().getPath();
mImportData = null; mImportData = null;
} else if (extras.containsKey(EXTRA_KEYRING_BYTES)) { } else if (extras.containsKey(EXTRA_KEY_BYTES)) {
mImportData = intent.getByteArrayExtra(EXTRA_KEYRING_BYTES); mImportData = intent.getByteArrayExtra(EXTRA_KEY_BYTES);
mImportFilename = null; mImportFilename = null;
} }
loadKeyListFragment(); loadKeyListFragment();

View File

@ -228,7 +228,7 @@ public class KeyServerQueryActivity extends SherlockFragmentActivity {
Intent intent = new Intent(KeyServerQueryActivity.this, Intent intent = new Intent(KeyServerQueryActivity.this,
ImportKeysActivity.class); ImportKeysActivity.class);
intent.setAction(ImportKeysActivity.ACTION_IMPORT_KEY); intent.setAction(ImportKeysActivity.ACTION_IMPORT_KEY);
intent.putExtra(ImportKeysActivity.EXTRA_KEYRING_BYTES, mKeyData.getBytes()); intent.putExtra(ImportKeysActivity.EXTRA_KEY_BYTES, mKeyData.getBytes());
startActivity(intent); startActivity(intent);
} }
} }

View File

@ -116,7 +116,7 @@ public class ShareNfcBeamActivity extends SherlockFragmentActivity implements
Intent importIntent = new Intent(this, ImportKeysActivity.class); Intent importIntent = new Intent(this, ImportKeysActivity.class);
importIntent.setAction(ImportKeysActivity.ACTION_IMPORT_KEY); importIntent.setAction(ImportKeysActivity.ACTION_IMPORT_KEY);
importIntent.putExtra(ImportKeysActivity.EXTRA_KEYRING_BYTES, receivedKeyringBytes); importIntent.putExtra(ImportKeysActivity.EXTRA_KEY_BYTES, receivedKeyringBytes);
finish(); finish();

View File

@ -67,12 +67,12 @@ OpenPGP Keychain specific Intent actions:
* ``org.sufficientlysecure.keychain.action.DECRYPT_FILE`` * ``org.sufficientlysecure.keychain.action.DECRYPT_FILE``
* Include data ``Uri`` (``intent.setData()``) pointing to a file or content provider * Include data ``Uri`` (``intent.setData()``) pointing to a file or content provider
* ``org.sufficientlysecure.keychain.action.IMPORT_KEY`` * ``org.sufficientlysecure.keychain.action.IMPORT_KEY``
* Extras: ``keyring_bytes`` (type: ``byte[]``) * Extras: ``key_bytes`` (type: ``byte[]``)
* or Uri in data with file schema * or Uri in data with file schema
* ``org.sufficientlysecure.keychain.action.IMPORT_KEY_FROM_QR_CODE`` * ``org.sufficientlysecure.keychain.action.IMPORT_KEY_FROM_QR_CODE``
* without extras starts Barcode Scanner to get QR Code * without extras starts Barcode Scanner to get QR Code
## Remote Serive API ## Remote Service API
To do asyncronous fast encryption/decryption/sign/verify operations bind to the remote service. To do asyncronous fast encryption/decryption/sign/verify operations bind to the remote service.
The API Demo contains all required AIDL files and a demo activity. The API Demo contains all required AIDL files and a demo activity.