Commit Graph

19201 Commits

Author SHA1 Message Date
Yuxin Hu
67c72c01cb Merge "Fix "Enable ANGLE" switch behavior when Developer Option Switch is off" into udc-dev 2023-05-25 18:08:10 +00:00
Treehugger Robot
48355b8b24 Merge "[Settings] Use background thread to get VoNr state." into udc-dev am: 1fd77775cb
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23405373

Change-Id: I68dd6ae9bd91519b126cbacb8cba1fb4909524a5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-25 06:41:09 +00:00
Chaohui Wang
f976ff3f06 Merge "Fix crash of PictureInPicture" into udc-dev am: 5b042e2feb
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23408018

Change-Id: I271981812af20ac9d666465edea064fba0a2642e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-25 06:40:44 +00:00
Treehugger Robot
1fd77775cb Merge "[Settings] Use background thread to get VoNr state." into udc-dev 2023-05-25 06:25:55 +00:00
tom hsu
97a1fc643e [Settings] Use background thread to get VoNr state.
- TelephonyManager#isVoNrEnabled may not send back the result in time,
   so use different thread and timer to prevent ANR.

Bug: 282876876
Test: atest passed
Change-Id: Ie6cc0f8a459f5ebed930e457dacb9b742df70fad
2023-05-25 10:56:03 +08:00
Chaohui Wang
ce56dcc30b Fix crash of PictureInPicture
This follows change I3115cf1b99a305efef192a0dcf3e809eb7903d0a

PackageManager.getPackageInfoAsUser() will throw exceptions when the
package is too large which is a known issue to PackageManager but very
low priority given resourcing constraints. As per the PackageManager
team suggestion, catch the exception on the app side to alleviate the
impact to the PictureInPicture & App info page.

Fix: 283076353
Fix: 283354211
Test: Unit test
Change-Id: Iad2bf9fbfca6ee7f604fec1c4afa1b9382f6ec7e
2023-05-24 19:41:20 +08:00
SongFerng Wang
75dd8a0a91 Merge "The BluetoothDevicePreference register the MetadataChanged" into udc-dev am: 71a5715e3e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23405361

Change-Id: I1f0f8264b33b5b826d54da4adca8c2c4409af79b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-24 10:10:09 +00:00
SongFerngWang
1872151b4f The BluetoothDevicePreference register the MetadataChanged
The bluetooth device preference needs to refresh UI after MetadataChanged
Fix: 282877247
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDevicePreferenceTest

Change-Id: I02cb07a6b255242e4877089ce2f3b7559ce02362
2023-05-24 04:49:41 +00:00
Yuxin Hu
0183cfd816 Fix "Enable ANGLE" switch behavior when Developer Option Switch is off
Fix below bugs:
1) When developer option switch is turned off,
"Enable ANGLE" switch is not disabled. Fixed it in
GraphicsDriverEnableAngleAsSystemDriverController::update().

2) When user turns off developer option switch,
a restart is not always mandatory. However, we should ask
user to restart the device is "Enable ANGLE" is forced to
change due to developer option switch turning off.
Fixed it in DevelopmentSettingsDashboardFragment::onSwitchChanged().

3) When user turns off developer option switch and
the reboot dialog pops up, user can dismiss the dialog by
not clicking either POSITIVE_BUTTON or NEGATIVE_BUTTON.
We should enforce user to click the button and disallow the
option to dimiss the dialog by touching screen areas
outside the window's bounds.
Fixed it in DisableDevSettingsDialogFragment.java.

Did a few clean-up and in
GraphicsDriverEnableAngleAsSystemDriverController.java, and updated
unit test to reflect new code behavior.

Bug: b/270994705
Test: m; flash and device can boot.
Test: atest -c GraphicsDriverEnableAngleAsSystemDriverControllerJUnitTest
Test: atest GraphicsDriverEnableAngleAsSystemDriverControllerTest
Test: atest SettingsRoboTests:FreeformWindowsPreferenceControllerTest
Test: atest SettingsRoboTests:DesktopModePreferenceControllerTest

