Add log to capture the hardware status.
Sometimes Settings Search show the items that are not supported by the hardware. e.g. FaceLock. Add log to check the HW status when the problem occurred. Bug: 156667203 Test: watch the log output. Change-Id: Ie6a89f338aac6f7bdefc69fc84cfa5bf848ed015
This commit is contained in:
@@ -25,7 +25,6 @@ import android.provider.Settings;
|
||||
import androidx.preference.Preference;
|
||||
|
||||
import com.android.settings.Utils;
|
||||
import com.android.settings.core.TogglePreferenceController;
|
||||
|
||||
/**
|
||||
* Preference controller giving the user an option to always require confirmation.
|
||||
@@ -65,7 +64,7 @@ public class FaceSettingsConfirmPreferenceController extends FaceSettingsPrefere
|
||||
@Override
|
||||
public void updateState(Preference preference) {
|
||||
super.updateState(preference);
|
||||
if (!FaceSettings.isAvailable(mContext)) {
|
||||
if (!FaceSettings.isFaceHardwareDetected(mContext)) {
|
||||
preference.setEnabled(false);
|
||||
} else if (!mFaceManager.hasEnrolledTemplates(getUserId())) {
|
||||
preference.setEnabled(false);
|
||||
|
Reference in New Issue
Block a user