diff options
author | Lifu Tang <lifu@google.com> | 2014-06-27 18:10:16 -0700 |
---|---|---|
committer | Lifu Tang <lifu@google.com> | 2014-06-27 18:18:59 -0700 |
commit | 387ecc6931c36a068efeaf6cc916307317d07c10 (patch) | |
tree | 39cb48c2f286e064c0b149a54c4f9c2c2256a47a /src/com/android/settings/location | |
parent | b4564c39b734227cd67e46d738caa6fb9d89c4cb (diff) | |
download | packages_apps_Settings-387ecc6931c36a068efeaf6cc916307317d07c10.zip packages_apps_Settings-387ecc6931c36a068efeaf6cc916307317d07c10.tar.gz packages_apps_Settings-387ecc6931c36a068efeaf6cc916307317d07c10.tar.bz2 |
Disable the switch bar instead of switch itself
- Fix b/15754817
Change-Id: I20c5bc85d35057a340ddcac691912863a4477804
Diffstat (limited to 'src/com/android/settings/location')
-rw-r--r-- | src/com/android/settings/location/LocationSettings.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/settings/location/LocationSettings.java b/src/com/android/settings/location/LocationSettings.java index b10d4b6..184c387 100644 --- a/src/com/android/settings/location/LocationSettings.java +++ b/src/com/android/settings/location/LocationSettings.java @@ -227,7 +227,9 @@ public class LocationSettings extends LocationSettingsBase // corner cases, the location might still be enabled. In such case the master switch should // be disabled but checked. boolean enabled = (mode != android.provider.Settings.Secure.LOCATION_MODE_OFF); - mSwitch.setEnabled(!restricted); + // Disable the whole switch bar instead of the switch itself. If we disabled the switch + // only, it would be re-enabled again if the switch bar is not disabled. + mSwitchBar.setEnabled(!restricted); mLocationMode.setEnabled(enabled && !restricted); mCategoryRecentLocationRequests.setEnabled(enabled); |