Change-Id: I199b2fe59b6ad948b753793254c822a293d8b40d
2023-05-24 01:37:35 +00:00
Lucas Silva
975b03405f Merge "Disable dreams home controls button when disabled on lockscreen." into udc-dev am: 5bce93eb17
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23321459

Change-Id: Ibd8e11b0cd11ff6ecb17a5b71ae8895e850d5b12
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-22 21:04:21 +00:00
Lucas Silva
5bce93eb17 Merge "Disable dreams home controls button when disabled on lockscreen." into udc-dev 2023-05-22 20:35:16 +00:00
Behnam Heydarshahi
2aecb2f1ea Merge "Remove volume_separate_notification flag" into udc-dev am: 7aa8424cc0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23244447

Change-Id: I6798c7a2e2020eb1ca4dbe6dbf1cb7ccc50a76b2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-22 14:21:55 +00:00
Behnam Heydarshahi
7aa8424cc0 Merge "Remove volume_separate_notification flag" into udc-dev 2023-05-22 14:09:22 +00:00
Lucas Silva
9872f4322b Disable dreams home controls button when disabled on lockscreen.
When home controls are disable on lockscreen, we should also disable
them on dreams.

Bug: 282680621
Test: flashed device, disabled/enabled home controls on lockscreen and
verified that dreams home controls button was hidden/shown correctly
Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.dream.DreamHomeControlsPreferenceControllerTest"

Change-Id: I535b079cabc2838e77f3afc74bb8f8730b850653
2023-05-19 11:46:39 -04:00
TreeHugger Robot
6a6b25ae1a Merge "Avoid hotspot band updates when country code is inactive" into udc-dev am: f6c0e2d4dd
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23341837

Change-Id: I851808ff2a967ab1c55b1186fdba7a2badabdb5e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-19 08:13:17 +00:00
TreeHugger Robot
f6c0e2d4dd Merge "Avoid hotspot band updates when country code is inactive" into udc-dev 2023-05-19 07:40:54 +00:00
Weng Su
8b7e0d7c88 Avoid hotspot band updates when country code is inactive
- The SAP usable channels cannot be queried when the country code is not activated, causing UI to display wrong design

Bug: 280554293
Test: Manual test
atest -c WifiHotspotRepositoryTest

Change-Id: I58e8879438d7a630808aa2c4b69f21eb19968ab1
2023-05-19 12:51:50 +08:00
Weng Su
4c1dd91695 Restrict Printing Settings
- Don't show Printing Settings if the user is restricted by UserManager.DISALLOW_PRINTING

Bug: 269122009
Test: manual test
atest -c PrintSettingsFragmentTest

Change-Id: I15db778ebc4de3c8a76505043fab1ee02db3f290
2023-05-18 18:40:48 +08:00
Julia Tuttle
35dae4aefd Merge "Add FSI toggle to per-app notification settings" into udc-dev am: 28edfb8df9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22899254

Change-Id: Ia5524ccfb7d3eac04f5aa780494f35650824faec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-17 15:31:12 +00:00
Julia Tuttle
28edfb8df9 Merge "Add FSI toggle to per-app notification settings" into udc-dev 2023-05-17 14:48:50 +00:00
Julia Tuttle
6630c852d9 Add FSI toggle to per-app notification settings
Bug: 277938609
Test: atest FullScreenIntentPermissionPreferenceControllerTest
Test: # manual, verifying against "Special app access" screen
Change-Id: I9cb0d9bc99ce59a7b0ff6bcd2cab7a3c2d63f45f
2023-05-17 14:30:49 +00:00
Zoey Chen
3ea5aa92d8 Merge "[Regional Preference] Set numbering system when select it" into udc-dev am: 74ab90bb53
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23258700

Change-Id: I359dba215d9ea74e39b528e041c34a2a90d18d05
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-17 10:38:45 +00:00
Zoey Chen
74ab90bb53 Merge "[Regional Preference] Set numbering system when select it" into udc-dev 2023-05-17 09:44:45 +00:00
Zoey Chen
14c81c17ce [Regional Preference] Set numbering system when select it
Should not return original locale, return the locale which is set unicodeLocaleKeyword instead

