Commit Graph

207 Commits

Author SHA1 Message Date
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
Chaohui Wang
5d7228235b Fix AppInstallerInfoPreferenceTest flakiness
Add delay after performClick().

Bug: 289155281
Test: unit test
Change-Id: Ie84a375dfcd053b3a1ea75da05b9f3ff4ee2d5ba
2023-08-28 11:37:48 +08:00
Chaohui Wang
8647256269 Use Mockito Kotlin
Which has better support for Kotlin unit test.

Bug: 289155281
Test: unit test
Change-Id: Ic98ba7e66c124e8398ad01d3bca7ee3a771b06c4
2023-08-21 17:01:52 +08:00
Graciela Putri
ab7f57b17c Merge "Add opt-out properties for aspect ratio settings" into udc-qpr-dev am: 83c8f47ddd am: 725efb1a5a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24309274

Change-Id: I5cdb28b8929b0ab8dba829ee6e12d880ca6cc27b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-16 07:04:50 +00:00
Graciela Wissen Putri
08983e8e63 Add opt-out properties for aspect ratio settings
Don't display aspect ratio options if app has opted out. If app has
opted out only for fullscreen, other aspect ratio options should still
be shown.

Bug: 292583399
Test: UserAspectRatioManagerTest
Change-Id: Ia0b223536407f703826d775468c8f8a0b4822e23
2023-08-15 09:14:21 +00:00
Chaohui Wang
b0b710f1b0 Clean up @OptIn(ExperimentalCoroutinesApi::class)
After runTest get stable.

Bug: 285231003
Test: unit test
Change-Id: I200ba979727b900380b107bd82e1d0e43ab1d994
2023-08-09 17:26:10 +08:00
Chaohui Wang
e9cf4bf65c Merge "Convert DataUsageLib to Kotlin" into main 2023-08-08 05:05:01 +00:00
Chaohui Wang
4000b90fad Merge "Remove context from enterprisePrivacyFeatureProvider" into main 2023-08-04 04:31:44 +00:00
Yanting Yang
f5e74b8f49 Merge "Support App details for work profile apps" into main 2023-08-02 20:12:32 +00:00
Chaohui Wang
3cdf5b9be9 Remove context from enterprisePrivacyFeatureProvider
EnterprisePrivacyFeatureProvider is created by using application
context, no need pass context in when get.

Bug: 286764889
Test: m Settings
Change-Id: I346f2b0ccbb0590f26954603ab630132cd8be63f
2023-08-02 19:10:31 +08:00
Chaohui Wang
515c0b8e3a Remove context from userFeatureProvider
UserFeatureProviderImpl is created by using application context,
no need pass context in when get.

Bug: 286764889
Test: m Settings
Change-Id: I80ac7124c3278399e562d4d7d49d1847847b92af
2023-08-02 17:25:41 +08:00
Yanting Yang
6b02225810 Support App details for work profile apps
App info page stopped supporting the App details feature for work
profile apps in Android N but there is no exact reason from the history.
Try supporting it again to fulfill users' requests and check for
exceptions.

Bug: 264932611
Test: manual & robo and unit tests
Change-Id: I1227cff5e25313905952ba54ab0270cdf4f00fd4
2023-08-01 20:49:24 +08:00
Chaohui Wang
d01245e75b Convert DataUsageLib to Kotlin
For better null safe.

Also add unit tests.

Fix: 290698845
Fix: 290684887
Test: unit test
Test: manual - on Mobile Settings page
Change-Id: I9c9edb9b7cbf7d688a885e5c36b61bd6dc526add
2023-07-31 01:22:58 +00:00
Graciela Putri
9cba6cf4b9 Merge "[3/n] Add aspect ratio app info page" into udc-qpr-dev am: 386b02e906 am: e5e57a8d9e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23819685

Change-Id: I0a880774214c804f2c22fb7aa876c39349e71b62
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-28 19:32:46 +00:00
Graciela Wissen Putri
57984f02d5 [3/n] Add aspect ratio app info page
Apps > App Info > Advanced > Aspect ratio

Adds link from aspect ratio app list page to app info. Stops activity if
user chooses a different aspect ratio override.

To enable feature:
adb shell device_config put window_manager enable_app_compat_user_aspect_ratio_settings true
adb shell am force-stop com.android.settings

Bug: 287448187
Test: Manual
      All Settings CUJs passed
      atest SettingsRoboTests:UserAspectRatioDetailsTest
      atest SettingsSpaUnitTests:UserAspectRatioAppPreferenceTest
Change-Id: Id47f291459e62267bf15d629c163dde73d96928a
2023-07-28 09:53:11 +00:00
Chris Antol
b95ceb53ba Merge "Storage Apps Lists SPA migration" into main 2023-07-26 19:00:40 +00:00
Chaohui Wang
a7a10f1088 Merge "Remove context from dashboardFeatureProvider" into main 2023-07-25 23:39:27 +00:00
Chris Antol
993e1cec1f Storage Apps Lists SPA migration
Pending task to support Sorting by Name which is currently not possible given existing SPA infra

