Commit Graph

18971 Commits

Author SHA1 Message Date
Priyanka Advani
57a077f8a5 Revert "Add receiver for app install/uninstall events"
This reverts commit 86e092d84a.

Reason for revert: Probable culprit for b/278615544.

Change-Id: I5ff8730ab3e1974967b8c9f840f0ee3110dad483
2023-04-17 23:05:32 +00:00
Becca Hughes
86e092d84a Add receiver for app install/uninstall events
In order to keep the settings list up to date
we are listening to package manager broadcasts
so when an app is installed, etc it will trigger
a refresh

Bug: 264420106
Test: ondevice & atest
Change-Id: I83be80e88dd03ebce1cb97a66fb759e1ef2537e8
2023-04-17 17:42:03 +00:00
Treehugger Robot
5664c869f6 Merge "Customize ChooseLockGeneric SUW options" into udc-dev am: 7d3b07f6cb am: 930cc10239
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22304962

Change-Id: Ib746440c38ffecae6b90a9c4014b04ea850dfd2b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-17 08:01:54 +00:00
Treehugger Robot
7d3b07f6cb Merge "Customize ChooseLockGeneric SUW options" into udc-dev 2023-04-17 06:59:18 +00:00
Chaohui Wang
59fd95e696 Merge "Migrate latest changes in "Alarms and Reminders"" into udc-dev am: a42119c6a8 am: a6bb9038c6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22635695

Change-Id: Ife9a26287e2fcf0e86d9a007cad3e0e8425f4a82
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-15 17:29:32 +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
c80b9de3b3 Merge "Count isActivityEmbedded() state to show split screen warning dialog" into udc-dev am: bba66e54b3 am: 9cc29dddf4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22641346

Change-Id: Ibc02570db7ef0f2300ac8329756bf43bf9ea0003
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-14 20:08:56 +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
9de898e699 Merge "Fix rotate device at face unlock detailed page, device will display redundant face unlock header." into udc-dev am: 9ce2e21857 am: 14a3b919e2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22613587

Change-Id: Idaf970f517c332c8fc261667fb1ec4999f2df89f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-14 18:18:00 +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
Bill Lin
ff899ca4b8 Merge "Remove onWindowFocusChange solution from FPS enrollment" into udc-dev am: f77643bec7 am: eeef3fd175
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22613586

Change-Id: I6305a980e72021ff87dfc5d327ebd202bcdb9892
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-14 10:30:14 +00:00
Jason Hsu
f7d03652eb Merge "Add ability to handle onActivityResult for AbstractPreferenceController in DashboardFragment" into udc-dev am: 32614f2b52 am: 566f5b5316
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22477522

Change-Id: I798d3c787fbe6d7b47265f22b4e01dfef145205b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-14 10:30:01 +00: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
Vania Januar
11603c5be9 Merge "Force enabling Notes role from developer options affects all users." 2023-04-14 09:24:44 +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
3c5baf76f1 Merge "Fixes SelectLongPressTimeoutPreferenceControllerTest summary check." into udc-dev am: 5c8d1332c7 am: 872336e5a5
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22630556

Change-Id: I554a5639de10e868f8a6353f32e32af2c9d4bb81
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-13 23:53:20 +00:00
Treehugger Robot
6065f10f11 Merge "Add dialog for enabling a provider in settings" 2023-04-13 23:24:44 +00:00
Treehugger Robot
5c8d1332c7 Merge "Fixes SelectLongPressTimeoutPreferenceControllerTest summary check." into udc-dev 2023-04-13 22:50:25 +00:00
Becca Hughes
7d407abf58 Add dialog for enabling a provider in settings
Test: manual
Bug: 277923170
Change-Id: I404444115f178faf5545dec9686096fcdfdf73de
2023-04-13 21:29:04 +00:00
Treehugger Robot
b09b6eb551 Merge "Handle corner cases in "Alarms and Reminders" page" into udc-dev am: 3b24bafb80 am: cdda0b8658
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22609703

Change-Id: I0c26bb3a47410bb60981c99c1aec39d0d4a405cf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-13 21:13:47 +00: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
32aae36b37 Force enabling Notes role from developer options affects all users.
CP from ag/22598718 due to conflicts in downstream branch.

Bug: 276432652
Test: ForceEnableNotesRolePreferenceControllerTest
Change-Id: Ic0fa7f33dcb6509908008774c725eec386d0608b
2023-04-13 09:57:38 +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
6e606674ec Merge "Support battery usage chart start index label is the detailed last full charge time" into udc-dev am: 4d737d7813 am: 07f3152ad2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22379150

Change-Id: Ic4820b148a0375c765f3bd36343c3017fc2b7960
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-13 09:25:44 +00:00
Milton Wu
9930d325ee Pass Timeout back to upper biometric preference am: 52a46d0a85 am: fa091d4a38
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22379152

