Commit Graph

20701 Commits

Author SHA1 Message Date
Graciela Wissen Putri
e6c4beca80 Remove 4:3 aspect ratio option for foldables
Bug: 304260896
Test: atest UserAspectRatioManagerTest
Change-Id: I8a745c90e45e8776eef082e01dc2155fe6b353b6
2023-10-10 17:18:48 +00:00
Piotr Wilczyński
3a9777c8e8 Merge "Back up peak refresh rate and min refresh rate" into main 2023-10-10 15:45:28 +00:00
Piotr Wilczyński
176a63a1db Back up peak refresh rate and min refresh rate
It's possible that in the future the peak refresh rate setting will have multiple values (e.g. 90, 120). For that reason, we shouldn't convert it to a boolean like in the previous CLs (ag/24604787, ag/24604847).

- set peak/min refresh rate to infinity if it's the highest refresh rate so that when we restore the setting on another device, we also choose the highest refresh rate
- back up peak/min refresh rate and add validators
- upgrade settings in SettingsProvider
- create a utils class - RefreshRateSettingsUtils

Bug: 211737588
Test: atest DisplayModeDirectorTest
Test: atest ForcePeakRefreshRatePreferenceControllerTest
Test: atest PeakRefreshRatePreferenceControllerTest
Test: atest SettingsBackupTest
Test: atest SettingsProviderTest
Test: atest RefreshRateSettingsUtilsTest
Change-Id: Ie1d8cfc76e42c7d98c4a36743463ccaf3ca5d483
2023-10-10 14:10:38 +00:00
Zaiyue Xue
0e277429cb Fix NullPointerException when full charge unplug a device with work profile
Block BatteryUsageBroadcastReceiver when context is work profile.

Bug: 304441610
Fix: 304441610
Test: manual
Change-Id: I91a41d5570e7cacf77a8d126c7700ee4bd766d40
2023-10-10 21:26:06 +08:00
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
Eric Biggers
938902d2df ShadowLockPatternUtils: remove patternEverChosen methods
These methods are being removed from LockPatternUtils because they are
no longer used, so remove them from ShadowLockPatternUtils too.

Bug: 270013005
Change-Id: If196bbef4755c644b3188043ed47e99817bf1856
Merged-In: If196bbef4755c644b3188043ed47e99817bf1856
(cherry picked from commit 795a02c92a)
2023-10-10 05:29:21 +00: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
Eric Biggers
faaee7a843 Merge "ChooseLockPassword: convert to use PasswordMetrics#validateCredential()" into main am: 00f5d9e7a6 am: 335752ed98 am: be262063a7 am: a6448e9389
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2776714

Change-Id: Ifade3ffd8878fc8c738ffa1eb927d2f3507fc643
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-09 23:26:11 +00:00
Eric Biggers
a6448e9389 Merge "ChooseLockPassword: convert to use PasswordMetrics#validateCredential()" into main am: 00f5d9e7a6 am: 335752ed98 am: be262063a7
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2776714

Change-Id: Ie1cba1fa73d9cfbf12aca28027854bf9afcfcd7f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-09 22:21:50 +00:00
Graciela Wissen Putri
fcba73e30e Add aspect ratio settings to advanced category children
Fix: 303823822
Test: Manual && atest AppDashboardFragmentTest
Change-Id: I5778efa6a1a790d76d9d35d1597d82fdc3707b3b
2023-10-09 17:35:07 +00: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
b7f8c15ff0 Merge "Status header not clickable in DataUsageSummary" into main 2023-10-09 10:37:37 +00:00
Chaohui Wang
51e1576c34 Status header not clickable in DataUsageSummary
Status header (DataUsageSummaryPreference) is not clickable in the
DataUsageSummary.

So remove the legacy logics, to unblock unified default template.

Bug: 234104784
Test: m RunSettingsRoboTests
Change-Id: I3dddf4ec3f84d53fd07afbb62d171942a6acce5d
2023-10-09 16:51:18 +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
Zaiyue Xue
834e19b188 Use empty BatteryDiffData instead of null to avoid NullPointerException
This is one action post P0 bug b/301362376.

