OSDN Git Service

Display the correct default for mobile data always on.
authorLorenzo Colitti <lorenzo@google.com>
Fri, 3 Mar 2017 07:17:15 +0000 (16:17 +0900)
committerLorenzo Colitti <lorenzo@google.com>
Fri, 3 Mar 2017 09:56:23 +0000 (18:56 +0900)
commit15fb2d1096ecd9ced547682f0c1b3e185ed5f437
treefbde7188ab0996a19683c473a2ea25d1b922255d
parentff960ed8595b143264f73e5e3101c2d6bfba32cc
Display the correct default for mobile data always on.

Mobile data always on was enabled by changing the default in
ConnectivityService to 1. However, the default value in the
developer options setting was left at 0. This means that by
default (i.e., when the setting is empty), mobile data always on
is enabled but appears in developer options as disabled.

Fix this by changing the default in developer options. This is
simpler than the other options (adding database upgrade code to
settings, making the default be controlled by config.xml and
ensuring that when a config changed broadcast is received the
value is re-rease, hardcoding a default value as an @hide
constant in Settings, etc.)

Bug: 23113288
Test: setting is off after "adb shell settings delete global mobile_data_always_on"
Change-Id: I27e2c0af7a03e510e640dbcfa281449d00385154
src/com/android/settings/DevelopmentSettings.java