Change-Id: I0371fa58c1d412538bf499ada83c73146eb0af70
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-13 09:24:59 +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
Treehugger Robot
a50f75532a Merge "Add Wi-Fi hotspot > Security Settings page" into udc-dev am: be76ebdc5b am: 758b0317ad
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22552288

Change-Id: Ic5be47e2240a4ece4853a2e772142c0bdeea7f3a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-13 08:56:32 +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
Chaohui Wang
bade118967 Merge "Fix create bluetooth dialog repeatedly" into udc-dev am: 8313b6b0fb am: 3bed84baec
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22572958

Change-Id: I3dd368195f69f0affdc14b6f7e259fac737ea3e4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-13 06:54:05 +00:00
Chaohui Wang
8313b6b0fb Merge "Fix create bluetooth dialog repeatedly" into udc-dev 2023-04-13 06:02:16 +00:00
Varun Shah
582f0e130c Merge "Update the default wellbeing package config." into udc-dev am: 4cf335d53c am: 1d00be1ad5
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22532865

Change-Id: If3aaeebba9ebde14a1a7f04a570a515b23b36234
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-13 03:52:18 +00:00
Varun Shah
4cf335d53c Merge "Update the default wellbeing package config." into udc-dev 2023-04-13 03:38:10 +00:00
TreeHugger Robot
ece31ef275 Merge "Remove plug/unplug condition for the incompatible charging" into udc-dev am: 70ef00405c am: f2e7f45fe6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22573807

Change-Id: I99703722ae243086389eab49563a715f7a7513c8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-13 03:23:07 +00:00
YK Hung
f4d44bcfff Merge "Small refactor battery usage code according to the comments in previous cls." into udc-dev am: e4c3f68b56 am: 3c47574638
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22573805

Change-Id: I8f7828fb51361ff560984b1de0320b234e7adb64
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-13 02:26:04 +00:00
Vania Januar
c7329bf42e Merge "Add developer options to force enable Notes role." into udc-dev am: b79772ac3a am: a24e7dc12a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22459282

Change-Id: I836cfd095b654ef4b55abb1474a19cd4ced4f1f9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-13 02:20:27 +00:00
Suprabh Shukla
5aeef97cae Handle corner cases in "Alarms and Reminders" page
There are few corner cases and new updates that need to be incorporated:
1. Apps that declare USE_EXACT_ALARM, do not need SCHEDULE_EXACT_ALARM.
   So these should be filtered out, regardless of whather they declared
   the latter.
2. Apps that are in the power allowlist do not need either of the
   permission, and so these should be filtered out as well.

In either case, if the user somehow ends up in the app detail page for
this setting, the switch should get disabled based on existing logic.

Test: make -j RunSettingsRoboTests
Test: Manually by UI inspection:
Settings -> Apps -> Special App access -> Alarms and Reminders
or by running:
adb shell am start -a android.settings.REQUEST_SCHEDULE_EXACT_ALARM

Bug: 232460265
Change-Id: I5aeab49f95260218878bc36f5a4d73a49e5082e4
2023-04-12 19:17:57 -07:00
TreeHugger Robot
70ef00405c Merge "Remove plug/unplug condition for the incompatible charging" into udc-dev 2023-04-13 02:16:15 +00:00
Treehugger Robot
7afb2d4440 Merge "Remove unused MagnificationPreferenceFragment and its related controllers" 2023-04-12 19:33:30 +00:00
ykhung
836dc0d76c Remove plug/unplug condition for the incompatible charging
Remove the plug/unplug condition checking for the incompatible
notification based on the feedback from:
https://b.corp.google.com/issues/276403405#comment3

Bug: 276403405
Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.fuelgauge.batterytip"
Change-Id: Iec177ed33a3cc8cf5a5747b6f65440d31120823c
2023-04-13 00:29:11 +08:00
YK Hung
e4c3f68b56 Merge "Small refactor battery usage code according to the comments in previous cls." into udc-dev 2023-04-12 15:43:48 +00:00
Chaohui Wang
e13d644f2c Fix create bluetooth dialog repeatedly
When the screen rotates, currently the startActivityForResult() within
RequestPermissionActivity could be called multiple times, so the
multiple RequestPermissionHelperActivity will be created, which caused
the issue.

Replace RequestPermissionHelperActivity with AlertDialog (as an
unfinished TODO of RequestPermissionHelperActivity) can fix this issue.

Fix: 243601277
Test: Manually with adb shell commands
Test: Unit test
Change-Id: If1e2b2807b69a87bbcfffa543ee0da134d4c4312
2023-04-12 18:34:52 +08:00