Disable saving PIN to password manager.

We haven't found a reliable way to make the auto-fill framework differentiate between the PIN and backup key, so we are disabling prompts to save Signal PINs to password managers to avoid accidentally overwriting a saved backup key with a PIN value.

Co-authored-by: Michelle Tang <mtang@signal.org>
This commit is contained in:
jeffrey-signal
2025-09-04 16:21:56 -04:00
committed by Greyson Parrelli
parent 217a6187c2
commit b1f067536b
16 changed files with 33 additions and 123 deletions

View File

@@ -4,6 +4,7 @@ import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.text.InputType;
import android.text.method.PasswordTransformationMethod;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -262,8 +263,8 @@ public class PinRestoreEntryFragment extends LoggingFragment {
private void updateKeyboard(@NonNull PinKeyboardType keyboard) {
boolean isAlphaNumeric = keyboard == PinKeyboardType.ALPHA_NUMERIC;
pinEntry.setInputType(isAlphaNumeric ? InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD
: InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_VARIATION_PASSWORD);
pinEntry.setInputType(isAlphaNumeric ? InputType.TYPE_CLASS_TEXT : InputType.TYPE_CLASS_NUMBER );
pinEntry.setTransformationMethod(PasswordTransformationMethod.getInstance());
pinEntry.getText().clear();
}