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

Commit 64fec889 authored by Kevin Chyn's avatar Kevin Chyn Committed by android-build-merger
Browse files

Merge changes from topic "face-bypass-move" into qt-r1-dev am: ffcc25ba

am: db00ff21

Change-Id: I9a93753fd094d8a3634c17e18c8b1900d4632312
parents ed1d864f db00ff21
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -62,14 +62,6 @@
        android:summary="@string/summary_placeholder"
        settings:searchable="false"/>

    <!-- Bypass lock screen -->
    <SwitchPreference
        android:key="privacy_lockscreen_bypass"
        android:title="@string/lockscreen_bypass_title"
        android:summary="@string/lockscreen_bypass_summary"
        settings:keywords="@string/keywords_lockscreen_bypass"
        settings:controller="com.android.settings.security.LockscreenBypassPreferenceController" />

    <!-- Privacy Service -->
    <PreferenceCategory
        android:key="privacy_services"
+0 −7
Original line number Diff line number Diff line
@@ -30,13 +30,6 @@
            android:summary="@string/summary_placeholder"
            settings:keywords="@string/keywords_lock_screen_notif"/>

        <SwitchPreference
            android:key="security_lockscreen_bypass"
            android:title="@string/lockscreen_bypass_title"
            android:summary="@string/lockscreen_bypass_summary"
            settings:searchable="false"
            settings:controller="com.android.settings.security.LockscreenBypassPreferenceController" />

        <com.android.settingslib.RestrictedSwitchPreference
            android:key="security_lockscreen_add_users_when_locked"
            android:title="@string/user_add_on_lockscreen_menu"
+7 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
<PreferenceScreen
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:settings="http://schemas.android.com/apk/res-auto"
    android:key="security_settings_face_settings_page"
    android:title="@string/security_settings_face_preference_title">

@@ -39,6 +40,12 @@
            android:title="@string/security_settings_face_settings_use_face_for_apps"
            app:keywords="@string/keywords_face_unlock"
            app:controller="com.android.settings.biometrics.face.FaceSettingsAppPreferenceController"/>
        <SwitchPreference
            android:key="security_lockscreen_bypass"
            android:title="@string/lockscreen_bypass_title"
            android:summary="@string/lockscreen_bypass_summary"
            settings:searchable="false"
            settings:controller="com.android.settings.biometrics.face.FaceSettingsLockscreenBypassPreferenceController" />
    </PreferenceCategory>

    <PreferenceCategory
+5 −1
Original line number Diff line number Diff line
@@ -123,8 +123,10 @@ public class FaceSettings extends DashboardFragment {
        Preference appPref = findPreference(FaceSettingsAppPreferenceController.KEY);
        Preference attentionPref = findPreference(FaceSettingsAttentionPreferenceController.KEY);
        Preference confirmPref = findPreference(FaceSettingsConfirmPreferenceController.KEY);
        Preference bypassPref =
                findPreference(FaceSettingsLockscreenBypassPreferenceController.KEY);
        mTogglePreferences = new ArrayList<>(
                Arrays.asList(keyguardPref, appPref, attentionPref, confirmPref));
                Arrays.asList(keyguardPref, appPref, attentionPref, confirmPref, bypassPref));

        mRemoveButton = findPreference(FaceSettingsRemoveButtonPreferenceController.KEY);
        mEnrollButton = findPreference(FaceSettingsEnrollButtonPreferenceController.KEY);
@@ -142,6 +144,7 @@ public class FaceSettings extends DashboardFragment {
        // Don't show keyguard controller for work profile settings.
        if (mUserManager.isManagedProfile(mUserId)) {
            removePreference(FaceSettingsKeyguardPreferenceController.KEY);
            removePreference(FaceSettingsLockscreenBypassPreferenceController.KEY);
        }

        if (savedInstanceState != null) {
@@ -248,6 +251,7 @@ public class FaceSettings extends DashboardFragment {
        final List<AbstractPreferenceController> controllers = new ArrayList<>();
        controllers.add(new FaceSettingsVideoPreferenceController(context));
        controllers.add(new FaceSettingsKeyguardPreferenceController(context));
        controllers.add(new FaceSettingsLockscreenBypassPreferenceController(context));
        controllers.add(new FaceSettingsAppPreferenceController(context));
        controllers.add(new FaceSettingsAttentionPreferenceController(context));
        controllers.add(new FaceSettingsRemoveButtonPreferenceController(context));
+0 −12
Original line number Diff line number Diff line
@@ -18,16 +18,13 @@ package com.android.settings.biometrics.face;

import static android.provider.Settings.Secure.FACE_UNLOCK_KEYGUARD_ENABLED;

import android.app.admin.DevicePolicyManager;
import android.content.Context;
import android.hardware.face.FaceManager;
import android.os.UserHandle;
import android.provider.Settings;

import androidx.preference.Preference;

import com.android.settings.Utils;
import com.android.settings.core.TogglePreferenceController;

/**
 * Preference controller for Face settings page controlling the ability to unlock the phone
@@ -87,13 +84,4 @@ public class FaceSettingsKeyguardPreferenceController extends FaceSettingsPrefer
            preference.setEnabled(true);
        }
    }

    private boolean adminDisabled() {
        DevicePolicyManager dpm =
                (DevicePolicyManager) mContext.getSystemService(Context.DEVICE_POLICY_SERVICE);
        return dpm != null &&
                (dpm.getKeyguardDisabledFeatures(null, UserHandle.myUserId())
                        & DevicePolicyManager.KEYGUARD_DISABLE_FACE)
                        != 0;
    }
}
Loading