Fix the problem that some items can't be searched in Privacy category.
The source of problem is that the controller returns the wrong availability status value and the searchable attribut of the preference is false. Fix: 200249682 Test: manual test and see the search result Change-Id: I2265514c49303f6a0910f1be84b281fccb9abb45
This commit is contained in:
@@ -40,7 +40,7 @@ public class CameraToggleController extends SensorToggleController {
|
||||
public int getAvailabilityStatus() {
|
||||
return mSensorPrivacyManagerHelper.supportsSensorToggle(getSensor())
|
||||
&& DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_PRIVACY, "camera_toggle_enabled",
|
||||
true) ? AVAILABLE_UNSEARCHABLE : UNSUPPORTED_ON_DEVICE;
|
||||
true) ? AVAILABLE : UNSUPPORTED_ON_DEVICE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -40,7 +40,7 @@ public class MicToggleController extends SensorToggleController {
|
||||
public int getAvailabilityStatus() {
|
||||
return mSensorPrivacyManagerHelper.supportsSensorToggle(getSensor())
|
||||
&& DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_PRIVACY, "mic_toggle_enabled",
|
||||
true) ? AVAILABLE_UNSEARCHABLE : UNSUPPORTED_ON_DEVICE;
|
||||
true) ? AVAILABLE : UNSUPPORTED_ON_DEVICE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -37,9 +37,7 @@ public class WorkPolicyInfoPreferenceController extends BasePreferenceController
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
return mEnterpriseProvider.hasWorkPolicyInfo()
|
||||
? AVAILABLE_UNSEARCHABLE
|
||||
: UNSUPPORTED_ON_DEVICE;
|
||||
return mEnterpriseProvider.hasWorkPolicyInfo() ? AVAILABLE : UNSUPPORTED_ON_DEVICE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user