Require attention pref not searchable by default
Test: Attempted to search with the keyword eyes and found nothing. Bug: 150933895 Change-Id: Ic69d4fc9fe495fe6d133b695ce48055f6fd65d35
This commit is contained in:
committed by
Joshua Mccloskey
parent
b2c35f7fcc
commit
593b5671c8
@@ -336,7 +336,22 @@ public class FaceSettings extends DashboardFragment {
|
|||||||
keys.add(hasEnrolled ? PREF_KEY_ENROLL_FACE_UNLOCK
|
keys.add(hasEnrolled ? PREF_KEY_ENROLL_FACE_UNLOCK
|
||||||
: PREF_KEY_DELETE_FACE_DATA);
|
: PREF_KEY_DELETE_FACE_DATA);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isAttentionSupported(context)) {
|
||||||
|
keys.add(FaceSettingsAttentionPreferenceController.KEY);
|
||||||
|
}
|
||||||
|
|
||||||
return keys;
|
return keys;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isAttentionSupported(Context context) {
|
||||||
|
FaceFeatureProvider featureProvider = FeatureFactory.getFactory(
|
||||||
|
context).getFaceFeatureProvider();
|
||||||
|
boolean isAttentionSupported = false;
|
||||||
|
if (featureProvider != null) {
|
||||||
|
isAttentionSupported = featureProvider.isAttentionSupported(context);
|
||||||
|
}
|
||||||
|
return isAttentionSupported;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user