Commit Graph

33 Commits

Author SHA1 Message Date
songferngwang
be3008e09d Add log for setDataEnabledForReason
To know who change the mobile data

Bug: 331843727
Test: NA Adding log only
Change-Id: I3ef5662102761541cd3e0e4662e0acab07c71937
2024-03-29 09:06:34 +00:00
SongFerngWang
8535539582 [Sim UI enhancement] MobileNetworkSettings UI enhancement
- Add the phone number
- Add the mobile network(SPN)
- Add the IMEI
- Add the EID
- Remove the mobile data
- Remove the Auto data switch
- Remove the calls and SMS default subscription

Bug: 318310357
Bug: 298898436
Bug: 298891941

Test: atest MobileNetworkEidPreferenceControllerTest
atest MobileNetworkImeiPreferenceControllerTest
atest MobileNetworkPhoneNumberPreferenceControllerTest
atest MobileNetworkSpnPreferenceControllerTest
atest MobileDataPreferenceControllerTest
atest MobileNetworkSettingsTest

Change-Id: Ie2767056dd04d1131390e3a03d6d82d56fe5b2dc
2024-01-31 07:45:28 +00:00
Chaohui Wang
15ca95a31b Migrate to TwoStatePreference
SwitchPreference and SwitchPreferenceCompat are both TwoStatePreference.

Using TwoStatePreference in Java will helps migration in the future.

Bug: 306771414
Test: manual - check Settings pages
Change-Id: I84e1d7b09451106797c2b23d127855c6976678ca
2023-10-23 09:28:57 +00:00
tom hsu
fa0bdabc6a [Settings] Fix NPE from updating subinfo changed.
- Refactor code to avoid NPE.

Bug: 278721219
Test: make passed
Test: atest MobileDataPreferenceControllerTest passed
Change-Id: I1fe57b8835677335ae9102cfff71451060ea4f78
2023-05-02 11:40:12 +00:00
Zoey Chen
cf88640701 [Settings] Remove the intent receiver due to the register exception
Bug: 274899027
Test: atest SystemUIMicrobenchmark:android.platform.test.scenario.sysui.quicksettings
Change-Id: Ia19b91cfd1073f22180cc9679025447b4d5fecd9
2023-03-29 04:57:08 +00:00
Zoey Chen
db02f10b07 [Settings] update the db list when back to UI
Bug: 271524675
Test: local test
Change-Id: I26c7d64e6f040c62c9efb1438efe328f5744fa02
2023-03-20 09:08:34 +00:00
Zoey Chen
5645c092a9 [Settings] 1.Clean up unnecessary callback 2. register listener and
manager by subId

Bug: 269742364
Test: manual
Change-Id: Id536dedb200385dc6de5697848f8a68f2302351f
2023-02-18 07:28:56 +00:00
Zoey Chen
4fab96ffe5 [Settings] Do not insert subInfo repeatedly
Bug: 264322977
Test: manual
Change-Id: If1e9144c9d682befe5bccd3fa506ad82e2807b09
2023-01-19 20:25:35 +00:00
Zoey Chen
5aa4d6915a [Settings] eSIM transfer: MobileNetworkSettings
- Add new entry in pSIM: Convert to eSIM
 - Add new entry in eSIM: Transfer eSIM to another device

Srceenshot(pSIM): https://hsv.googleplex.com/6013596216590336
Srceenshot(eSIM): https://hsv.googleplex.com/6584033673740288

Bug: 261810065
Test: manual
Change-Id: Ifb1a6f8213037893939478caf1ced4a5705bdf66
2022-12-13 08:54:20 +00:00
Zoey Chen
92333907f0 [Settings] Apply the SettingsDataService to the SIM page, MobileDataPreferenceController
Bug: 257950125
Test: atest MobileDataPreferenceControllerTest
Change-Id: Ia64a8baf931e9aa7f54cad2b2f5bb264420be9b0
2022-11-22 08:01:27 +00:00
Bonian Chen
1b64e2bfcd [Settings] Workaround for network and internet crash
Network and internet UI crash.
This is a temporarily workaround for it.

Bug: 211045208
Test: local
Change-Id: Ie19e565547c26967d83b194c2e098286dd676178
2021-12-21 09:48:51 +08:00
Weng Su
aeb6200bfe [Provider Model] Carrie Wi-Fi offload toggle request
- Remove the Advanced expandable list pattern and expose the items

