Remove LOCATION_PROVIDERS_ALLOWED completely

Test: presubmits only
Change-Id: I68d7c53c0edc2df0ab3642451aa1ee84b03d7dcc
This commit is contained in:
Soonil Nagarkar
2020-10-28 15:17:04 -07:00
parent 4aad7e9d83
commit 3bacac2197
2 changed files with 12 additions and 4 deletions

View File

@@ -6333,9 +6333,10 @@ public final class Settings {
* Comma-separated list of location providers that are enabled. Do not rely on this value
* being present or correct, or on ContentObserver notifications on the corresponding Uri.
*
* @deprecated The preferred methods for checking provider status and listening for changes
* are via {@link LocationManager#isProviderEnabled(String)} and
* {@link LocationManager#PROVIDERS_CHANGED_ACTION}.
* @deprecated This setting no longer exists from Android S onwards as it no longer is
* capable of realistically reflecting location settings. Use {@link
* LocationManager#isProviderEnabled(String)} or {@link LocationManager#isLocationEnabled()}
* instead.
*/
@Deprecated
public static final String LOCATION_PROVIDERS_ALLOWED = "location_providers_allowed";

View File

@@ -3342,7 +3342,7 @@ public class SettingsProvider extends ContentProvider {
}
private final class UpgradeController {
private static final int SETTINGS_VERSION = 193;
private static final int SETTINGS_VERSION = 194;
private final int mUserId;
@@ -4754,6 +4754,13 @@ public class SettingsProvider extends ContentProvider {
currentVersion = 193;
}
if (currentVersion == 193) {
// Version 193: remove obsolete LOCATION_PROVIDERS_ALLOWED settings
getSecureSettingsLocked(userId).deleteSettingLocked(
Secure.LOCATION_PROVIDERS_ALLOWED);
currentVersion = 194;
}
// vXXX: Add new settings above this point.
if (currentVersion != newVersion) {