mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-12-25 00:18:51 -05:00
rename activities to match new purpose
This commit is contained in:
parent
0cfbe4ad06
commit
5e5febaee3
@ -195,7 +195,7 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".ui.DecryptTextActivity"
|
||||
android:name=".ui.DisplayTextActivity"
|
||||
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
|
||||
android:label="@string/title_decrypt"
|
||||
android:parentActivityName=".ui.MainActivity"
|
||||
@ -203,16 +203,9 @@
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".ui.MainActivity" />
|
||||
|
||||
<!-- DECRYPT_TEXT with text as extra -->
|
||||
<intent-filter>
|
||||
<action android:name="org.sufficientlysecure.keychain.action.DECRYPT_TEXT" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".ui.DecryptFilesActivity"
|
||||
android:name=".ui.DecryptActivity"
|
||||
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
|
||||
android:label="@string/title_decrypt"
|
||||
android:parentActivityName=".ui.MainActivity"
|
||||
@ -257,6 +250,14 @@
|
||||
<data android:scheme="file" />
|
||||
<data android:scheme="content" />
|
||||
</intent-filter>
|
||||
|
||||
<!-- DECRYPT_TEXT -->
|
||||
<intent-filter>
|
||||
<action android:name="org.sufficientlysecure.keychain.action.DECRYPT_TEXT" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
|
||||
<!-- Android's Send and Multi-Send Actions -->
|
||||
<intent-filter android:label="@string/intent_send_decrypt">
|
||||
<action android:name="android.intent.action.SEND" />
|
||||
|
@ -34,10 +34,12 @@ import org.sufficientlysecure.keychain.intents.OpenKeychainIntents;
|
||||
import org.sufficientlysecure.keychain.ui.base.BaseActivity;
|
||||
|
||||
|
||||
public class DecryptFilesActivity extends BaseActivity {
|
||||
public class DecryptActivity extends BaseActivity {
|
||||
|
||||
/* Intents */
|
||||
public static final String ACTION_DECRYPT_DATA = OpenKeychainIntents.DECRYPT_DATA;
|
||||
// TODO handle this intent
|
||||
public static final String ACTION_DECRYPT_TEXT = OpenKeychainIntents.DECRYPT_TEXT;
|
||||
|
||||
// intern
|
||||
public static final String ACTION_DECRYPT_DATA_OPEN = Constants.INTENT_PREFIX + "DECRYPT_DATA_OPEN";
|
||||
@ -77,6 +79,7 @@ public class DecryptFilesActivity extends BaseActivity {
|
||||
|
||||
String action = intent.getAction();
|
||||
|
||||
// TODO handle ACTION_DECRYPT_FROM_CLIPBOARD
|
||||
switch (action) {
|
||||
case Intent.ACTION_SEND: {
|
||||
// When sending to Keychain Decrypt via share menu
|
||||
@ -131,7 +134,7 @@ public class DecryptFilesActivity extends BaseActivity {
|
||||
|
||||
public void displayListFragment(ArrayList<Uri> inputUris) {
|
||||
|
||||
DecryptFilesListFragment frag = DecryptFilesListFragment.newInstance(inputUris);
|
||||
DecryptListFragment frag = DecryptListFragment.newInstance(inputUris);
|
||||
|
||||
FragmentManager fragMan = getSupportFragmentManager();
|
||||
|
@ -127,7 +127,7 @@ public class DecryptFilesInputFragment extends Fragment {
|
||||
return;
|
||||
}
|
||||
|
||||
DecryptFilesActivity activity = (DecryptFilesActivity) getActivity();
|
||||
DecryptActivity activity = (DecryptActivity) getActivity();
|
||||
|
||||
ArrayList<Uri> uris = new ArrayList<>();
|
||||
uris.add(mInputUri);
|
||||
|
@ -60,7 +60,7 @@ import org.sufficientlysecure.keychain.provider.TemporaryStorageProvider;
|
||||
// this import NEEDS to be above the ViewModel one, or it won't compile! (as of 06/06/15)
|
||||
import org.sufficientlysecure.keychain.service.input.CryptoInputParcel;
|
||||
import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils.StatusHolder;
|
||||
import org.sufficientlysecure.keychain.ui.DecryptFilesListFragment.DecryptFilesAdapter.ViewModel;
|
||||
import org.sufficientlysecure.keychain.ui.DecryptListFragment.DecryptFilesAdapter.ViewModel;
|
||||
import org.sufficientlysecure.keychain.ui.adapter.SpacesItemDecoration;
|
||||
import org.sufficientlysecure.keychain.ui.base.CryptoOperationFragment;
|
||||
import org.sufficientlysecure.keychain.ui.util.FormattingUtils;
|
||||
@ -70,7 +70,7 @@ import org.sufficientlysecure.keychain.ui.util.Notify.Style;
|
||||
import org.sufficientlysecure.keychain.util.FileHelper;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
|
||||
public class DecryptFilesListFragment
|
||||
public class DecryptListFragment
|
||||
extends CryptoOperationFragment<PgpDecryptVerifyInputParcel,DecryptVerifyResult>
|
||||
implements OnMenuItemClickListener {
|
||||
public static final String ARG_URIS = "uris";
|
||||
@ -88,8 +88,8 @@ public class DecryptFilesListFragment
|
||||
/**
|
||||
* Creates new instance of this fragment
|
||||
*/
|
||||
public static DecryptFilesListFragment newInstance(ArrayList<Uri> uris) {
|
||||
DecryptFilesListFragment frag = new DecryptFilesListFragment();
|
||||
public static DecryptListFragment newInstance(ArrayList<Uri> uris) {
|
||||
DecryptListFragment frag = new DecryptListFragment();
|
||||
|
||||
Bundle args = new Bundle();
|
||||
args.putParcelableArrayList(ARG_URIS, uris);
|
@ -38,7 +38,9 @@ import org.sufficientlysecure.keychain.util.Log;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
|
||||
public class DecryptTextActivity extends BaseActivity {
|
||||
public class DisplayTextActivity extends BaseActivity {
|
||||
|
||||
// TODO make this only display text (maybe we need only the fragment?)
|
||||
|
||||
/* Intents */
|
||||
public static final String ACTION_DECRYPT_TEXT = OpenKeychainIntents.DECRYPT_TEXT;
|
||||
@ -214,7 +216,7 @@ public class DecryptTextActivity extends BaseActivity {
|
||||
|
||||
private void loadFragment(String ciphertext) {
|
||||
// Create an instance of the fragment
|
||||
Fragment frag = DecryptTextFragment.newInstance(ciphertext);
|
||||
Fragment frag = DisplayTextFragment.newInstance(ciphertext);
|
||||
|
||||
// Add the fragment to the 'fragment_container' FrameLayout
|
||||
// NOTE: We use commitAllowingStateLoss() to prevent weird crashes!
|
@ -37,7 +37,7 @@ import org.sufficientlysecure.keychain.util.ShareHelper;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
|
||||
public class DecryptTextFragment extends DecryptFragment {
|
||||
public class DisplayTextFragment extends DecryptFragment {
|
||||
public static final String ARG_CIPHERTEXT = "ciphertext";
|
||||
public static final String ARG_SHOW_MENU = "show_menu";
|
||||
|
||||
@ -48,8 +48,8 @@ public class DecryptTextFragment extends DecryptFragment {
|
||||
private String mCiphertext;
|
||||
private boolean mShowMenuOptions;
|
||||
|
||||
public static DecryptTextFragment newInstance(String ciphertext) {
|
||||
DecryptTextFragment frag = new DecryptTextFragment();
|
||||
public static DisplayTextFragment newInstance(String ciphertext) {
|
||||
DisplayTextFragment frag = new DisplayTextFragment();
|
||||
|
||||
Bundle args = new Bundle();
|
||||
args.putString(ARG_CIPHERTEXT, ciphertext);
|
@ -74,8 +74,8 @@ public class EncryptDecryptOverviewFragment extends Fragment {
|
||||
mDecryptFile.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent filesDecrypt = new Intent(getActivity(), DecryptFilesActivity.class);
|
||||
filesDecrypt.setAction(DecryptFilesActivity.ACTION_DECRYPT_DATA_OPEN);
|
||||
Intent filesDecrypt = new Intent(getActivity(), DecryptActivity.class);
|
||||
filesDecrypt.setAction(DecryptActivity.ACTION_DECRYPT_DATA_OPEN);
|
||||
startActivity(filesDecrypt);
|
||||
}
|
||||
});
|
||||
@ -83,8 +83,8 @@ public class EncryptDecryptOverviewFragment extends Fragment {
|
||||
mDecryptFromClipboard.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent clipboardDecrypt = new Intent(getActivity(), DecryptTextActivity.class);
|
||||
clipboardDecrypt.setAction(DecryptTextActivity.ACTION_DECRYPT_FROM_CLIPBOARD);
|
||||
Intent clipboardDecrypt = new Intent(getActivity(), DisplayTextActivity.class);
|
||||
clipboardDecrypt.setAction(DisplayTextActivity.ACTION_DECRYPT_FROM_CLIPBOARD);
|
||||
startActivityForResult(clipboardDecrypt, 0);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user