From 1137bbd8a55e244a74715f4b619c426843f710ba Mon Sep 17 00:00:00 2001 From: jeffrey-signal Date: Mon, 14 Jul 2025 12:48:42 -0400 Subject: [PATCH] Fix missing prompt to save PIN to password manager on Android < 14. On Android versions older than 14, users were not prompted to save their PIN to their device password manager due to an autofill session conflict. The `CreateSvrPinFragment.input` field triggered an autofill session, so when `ConfirmSvrPinFragment` later attempted to save the PIN using `CredentialManager`, the system incorrectly assumed the credential had already been saved by autofill and skipped the save prompt. --- .../thoughtcrime/securesms/lock/v2/CreateSvrPinFragment.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/org/thoughtcrime/securesms/lock/v2/CreateSvrPinFragment.kt b/app/src/main/java/org/thoughtcrime/securesms/lock/v2/CreateSvrPinFragment.kt index 495d5a2989..77a5c32185 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/lock/v2/CreateSvrPinFragment.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/lock/v2/CreateSvrPinFragment.kt @@ -1,10 +1,12 @@ package org.thoughtcrime.securesms.lock.v2 +import android.view.View import android.view.animation.Animation import android.view.animation.TranslateAnimation import android.widget.EditText import androidx.annotation.PluralsRes import androidx.core.content.ContextCompat +import androidx.core.view.ViewCompat import androidx.lifecycle.ViewModelProvider import androidx.navigation.Navigation.findNavController import org.thoughtcrime.securesms.R @@ -21,8 +23,10 @@ class CreateSvrPinFragment : BaseSvrPinFragment() { } else { initializeViewStatesForPinCreate() } + label.text = getPinLengthRestrictionText(R.plurals.CreateKbsPinFragment__pin_must_be_at_least_digits) confirm.isEnabled = false + ViewCompat.setImportantForAutofill(input, View.IMPORTANT_FOR_AUTOFILL_NO) } private fun initializeViewStatesForPinChange() {