Commit Graph

589 Commits

Author SHA1 Message Date
Chaohui Wang
3780ba5d12 Merge "Improve the performance of AppDataUsagePreference" into main 2023-10-10 09:30:47 +00:00
Chaohui Wang
252450b5fc Improve the performance of AppDataUsagePreference
We only need aggregated summary, but NetworkCycleDataForUidLoader loads
usage for all cycles.

Create AppDataUsageSummaryRepository to reduce the system api call to
only once.

Fix: 304421722
Test: manual - on AppInfoSettings
Test: unit test
Change-Id: I115dfb51dbf77ed3fdde985aa1a968ff7462bebc
2023-10-10 15:51:40 +08:00
Treehugger Robot
f062d1cd6e Merge "Telephony.Carriers.MVNO_TYPE is Deprecated." into main 2023-10-10 03:28:29 +00:00
Charlotte Lu
2d029133f2 Telephony.Carriers.MVNO_TYPE is Deprecated.
Fix: 304180380
Test: Visual Test
Change-Id: Ibd1574e2f5004c27a4aafb94a679db5a60113c62
2023-10-10 10:33:15 +08:00
Chaohui Wang
6395cf8d30 Unify the default template and title
On AppDataUsage page, using single source of truth to calculate the
default template, and set title base on the current template.

Fix: 213266028
Fix: 234104784
Test: visual - on AppDataUsage
Test: unit test
Change-Id: I80facca0b000964e901905af51a344a4bc9f498b
2023-10-09 18:40:03 +08:00
Chaohui Wang
741979bc02 Create AppDataUsageCycleController
To improve performance and better organization and testings.

Fix: 240931350
Test: manual - on AppDataUsage
Test: unit test
Change-Id: I277133b55378a3445aceb826d771b14c0fc91e4a
2023-10-09 16:19:08 +08:00
Chaohui Wang
0bcf5b79f8 Merge "Create AppDataUsageAppSettingsController" into main 2023-10-08 11:46:37 +00:00
Charlotte Lu
93fb316f01 Add ApnDataInit.
Fix: 298906796
Test: Unit Test
Change-Id: Ibf9e12e4f9c4ee033ad6dc2ca1f2267bf1f21912
2023-10-08 17:54:40 +08:00
Chaohui Wang
08e24272e4 Create AppDataUsageAppSettingsController
For better organization and testings.

Bug: 240931350
Test: manual - on AppDataUsage
Test: unit test
Change-Id: Ie3d35f5d112cf06cca585c9859624d705fbe2655
2023-10-08 17:03:48 +08:00
Chaohui Wang
4188a571aa Use network type enum for APN
Instead of hardcoded names and values.

Bug: 303971237
Test: unit test
Change-Id: I099a408df7ee35abc886ed5c1d2d09fd31fda7d3
2023-10-08 14:23:37 +08:00
Treehugger Robot
9f49e038a0 Merge "Telephony.Carriers.BEARER is deprecated." into main 2023-10-08 03:33:27 +00:00
Charlotte Lu
11737b956e Telephony.Carriers.BEARER is deprecated.
Fix: 303971237
Test: Unit Test
Change-Id: Id3257b279421eb9f3544430667dc8ae536476e5c
2023-10-07 17:52:16 +08:00
Chaohui Wang
8e2e9e5d3e Prevent unnecessary reconnection for wifi privacy
Before fix, privacy toggle in the Network details page causes a
disconnection + reconnection even when selecting the same setting.

Check current setting first to prevent unnecessary reconnection.

Fix: 303093138
Test: manual - select same privacy setting
Test: unit test
Change-Id: I71208e3cd256fdc0dd5e895fa1a68fdab47aed9a
2023-10-07 15:42:35 +08:00
Chaohui Wang
b19eb9a4c2 Create AppDataUsageListController
For better organization and testings.