Bug: 282879594
Bug: 283036197
Test: atest NumberingSystemItemControllerTest
Change-Id: Ic572f20175ea0428be98f30fe865d826b61dcca6
2023-05-17 05:47:53 +00:00
Yanli Wan
433d934b89 Merge "Start activity from Device Lock APEX if device is provisioned by Device Lock" into udc-dev am: f5ce620937
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23087508

Change-Id: I05e673c9f6e1db8aabef3a66e9f8c569e96e5850
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-16 23:57:53 +00:00
Yanli Wan
f5ce620937 Merge "Start activity from Device Lock APEX if device is provisioned by Device Lock" into udc-dev 2023-05-16 23:47:46 +00:00
Yuxin Hu
9fcd85c5f8 Merge "Toggle switch back when user dismisses dialog by tapping screen" into udc-dev am: 174bd2ab74
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23220112

Change-Id: I6fcae10eabb687454e4611cd29087917c781048e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-16 19:05:13 +00:00
Yuxin Hu
174bd2ab74 Merge "Toggle switch back when user dismisses dialog by tapping screen" into udc-dev 2023-05-16 18:24:14 +00:00
Yanli Wan
ad151bf1e7 Start activity from Device Lock APEX if device is provisioned by Device
Lock

Bug: 279616148
Test: atest DeviceLockPreferenceControllerTest
Test: Build & test locally
Change-Id: Ieb2ea691136749d034bceb9412744af874d6abb9
2023-05-16 17:03:45 +00:00
Treehugger Robot
87a35ffae5 Merge "Limit the optimization mode restore mechanism for specific conditions" into udc-dev am: b2de62c076
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23241740

Change-Id: I7515931a772d74ed2bc7f6ab596cad727ebb68c6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-16 12:18:56 +00:00
Treehugger Robot
b2de62c076 Merge "Limit the optimization mode restore mechanism for specific conditions" into udc-dev 2023-05-16 11:54:24 +00:00
ykhung
24cbb2c0aa Limit the optimization mode restore mechanism for specific conditions
Limit the app optimization mode restore mechanism is enabled by checking
the isValidToRestoreOptimizationMode() method (default false)

Bug: 280192659
Test: make test RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.BatteryBackupHelperTest
Change-Id: I90a438a15905578336bc46ec7cd92d3bbe2858b7
2023-05-16 18:40:11 +08:00
YK Hung
5956d38f7a Merge "Add device build information in the backup stage" into udc-dev am: 1d818600a4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23240826

Change-Id: I3773d5d5cd20f2527e32d389479dc798fb86b2ae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-16 06:22:36 +00:00
YK Hung
1d818600a4 Merge "Add device build information in the backup stage" into udc-dev 2023-05-16 06:03:41 +00:00
TreeHugger Robot
e51a854b93 Merge "[Use] Replace settings LocalePreference with androidx LocalePreference" into udc-dev am: ab32753382
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23232981

Change-Id: I9ba8cd5db9fbcdbee5e4a9a44c278c13bbe89930
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-16 04:32:37 +00:00
TreeHugger Robot
ab32753382 Merge "[Use] Replace settings LocalePreference with androidx LocalePreference" into udc-dev 2023-05-16 03:51:45 +00:00
ykhung
cad41681d6 Add device build information in the backup stage
Insert the device build information in the battery optimization mode
backup stage, such that we can use it to decide whether we should
restore the data in the targeted device or not

Bug: 192523697
Test: make test RunSettingsRoboTests
ROBOTEST_FILTER=com.android.settings.fuelgauge.*

Change-Id: I3ab76e013ea9aca4d336a62e0c7cb6882c5b5085
2023-05-16 11:07:31 +08:00
Yuxin Hu
2cbb587f81 Toggle switch back when user dismisses dialog by tapping screen
The reboot dialog can be dismissed when user:
1) Clicks any button on the reboot dialog
2) Taps any screen area outside of reboot dialog

We want to toggle back the "Enable ANGLE" switch
whenever the user chooses to not reboot the device
immetiately.

This change adds the function to toggle the
"Enable ANGLE" switch back when:
1) User clicks "Cancel" on reboot dialog.
2) User taps screen area outside of reboot dialog
to dismiss the reboot dialog.

