diff options
author | mar-v-in <github@rvin.mooo.com> | 2014-08-13 12:48:02 +0200 |
---|---|---|
committer | mar-v-in <github@rvin.mooo.com> | 2014-08-13 12:48:02 +0200 |
commit | e8b7bbd978c9a832b6ac34a0039cf0fc8feb99b9 (patch) | |
tree | b41794fdd43d715ec109caeb54b06e6b9616afc2 /OpenKeychain/src/main | |
parent | fd055a893be2bcc75dfb2ef768479e8536df6ffc (diff) | |
download | open-keychain-e8b7bbd978c9a832b6ac34a0039cf0fc8feb99b9.tar.gz open-keychain-e8b7bbd978c9a832b6ac34a0039cf0fc8feb99b9.tar.bz2 open-keychain-e8b7bbd978c9a832b6ac34a0039cf0fc8feb99b9.zip |
fix message and uri from encrypt intent
Diffstat (limited to 'OpenKeychain/src/main')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptActivity.java | 12 | ||||
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFileFragment.java | 10 |
2 files changed, 4 insertions, 18 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptActivity.java index b140c5a03..6f4db88e8 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptActivity.java @@ -83,8 +83,6 @@ public class EncryptActivity extends DrawerActivity implements EncryptActivityIn // tabs Bundle mAsymmetricFragmentBundle = new Bundle(); Bundle mSymmetricFragmentBundle = new Bundle(); - Bundle mMessageFragmentBundle = new Bundle(); - Bundle mFileFragmentBundle = new Bundle(); int mSwitchToMode = PAGER_MODE_ASYMMETRIC; int mSwitchToContent = PAGER_CONTENT_MESSAGE; @@ -509,10 +507,8 @@ public class EncryptActivity extends DrawerActivity implements EncryptActivityIn mSymmetricFragmentBundle, getString(R.string.label_symmetric)); mViewPagerMode.setCurrentItem(mSwitchToMode); - mTabsAdapterContent.addTab(EncryptMessageFragment.class, - mMessageFragmentBundle, getString(R.string.label_message)); - mTabsAdapterContent.addTab(EncryptFileFragment.class, - mFileFragmentBundle, getString(R.string.label_files)); + mTabsAdapterContent.addTab(EncryptMessageFragment.class, null, getString(R.string.label_message)); + mTabsAdapterContent.addTab(EncryptFileFragment.class, null, getString(R.string.label_files)); mViewPagerContent.setCurrentItem(mSwitchToContent); mUseArmor = Preferences.getPreferences(this).getDefaultAsciiArmor(); @@ -619,11 +615,11 @@ public class EncryptActivity extends DrawerActivity implements EncryptActivityIn */ if (ACTION_ENCRYPT.equals(action) && textData != null) { // encrypt text based on given extra - mMessageFragmentBundle.putString(EncryptMessageFragment.ARG_TEXT, textData); + mMessage = textData; mSwitchToContent = PAGER_CONTENT_MESSAGE; } else if (ACTION_ENCRYPT.equals(action) && uris != null && !uris.isEmpty()) { // encrypt file based on Uri - mFileFragmentBundle.putParcelableArrayList(EncryptFileFragment.ARG_URIS, uris); + mInputUris = uris; mSwitchToContent = PAGER_CONTENT_FILE; } else if (ACTION_ENCRYPT.equals(action)) { Log.e(Constants.TAG, diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFileFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFileFragment.java index 8a9e17020..14d3d1c4a 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFileFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFileFragment.java @@ -111,8 +111,6 @@ public class EncryptFileFragment extends Fragment implements EncryptActivityInte @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); - - addInputUris(getArguments().<Uri>getParcelableArrayList(ARG_URIS)); } private void addInputUri() { @@ -125,14 +123,6 @@ public class EncryptFileFragment extends Fragment implements EncryptActivityInte } } - private void addInputUris(List<Uri> uris) { - if (uris != null) { - for (Uri uri : uris) { - addInputUri(uri); - } - } - } - private void addInputUri(Uri inputUri) { if (inputUri == null) { return; |