Bug: 240931350
Test: manual - on AppDataUsage
Test: unit test
Change-Id: I77ceeccc7055fcd948fe40d5dfb9cc4a9b9ad2ee
2023-10-07 15:03:27 +08:00
Graciela Putri
f861f64769 Merge "Update aspect ratio summary strings" into udc-qpr-dev am: 242bde10c8 am: fafb4bf5ba
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24867213

Change-Id: I169898d72e09964a762726782acfe57906468608
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-04 14:03:45 +00:00
Graciela Putri
242bde10c8 Merge "Update aspect ratio summary strings" into udc-qpr-dev 2023-10-04 13:04:36 +00:00
mxyyiyi
1b9eb170dd Refactor Power Usage Time Page.
- Show use time category

Screenshot:
[Screen time with hint] https://screenshot.googleplex.com/3cRLrwevzw4iytb
[Background time with hint] https://screenshot.googleplex.com/zEf8PcWopCVCRZR
[without hint] https://screenshot.googleplex.com/9bao9sVd8s7VRwM
[enter from app info (without category)] https://screenshot.googleplex.com/8sozxMrq8ojadiF

Bug: 302063050
Test: Manual
Change-Id: Ic967d05a173afa76c2a958e1332dedd9f83cd687
2023-10-02 02:34:35 +08:00
Eghosa Ewansiha-Vlachavas
5f624b70ba Merge "[1/n] Aspect ratio settings app list refinement" into udc-qpr-dev am: a3108d5b14 am: 2595f32076
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24854937

Change-Id: Iaa9687110887498c26d246dfed086eb1f8d529af
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-28 12:13:01 +00:00
Chaohui Wang
58871ff999 Merge "Improve the latency of DataUsageList" into main 2023-09-28 03:18:38 +00:00
Eghosa Ewansiha-Vlachavas
6bd9bff2e2 [1/n] Aspect ratio settings app list refinement
All apps list for work profile currently only shows work apps that are
also installed on the normal user. Update filter for list to show all
launcher apps for both users in their respective lists.

Fixes: 301373413
Test: atest SettingsUnitTests:UserAspectRatioManagerTest
Test: atest SettingsSpaUnitTests:UserAspectRatioAppPreferenceTest
Change-Id: Ia0bf15340d1b37dcd926d81598d3e94f448a46fc
2023-09-27 17:30:23 +00:00
Charlotte Lu
cfa739350f Add SettingsTextFieldPassword.
Fix: 298906796
Test: Visual
Change-Id: I7dc8c641f93df96a28a57a6f6082abe264680298
2023-09-27 16:19:19 +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
Eghosa Ewansiha-Vlachavas
159b8aed3d Update aspect ratio summary strings
Replace usage of `aspect_ratio_summary` and `aspect_ratio_main_summary`
with `aspect_ratio_summary_text` and `aspect_ratio_main_summary_text`

Fixes: 302142203
Test: Manual
Change-Id: Id7570269806e2dd15f45bdc0aad1ed0534e259b6
2023-09-26 17:04:59 +00:00
Chaohui Wang
5ed30f4672 New DataUsageListHeaderController
Move spinner and config button to DataUsageListHeaderController.

Bug: 290856342
Test: manual - on DataUsageList and AppDataUsage
Test: unit test
Change-Id: I655bd3441b2305708c0052f1203538bb07eef2af
2023-09-25 00:28:31 +08:00
Charlotte Lu
cb624a3155 Merge "Add SettingsExposedDropdownMenuCheckBox. SettingsExposedDropdownMenuCheckBox requires input index." into main 2023-09-22 10:35:37 +00:00
Charlotte Lu
7e74f4c8ad Add SettingsExposedDropdownMenuCheckBox.
SettingsExposedDropdownMenuCheckBox requires input index.

Bug: 298906796
Test: Munual
Change-Id: I6059bd5371a2472fbbb9a6b0aa83be769f90264e
2023-09-22 14:48:31 +08:00
Graciela Putri
b8c49b99aa Merge "Fix null object ref in UserAspectRatioAppPreferenceTest" into udc-qpr-dev am: 7dff7a0d56 am: 912ae142ca
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24824336

