OSDN Git Service

Fix some problems with the "Mobile network" preference
authorAntony Sargent <asargent@google.com>
Sat, 9 Feb 2019 00:41:30 +0000 (16:41 -0800)
committerAntony Sargent <asargent@google.com>
Mon, 11 Feb 2019 17:50:38 +0000 (09:50 -0800)
commit475dde51b6facf48ef0605eead460789f20ffdb7
treeeb4b813ec8878de134c1b30ceb1dbbfe5e34f997
parent12cec79889573d0d649fb406f6795ba702577b59
Fix some problems with the "Mobile network" preference

This fixes a few issues with the "Mobile network" preference that shows
on the Network & internet page:

-The pref should not be available at all if the device is wifi-only.

-The pref should be disabled in airplane mode.

-If eSIM support is disabled, we need to disable entry points for adding
 a new eSIM subscription (the summary and click handler in single-SIM
 mode with no physical SIM, and the 'add' button in dual-SIM mode).

Bug: 116349402
Test: make RunSettingsRoboTests
Change-Id: Ic6fe426e9f890d80b399d48a2c9984d4d8b02a10
src/com/android/settings/network/MobileNetworkSummaryController.java
src/com/android/settings/widget/AddPreference.java
tests/robotests/src/com/android/settings/network/MobileNetworkSummaryControllerTest.java