Fix exception on non face-enabled devices
Test: open privacy settings page Bug: 130327302 Change-Id: I31ba9f30bb7300bff6daea8a51ed6c4dc2a373f2
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package com.android.settings.security;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.hardware.face.FaceManager;
|
||||
import android.provider.Settings;
|
||||
|
||||
@@ -30,7 +31,9 @@ public class LockscreenBypassPreferenceController extends TogglePreferenceContro
|
||||
|
||||
public LockscreenBypassPreferenceController(Context context, String preferenceKey) {
|
||||
super(context, preferenceKey);
|
||||
mFaceManager = context.getSystemService(FaceManager.class);
|
||||
if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_FACE)) {
|
||||
mFaceManager = context.getSystemService(FaceManager.class);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user