Commit Graph

2765 Commits

Author SHA1 Message Date
Zoey Chen
5d2ce38d3a [Regional Pref] 1. Add metrics for user changes the Temperature unit 2.
Refactor to Settings design

Bug: 275003276
Bug: 264483854
Change-Id: Ib886ace45db8cfd7dd0f468d03a0aa0551f1f5c4
2023-04-24 10:25:44 +00:00
Zoey Chen
af05cf7e0e [Settings] UI part: Add metrics for numbers preferences
Bug: 275003276
Test: local test
Change-Id: I2455252f3ed7f5355a363a79076113bd4452732d
2023-04-24 10:22:03 +00:00
Matías Hernández
8c40305ad6 Tweak refresh of notification channel group preferences
Previously, we were discarding and re-adding all channel preference switches when a group was toggled. This caused the group switch itself to flicker and sometimes lose the a11y focus as well. Because the group toggle is always at the top, it's not necessary to ever re-sort it (which is the main reason for doing the remove+add dance).

This CL also resurrects ChannelListPreferenceControllerTest which was disabled.

Fixes: 248056830
Test: atest ChannelListPreferenceControllerTest

Change-Id: I5672c102d4571430e26ad6bee92d8c88794214ae
2023-04-24 11:39:59 +02:00
Presubmit Automerger Backend
56c8b39d51 [automerge] Replace the SlicePreference with Preference 2p: 794fc58235
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22755956

Bug: 270544054
Change-Id: I88bb34649b2a1da21e6a3a36d90bd32c17ffb5ae
2023-04-21 15:08:44 +00:00
SongFerngWang
794fc58235 Replace the SlicePreference with Preference
The Settings' 2 panel did not support SlicePreference, since it
always open activity with NEW_TASK and it casues the settings can't
set new page at right side.

Bug: 270544054
Test: build pass. local test: the phone pair the buds with fastpair, and
then check the slice preferences.
atest BlockingPrefWithSliceControllerTest (pass)

Change-Id: I0e8abfd284492f04ab322a5bed13741fc6b25b34
2023-04-21 23:08:06 +08:00
Philip Junker
9e34ccd80f Merge "List apps which requested the TURN_SCREEN_ON appOp permission" into udc-dev am: 134bea1957 am: a9e09ac0ce
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22724663

Change-Id: I5d184e66b6581e5eeb6620ed0d17fc493384e602
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-21 10:37:38 +00:00
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
Weng Su
bf0e8c1dc7 Restart Wi-Fi tethering automatically if configuration change
- When the Wi-Fi Hotspot is already started, if the user changes the configuration, the Wi-Fi Hotspot will be restarted automatically.

- When the Wi-Fi hotspot restarts, display a circle on the screen to indicate that it is processing.

Bug: 245258763
Test: manual test
atest -c WifiTetherSettingsTest \
         WifiHotspotSpeedSettingsTest
atest -c WifiHotspotRepositoryTest \
         WifiHotspotSecuritySettingsTest \
         WifiHotspotSecurityViewModelTest \
         WifiHotspotSpeedViewModelTest \
         WifiTetherViewModelTest

Change-Id: I6fdd5892916703095f28d0589ebc3b7dd59fcd61
2023-04-21 13:06:44 +08:00
Daniel Norman
c14d26462b Adds TEST_MAPPING for Settings > Accessibility unit tests.
This initial TEST_MAPPING file is postsubmit only until we validate
which tests are stable enough to be moved to presubmit and which need
fixes.

Bug: 267225211
Test: atest --test-mapping packages/apps/Settings/src/com/android/settings/accessibility
Change-Id: I5e5f337d4ea7618ab92d3daa5171fd8ee1508c59
2023-04-20 22:04:11 +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
Becca Hughes
7039cdb12a 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 16:19:28 +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
Becca Hughes
3ac6b141a4 Merge "Rollback decision to merge by package name" 2023-04-19 00:08:57 +00:00
Becca Hughes
ca542c90cd Rollback decision to merge by package name
At the moment settings aggregates by
package name and it has been decided that
we should do per-service instead.

Test: atest & manual
Bug: 278598419
Change-Id: I6b7c8adac4957f1c3382044208e1642d0b6e3fab
2023-04-18 22:15:50 +00:00
Linyu He
32acd8c90d Merge "Revert "List apps which requested the TURN_SCREEN_ON appOp permi..."" into udc-dev am: e346dc6779 am: 3abe7779e0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22715841

