Merge "Fix exception on non face-enabled devices" into qt-r1-dev
am: 1a3112ab32
Change-Id: I8c0512ac98aecfb3306ee89e3a4ff1e711f45d89
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
package com.android.settings.security;
|
package com.android.settings.security;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.pm.PackageManager;
|
||||||
import android.hardware.face.FaceManager;
|
import android.hardware.face.FaceManager;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
|
|
||||||
@@ -30,8 +31,10 @@ public class LockscreenBypassPreferenceController extends TogglePreferenceContro
|
|||||||
|
|
||||||
public LockscreenBypassPreferenceController(Context context, String preferenceKey) {
|
public LockscreenBypassPreferenceController(Context context, String preferenceKey) {
|
||||||
super(context, preferenceKey);
|
super(context, preferenceKey);
|
||||||
|
if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_FACE)) {
|
||||||
mFaceManager = context.getSystemService(FaceManager.class);
|
mFaceManager = context.getSystemService(FaceManager.class);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isChecked() {
|
public boolean isChecked() {
|
||||||
|
Reference in New Issue
Block a user