show more generic "Enter password" if asking for multiple
This commit is contained in:
@@ -232,7 +232,12 @@ public class PassphraseDialogActivity extends FragmentActivity {
|
|||||||
hint = getString(R.string.label_passphrase);
|
hint = getString(R.string.label_passphrase);
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
long subKeyId = mRequiredInput.getSubKeyId();
|
long[] subKeyIds = mRequiredInput.getSubKeyIds();
|
||||||
|
if (subKeyIds.length > 1) {
|
||||||
|
message = getString(R.string.passphrase_for_any);
|
||||||
|
hint = getString(R.string.label_passphrase);
|
||||||
|
} else {
|
||||||
|
long subKeyId = subKeyIds[0];
|
||||||
|
|
||||||
KeyRepository helper =
|
KeyRepository helper =
|
||||||
KeyRepository.create(getContext());
|
KeyRepository.create(getContext());
|
||||||
@@ -265,7 +270,7 @@ public class PassphraseDialogActivity extends FragmentActivity {
|
|||||||
default:
|
default:
|
||||||
throw new AssertionError("Unhandled SecretKeyType (should not happen)");
|
throw new AssertionError("Unhandled SecretKeyType (should not happen)");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (PgpKeyNotFoundException | KeyRepository.NotFoundException e) {
|
} catch (PgpKeyNotFoundException | KeyRepository.NotFoundException e) {
|
||||||
alert.setTitle(R.string.title_key_not_found);
|
alert.setTitle(R.string.title_key_not_found);
|
||||||
alert.setMessage(getString(R.string.key_not_found, mRequiredInput.getSubKeyId()));
|
alert.setMessage(getString(R.string.key_not_found, mRequiredInput.getSubKeyId()));
|
||||||
|
|||||||
@@ -332,6 +332,7 @@
|
|||||||
<string name="passphrase_for_symmetric_encryption">"Enter password"</string>
|
<string name="passphrase_for_symmetric_encryption">"Enter password"</string>
|
||||||
<string name="passphrase_for_backup">"Enter backup code"</string>
|
<string name="passphrase_for_backup">"Enter backup code"</string>
|
||||||
<string name="passphrase_for">"Enter password for '%s'"</string>
|
<string name="passphrase_for">"Enter password for '%s'"</string>
|
||||||
|
<string name="passphrase_for_any">"Enter password"</string>
|
||||||
<string name="passphrase_keyboard_hint_alpha">"Switch to alphabetic keyboard"</string>
|
<string name="passphrase_keyboard_hint_alpha">"Switch to alphabetic keyboard"</string>
|
||||||
<string name="passphrase_keyboard_hint_numeric">"Switch to numeric keyboard"</string>
|
<string name="passphrase_keyboard_hint_numeric">"Switch to numeric keyboard"</string>
|
||||||
<string name="pin_for">"Enter PIN for '%s'"</string>
|
<string name="pin_for">"Enter PIN for '%s'"</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user