mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-27 05:03:28 +00:00
Prevent password managers from overwriting backup key with Signal PIN.
Adding a hidden username field provides additional context for the autofill service, so it knows the username associated with the confirmed PIN should be "Signal PIN" rather than "Signal backup key".
This commit is contained in:
committed by
Jeffrey Starke
parent
d7714a2067
commit
cd26929d39
@@ -5,6 +5,7 @@ import android.view.animation.Animation
|
||||
import android.view.animation.TranslateAnimation
|
||||
import android.widget.EditText
|
||||
import androidx.annotation.PluralsRes
|
||||
import androidx.autofill.HintConstants
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
@@ -26,7 +27,9 @@ class CreateSvrPinFragment : BaseSvrPinFragment<CreateSvrPinViewModel?>() {
|
||||
|
||||
label.text = getPinLengthRestrictionText(R.plurals.CreateKbsPinFragment__pin_must_be_at_least_digits)
|
||||
confirm.isEnabled = false
|
||||
ViewCompat.setImportantForAutofill(input, View.IMPORTANT_FOR_AUTOFILL_NO)
|
||||
|
||||
ViewCompat.setImportantForAutofill(input, View.IMPORTANT_FOR_AUTOFILL_YES)
|
||||
ViewCompat.setAutofillHints(input, HintConstants.AUTOFILL_HINT_PASSWORD)
|
||||
}
|
||||
|
||||
private fun initializeViewStatesForPinChange() {
|
||||
|
||||
Reference in New Issue
Block a user