summaryrefslogtreecommitdiff
path: root/packages/SettingsLib/src/com/android/settingslib/Utils.java
diff options
context:
space:
mode:
authorSoonil Nagarkar <sooniln@google.com>2019-07-16 11:47:59 -0700
committerSoonil Nagarkar <sooniln@google.com>2019-07-19 02:09:11 +0000
commitfb6b187bfb01fd068f740f020935f2482902a78d (patch)
treecb7a0403128edd335f7fd9fd378bbd74d94f0111 /packages/SettingsLib/src/com/android/settingslib/Utils.java
parente3d284e255744c2afb177608c337151e1210c241 (diff)
Remove obsolete constants.
These constants are not in use anywhere. Test: na Bug: 137675020 Change-Id: I9f1b2101b75779ff2f9c5f9d945189eccff782ae
Diffstat (limited to 'packages/SettingsLib/src/com/android/settingslib/Utils.java')
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/Utils.java17
1 files changed, 1 insertions, 16 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/Utils.java b/packages/SettingsLib/src/com/android/settingslib/Utils.java
index eb5ca46b0d33..14f233d958e6 100644
--- a/packages/SettingsLib/src/com/android/settingslib/Utils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/Utils.java
@@ -35,8 +35,6 @@ import java.text.NumberFormat;
public class Utils {
- private static final String CURRENT_MODE_KEY = "CURRENT_MODE";
- private static final String NEW_MODE_KEY = "NEW_MODE";
@VisibleForTesting
static final String STORAGE_MANAGER_ENABLED_PROPERTY =
"ro.storage_manager.enabled";
@@ -56,24 +54,11 @@ public class Utils {
public static void updateLocationEnabled(Context context, boolean enabled, int userId,
int source) {
- LocationManager locationManager = context.getSystemService(LocationManager.class);
-
Settings.Secure.putIntForUser(
context.getContentResolver(), Settings.Secure.LOCATION_CHANGER, source,
userId);
- Intent intent = new Intent(LocationManager.MODE_CHANGING_ACTION);
- final int oldMode = locationManager.isLocationEnabled()
- ? Settings.Secure.LOCATION_MODE_ON
- : Settings.Secure.LOCATION_MODE_OFF;
- final int newMode = enabled
- ? Settings.Secure.LOCATION_MODE_ON
- : Settings.Secure.LOCATION_MODE_OFF;
- intent.putExtra(CURRENT_MODE_KEY, oldMode);
- intent.putExtra(NEW_MODE_KEY, newMode);
- context.sendBroadcastAsUser(
- intent, UserHandle.of(userId), android.Manifest.permission.WRITE_SECURE_SETTINGS);
-
+ LocationManager locationManager = context.getSystemService(LocationManager.class);
locationManager.setLocationEnabledForUser(enabled, UserHandle.of(userId));
}