Change-Id: I6e39f10e10537249171be49aad89ed9923567599
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-21 20:42:11 +00:00
Graciela Putri
7dff7a0d56 Merge "Fix null object ref in UserAspectRatioAppPreferenceTest" into udc-qpr-dev 2023-09-21 18:25:29 +00:00
Graciela Wissen Putri
88f8ebe3e3 Fix null object ref in UserAspectRatioAppPreferenceTest
Fix: 300651879
Test: atest UserAspectRatioAppPreferenceTest
Change-Id: I7afb90ecd7038e742b2b5ee5b4af5d6ecb4c7a4e
2023-09-21 13:33:06 +00:00
Graciela Putri
e6743f5676 Merge "Change title to aspect ratio (experimental)" into main 2023-09-21 09:37:06 +00:00
Charlotte Lu
f27c23fa79 SettingsExposedDropdownMenuCheckBox requires input index.
Fix: 301354014
Test: Unit Test
Change-Id: I4f5ef9a3cfcd0705687232b5e67da8007bf97aed
2023-09-21 14:25:50 +08:00
Chaohui Wang
c39acee194 Clean up NetworkServices from setTemplate
Not used any more.

Bug: 290856342
Test: manual - on mobile settings
Test: m RunSettingsRoboTests
Test: unit test
Change-Id: I9c8dde2a8812e83e535d15713ccbf25b42f1f303
2023-09-21 12:57:51 +08:00
Chaohui Wang
ba1ec910ac New BillingCycleRepository
Migrate BillingCyclePreference to BillingCycleRepository first, will
also migrate DataUsageList in future cl.

Also fix an issue that the BillingCyclePreference initial enable state
not set.

Bug: 290856342
Test: manual - on mobile settings
Test: unit test
Change-Id: Idd171fefbc30763010afb7bfb68543612f7b9b1a
2023-09-21 12:57:51 +08:00
Graciela Wissen Putri
bbb58cac69 Change title to aspect ratio (experimental)
Settings > Apps > Aspect ratio (experimental)
Settings > Apps > App info > Aspect ratio (experimental)

Fix: 300219974
Test: Manual && atest SettingsSpaUnitTests
Merged-In: I359c744025232c6a6ebd9628dbf91acac85b53e9
Change-Id: I359c744025232c6a6ebd9628dbf91acac85b53e9
2023-09-20 21:57:57 +00:00
Graciela Wissen Putri
ac2bfce107 Change title to aspect ratio (experimental)
Settings > Apps > Aspect ratio (experimental)
Settings > Apps > App info > Aspect ratio (experimental)

Fix: 300219974
Test: Manual
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:83b61850f3ed511b42c148b63840b12cff3fe5aa)
Merged-In: I359c744025232c6a6ebd9628dbf91acac85b53e9
Change-Id: I359c744025232c6a6ebd9628dbf91acac85b53e9
2023-09-20 21:45:06 +00:00
Chaohui Wang
dc10483dc5 Merge "Move SystemUpdateManager.retrieveSystemUpdateInfo" into main 2023-09-20 15:39:37 +00:00
Charlotte Lu
b0d09d2ad2 Add SettingsExposedDropdownMenuBox and SwitchPreference.
Bug: 298906796
Test: Munual
Change-Id: I666c51b79589b9529b623c81c156a545af269e03
2023-09-20 12:22:19 +08:00
Chaohui Wang
cda836fff7 Move SystemUpdateManager.retrieveSystemUpdateInfo
Into Kotlin Coroutine for true async.

Bug: 300851543
Test: manual - on system page
Test: unit test
Change-Id: Ibec5c9d0934d71ed1a5808cadf3b3542eb3d5fa0
2023-09-19 14:54:41 +08:00
Charlotte Lu
4964deb8b5 Add ApnData class and SettingsOutlinedTextField.
Bug: 298906796
Test: Munual
Change-Id: Iba6563fee091302989d2653c0b59b5c18accce4d
2023-09-19 11:03:00 +08:00
Chaohui Wang
0cb8d91e4e Create DataUsageListAppsController
Move apps group logic from DataUsageList.

