Commit Graph

13 Commits

Author SHA1 Message Date
Bonian Chen
8b06c96fe9 [Settings] Hide some Preference entries when no mobile data support
Hide some Preference which requires mobile data on device didn't support
it.

Bug: 221999174
Test: local
Change-Id: I7dd6e13aea0ed4467c7c7edeada564e42ea78349
2022-05-10 01:12:23 +00:00
Bonian Chen
d40f7f707e [Settings] Move mobile data template out of framework
Move mobile data template out of framework

Bug: 151751844
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageLibTest
Change-Id: I5072cd1e673194d00b3ce82242bf5fbad88d23cd
2020-06-02 17:16:53 +08:00
Bonian Chen
3d62032fed [Settings] Query historical data in background
Move the query of historical data into background thread to avoid from
blocking other query operation in UI thread,

Bug: 141833767
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsagePreferenceControllerTest
Change-Id: I61e414d70136a0025ddd7373a4f34a99acb89510
2020-05-04 11:57:44 +08:00
Bonian Chen
3248d004d3 [Settings] Move some work into background thread
1. Move some work into backgroud thread when query data usage status.
2. Fix test case

Bug: 141833767
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsagePreferenceControllerTest
Change-Id: Ic1496323cd2bbaf794881394565d8d9bb0a89111
2020-04-23 12:55:53 +08:00
Bonian Chen
0fef82fbd1 [Settings] Mobile data usage code refactor
Code refactor

Bug: 151751844
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsagePreferenceControllerTest
Change-Id: Ie1870523ce83e6a1fc56fe9bc4c61708e0e745c4
2020-04-22 18:22:35 +08:00
Bonian Chen
6ea4727eb4 [Settings] Mobile data usage code refactor
Code refactor

Bug: 151751844
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsagePreferenceControllerTest
Change-Id: If85207ebe2edb8c547bb6dac0c55bbd146b62361
2020-04-22 13:13:33 +08:00
Bonian Chen
9bc2f7f8bc [Settings] Code refactor
Minor code refactor

Bug: 141833767
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsagePreferenceControllerTest
Change-Id: I060e7c880d91a0e5059610c5ceae319d47c19c7a
2020-04-21 14:43:48 +08:00
Lei Yu
9bc3273489 Update datausage for DataUsagePreferenceController
Data usage number was wrong because we didn't set correct
subId, this CL fixes this issue.

Bug: 132113657
Test: RunSettingsRoboTests
Change-Id: If7c9cf2f4709d9a8e5f9a154c02de9484800d6d5
2019-05-08 10:25:10 -07:00
Fan Zhang
71d793cc2a Format app data usage using IEC unit, not SI unit.
Fixes: 131924586
Test: visual
Change-Id: Iedbd15fb9c98a5c93089708e40175cbf5572eeda
2019-05-03 16:53:11 -07:00
Doris Ling
55a189a640 Disable App data usage preference if there's no usage data.
- when there is no usage data at all, launching the app data usage page
will show something blank, as there's no cycle with available usage
data. Check the overall historic usage to make sure that there's
usage data to be shown, otherwise, disable the preference.

Fixes: 123518021
Test: make RunSettingsRoboTests
Change-Id: I2d19f85e8618c41e2c31b9e4259cdc522f69e371
2019-02-22 11:18:29 -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
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
5680477b8b Refactor DataUsagePreference
Move the logic to PreferenceController

Bug: 114749736
Test: RunSettingsRoboTests
Change-Id: I7a0845c0cbc3f33e23257831d0d4ed97e7a5cc04
2018-10-16 15:40:17 -07:00