Make bypass controller consistent with rest of face unlock settings
1) Should only be shown for owner profile 2) Should be disabled if A) not enrolled, B) DevicePolicyManager, C) HAL issue Fixes: 134700640 Test: Manual test of conditions above Change-Id: Id72db59c662df6c529c98aafd610de8c86c77ebd
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user