package com.android.settings.security;
import android.content.Context;
+import android.content.pm.PackageManager;
import android.hardware.face.FaceManager;
import android.provider.Settings;
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