Commit Graph

7 Commits

Author SHA1 Message Date
Chaohui Wang
00c21da30e Correct the data usage warning
- For MATCH_WIFI, only shown non carrier warning when has SIM
- For others, restore the previous operator warning

Bug: 331184249
Test: manual - on DataUsageList
Change-Id: I5d5c6b36c6874a547cc635c025aa77acadf6e1e3
2024-04-02 17:14:42 +08:00
Chaohui Wang
83c46eb1b6 Fix DataUsageListTest
Using androidx.fragment.app.testing.launchFragment to rewrite the test.

Bug: 315449973
Test: manual - on DataUsageList
Test: unit test
Change-Id: Ief373becb4ac8ab1ba93b8ff3c594b5682c4821e
2023-12-19 12:54:31 +08:00
Chaohui Wang
51fc4bef49 Use single queryDetailsForDevice if possible
To improve performance.

Since queryDetailsForDevice() also aggregated the uids into one,
the apps list in DataUsageList still needs another separated api call.

Fix: 315449973
Test: manual - on DataUsageList page
Test: unit tests
Change-Id: I96c23dd7d0d40ecd183e0fb0f61329db42dae1ab
2023-12-16 02:01:22 +08:00
Chaohui Wang
9e72afdca4 New MobileDataEnabledFlow
To easily collect the mobile data enabled setting changes.

Bug: 308903704
Test: manual - on DataUsageList
Test: unit tests
Change-Id: I31327f59ac32c1a621e2853e64bd30d7d17e079c
2023-11-03 07:19:26 +08:00
Chaohui Wang
d9a372204b Refresh the DataUsageList when resume
Like when back from AppDataUsage page.

Bug: 295260929
Test: manual - on DataUsageList
Change-Id: I0b1698e47f06cbe731794a2a6b04e9c9ac9450d8
2023-10-14 19:34:09 +08:00
Chaohui Wang
8603782bc5 Optimize DataUsagePreferenceController
Bug: 295260929
Test: manual - on mobile settings
Change-Id: I89a36981771ef21f3c8213ad2039c3577196b493
2023-10-11 20:48:18 +08:00
Chaohui Wang
2205762482 Improve the latency of DataUsageList
Up to 30x faster.

Currently it load the usage detail for every day at the beginning, so
it's quite slow.

To fix,
- Not load the usage detail for every day at the beginning
- Load only the cycles first
- And only load the daily detail for the selected month

Fix: 290856342
Test: manual - on DataUsageList (cell & wifi)
Test: unit tests
Change-Id: Ie18fa68f801743389bd6b6a28e236dcf1fea00e4
2023-09-27 08:05:02 +00:00