Commit Graph

12 Commits

Author SHA1 Message Date
Sunny Shao
238928dea2 Show mobile data slice in Search even no SIM card
- return slice like in airplan mode when mobile data disabled in the getSlice
  of the MobileDataSlice
- replace CONDITIONALLY_UNAVAILABLE by DISABLED_DEPENDENT_SETTING in the
  getAvailabilityStatus of the MobileDataPreferenceController
- remove the duplicated mobile data item by update data_usage_cellular.xml

Fixes: 130650621
Test: robotest
Change-Id: I42c0983c27d4edb17fcdce7ca386023911254d2d
2019-04-26 14:44:55 +08:00
Fan Zhang
56c6f89a22 Remove disable mobile data confirm dialog for single sim.
Fixes: 124005813
Test: robotest
Change-Id: I2da563f26d6dbb1ec3c6c205f21a96c896b51334
2019-04-24 13:50:09 -07:00
Lei Yu
5d85dfb123 Add mms preference and controller
Only visible when it is metered and mobile data off.
Also refactor one mobile data observer so we can reuse it.

Bug: 130222866
Test: RunSettingsRoboTests
Change-Id: Id218f51da3c373fad98c1a39cfadd6b0e8c46a88
2019-04-19 11:25:14 -07:00
Malcolm Chen
5506e0c732 Correct behavior of "Mobile data" button on opportunistic subscriptions.
A check was added earlier to make sure in DSDS mode only one sub
shows data on, which is not true for opportunistic subscriptions. For
them, it should always be on (enforced by Telephony) and be disabled
as it shouldn't be turned off.

Bug: 124331860
Bug: 124683219
Test: manual, robolectric
Change-Id: I53c8d881ff71ad25c418085d3eee63e55c786b8f
2019-02-19 21:03:42 +00:00
TreeHugger Robot
00ca556f26 Merge "Create special case mobile data slice" 2019-02-11 22:53:50 +00:00
jackqdyulei
e6d7d3b1e7 Update search for mobile network settings
This CL make all mobile related preferences support:
1. If subId is manually set, check visibility by subId
2. If not, try find whether there is one active subId meets requirement.
If so, isAvailable() will return true to enable search.

Bug: 77276236
Test: RunSettingsRoboTests
Change-Id: I24e2d2f5e882284ba8e997b844caee7722b6b07d
2019-02-08 16:23:11 -08:00
Matthew Fritze
1138218abe Create special case mobile data slice
Build the special case mobile data slice for general use,
and for the Internet Connectivity Panel. The Slice controls
the default data subscription, and links to the subscriptions
page.

Bug: 117804089
Fixse: 119411534
Test: robotests & test app.

Change-Id: I31b524a8fe3182a244d940848090e97250632f39
2019-02-08 13:13:28 -08:00
Antony Sargent
8af118bd87 Fix mobile data on/off switch for multi-sim case
In multi-sim, the on/off switch for mobile data on the mobile network
details page doesn't quite work right. The thing it's missing is
checking whether the current sim is the default one used for data - if
it's not the default, then the switch should be off even if mobile data
is turned on. And clicking to enable needs to prompt the user to ask if
this sim should be become the new default one, which we already have
code for, but we weren't triggering it properly.

Bug: 124005813
Test: make RunSettingsRoboTests
Change-Id: Ifdf58addfde94b3bac85c68e4b22ddfbaf01dff7
2019-02-06 14:28:27 -08:00
Malcolm Chen
42055cbe50 Only enable data for one SIM in DSDS.
Only enable mobile data for one SIM for simplicity. Which means When
turning on mobile data on non-default sub, pop a notification to user
that it will turn off data of the other one.

Bug: 120515679
Test: manual and unittest
Change-Id: I7c190bb70d771b7f280c246038a380e4fc7338a3
2018-12-06 01:24:58 +00:00
Fan Zhang
cdf284b732 Make Settings robotest work with tot Robolectric
Bug: 116278591
Test: make -j RunSettingsRoboTests
Change-Id: I32cb2fcf6094675f79d2fc24702ef6298a9691e4
2018-10-31 17:59:17 -07:00
jackqdyulei
6ac8d80fcb Use main looper for PhoneStateListener
Also init all subIds to INVALID in constructor

Change-Id: Ic66a2e5a24dbc10d52db0069f0e863c96ec12513
Fixes: 118070636
Test: Manual
2018-10-22 10:25:38 -07:00
jackqdyulei
8eec6ff917 Change packagename to telephony
Also move it under package network, so all of them belong to
com.android.settings.network.telephony.

Bug: 114749736
Test: RunSettingsRoboTests
Change-Id: I35dbdcd5cc9dab939b0a3efccc8897b9a92338d1
2018-10-11 11:46:38 -07:00