Commit Graph

18852 Commits

Author SHA1 Message Date
Philip Junker
134bea1957 Merge "List apps which requested the TURN_SCREEN_ON appOp permission" into udc-dev 2023-04-21 10:07:47 +00:00
Piotr Wilczyński
85d5e3efb8 Merge "Back up the smooth display setting" into udc-dev 2023-04-21 07:31:47 +00:00
Treehugger Robot
0c1838807d Merge "Fix BatteryChartPreferenceControllerTest Fail" into udc-dev 2023-04-21 05:57:43 +00:00
Zaiyue Xue
74d8a4b745 Fix BatteryChartPreferenceControllerTest Fail
Bug: 279107937
Fix: 279107937
Test: presubmit
Change-Id: Ie5597361e4c3c90737b8dcfc302fc3aad94ea476
2023-04-21 11:12:14 +08:00
Piotr Wilczyński
5c42659602 Back up the smooth display setting
- Convert "Smooth display" and "Force peak refresh rate" to a boolean. If they are a boolean, they can be backed up without being device-specific.
- Back up "Smooth display" and add a validator
- Upgrade the 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
Change-Id: Ib2cb2dd100f06f5452083b7606109a486e795a0e
Merged-In: Ib2cb2dd100f06f5452083b7606109a486e795a0e
2023-04-20 13:25:38 +00:00
Treehugger Robot
bc67d885ec Merge "Update the proper App battery usage string on App info page" into udc-dev 2023-04-20 10:50:46 +00:00
ykhung
ff65a02ff8 Update battery tip main icon into materiel theme design
Update all battery tip icon into materiel theme design based on the UX
feedback and clean up legacy icons

Bug: 246960554
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.*
Change-Id: I82f5b140700a36b29844c0c3330b2eeeda8e5a55
2023-04-20 09:19:36 +00:00
TreeHugger Robot
d21225790b Merge "[BiometricsV2] Fix fingerprint add another fail" into udc-dev 2023-04-20 03:34:29 +00:00
Becca Hughes
d8b74b5c39 DO NOT MERGE Live update cred man settings
This CL will enable live update of credential
providers if any are added/removed.

