OSDN Git Service

[RadioInfo] Save PreferredNetworkMode to Settings
authorNathan Harold <nharold@google.com>
Tue, 5 Jun 2018 21:02:35 +0000 (14:02 -0700)
committerNathan Harold <nharold@google.com>
Thu, 7 Jun 2018 00:27:50 +0000 (17:27 -0700)
commitdaea8be9abd408f39a8b7451bc171cb60f8e6274
tree7267c0a829626f4e84a961c6416a285c8136eeb1
parentaaac61eb5e8e1db05709a95bcb407ef1c72892dd
[RadioInfo] Save PreferredNetworkMode to Settings

Historically, the debug menu intentionally did not
save the preferred network mode once chosen. This
causes problems because some settings cause a phone
switch which overrides the preferred network mode,
which can cause another phone switch and again
override the preferred network mode, completely
obliterating the requested debug setting. This change
will now save the debug menu setting to the system
settings, which will prevent the circular changes and
loss of setting due to phone switching.

However, caching the debug setting to prevent the phone
switch logic from overriding the setting has a side
effect, which is why it wasn't done historically.
If a debug setting of the preferred network mode
is set, it will cause the UX of the non-debug network
preference screen to change. Thus, someone who uses
the debug menu to make changes must be careful to
re-set the setting to return to the correct UX of the
publicly displayed menu.

Bug: 95133265
Test: -manually set preferred network mode using the
       RadioInfo menu and observed that there is no
       phone switch when setting CDMA.
      -confirmed that changing the network mode in
       RadioInfo will cause UX changes to the public
       network preference menu.

Change-Id: I91f669956a6d02515530855c4617cd0a767d73fa
src/com/android/settings/RadioInfo.java