diff options
author | Manoj Khanna <manojkhannakm@gmail.com> | 2015-03-20 18:23:23 +0530 |
---|---|---|
committer | Manoj Khanna <manojkhannakm@gmail.com> | 2015-03-20 19:49:42 +0530 |
commit | 4e4b8efd6ea275d5fe2d07c188ab8a2581617ec6 (patch) | |
tree | 4fdcfae68e3047c51358ec4b600c5e5311849604 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesActivity.java | |
parent | acd6c2ecec0ecc447428b87026d7f69b71f7f574 (diff) | |
download | open-keychain-4e4b8efd6ea275d5fe2d07c188ab8a2581617ec6.tar.gz open-keychain-4e4b8efd6ea275d5fe2d07c188ab8a2581617ec6.tar.bz2 open-keychain-4e4b8efd6ea275d5fe2d07c188ab8a2581617ec6.zip |
Reworked Notify class
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesActivity.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesActivity.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesActivity.java index 0dd672c90..fe9b05226 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesActivity.java @@ -303,7 +303,8 @@ public class EncryptFilesActivity extends EncryptActivity implements EncryptActi // file checks if (mInputUris.isEmpty()) { - Notify.showNotify(this, R.string.no_file_selected, Notify.Style.ERROR); + Notify.create(this, R.string.no_file_selected, Notify.Style.ERROR) + .show(getSupportFragmentManager().findFragmentById(R.id.encrypt_file_fragment)); return false; } else if (mInputUris.size() > 1 && !mShareAfterEncrypt) { // This should be impossible... @@ -317,11 +318,13 @@ public class EncryptFilesActivity extends EncryptActivity implements EncryptActi // symmetric encryption checks if (mPassphrase == null) { - Notify.showNotify(this, R.string.passphrases_do_not_match, Notify.Style.ERROR); + Notify.create(this, R.string.passphrases_do_not_match, Notify.Style.ERROR) + .show(getSupportFragmentManager().findFragmentById(R.id.encrypt_file_fragment)); return false; } if (mPassphrase.isEmpty()) { - Notify.showNotify(this, R.string.passphrase_must_not_be_empty, Notify.Style.ERROR); + Notify.create(this, R.string.passphrase_must_not_be_empty, Notify.Style.ERROR) + .show(getSupportFragmentManager().findFragmentById(R.id.encrypt_file_fragment)); return false; } @@ -333,7 +336,8 @@ public class EncryptFilesActivity extends EncryptActivity implements EncryptActi // Files must be encrypted, only text can be signed-only right now if (!gotEncryptionKeys) { - Notify.showNotify(this, R.string.select_encryption_key, Notify.Style.ERROR); + Notify.create(this, R.string.select_encryption_key, Notify.Style.ERROR) + .show(getSupportFragmentManager().findFragmentById(R.id.encrypt_file_fragment)); return false; } } |