Merge "Updated settings for new get/set feature change" into sc-dev am: 5487f2fa6c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14202131 Change-Id: Ia1eb05aabe80e2617c6854a18852423ee3ecfaf2
This commit is contained in:
@@ -57,15 +57,15 @@ public class FaceSettingsAttentionPreferenceController extends FaceSettingsPrefe
|
|||||||
|
|
||||||
private final GetFeatureCallback mGetFeatureCallback = new GetFeatureCallback() {
|
private final GetFeatureCallback mGetFeatureCallback = new GetFeatureCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onCompleted(boolean success, int feature, boolean value) {
|
public void onCompleted(boolean success, int[] features, boolean[] featureState) {
|
||||||
if (feature == FaceManager.FEATURE_REQUIRE_ATTENTION && success) {
|
boolean requireAttentionEnabled = false;
|
||||||
if (!mFaceManager.hasEnrolledTemplates(getUserId())) {
|
for (int i = 0; i < features.length; i++) {
|
||||||
mPreference.setEnabled(false);
|
if (features[i] == FaceManager.FEATURE_REQUIRE_ATTENTION) {
|
||||||
} else {
|
requireAttentionEnabled = featureState[i];
|
||||||
mPreference.setEnabled(true);
|
|
||||||
mPreference.setChecked(value);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mPreference.setEnabled(success);
|
||||||
|
mPreference.setChecked(requireAttentionEnabled);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user