diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-09-07 18:50:58 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-09-07 18:50:58 +0200 |
commit | 857fc43873a24e22fb7b80d00e0086c138c70ca3 (patch) | |
tree | dadb20e7e455314c90fccd120575ce09a8c9ae5a /OpenKeychain/src/main/java/org/sufficientlysecure/keychain | |
parent | a9644cab07d9eb1e1336a7987403590ea60f6e06 (diff) | |
download | open-keychain-857fc43873a24e22fb7b80d00e0086c138c70ca3.tar.gz open-keychain-857fc43873a24e22fb7b80d00e0086c138c70ca3.tar.bz2 open-keychain-857fc43873a24e22fb7b80d00e0086c138c70ca3.zip |
Update and fix Intent API
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain')
4 files changed, 16 insertions, 14 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptActivity.java index 7eecaa6d0..998ed34cd 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptActivity.java @@ -26,6 +26,7 @@ import android.support.v4.view.ViewPager; import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.R; +import org.sufficientlysecure.keychain.api.OpenKeychainIntents; import org.sufficientlysecure.keychain.pgp.PgpHelper; import org.sufficientlysecure.keychain.ui.adapter.PagerTabStripAdapter; import org.sufficientlysecure.keychain.util.Log; @@ -35,10 +36,10 @@ import java.util.regex.Matcher; public class DecryptActivity extends DrawerActivity { /* Intents */ - public static final String ACTION_DECRYPT = Constants.INTENT_PREFIX + "DECRYPT"; + public static final String ACTION_DECRYPT = OpenKeychainIntents.DECRYPT; /* EXTRA keys for input */ - public static final String EXTRA_TEXT = Constants.EXTRA_PREFIX + "EXTRA_TEXT"; + public static final String EXTRA_TEXT = OpenKeychainIntents.DECRYPT_EXTRA_TEXT; ViewPager mViewPager; PagerTabStrip mPagerTabStrip; diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFileActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFileActivity.java index db067498b..3d414c227 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFileActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFileActivity.java @@ -31,6 +31,7 @@ import android.view.MenuItem; import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.R; +import org.sufficientlysecure.keychain.api.OpenKeychainIntents; import org.sufficientlysecure.keychain.compatibility.ClipboardReflection; import org.sufficientlysecure.keychain.helper.Preferences; import org.sufficientlysecure.keychain.helper.ShareHelper; @@ -50,10 +51,10 @@ import java.util.Set; public class EncryptFileActivity extends DrawerActivity implements EncryptActivityInterface { /* Intents */ - public static final String ACTION_ENCRYPT_FILES = Constants.INTENT_PREFIX + "ENCRYPT_FILES"; + public static final String ACTION_ENCRYPT_FILES = OpenKeychainIntents.ENCRYPT_DATA; // enables ASCII Armor for file encryption when uri is given - public static final String EXTRA_ASCII_ARMOR = Constants.EXTRA_PREFIX + "EXTRA_ASCII_ARMOR"; + public static final String EXTRA_ASCII_ARMOR = OpenKeychainIntents.ENCRYPT_EXTRA_ASCII_ARMOR; // preselect ids, for internal use public static final String EXTRA_SIGNATURE_KEY_ID = Constants.EXTRA_PREFIX + "EXTRA_SIGNATURE_KEY_ID"; diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptTextActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptTextActivity.java index 7d84a6c5e..9bed6a5ae 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptTextActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptTextActivity.java @@ -31,6 +31,7 @@ import android.view.MenuItem; import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.R; +import org.sufficientlysecure.keychain.api.OpenKeychainIntents; import org.sufficientlysecure.keychain.compatibility.ClipboardReflection; import org.sufficientlysecure.keychain.helper.Preferences; import org.sufficientlysecure.keychain.helper.ShareHelper; @@ -49,10 +50,10 @@ import java.util.Set; public class EncryptTextActivity extends DrawerActivity implements EncryptActivityInterface { /* Intents */ - public static final String ACTION_ENCRYPT_TEXT = Constants.INTENT_PREFIX + "ENCRYPT_TEXT"; + public static final String ACTION_ENCRYPT_TEXT = OpenKeychainIntents.ENCRYPT_TEXT; /* EXTRA keys for input */ - public static final String EXTRA_TEXT = Constants.EXTRA_PREFIX + "EXTRA_TEXT"; + public static final String EXTRA_TEXT = OpenKeychainIntents.ENCRYPT_EXTRA_TEXT; // preselect ids, for internal use public static final String EXTRA_SIGNATURE_KEY_ID = Constants.EXTRA_PREFIX + "EXTRA_SIGNATURE_KEY_ID"; diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java index 3d871849f..f74e4fdd6 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java @@ -40,6 +40,7 @@ import android.view.ViewGroup; import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.R; +import org.sufficientlysecure.keychain.api.OpenKeychainIntents; import org.sufficientlysecure.keychain.helper.OtherHelper; import org.sufficientlysecure.keychain.helper.Preferences; import org.sufficientlysecure.keychain.keyimport.ImportKeysListEntry; @@ -60,11 +61,9 @@ import java.util.ArrayList; import java.util.Locale; public class ImportKeysActivity extends ActionBarActivity { - 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"; - public static final String ACTION_IMPORT_KEY_FROM_KEYSERVER = Constants.INTENT_PREFIX - + "IMPORT_KEY_FROM_KEYSERVER"; + public static final String ACTION_IMPORT_KEY = OpenKeychainIntents.IMPORT_KEY; + public static final String ACTION_IMPORT_KEY_FROM_QR_CODE = OpenKeychainIntents.IMPORT_KEY_FROM_QR_CODE; + public static final String ACTION_IMPORT_KEY_FROM_KEYSERVER = OpenKeychainIntents.IMPORT_KEY_FROM_KEYSERVER; public static final String ACTION_IMPORT_KEY_FROM_KEYSERVER_AND_RETURN_RESULT = Constants.INTENT_PREFIX + "IMPORT_KEY_FROM_KEY_SERVER_AND_RETURN_RESULT"; public static final String ACTION_IMPORT_KEY_FROM_KEYSERVER_AND_RETURN_TO_SERVICE = Constants.INTENT_PREFIX @@ -83,12 +82,12 @@ public class ImportKeysActivity extends ActionBarActivity { public static final String EXTRA_RESULT = "result"; // only used by ACTION_IMPORT_KEY - public static final String EXTRA_KEY_BYTES = Constants.EXTRA_PREFIX + "KEY_BYTES"; + public static final String EXTRA_KEY_BYTES = OpenKeychainIntents.IMPORT_EXTRA_KEY_EXTRA_KEY_BYTES; // only used by ACTION_IMPORT_KEY_FROM_KEYSERVER - public static final String EXTRA_QUERY = Constants.EXTRA_PREFIX + "EXTRA_QUERY"; + public static final String EXTRA_QUERY = OpenKeychainIntents.IMPORT_KEY_FROM_KEYSERVER_EXTRA_QUERY; public static final String EXTRA_KEY_ID = Constants.EXTRA_PREFIX + "EXTRA_KEY_ID"; - public static final String EXTRA_FINGERPRINT = Constants.EXTRA_PREFIX + "EXTRA_FINGERPRINT"; + public static final String EXTRA_FINGERPRINT = OpenKeychainIntents.IMPORT_KEY_FROM_KEYSERVER_EXTRA_FINGERPRINT; // only used by ACTION_IMPORT_KEY_FROM_KEYSERVER_AND_RETURN_TO_SERVICE when used from OpenPgpService public static final String EXTRA_PENDING_INTENT_DATA = "data"; |