Update Settings to use the proper DeviceConfig API.
Exempt-From-Owner-Approval: carry over approval from ag/6908306 bug:124769181 Change-Id: If18d0dc5e55dabf82b7c7a2b6df240fb8b24f736
This commit is contained in:
@@ -24,6 +24,7 @@ import android.provider.Settings;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.SwitchPreference;
|
||||
|
||||
import com.android.settings.Utils;
|
||||
import com.android.settings.core.PreferenceControllerMixin;
|
||||
import com.android.settingslib.development.DeveloperOptionsPreferenceController;
|
||||
|
||||
@@ -53,10 +54,8 @@ public class DeviceIdentifierAccessRestrictionsPreferenceController
|
||||
public boolean isAvailable() {
|
||||
// If the new access restrictions have been disabled from the server side then do not
|
||||
// display the option.
|
||||
boolean disabledFromServerSide = Boolean.parseBoolean(
|
||||
DeviceConfig.getProperty(DeviceConfig.Privacy.NAMESPACE,
|
||||
DeviceConfig.Privacy.
|
||||
PROPERTY_DEVICE_IDENTIFIER_ACCESS_RESTRICTIONS_DISABLED));
|
||||
boolean disabledFromServerSide = DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_PRIVACY,
|
||||
Utils.PROPERTY_DEVICE_IDENTIFIER_ACCESS_RESTRICTIONS_DISABLED, false);
|
||||
return !disabledFromServerSide;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user