diff options
Diffstat (limited to 'OpenKeychain/src/main')
4 files changed, 7 insertions, 9 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFragment.java index 29ccb0907..c8ae867b2 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFragment.java @@ -19,6 +19,7 @@ package org.sufficientlysecure.keychain.ui; import java.util.ArrayList; +import android.app.Activity; import android.content.Intent; import android.database.Cursor; import android.net.Uri; @@ -152,7 +153,10 @@ public abstract class DecryptFragment extends Fragment implements LoaderManager. final ImportKeyResult result = returnData.getParcelable(OperationResult.EXTRA_RESULT); - result.createNotify(getActivity()).show(); + Activity activity = getActivity(); + if (result != null && activity != null) { + result.createNotify(activity).show(); + } getLoaderManager().restartLoader(LOADER_ID_UNIFIED, null, DecryptFragment.this); } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DisplayTextActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DisplayTextActivity.java index 2742e4565..be21cdde1 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DisplayTextActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DisplayTextActivity.java @@ -28,15 +28,10 @@ import android.support.v4.app.Fragment; import android.view.View; import android.widget.Toast; -import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.R; -import org.sufficientlysecure.keychain.intents.OpenKeychainIntents; import org.sufficientlysecure.keychain.operations.results.DecryptVerifyResult; import org.sufficientlysecure.keychain.ui.base.BaseActivity; -import org.sufficientlysecure.keychain.ui.util.Notify; -import org.sufficientlysecure.keychain.ui.util.Notify.Style; import org.sufficientlysecure.keychain.util.FileHelper; -import org.sufficientlysecure.keychain.util.Log; public class DisplayTextActivity extends BaseActivity { diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptDecryptOverviewFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptDecryptOverviewFragment.java index 566ad1d67..590d02c6f 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptDecryptOverviewFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptDecryptOverviewFragment.java @@ -19,7 +19,6 @@ package org.sufficientlysecure.keychain.ui; -import java.util.ArrayList; import java.util.regex.Matcher; import android.app.Activity; @@ -152,7 +151,7 @@ public class EncryptDecryptOverviewFragment extends Fragment { if (resultCode == Activity.RESULT_OK && data != null) { Uri uri = data.getData(); if (uri == null) { - Notify.create(getActivity(), R.string.no_file_selected, Notify.Style.ERROR).show(this); + Notify.create(getActivity(), R.string.no_file_selected, Notify.Style.ERROR).show(); return; } diff --git a/OpenKeychain/src/main/res/values/strings.xml b/OpenKeychain/src/main/res/values/strings.xml index a48e97284..c278daf09 100644 --- a/OpenKeychain/src/main/res/values/strings.xml +++ b/OpenKeychain/src/main/res/values/strings.xml @@ -221,7 +221,7 @@ <string name="file_delete_confirmation_title">"Delete original files?"</string> <string name="file_delete_confirmation">"The following files will be deleted:%s"</string> <string name="file_delete_successful">"%1$d out of %2$d files have been deleted.%3$s"</string> - <string name="no_file_selected">"Select a file first."</string> + <string name="no_file_selected">"No file selected."</string> <string name="encrypt_sign_successful">"Successfully signed and/or encrypted."</string> <string name="encrypt_sign_clipboard_successful">"Successfully signed and/or encrypted to clipboard."</string> <string name="select_encryption_key">"Select at least one encryption key."</string> |