Bug: 304067689
Bug: 303838369
Fix: 304067689
Fix: 303838369
Test: manual
Change-Id: I8bb6bfe9c3fca78ab19dfbfd2a184b0f92f4ef09
2023-10-08 16:38:29 +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
Eric Biggers
3a11c3b0de ShadowLockPatternUtils: remove patternEverChosen methods
These methods are being removed from LockPatternUtils because they are
no longer used, so remove them from ShadowLockPatternUtils too.

Bug: 270013005
Change-Id: If196bbef4755c644b3188043ed47e99817bf1856
Merged-In: If196bbef4755c644b3188043ed47e99817bf1856
(cherry picked from commit 795a02c92a)
2023-10-06 17:16:55 +00:00
Eric Biggers
b2ea672670 ChooseLockPassword: convert to use PasswordMetrics#validateCredential()
Fix the check for invalid characters in new passwords by switching from
PasswordMetrics#validatePassword() to
PasswordMetrics#validateCredential().  For more information, see
frameworks/base change I5c3c55367c3a294578cd0f97ac0e315a11ed517e.

Bug: 219511761
Bug: 232900169
Bug: 243881358
Test: Verified no regressions in 'atest ChooseLockPasswordTest'.  Note,
      this test is currently @Ignored and has 2 failures.  I didn't
      attempt to address that.
Test: Set a password containing non-ASCII characters on a device running
      an older build.  Upgraded and verified unlocking still works.
      Tested that setting a new non-ASCII password is not allowed.
Change-Id: I5f1822a34688473cb103eb64dca56e4c19d4dd08
Merged-In: I5f1822a34688473cb103eb64dca56e4c19d4dd08
(cherry picked from commit b547094366)
2023-10-06 17:16:55 +00:00
Valentin Iftime
323fbda20e Validate ringtone URIs before setting
Add checks URIs for content from other users.
 Fail for users that are not profiles of the current user.

Test: atest DefaultRingtonePreferenceTest
Bug: 299614635
Change-Id: Ib266b285a3a1c6c5265ae2321159e61e08e349f6
2023-10-06 15:44:17 +02:00
Gil Cukierman
18403f2adc Merge changes from topic "cukie-300248708-hide2gremoval" into main
* changes:
  Stop honoring CarrierConfigManager.KEY_HIDE_ENABLE_2G
  Add feature flag for removal of KEY_HIDE_ENABLE_2G
2023-10-04 20:12:53 +00:00
Matt Pietal
9695477373 Merge "Add support to configure double line clock in lockscreen [2/2]" into main am: 3be411d513 am: 705507d68f am: 8d4d73f152 am: 9e233f3284 am: 84076896f6
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2539870

Change-Id: I361b6926ca06f22211048ad5738b58d3bf21c473
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-04 16:57:42 +00:00
Matt Pietal
84076896f6 Merge "Add support to configure double line clock in lockscreen [2/2]" into main am: 3be411d513 am: 705507d68f am: 8d4d73f152 am: 9e233f3284
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2539870

Change-Id: I91198eb53fda60d1f5801e5fa8512be2800304e8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-04 16:26:27 +00:00
Matt Pietal
9e233f3284 Merge "Add support to configure double line clock in lockscreen [2/2]" into main am: 3be411d513 am: 705507d68f am: 8d4d73f152
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2539870

Change-Id: I9a436c40d689ad4db65a9ff9def5ea04c8115894
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-04 15:55:50 +00:00
Matt Pietal
705507d68f Merge "Add support to configure double line clock in lockscreen [2/2]" into main am: 3be411d513
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2539870

