Merge "Fix Settings search crashed."
This commit is contained in:
@@ -329,10 +329,13 @@ public class FaceSettings extends DashboardFragment {
|
|||||||
@Override
|
@Override
|
||||||
public List<String> getNonIndexableKeys(Context context) {
|
public List<String> getNonIndexableKeys(Context context) {
|
||||||
final List<String> keys = super.getNonIndexableKeys(context);
|
final List<String> keys = super.getNonIndexableKeys(context);
|
||||||
final FaceManager faceManager = context.getSystemService(FaceManager.class);
|
if (isAvailable(context)) {
|
||||||
final boolean hasEnrolled = faceManager.hasEnrolledTemplates(
|
final FaceManager faceManager = context.getSystemService(FaceManager.class);
|
||||||
UserHandle.myUserId());
|
final boolean hasEnrolled = faceManager.hasEnrolledTemplates(
|
||||||
keys.add(hasEnrolled ? PREF_KEY_ENROLL_FACE_UNLOCK : PREF_KEY_DELETE_FACE_DATA);
|
UserHandle.myUserId());
|
||||||
|
keys.add(hasEnrolled ? PREF_KEY_ENROLL_FACE_UNLOCK
|
||||||
|
: PREF_KEY_DELETE_FACE_DATA);
|
||||||
|
}
|
||||||
return keys;
|
return keys;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user