mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-09-04 08:15:11 +00:00
Some UI loading for #119
This commit is contained in:
@@ -341,6 +341,7 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case REQUEST_CODE_DECRYPT_AND_VERIFY: {
|
case REQUEST_CODE_DECRYPT_AND_VERIFY: {
|
||||||
|
findViewById(R.id.progress_bar_label).setVisibility(View.GONE);
|
||||||
decryptAndVerify(data);
|
decryptAndVerify(data);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -374,6 +375,9 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne
|
|||||||
if (requestCode == REQUEST_CODE_DECRYPT_AND_VERIFY && os != null) {
|
if (requestCode == REQUEST_CODE_DECRYPT_AND_VERIFY && os != null) {
|
||||||
try {
|
try {
|
||||||
if (returnToCiphertextField) {
|
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);
|
boolean showPassword = settings.getBoolean("show_password", true);
|
||||||
|
|
||||||
if (showPassword) {
|
if (showPassword) {
|
||||||
@@ -447,6 +451,8 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne
|
|||||||
case OpenPgpApi.RESULT_CODE_USER_INTERACTION_REQUIRED: {
|
case OpenPgpApi.RESULT_CODE_USER_INTERACTION_REQUIRED: {
|
||||||
Log.i("PgpHandler", "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);
|
PendingIntent pi = result.getParcelableExtra(OpenPgpApi.RESULT_INTENT);
|
||||||
try {
|
try {
|
||||||
PgpHandler.this.startIntentSenderForResult(pi.getIntentSender(),
|
PgpHandler.this.startIntentSenderForResult(pi.getIntentSender(),
|
||||||
@@ -483,6 +489,8 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne
|
|||||||
public void decryptAndVerify(Intent data) {
|
public void decryptAndVerify(Intent data) {
|
||||||
data.setAction(OpenPgpApi.ACTION_DECRYPT_VERIFY);
|
data.setAction(OpenPgpApi.ACTION_DECRYPT_VERIFY);
|
||||||
|
|
||||||
|
findViewById(R.id.progress_bar).setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
InputStream is = FileUtils.openInputStream(new File(getIntent().getExtras().getString("FILE_PATH")));
|
InputStream is = FileUtils.openInputStream(new File(getIntent().getExtras().getString("FILE_PATH")));
|
||||||
|
|
||||||
|
@@ -39,6 +39,23 @@
|
|||||||
android:layout_marginLeft="@dimen/activity_horizontal_margin"/>
|
android:layout_marginLeft="@dimen/activity_horizontal_margin"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<ProgressBar
|
||||||
|
style="?android:attr/progressBarStyleLarge"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="32dp"
|
||||||
|
android:id="@+id/progress_bar"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:indeterminate="true"
|
||||||
|
android:visibility="gone"/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/progress_bar_label"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:text="Authentication Required"
|
||||||
|
android:visibility="gone"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/crypto_container"
|
android:id="@+id/crypto_container"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
Reference in New Issue
Block a user