Change-Id: I04a4b7e9a80ba6effc9f90b32be5c70303671c5d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-18 20:02:30 +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
2f6ea6addb Merge "Fallback to "Extended Compatibility" if Speed feature is not ready" into udc-dev am: dc02736824 am: b24b622c3c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22651125

Change-Id: Ia14eb54b4b0826dee20b761be9a22078849bdeed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-18 17:18:35 +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
61a9f88c33 Merge "List apps which requested the TURN_SCREEN_ON appOp permission" into udc-dev am: c57e5c0e2c am: 632da3759f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22223104

Change-Id: Id7262f3031d2e0e833ef154510d033dcb62eb699
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-18 16:15:02 +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
Treehugger Robot
01605466a8 Merge "[BiometricsV2] fix enrolling rotate failed" into udc-dev am: 2a0d6ead1a am: 8cf1fe7757
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22651124

Change-Id: I9431fc80ffe0ce638813ede530267e51108c478c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-18 05:28:15 +00:00
Treehugger Robot
2a0d6ead1a Merge "[BiometricsV2] fix enrolling rotate failed" into udc-dev 2023-04-18 04:56:12 +00:00
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
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
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
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
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
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
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
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
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
Treehugger Robot
be76ebdc5b Merge "Add Wi-Fi hotspot > Security Settings page" into udc-dev 2023-04-13 08:24:34 +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
Weng Su
9f80cd2f77 Add Wi-Fi hotspot > Security Settings page
- Restrict low security type when 6 GHz band is selected
  - Disable "WPA2/WPA3-Personal" security type
  - Disable "WPA2-Personal" security type
  - Disable "None" security type

- Automatically updated security type to WPA3 when 6 GHz band is selected
  - Regenerate password when security type is changed from None

Bug: 245258763
Test: manual test
atest -c WifiTetherSettingsTest
atest -c WifiTetherViewModelTest \
         WifiHotspotSecuritySettingsTest \
         WifiHotspotSecurityViewModelTest \
         WifiHotspotRepositoryTest

Change-Id: I31b08795419baed10dc40b876aeec175f6f41e69
2023-04-12 18:19:49 +08:00
Treehugger Robot
ed69cebe02 Merge "[BiometricsV2] IconTouchDialog continue enroll" into udc-dev am: eb3e62f639 am: e1d5cef1a5
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22552762

Change-Id: I78e494412b8d83c1c835a0827fc9bfae7d38d346
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-12 08:14:41 +00:00
Treehugger Robot
3a27d850b8 Merge "[Regional Pref] Add footer in Regional preference page" into udc-dev am: d81b473fe0 am: cfcef716f4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22550313

Change-Id: Ic45e3d9f20db9d89a34fc0d053ea48d056d907c5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-12 07:21:46 +00:00
Treehugger Robot
eb3e62f639 Merge "[BiometricsV2] IconTouchDialog continue enroll" into udc-dev 2023-04-12 03:40:38 +00:00
Zoey Chen
5eecd86982 [Regional Pref] Add footer in Regional preference page
Bug: 277436632
Test: local test
Change-Id: I596f440696830374225d9b56fb8c4f0d5d5d5d61
2023-04-11 09:28:20 +00:00
Milton Wu
15267aab1f [BiometricsV2] IconTouchDialog continue enroll
When user clicks "OK" in FingerprintEnrollEnrollingIconTouchDialog,
continue enrolling.

Bug: 276416053
Test: atest FingerprintEnrollEnrollingViewModelTest
      FingerprintEnrollmentActivityTest
Test: Manually check enrolling status as clicking "OK" button on
      FingerprintEnrollEnrollingIconTouchDialog after enabling
      biometrics v2 v2 through feature flag.
Change-Id: I028723acfe35e5119e43b6860022c7432fc2ae0e
2023-04-11 14:39:59 +08:00
Hao Dong
40d69e3ce5 Merge "Show a dialog preventing face enrollment in split mode." into udc-dev am: 22c608be4d am: a27d94d75d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22460413

Change-Id: I25f7d00d306b00b1c144d4f1e12478d3276f379d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-10 19:45:32 +00:00