Change-Id: Ia1bfae20044369b8a8e463e21a2393cf9b6e9250
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-04 14:54:22 +00:00
Matt Pietal
3be411d513 Merge "Add support to configure double line clock in lockscreen [2/2]" into main 2023-10-04 14:25:38 +00: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
Gil Cukierman
761fd612c4 Stop honoring CarrierConfigManager.KEY_HIDE_ENABLE_2G
KEY_HIDE_ENABLE_2G is soft removed in Android API level 35
because it hides a security feature. This patch
introduces simplified logic that ignores the
carrier config value. The new behavior is behind a feature flag.

This patch also includes some cleanup.
1. It removes an unneeded check for null carrier config
2. It removes test logic that set the value of KEY_HIDE_ENABLE_2G
   in places where it had no impact on the test.

Bug: 300248708
Test: atest Enable2gPreferenceControllerTest
Change-Id: I892d115d1ae173d2f3cd69e8f8b97bc5bfa7c67b
2023-10-04 13:59:55 +00:00
Graciela Putri
fafb4bf5ba Merge "Update aspect ratio summary strings" into udc-qpr-dev am: 242bde10c8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24867213

Change-Id: I4e6ef486029a3f70cf7c267320c200c19384787a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-04 13:32:50 +00:00
Graciela Putri
242bde10c8 Merge "Update aspect ratio summary strings" into udc-qpr-dev 2023-10-04 13:04:36 +00:00
Treehugger Robot
3772065d38 Merge "Fix code inspection test for slice controllers" into main 2023-10-03 17:44:42 +00:00
Jason Chiu
1926318cdc Merge "Enable the suggesiton test on disabled components" into main 2023-10-03 09:29:43 +00:00
Treehugger Robot
4cc92858f4 Merge "Config battery info page(1/2)" into main 2023-10-03 08:53:01 +00:00
Mill Chen
6cbbc3bf3f Fix code inspection test for slice controllers
Bug: 269156923
Test: atest CodeInspectionTest
Change-Id: I8937c8b3e39c475c630e8d4bbd45439c2234e7ea
2023-10-03 08:23:36 +00:00
Treehugger Robot
094a73867c Merge "Fix missing declared accessibility PreferenceControllers." into main 2023-10-03 08:22:02 +00:00
Jason Chiu
45583d449f Enable the suggesiton test on disabled components
The activity to test suggestions might be disabled by configuration. To
avoid no component found for testing, just query activities including
the disabled components.

Fix: 300160935
Test: atest SettingsRoboTests:com.android.settings.suggestions
Change-Id: I37718ea79480d16a90c67635666b8cdfa8be4dae
2023-10-03 07:56:31 +00:00
Zoey Chen
6a3352e7a0 Merge "[ToA] Terms of Address UI, fragment in LocaleListPicker" into main 2023-10-03 07:46:49 +00:00
Wesley Wang
bace563189 Config battery info page(1/2)
- Make battery information page configurable

Bug: 301817717
Test: make SettingsRoboTests
Change-Id: I51bf00fe3d9993ecd4e8481cd7c15d70b3c09ec4
2023-10-03 07:36:52 +00:00
YK Hung
3be5135a01 Merge "Refactor Power Usage Time Page." into main 2023-10-03 06:55:07 +00:00
Zoey Chen
c2522b8f9d [ToA] Terms of Address UI, fragment in LocaleListPicker
Test: atest TermsOfAddressCategoryControllerTest
Test: adb shell device_config put settings_globalintl com.android.settings.flags.terms_of_address_enabled true
Bug: 295826542
Bug: 297798866
Change-Id: I2b9af7cbe7cab0bb7b2168bc99f0fa7bc0903ac2
2023-10-03 06:36:05 +00:00
Allen Su
1c2440aab0 Merge "Fix notificaiton not working in work profile" into main 2023-10-03 02:11:34 +00:00
Joshua McCloskey
b7021c8e0b Added UI tests for FingerprintEnrollIntro
Test: m -j40 RunSettingsRoboTests ROBOTEST_FILTER=FingerprintEnrollmentIntroFragmentTest
Bug: 295206367
Change-Id: I70f6b50dd2604e01805df04ffb1c07a9134ba065
2023-10-02 22:05:16 +00:00