Also add key to AppDataUsagePreference, which reduce flaky and keep
scroll position when back from app detail page.

Bug: 290856342
Test: manual - on DataUsageList
Test: unit test
Change-Id: I61e2b6bd9b192b7230e3553dbc6038f5d59bd303
2023-09-17 13:51:11 +08:00
Chaohui Wang
14655b03fb Merge "Fix AppInstallerInfoPreferenceTest flakiness" into main 2023-09-15 15:57:50 +00:00
Chaohui Wang
c31474c02c Extract app data usage to AppDataUsageRepository
From DataUsageList for better organization and testing.

Bug: 290856342
Test: manual - on DataUsageList
Test: unit test
Change-Id: I97e327a220d40942b9345ec7f1f8c466ac1fc9da
2023-09-14 16:48:29 +08:00
Graciela Wissen Putri
c37c8b8789 Change aspect ratio summary and footer text
Add more education for device user that setting aspect ratio has not
been tested by the app developer. Move Aspect ratio under Apps >
Advanced instead of General.

Fix: 296160724
Test: atest UserAspectRatioAppsPageProviderTest
Change-Id: I2078f285d7bfb8de3a61c69f9d0ff3872d683ed4
2023-09-12 16:56:10 +00:00
Chaohui Wang
81d99646e9 Set use_resource_processor for Settings tests
Bug: 293810334
Test: unit test
Test: robo test
Change-Id: Ibc1756f4f1f943ee6aa8ebb4dda930684d93ae07
2023-09-08 12:13:35 +08:00
Graciela Putri
9e571e55cf Merge "Enable User Aspect Ratio Settings by default" into udc-qpr-dev am: f7a443b419 am: c8bd304d95
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24620828

Change-Id: I3d5ad3abc86cf3bdb85c031bdee154708985176d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-06 04:10:27 +00:00
Massimo Carli
70ca63e4a2 Enable User Aspect Ratio Settings by default
Fix: 298203770
Test: Manual

Change-Id: I55daa03ab4369fef62ba439f4cf8af211f136021
2023-08-31 16:46:39 +00:00
Chaohui Wang
7f72bcf667 Merge "Remove getMobileTemplate_mergedImsisFromGroupNull_returnRequestedSub" into main 2023-08-31 07:07:48 +00:00
Yiyi Shen
de231200d7 Add FeatureProvider for FastPair Settings integration.
Bug: 296507968
Test: FakeFeatureFactory
Change-Id: Ie2e238cb61ca56a1d19e1a13b0234e28e28a785e
2023-08-29 15:50:48 +08:00
Chaohui Wang
88343a3d7c Remove getMobileTemplate_mergedImsisFromGroupNull_returnRequestedSub
Because,
 - telephonyManager.mergedImsisFromGroup is @NonNull
 - telephonyManager.mergedImsisFromGroup is fixed, will not return null
 - This test no longer feasible, since return null will crash now

Bug: 297923588
Test: atest SettingsSpaUnitTests
Change-Id: Ic09cd9b5a36a4743a65e05105ce2e814c020491f
2023-08-29 13:02:53 +08:00
Colin Cross
4700dd261f Skip test broken by @NonNull annotation fix
b/294110802 fixed the @NonNull annotation so that it was visible to
kotlin when applied to methods outside the current build module.  This
caused kotlin to insert more null checks, which broke a test that was
mocking a method annoated with @NonNull and forcing it to return null.
Add @Ignore to the test for now.

Bug: 294110802
Bug: 297923588
Test: atest SettingsSpaUnitTests
Change-Id: I86a677c5ac01bcfaeebe8c339791cca5b2b97fc7
2023-08-28 15:36:09 -07:00