- Add Carrie Wi-Fi offload toggle preference

- Add Carrier Wi-Fi network preference

- Do not set Carrier Network together when setting Mobile Data, if
carrner network provision enabled.

- Screenshot:
  https://screenshot.googleplex.com/8vMow53cvGfUAoj

Bug: 182324921
Test: manual test
atest -c CarrierWifiTogglePreferenceControllerTest \
         MobileDataPreferenceControllerTest \
	 WifiPickerTrackerHelperTest

Change-Id: I5a7f4cc6850fe76c0efee392c0c0c23cb41f5e1e
2021-04-20 07:58:20 +08:00
Weng Su
5e76c02d82 [Provider Model] Implement the carrner network selection settings
- Add WifiPickerTrackerHelper to reuse the library

- User taps on carrier network preference
  - Calls MergedCarrierEntry#connect()

- User toggles mobile data On/Off
  - Calls MergedCarrierEntry#setEnabled(true/false)

Bug: 175761096
Test:
- Manual Test
- atest NetworkMobileProviderControllerTest \
        SubscriptionsPreferenceControllerTest \
        WifiPickerTrackerHelperTest

Change-Id: Ia311b10ca7a44a536556c1889ee65743af379822
2021-01-05 15:05:24 +00:00
Treehugger Robot
99c2ccf984 Merge "Disable 'Mobile data' selection after removing SIM" am: 87d1e30f17 am: d6859736a4
Change-Id: I77a6c089aec6fe57f79ef7dc7f6630ee8fc68ae7
2020-04-29 23:01:07 +00:00
Grace Jia
7098379555 Disable 'Mobile data' selection after removing SIM
Bug: 153895858
Test: Manually remove SIM and test
Change-Id: I5934b01c047172ae2269e77e2fe0945aacba4ca1
Exempt-From-Owner-Approval: Telephony settings
2020-04-29 22:34:29 +00:00
zoey chen
5b336b1bd9 [Settings] Replace #getSimCount with #getActiveModemCount
Bug: 146815553
Test: make
Change-Id: I9911d2d565a60dbf4a6af47cc25c8345ac2c6355
Merged-In: I9911d2d565a60dbf4a6af47cc25c8345ac2c6355
2019-12-25 16:30:25 +08:00
zoey chen
2d5171f68d [Settings] Replace #getSimCount with #getActiveModemCount
Bug: 146815553
Test: make
Change-Id: I9911d2d565a60dbf4a6af47cc25c8345ac2c6355
2019-12-25 15:09:00 +08:00
Automerger Merge Worker
778653fe71 Merge "[Settings] Replace TelephonyManager#from()" am: 19cebd9eca am: fb72a1094f am: 737783d5e4
Change-Id: I392268bd41ff76960107f137ae10ebf3dd151170
2019-12-23 03:04:51 +00:00
Bonian Chen
228dd34a8a [Settings] Replace TelephonyManager#from()
Replacing TelephonyManager#from() by public API.

Bug: 146752167
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageUtilsTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=CdmaListPreferenceTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=CdmaSubscriptionPreferenceControllerTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=CdmaSystemSelectPreferenceControllerTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=AutoSelectPreferenceControllerTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=OpenNetworkSelectPagePreferenceControllerTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataServiceSetupPreferenceControllerTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=EnabledNetworkModePreferenceControllerTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=MmsMessagePreferenceControllerTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=PreferredNetworkModePreferenceControllerTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=SettingsDumpServiceTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=MobileDataPreferenceControllerTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=MobileNetworkSettingsTest
Change-Id: If78ad37d4795d615b6f8db2f5687a28792a6764f
2019-12-23 01:00:38 +00:00
Stanley Wang
19afdba261 Mobile data should be non-indexable when the subscription id is invalid.
Return AVAILABLE_UNSEARCHABLE when the subscription id is invalid.

Fixes: 141289758
Test: manual and robotests
Change-Id: I86534182fca26bf7b56ee1ee7d6f573a142a6a3a
2019-09-20 02:34:06 +00:00
Andrew Sapperstein
477e345f21 Update summary for mobile data toggle for CBRS.
Fixes: 127529917
Test: robotests
Change-Id: Id2d0bdbcf9674106a3dff8db8e9ceb22dbdda314
2019-05-08 15:55:04 -07:00
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