Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c614b47a authored by Bhavuk Jain's avatar Bhavuk Jain Committed by Android (Google) Code Review
Browse files

Merge "Added changes for utilising a common feature flag"

parents ff3a45ce 2d500436
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
package com.android.internal.widget;

import static android.provider.DeviceConfig.NAMESPACE_AUTO_PIN_CONFIRMATION;

import android.annotation.NonNull;
import android.os.AsyncTask;
import android.provider.DeviceConfig;

import com.android.internal.widget.LockPatternUtils.RequestThrottledException;

@@ -120,8 +117,7 @@ public final class LockPatternChecker {
            @Override
            protected void onPostExecute(Boolean result) {
                callback.onChecked(result, mThrottleTimeout);
                if (DeviceConfig.getBoolean(NAMESPACE_AUTO_PIN_CONFIRMATION,
                        "enable_auto_pin_confirmation", false)) {
                if (LockPatternUtils.isAutoPinConfirmFeatureAvailable()) {
                    utils.setPinLength(userId, credentialCopy.size());
                }
                credentialCopy.zeroize();
+1 −1
Original line number Diff line number Diff line
@@ -681,7 +681,7 @@ public class LockPatternUtils {
     * @return true, if deviceConfig flag is set to true or the flag is not propagated and
     * defaultValue is true.
     */
    public boolean isAutoPinConfirmFeatureAvailable() {
    public static boolean isAutoPinConfirmFeatureAvailable() {
        return DeviceConfig.getBoolean(
                DeviceConfig.NAMESPACE_AUTO_PIN_CONFIRMATION,
                FLAG_ENABLE_AUTO_PIN_CONFIRMATION,
+1 −3
Original line number Diff line number Diff line
@@ -30,7 +30,6 @@ import static android.content.Context.KEYGUARD_SERVICE;
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
import static android.os.UserHandle.USER_ALL;
import static android.os.UserHandle.USER_SYSTEM;
import static android.provider.DeviceConfig.NAMESPACE_AUTO_PIN_CONFIRMATION;

import static com.android.internal.widget.LockPatternUtils.CREDENTIAL_TYPE_NONE;
import static com.android.internal.widget.LockPatternUtils.CREDENTIAL_TYPE_PASSWORD;
@@ -1729,8 +1728,7 @@ public class LockSettingsService extends ILockSettings.Stub {
        if (newCredential.isPattern()) {
            setBoolean(LockPatternUtils.PATTERN_EVER_CHOSEN_KEY, true, userHandle);
        }
        if (DeviceConfig.getBoolean(NAMESPACE_AUTO_PIN_CONFIRMATION,
                "enable_auto_pin_confirmation", /* defaultValue= */ false)) {
        if (LockPatternUtils.isAutoPinConfirmFeatureAvailable()) {
            if (newCredential.isPin()) {
                setLong(LockPatternUtils.PIN_LENGTH, newCredential.size(), userHandle);
            }