Commit Graph

14 Commits

Author SHA1 Message Date
songferngwang
7489c93347 Fix the BasePreferenceController.createInstance's IllegalStateException
When the settings search do BasePreferenceController.createInstance,
it get the the IllegalStateException, and then the search ignore this
controller. It causes the indexing can not filter this controller via
the PreferenceController's getAvailabilityStatus.

Bug: 335509130
Test: Build pass. Do search and no crash
Change-Id: Icaff8ca690ca3e3a46c2f21a5fbde0bbd99fd92e
2024-05-15 09:26:44 +00:00
tom hsu
499a2fa16d [Settings] Add data roaming observer
- Data roaming can be controlled by SettingsProvider, it shall be
   listen the change and set the change state to repository.

Bug: 278822324
Test: Manual test passed.
Test: atest passed
Change-Id: I6eb5330ba643c485c5d12eb879af1e0e8f7baed7
2023-05-26 16:13:09 +08: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
7dfd3be886 [Settings] Apply the SettingsDataService to the SIM page, roaming
controller

Implement it in 0RoamingPreferenceController
Launch MobileNetworkSettings in SettingsApp by SubSettingLauncher
Launch MobileNetworkSettings by intent

Bug: 257197354
Test: atest RoamingPreferenceControllerTest
Change-Id: Ia2df51ad3a9b2b72bdada05de480e0b05d2d4f43
2022-11-18 20:01:36 +00:00
Rambo Wang
145c954a33 Hide roaming option when carriers force all networks as HOME networks
This change will hide roaming option in carrier's network setting
if the carrier overrrides the carrier config force_home_network_bool
to true.

Some carriers, like google Fi, has no concept of roaming. The carrier
config force_home_network_bool is overridden to true to treat all
cellular networks as home networks. There is no actually impact when
user turn on/off the roaming option in network setting. Leaving an
unused option just confuse many end users.

Bug: 79424760
Test: make && make RunSettingsRoboTests
Test: activate Fi service and make sure no roaming option
Test: activate VZW service and make sure roaming option is present
Test: override the cc config with adb command to make sure the roaming
option is always correctly shown/hidden on the cc key values

Change-Id: If6d0f7e3a5edea368b3a725afd9a2b4d1ad686ed
2022-09-09 12:28:40 -05:00
Bonian Chen
19135546a3 [Settings] Data roaming warning only when turn ON
handlePreferenceTreeClick() goes after setChecked() however
configuration may have been altered within setChecked().

Follow same design within MobileDataPreferenceController to fix this
issue. A boolean state will be maintained as the condition when warning
dialog is required when click.

Bug: 148491064
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=RoamingPreferenceControllerTest
Change-Id: I63c4e2149b0e9efa16fd9ee402652c67eb9c5a4d
2020-02-11 20:46:44 +08:00
Bonian Chen
31367d7a72 [Settings] Replace getSimCount() API
Change design of monitor change in Settings.Global.MOBILE_DATA and
Settings.Global.DATA_ROAMING in order to avoid from accessing
getSimCount().

Bug: 144251589
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=RoamingPreferenceControllerTest
make RunSettingsRoboTests -j ROBOTEST_FILTER=VideoCallingPreferenceControllerTest

Change-Id: I965a0c07c7c9ef5897b33809bae6a7921977db18
2019-11-11 15:27:30 +08:00
Edgar Wang
133ffc9c57 Show admin dialog when preference is disabled by Device Admin
Fixes: 130694312
Test: manual & robotest
Change-Id: I9c6487ac056ec3d784bd6f6901e96869e27e0b3e
2019-05-08 02:04:05 +08: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
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
d622e14d85 Refactor roaming preference
Use preferenceController instead

Bug: 114749736
Test: RunSettingsRoboTests
Change-Id: Idb0276ea0ed1738d93223e072338ba3c32498a9d
2018-10-17 13:03:26 -07:00