Test: atest
Bug: 264420106
Change-Id: I14804bac17a4efe5eccd3c5824558eace18da186
2023-04-19 22:06:15 +00:00
Philip Junker
ded7f45e6a List apps which requested the TURN_SCREEN_ON appOp permission
This reverts commit 94f08e4ba1.
Reason for revert: Re-land with fix (b/278739832#comment8)

Bug: 272053372
Change-Id: I945e543b6e17b682bc88e9e9b0a79775a71dd6f7
Test: manually installed an app which requests the permission and verified it shows up correctly in Settings > Apps > special app access > Turn screen on
Test: atest AppFilterRegistryTest
Test: atest TurnScreenOnDetailsTest
Test: m -j RunSettingsRoboTests
Test: adb shell am start -a android.settings.TURN_SCREEN_ON_SETTINGS
2023-04-19 11:59:19 +00:00
Milton Wu
3024352f85 [BiometricsV2] Fix fingerprint add another fail
Fix enrolling can't finished because FingerprintEnrollment attaches to
wrong ViewModel during onCreate() with non-null savedInstance after
rotation.

Read latest fragment through findFragmentById to fix it

Bug: 275513362
Test: atest FingerprintEnrollmentActivityTest
Change-Id: Icb2c0edec325a813ec5a7822aba39ca201d2d8e9
2023-04-19 17:35:33 +08:00
Yanting Yang
3be454f967 Update the proper App battery usage string on App info page
Bug: 278045681
Test: visual
Change-Id: I4da671615f11554e2cd64f3a801252df5c0ba6f4
2023-04-19 17:00:46 +08:00
YK Hung
3f9363aaff Merge "Fix banner tip buttons visibility and update incompatible tip" into udc-dev 2023-04-19 07:40:45 +00:00
ykhung
ab07b53ea1 Fix banner tip buttons visibility and update incompatible tip
Fix the battery settings banner tip buttons visibility not reset issue
and update the incompatible charging tip into the colored primary button

Bug: 246960554
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.*
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.widget.CardPreferenceTest
Change-Id: I9b72fccc7838d974d3b60d0f9684780841623cbb
2023-04-19 06:24:51 +00:00
Linyu He
e346dc6779 Merge "Revert "List apps which requested the TURN_SCREEN_ON appOp permi..."" into udc-dev 2023-04-18 19:36:45 +00:00
Liana Kazanova
94f08e4ba1 Revert "List apps which requested the TURN_SCREEN_ON appOp permi..."
Revert submission 22338257-turnScreenOnPermission_pregrant

Reason for revert: b/278739832

Reverted changes: /q/submissionid:22338257-turnScreenOnPermission_pregrant

Change-Id: Iada276497c37c0e89a2cde8706394949d468e8e5
2023-04-18 17:47:14 +00:00
Treehugger Robot
dc02736824 Merge "Fallback to "Extended Compatibility" if Speed feature is not ready" into udc-dev 2023-04-18 16:21:11 +00:00
Philip Junker
c57e5c0e2c Merge "List apps which requested the TURN_SCREEN_ON appOp permission" into udc-dev 2023-04-18 15:36:55 +00:00
Weng Su
d965ff3049 Fallback to "Extended Compatibility" if Speed feature is not ready
- Fallback to the "Extended Compatibility" design when the following conditions occur
  - 5 GHz band is not supported on the device
  - 5 GHz SAP available channels cannot be obtained from WifiManager
  - 6 GHz SAP available channels cannot be obtained from WifiManager

Bug: 272450463
Test: manual test
atest -c WifiTetherSettingsTest
atest -c WifiTetherViewModelTest \
         WifiHotspotRepositoryTest \
         WifiTetherSecurityPreferenceControllerTest.java \
         WifiTetherMaximizeCompatibilityPreferenceControllerTest

Change-Id: If7c8c41ebe86f5e7d8e4737ab7a82d38c9d633de
2023-04-18 20:49:25 +08:00
Philip Junker
58e7b70df3 List apps which requested the TURN_SCREEN_ON appOp permission
Bug: 272053372
Test: manually installed an app which requests the permission and verified it shows up correctly in Settings > Apps > special app access > Turn screen on
Test: atest AppFilterRegistryTest
Test: atest TurnScreenOnDetailsTest
Test: m -j RunSettingsRoboTests
Test: adb shell am start -a android.settings.TURN_SCREEN_ON_SETTINGS
Change-Id: I7c47d4b1c0b33c7ba6209bb64acf93cb07d9a717
2023-04-18 09:12:44 +00:00
Jason Hsu
80016ad92a Merge "Fix pair another dialog doesn't show up after pairing in all bluetooth device page." into udc-dev 2023-04-18 08:47:37 +00:00
Treehugger Robot
2a0d6ead1a Merge "[BiometricsV2] fix enrolling rotate failed" into udc-dev 2023-04-18 04:56:12 +00:00
YK Hung
d9f390010b Merge "Cleanup smart battery entries (1/3)" into udc-dev 2023-04-18 01:59:06 +00:00
Jay Sullivan
4d5ac5a89f Merge "[Safety Labels] Filter out auto, wear and tv" into udc-dev 2023-04-17 19:53:43 +00:00
Becca Hughes
b69351b06d Add dialog for enabling a provider in settings
Test: manual
Bug: 277923170
Merged-In: I404444115f178faf5545dec9686096fcdfdf73de
Change-Id: I404444115f178faf5545dec9686096fcdfdf73de
2023-04-17 18:06:50 +00:00
lbill
e85d588904 Fix Settings crash on non face service support devices
Doing some improvement for stability:

1. Check hasSystemFeature(PackageManager.FEATURE_FACE) for non-face
   service devices.
2. Wrap addAuthenticatorsRegisteredCallback()
3. Find mPreference before addAuthenticatorsRegisteredCallback

Bug: 276680407
Bug: 278174667
Bug: 277647959
Bug: 277725506
Test: m RunSettingsRoboTests -j30 ROBOTEST_FILTER= \
      FaceSettingsFooterPreferenceControllerTest
Change-Id: I81346b6eb8c44106c5e52867d69c8736203dd558
2023-04-17 11:45:13 +00:00
Wesley Wang
742e506d13 Cleanup smart battery entries (1/3)
- Remove smart battery entry from battery settings page since
   restriction app info already move to app list page and smart battery
   feature will keep as enabled, smart battery page will be empty
 - Enable battery usage list page for AOSP

Bug: 277175992
Test: make SettingsRoboTests
Change-Id: I9221cecbfc8445b8f470975551f600e94e3128d5
2023-04-17 16:50:21 +08:00
Milton Wu
562bbc8193 [BiometricsV2] fix enrolling rotate failed
Clean help message during progress changed, and reload help message from
ViewModel in onStart of enrolling page.

Bug: 275513362
Test: atest FingerprintEnrollProgressViewModelTest
Test: enable biometrics v2, and manully rotate screen when help msg
      is shown, and check help msg is kept after screen rotation.
Change-Id: I44220050806038ee62750f8945b8ba8f8bb9c282
2023-04-17 08:06:53 +00:00
Treehugger Robot
7d3b07f6cb Merge "Customize ChooseLockGeneric SUW options" into udc-dev 2023-04-17 06:59:18 +00:00
Chaohui Wang
a42119c6a8 Merge "Migrate latest changes in "Alarms and Reminders"" into udc-dev 2023-04-15 16:32:54 +00:00
Hao Dong
bba66e54b3 Merge "Count isActivityEmbedded() state to show split screen warning dialog" into udc-dev 2023-04-14 19:04:55 +00:00
Treehugger Robot
9ce2e21857 Merge "Fix rotate device at face unlock detailed page, device will display redundant face unlock header." into udc-dev 2023-04-14 17:11:40 +00:00
jasonwshsu
c8a53a9391 Fix pair another dialog doesn't show up after pairing in all bluetooth device page.
Solution: Finish the page immediately to back to previous page when already BONDED the device in
all bluetooth device page.

Bug: 270096758
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ViewAllBluetoothDevicesPreferenceControllerTest
Change-Id: I13a88c3fbe0c6851f9446a9f574a1c18f934cd2e
2023-04-14 18:25:28 +08:00
lbill
09276c9639 Count isActivityEmbedded() state to show split screen warning dialog
According to Activity#isInMultiWindowMode() API design,
When the Task is in fullscreen windowing mode, and the app is in
ActivityEmbedding split (two activities split left and right),
Activity.isInMultiWindowMode() == true.

With the reason, we should consider additional condidion for
foldable device in unfolded mode, while settings activities
config to embedded activity, we can't only count on
isInMultiWindowMode() for split-screen mode

Bug: 278176550
Bug: 276938441
Test: atest CombinedBiometricProfileSettingsTest
Test: atest FingerprintSettingsFragmentTest
Test: manaul go to split screen mode and try to enroll face
Test: manual unfold device and enroll finger or face
Change-Id: I02bd223f27889e74e67b73051531a5b4554f3de1
2023-04-14 09:57:04 +00:00
Bill Lin
f77643bec7 Merge "Remove onWindowFocusChange solution from FPS enrollment" into udc-dev 2023-04-14 09:45:42 +00:00
Jason Hsu
32614f2b52 Merge "Add ability to handle onActivityResult for AbstractPreferenceController in DashboardFragment" into udc-dev 2023-04-14 09:42:43 +00:00
lbill
53c0c2f4ee Customize ChooseLockGeneric SUW options
Legacy choose lock options was hard coded description.

1. In T-QPR when device do not support Face enroll in SUW flow,
We should remove "Face" from the description.
2. Use BidiFormatter to handle RTL string combination.
3. Define a new string for "Fingerprint"
4. Add workaround crash in ChooseLockGenericTest/SetupChooseLockGenericTest

Test: Manual login corp, and observe the UI in Choose screen lock
Test: adb shell settings put system system_locales ar check RTL
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.password
Bug: 269786629
Bug: 277361320
Change-Id: I2b26b7cc229f66300bb23ca190bb21f86f1caa01
2023-04-14 09:34:54 +00:00
Vania Januar
cd0176ba92 Merge "[RESTRICT AUTOMERGE] Force enabling Notes role from developer options affects all users." into udc-dev 2023-04-14 09:25:10 +00:00
Jason Chang
2ca753bd06 Fix rotate device at face unlock detailed page, device will display
redundant face unlock header.

1. Change the FaceSettings theme style to avoid an action bar
appearing.
2. In AndroidManifest.xml to apply configChanges attribute for
handling device orientation.

Bug: 262497152

Test: manually to do reproduced steps:
Pre-Condition:
1. enroll face
2. enable auto rotate

Procedure:
1.go to settings > security > face & fingerprint unlock
2.enter screen lock
3.click face unlock
4.rotate device into landscape mode and then back to portrait mode
5.check the UI

Test: make RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings
.biometrics.face.FaceSettingsActivityTest"

Change-Id: I4ee1bb4f061ea2d141043405213ba6e60bacd92f
2023-04-14 07:38:18 +00:00
Chaohui Wang
f6caf24369 Migrate latest changes in "Alarms and Reminders"
To the new spa version.

Fix: 278113001
Test: Follows the instruction in bug
Test: Unit test
Change-Id: Iff38f01cd34c7b56ff23f4a17cb6ec1b78fba1ee
2023-04-14 13:46:24 +08:00
Treehugger Robot
5c8d1332c7 Merge "Fixes SelectLongPressTimeoutPreferenceControllerTest summary check." into udc-dev 2023-04-13 22:50:25 +00:00
Jay Thomas Sullivan
fa6d0031f1 [Safety Labels] Filter out auto, wear and tv
This feature should never be enabled on these form factors.

Bug: 277601279
Bug: 264939792
Test: atest CtsPermission3TestCases:SafetyLabelChangesJobServiceTest
Test: atest CtsPermission3TestCases:AppDataSharingUpdatesTest
Change-Id: I89f0443c52cfc0894f2ad5398a15f2c0e1a9ad77
2023-04-13 15:17:04 -07:00
Treehugger Robot
3b24bafb80 Merge "Handle corner cases in "Alarms and Reminders" page" into udc-dev 2023-04-13 20:10:49 +00:00
Daniel Norman
5c6ba285b7 Fixes SelectLongPressTimeoutPreferenceControllerTest summary check.
This preference was updated in
commit 6c3805288b
to use "%s" summary and remove the controller's getSummary()
implementation so the old test that checked the controller summary
was failing.

This new version checks the preference's summary directly, but that
seems to require running using the robotest runner instead of unit test
so this test was moved there and now follows patterns used by other
similar tests there.

Fix: 278110568
Test: SelectLongPressTimeoutPreferenceControllerTest
Change-Id: Ib65c823a568ad200ebeae74ad443f32441e5cb73
2023-04-13 19:57:32 +00:00
lbill
6193554873 Remove onWindowFocusChange solution from FPS enrollment
Context:
The legacy architecture UdfpsEnrollView was shown by SysUI
which has higher z-order that encounter lots of overlap issue.
Besides, IPC impact the latency of show/hide enroll view in
legacy architecture.
We used to upload ag/19699461 to cancel enrollment due to
above limitation.

With the new architecture ag/20582186 the UdfpsEnrollView
migrate to Settings and controlled by Settings process.

And ag/21149538 config SETTINGS_SHOW_UDFPS_ENROLL_IN_SETTINGS flag
to ture by default.

It's the time to improve the enroll UX by removing cancel
signle when onWindowFocusChanged() invoked.

Bug: 262680438
Test: m RunSettingsRoboTests -j30 ROBOTEST_FILTER=FingerprintEnrollEnrollingTest
Test: manual Security Settings > Enroll fingerprint > enroll
      Swipe Notify Shade , Heads-up, Power menu interrupt should
      not stop the enroll flow.
Change-Id: I60d88d5edd80e6eed70e2fbf288357e949abcae3
2023-04-13 12:58:49 +00:00
Vania Januar
a1b7888c30 [RESTRICT AUTOMERGE] Force enabling Notes role from developer options affects all users.
Restricting merge due to conflicts; will manually CP this to master.

Bug: 276432652
Test: ForceEnableNotesRolePreferenceControllerTest
Change-Id: Ic0fa7f33dcb6509908008774c725eec386d0608b
2023-04-13 09:53:20 +00:00
Zaiyue Xue
4d737d7813 Merge "Support battery usage chart start index label is the detailed last full charge time" into udc-dev 2023-04-13 09:06:22 +00:00
Milton Wu
52a46d0a85 Pass Timeout back to upper biometric preference
When FaceSettings or FingerprintSettings are closed because of onStop(),
this information can't been passed back to previous Preference screen,
CombinedBiometricSettings, because handlePreferenceTreeClick() from
AbstractPreferenceController class only can launchActivity() throguh
preference's Context.

In order to recevice the activity result code from FaceSettings or
FingerprintSettings, add handleBiometricPreferenceTreeClick() method in
BiometricStatusPreferenceController. Then CombinedBiometricSettings uses
this method to show FaceSettings or FingerprintSettings through
launchActivityForResult().

Bug: 263057093
Test: atest BiometricNavigationUtilsTest
Test: Manually open camera through double-click power key on different
      pages inside "Face & Fingerprint Unlock"
Change-Id: I99167739766ad5ea5f204b0f0543ba6ad18fac31
2023-04-13 09:02:18 +00:00
Zaiyue Xue
bcafd5dfda Support battery usage chart start index label is the detailed last full charge time
https://screenshot.googleplex.com/5dYp7kJpNPMU6Jx.png
https://screenshot.googleplex.com/7ZSbWyCGRFSym6A.png
https://screenshot.googleplex.com/9GsPTa9zd2XttDX.png

Bug: 271214926
Fix: 271214926
Test: manual
Change-Id: Ic869653f66866964f34e111dd2ee8c052313e119
2023-04-13 16:37:35 +08:00
Treehugger Robot
be76ebdc5b Merge "Add Wi-Fi hotspot > Security Settings page" into udc-dev 2023-04-13 08:24:34 +00:00