Fix empty screen when clicking on encrypt in details view

This commit is contained in:
Dominik Schürmann 2015-04-25 14:15:38 +02:00
parent f8af6e3387
commit 28da731201

View File

@ -98,23 +98,20 @@ public class EncryptTextActivity extends BaseActivity implements
// handle like normal text encryption, override action and extras to later // handle like normal text encryption, override action and extras to later
// executeServiceMethod ACTION_ENCRYPT_TEXT in main actions // executeServiceMethod ACTION_ENCRYPT_TEXT in main actions
extras.putString(EXTRA_TEXT, sharedText); extras.putString(EXTRA_TEXT, sharedText);
action = ACTION_ENCRYPT_TEXT;
} }
} }
} }
String textData = extras.getString(EXTRA_TEXT); String textData = extras.getString(EXTRA_TEXT);
if (ACTION_ENCRYPT_TEXT.equals(action) && textData == null) { if (textData == null) {
Log.e(Constants.TAG, "Include the extra 'text' in your Intent!"); textData = "";
return;
} }
// preselect keys given by intent // preselect keys given by intent
long mSigningKeyId = extras.getLong(EXTRA_SIGNATURE_KEY_ID); long mSigningKeyId = extras.getLong(EXTRA_SIGNATURE_KEY_ID);
long[] mEncryptionKeyIds = extras.getLongArray(EXTRA_ENCRYPTION_KEY_IDS); long[] mEncryptionKeyIds = extras.getLongArray(EXTRA_ENCRYPTION_KEY_IDS);
if (savedInstanceState == null) { if (savedInstanceState == null) {
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();