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:
@@ -53,7 +53,7 @@ public class FaceSettingsKeyguardPreferenceController extends FaceSettingsPrefer
|
||||
|
||||
@Override
|
||||
public boolean isChecked() {
|
||||
if (!FaceSettings.isAvailable(mContext)) {
|
||||
if (!FaceSettings.isFaceHardwareDetected(mContext)) {
|
||||
return false;
|
||||
} else if (getRestrictingAdmin() != null) {
|
||||
return false;
|
||||
@@ -77,7 +77,7 @@ public class FaceSettingsKeyguardPreferenceController extends FaceSettingsPrefer
|
||||
public void updateState(Preference preference) {
|
||||
EnforcedAdmin admin;
|
||||
super.updateState(preference);
|
||||
if (!FaceSettings.isAvailable(mContext)) {
|
||||
if (!FaceSettings.isFaceHardwareDetected(mContext)) {
|
||||
preference.setEnabled(false);
|
||||
} else if ((admin = getRestrictingAdmin()) != null) {
|
||||
((RestrictedSwitchPreference) preference).setDisabledByAdmin(admin);
|
||||
|
Reference in New Issue
Block a user