Bug: 284032857
Bug: 284032898
Test: Unit Test. Uncomment lines and tested Settings>Storage>Apps and Settings>Storage>Games
Change-Id: I93853ed7184808a083b66ba5b03f9fe3acf48d41
2023-07-21 23:52:27 +00:00
Graciela Putri
8dffd59e3d Merge "[2/n] Add aspect ratio app list page under apps" into udc-qpr-dev am: 4e86d0d6b3 am: dc86dbe24b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23819684

Change-Id: If7c6f4fa26ea014e40e737f07daae8b72481e2c2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-21 22:58:58 +00:00
Graciela Putri
4e86d0d6b3 Merge "[2/n] Add aspect ratio app list page under apps" into udc-qpr-dev 2023-07-21 21:28:44 +00:00
Graciela Wissen Putri
b4c4f6cbe6 [2/n] Add aspect ratio app list page under apps
Apps > General > Screen Size

To enable feature:
adb shell device_config put window_manager enable_app_compat_user_aspect_ratio_settings true
adb shell am force-stop com.android.settings

Fix: 287448088
Test: Manual
      atest AspectRatioAppsPageProviderTest
      atest AspectRatioUtilsTest
      All CUJs passed in go/settings-cujs
Change-Id: I4de6c3cbdbdfbc79ed839ec149fb633344dcd3a7
2023-07-21 08:02:09 +00:00
Sunny Shao
4d00821093 Fix the Protocol buffer best practice warnings problem
- Add prefix for the items of the SessionType enums.

Fixes: 287363023
Test: atest SpaActivityTest SpaLogDataTest MetricsDataModelTest
Change-Id: Ifde0b61a05b1257edaca54325a72dad333e43e3c
2023-07-20 21:48:22 +08:00
Chaohui Wang
58f0ee30fc Remove context from dashboardFeatureProvider
DashboardFeatureProviderImpl is created by using application context,
no need pass context in when get.

Bug: 286764889
Test: m Settings
Change-Id: Ia9672dfd9d3d71f64735cbc5979a6ad57c9429d3
2023-07-20 12:21:16 +08:00
Vania Januar
986fe4ebc1 USB firmware update for stylus in Stylus USI Device Details
Bug: 288850921
Test: StylusUsbFirmwareControllerTest, UsbStylusBroadcastReceiverTest
Change-Id: Ic7cb35799ff00f9998ca569eb4ae091f8010780a
Merged-In: Ic7cb35799ff00f9998ca569eb4ae091f8010780a
2023-07-18 14:09:05 +00:00
Vania Januar
a7d9944090 Merge "USB firmware update for stylus in Stylus USI Device Details" into main 2023-07-18 09:16:13 +00:00
Vania Januar
f04363547a USB firmware update for stylus in Stylus USI Device Details
Bug: 288850921
Test: StylusUsbFirmwareControllerTest, UsbStylusBroadcastReceiverTest
Change-Id: Ic7cb35799ff00f9998ca569eb4ae091f8010780a
2023-07-17 13:49:30 +00:00
Chaohui Wang
36b8227073 Remove context from powerUsageFeatureProvider
PowerUsageFeatureProviderImpl is created by using application context,
no need pass context in when get.

Bug: 286764889
Test: m Settings
Change-Id: Iec81e98648fcb2f6a20978ef4ce164e1af50a804
2023-07-13 09:58:54 +08:00
Chaohui Wang
14ab64637e Merge "Remove context from batteryStatusFeatureProvider" into main 2023-07-12 05:03:48 +00:00
Chaohui Wang
b515ed5fee Merge "[Regulatory Labels] Load labels from overlays" into udc-d1-dev am: fe38ff963a am: 47803f6b10 am: fc275fef2e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23939155

Change-Id: I2d9d02579aec65fdc5916522563fad4daada58c0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-11 09:54:45 +00:00
Chaohui Wang
fc275fef2e Merge "[Regulatory Labels] Load labels from overlays" into udc-d1-dev am: fe38ff963a am: 47803f6b10
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23939155

Change-Id: I624e8cf060dae2dfb7a1b0b06c4610adeeddde79
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-11 09:12:13 +00:00
Chaohui Wang
1806b3032f Merge "[Regulatory Labels] Load labels from overlays" into udc-d1-dev am: fe38ff963a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23939155

Change-Id: I46c9e35554f3a7021bb52c79cc73e09971ca4232
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-11 08:34:42 +00:00
Chaohui Wang
fe38ff963a Merge "[Regulatory Labels] Load labels from overlays" into udc-d1-dev 2023-07-11 07:50:49 +00:00
Chaohui Wang
dc3fc1dff0 Fix crash when call getMobileTemplate am: 9132535e5e am: f3d6684e14
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24002328

Change-Id: Ifbeab53d402207c0cd63ab225f30af6bdc4da824
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-10 08:56:59 +00:00