Settings should be per-profile
Also, don't show keyguard option for work profile Fixes: 129905061 Test: Builds Change-Id: I18f573f39ee4e54a3385cc65079bb794633cc560
This commit is contained in:
@@ -21,13 +21,11 @@ import static android.provider.Settings.Secure.FACE_UNLOCK_APP_ENABLED;
|
||||
import android.content.Context;
|
||||
import android.provider.Settings;
|
||||
|
||||
import com.android.settings.core.TogglePreferenceController;
|
||||
|
||||
/**
|
||||
* Preference controller for Face settings page controlling the ability to use
|
||||
* Face authentication in apps (through BiometricPrompt).
|
||||
*/
|
||||
public class FaceSettingsAppPreferenceController extends TogglePreferenceController {
|
||||
public class FaceSettingsAppPreferenceController extends FaceSettingsPreferenceController {
|
||||
|
||||
private static final String KEY = "security_settings_face_app";
|
||||
|
||||
@@ -48,14 +46,14 @@ public class FaceSettingsAppPreferenceController extends TogglePreferenceControl
|
||||
if (!FaceSettings.isAvailable(mContext)) {
|
||||
return false;
|
||||
}
|
||||
return Settings.Secure.getInt(
|
||||
mContext.getContentResolver(), FACE_UNLOCK_APP_ENABLED, DEFAULT) == ON;
|
||||
return Settings.Secure.getIntForUser(
|
||||
mContext.getContentResolver(), FACE_UNLOCK_APP_ENABLED, DEFAULT, getUserId()) == ON;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setChecked(boolean isChecked) {
|
||||
return Settings.Secure.putInt(mContext.getContentResolver(), FACE_UNLOCK_APP_ENABLED,
|
||||
isChecked ? ON : OFF);
|
||||
return Settings.Secure.putIntForUser(mContext.getContentResolver(), FACE_UNLOCK_APP_ENABLED,
|
||||
isChecked ? ON : OFF, getUserId());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user