modify dialog lifecycle logic to be able to use autofill

This commit is contained in:
Konrad Moesch
2023-12-03 12:20:43 +01:00
parent 8d69181b65
commit e81a184056

View File

@@ -129,6 +129,9 @@ public class PassphraseDialogActivity extends FragmentActivity {
finish(); finish();
} }
PassphraseDialogFragment frag = new PassphraseDialogFragment();
frag.setArguments(getIntent().getExtras());
frag.show(getSupportFragmentManager(), "passphraseDialog");
} }
@Override @Override
@@ -139,9 +142,9 @@ public class PassphraseDialogActivity extends FragmentActivity {
* encryption. Based on mSecretKeyId it asks for a passphrase to open a private key or it asks * encryption. Based on mSecretKeyId it asks for a passphrase to open a private key or it asks
* for a symmetric passphrase * for a symmetric passphrase
*/ */
PassphraseDialogFragment frag = new PassphraseDialogFragment(); /*PassphraseDialogFragment frag = new PassphraseDialogFragment();
frag.setArguments(getIntent().getExtras()); frag.setArguments(getIntent().getExtras());
frag.show(getSupportFragmentManager(), "passphraseDialog"); frag.show(getSupportFragmentManager(), "passphraseDialog");*/
} }
@Override @Override
@@ -149,9 +152,9 @@ public class PassphraseDialogActivity extends FragmentActivity {
super.onPause(); super.onPause();
DialogFragment dialog = (DialogFragment) getSupportFragmentManager().findFragmentByTag("passphraseDialog"); DialogFragment dialog = (DialogFragment) getSupportFragmentManager().findFragmentByTag("passphraseDialog");
if (dialog != null) { /*if (dialog != null) {
dialog.dismiss(); dialog.dismiss();
} }*/
} }
public static class PassphraseDialogFragment extends DialogFragment implements TextView.OnEditorActionListener { public static class PassphraseDialogFragment extends DialogFragment implements TextView.OnEditorActionListener {