From daef6cc9e9990e26e46a69b178741c4931d4a6c0 Mon Sep 17 00:00:00 2001 From: Bhavuk Jain Date: Wed, 17 May 2023 18:16:19 +0000 Subject: [PATCH] Setting flag for auto confirm feature to always return true This CL aims at making changes such that auto confirm feature flag always return true. This would work because we are anyways setting default value of flag to true. This just removes check to go via the Mendel route to identify the default value of flag since that can have some underlying issues. Bug: b/282246842 Test: Tested by building and flashing on local and checking if feature is available or not Change-Id: Ifff9008b2bb4a632131e53959e979b8b57d922b3 --- .../android/internal/widget/LockPatternUtils.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java index a554d0e774106..92cfa670045e7 100644 --- a/core/java/com/android/internal/widget/LockPatternUtils.java +++ b/core/java/com/android/internal/widget/LockPatternUtils.java @@ -50,7 +50,6 @@ import android.os.SystemClock; import android.os.UserHandle; import android.os.UserManager; import android.os.storage.StorageManager; -import android.provider.DeviceConfig; import android.provider.Settings; import android.text.TextUtils; import android.util.Log; @@ -723,15 +722,13 @@ public class LockPatternUtils { } /** - * Whether the auto pin feature logic is available or not. - * @return true, if deviceConfig flag is set to true or the flag is not propagated and - * defaultValue is true. + * Whether the auto pin feature is available or not. + * @return true. This method is always returning true due to feature flags not working + * properly (b/282246482). Ideally, this should check if deviceConfig flag is set to true + * and then return the appropriate value. */ public static boolean isAutoPinConfirmFeatureAvailable() { - return DeviceConfig.getBoolean( - DeviceConfig.NAMESPACE_AUTO_PIN_CONFIRMATION, - FLAG_ENABLE_AUTO_PIN_CONFIRMATION, - /* defaultValue= */ true); + return true; } /** Returns if the given quality maps to an alphabetic password */