summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorMatthew Wong <wongma7@outlook.com>2015-08-27 19:17:00 -0400
committerMatthew Wong <wongma7@outlook.com>2015-08-27 19:17:00 -0400
commita314563ca900522e9000223971a8f3c47ff9f668 (patch)
tree917b8f598a41a0e7e9a615232faef4b9b96be651 /app/src/main/java
parenta59f5b4cc71e8e47ce96afbf09f97d1c8006cda3 (diff)
Some UI loading for #119
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java
index d44b4214..d8c47b2a 100644
--- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java
+++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java
@@ -341,6 +341,7 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne
break;
}
case REQUEST_CODE_DECRYPT_AND_VERIFY: {
+ findViewById(R.id.progress_bar_label).setVisibility(View.GONE);
decryptAndVerify(data);
break;
}
@@ -374,6 +375,9 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne
if (requestCode == REQUEST_CODE_DECRYPT_AND_VERIFY && os != null) {
try {
if (returnToCiphertextField) {
+ findViewById(R.id.progress_bar).setVisibility(View.GONE);
+ findViewById(R.id.progress_bar_label).setVisibility(View.GONE);
+
boolean showPassword = settings.getBoolean("show_password", true);
if (showPassword) {
@@ -447,6 +451,8 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne
case OpenPgpApi.RESULT_CODE_USER_INTERACTION_REQUIRED: {
Log.i("PgpHandler", "RESULT_CODE_USER_INTERACTION_REQUIRED");
+ findViewById(R.id.progress_bar_label).setVisibility(View.VISIBLE);
+
PendingIntent pi = result.getParcelableExtra(OpenPgpApi.RESULT_INTENT);
try {
PgpHandler.this.startIntentSenderForResult(pi.getIntentSender(),
@@ -483,6 +489,8 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne
public void decryptAndVerify(Intent data) {
data.setAction(OpenPgpApi.ACTION_DECRYPT_VERIFY);
+ findViewById(R.id.progress_bar).setVisibility(View.VISIBLE);
+
try {
InputStream is = FileUtils.openInputStream(new File(getIntent().getExtras().getString("FILE_PATH")));