Bug: b/270994705
Test: m; flash and device can boot.
atest -c GraphicsDriverEnableAngleAsSystemDriverControllerJUnitTest

Change-Id: I84fde5ea5bae9d8793bcef30f4c37d832152ae43
2023-05-16 01:58:25 +00:00
TreeHugger Robot
e12013a755 Merge "Fix FaceUpdater.enroll unit test fail in aosp" into udc-dev am: 92e760861d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23155080

Change-Id: I0d76d4228b2ff45202fc428626c0677d87176aec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-16 00:41:13 +00:00
TreeHugger Robot
92e760861d Merge "Fix FaceUpdater.enroll unit test fail in aosp" into udc-dev 2023-05-15 23:56:06 +00:00
Behnam Heydarshahi
f07e023302 Remove volume_separate_notification flag
Fully enable the feature

Bug: b/255363741, b/38477228

Test: make DEBUG_ROBOLECTRIC=1 ROBOTEST_FILTER="NotificationVolumePreferenceControllerTest|SeparateRingVolumePreferenceControllerTest|RingerModeAffectedPreferenceControllerTest|SoundSettingsTest" RunSettingsRoboTests -j40
Change-Id: Iec490fc254f71b6461dbf9f9beb4a11645a4a497
2023-05-15 21:19:26 +00:00
ykhung
852e9908ad Remove useless optimization mode backup for FULL_POWER_LIST am: 2c125d29a3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23240822

Change-Id: I3b954248d7edcdb0f3b909ccdc3e2c64c2b1ff04
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-15 17:35:49 +00:00
ykhung
2c125d29a3 Remove useless optimization mode backup for FULL_POWER_LIST
Remove the useless backup for the FULL_POWER_LIST, since we will not use
it to restore data, only backup the optimization_mode_list is enough

Test: presubmit
Bug: 192523697
Change-Id: I95f1f41732b8aff090e8b722896d153f6181a6ac
2023-05-15 23:45:16 +08:00
ykhung
094281617f Disable the optimization mode preference if the app is not settable am: 5cd3a7298e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23235859

Change-Id: Ic7eb5e46f65c782b0f8922464a126f39c31dd3fb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-15 12:39:04 +00:00
ykhung
5cd3a7298e Disable the optimization mode preference if the app is not settable
https://screenshot.googleplex.com/BbQyEv6YCjPVwUF (allowlist)
https://screenshot.googleplex.com/3hTb8TQwGMQqcwS
https://screenshot.googleplex.com/6hdTAT2yNFucD9N (system app)
https://screenshot.googleplex.com/77T5JyAD5nZJpDT (normal app)

Fix: 281566984
Test: make test RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.*
Change-Id: If7aa4b61bc806daa570187da24b7f454cd069dec
2023-05-15 09:32:09 +00:00
Treehugger Robot
14ebb061bc Merge "Add allowlist mechanism for battery optimization mode" into udc-dev am: 2b91f1a4cb
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23216878

Change-Id: If932fe3124f6ed49fc557a27e5ee4999cd41b941
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-15 08:26:58 +00:00
Treehugger Robot
2b91f1a4cb Merge "Add allowlist mechanism for battery optimization mode" into udc-dev 2023-05-15 07:43:05 +00:00
Zoey Chen
0d1638c3d3 [Use] Replace settings LocalePreference with androidx LocalePreference
Bug: 263861083
Test: atest and manual test
Change-Id: I7af48074278df0b12c83500f0d2b61eb279e70be
2023-05-15 07:28:05 +00:00
ykhung
0cd24adec5 Add allowlist mechanism for battery optimization mode
Add a mechanism to add package name into the allowlist to avoid users
change the battery optimization modes for specific apps in the list

https://screenshot.googleplex.com/8hrHCcTh5bNYXqp

Bug: 281566984
Test: make test RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.*
Change-Id: I8efa6a55646d761f5bee3667a59b38ab68c74bc1
2023-05-15 14:28:49 +08:00
YK Hung
55a6b7cdc6 Merge "Update battery health state intent (2/3)" into udc-dev am: 83de631175
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22741222

Change-Id: I94b81f612a8ce5852cffb34e1bbc70e6f5012610
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-15 03:58:14 +00:00