Commit Graph

1875 Commits

Author SHA1 Message Date
Treehugger Robot
9cdf565458 Merge "Restart Wi-Fi tethering automatically if configuration change" into udc-dev 2023-04-26 03:59:47 +00:00
Matías Hernández
c49cb1014c Merge "Tweak refresh of notification channel group preferences" into udc-dev 2023-04-25 14:00:14 +00:00
SongFerngWang
c054498357 Replace the SlicePreference with Preference am: 794fc58235
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22755956

Change-Id: I5e9032624347b27acb02eafd28002744d92b5f2f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-25 06:23:25 +00:00
Zoey Chen
c31cf3d3b4 Merge " [Settings] UI part: Add metrics for numbers preferences" into udc-dev 2023-04-25 03:00:20 +00:00
Zoey Chen
10fa1b8aec [Regional Pref] Remove Calendar controller and related Fragement
Bug: 275003276
Bug: 264483854
Change-Id: I2431ea55a7a69db8a4f661a125a6ca218ce41a94
2023-04-24 10:27:10 +00:00
Zoey Chen
4aa05e58bb [Regional Pref] 1. Add metrics for user changes the First day of week 2.
Refactor to Settings design

Bug: 275003276
Bug: 264483854
Change-Id: Ibea987b6e51fd76c89a0ff5269da6e99171f6b1c
2023-04-24 10:26:52 +00:00
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
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
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
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
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
Treehugger Robot
2a0d6ead1a Merge "[BiometricsV2] fix enrolling rotate failed" into udc-dev 2023-04-18 04:56:12 +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
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
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
5c8d1332c7 Merge "Fixes SelectLongPressTimeoutPreferenceControllerTest summary check." into udc-dev 2023-04-13 22:50:25 +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
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
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
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
64277a23bb Show a dialog preventing face enrollment in split mode.
Test: atest CombinedBiometricProfileSettingsTest
Test: atest FingerprintSettingsFragmentTest
Test: manaul test- go to split screen mode and try to enroll
face
Bug: 276938441

Change-Id: I45e859b453700aa79f7774fb5deda81b1f30e5a5
2023-04-07 21:53:52 +00:00
TreeHugger Robot
b29aa72fae Merge "[BiometricsV2] Fix 2nd touch not work for enroll" into udc-dev 2023-04-06 07:31:30 +00:00
Milton Wu
4140b84881 [BiometricsV2] Fix 2nd touch not work for enroll
Use MessageDisplayController only when enroll reason is ENROLL_ENROLL
and R.bool.enrollment_message_display_controller_flag is true.
And always allocate a new MessageDisplayController for each new enroll
to avoid the possibility of events being ignored by
MessageDisplayController.

Bug: 275510856
Test: atest FingerprintEnrollProgressViewModelTest
Test: manually test sfps/udfps enrollment for biometricsV2
Change-Id: Ifc8b91916a3d76bed68dc523a90dc6ba422e3923
2023-04-06 13:18:41 +08:00
tom hsu
23359bc0e9 Unify Tick Preference from Physic keyboard and Regional preference
- Also change icon color from colorAccentPrimaryVarient to colorAccentPrimary

Bug: b/272398108
Bug: b/264476709
Test: Manual test.
Change-Id: Ide602c6fb9501b832df646692ec618be8a76e7b9
2023-03-30 18:52:23 +08:00
Zoey Chen
082e8b03df Merge "[Settings] Remove the intent receiver due to the register exception" into udc-dev 2023-03-29 09:39:33 +00:00
Zoey Chen
cf88640701 [Settings] Remove the intent receiver due to the register exception
Bug: 274899027
Test: atest SystemUIMicrobenchmark:android.platform.test.scenario.sysui.quicksettings
Change-Id: Ia19b91cfd1073f22180cc9679025447b4d5fecd9
2023-03-29 04:57:08 +00:00
Becca Hughes
f9f3309fa0 Add service link when no providers are present
Test: ondevice & atest
Bug: 273752971
Merged-In: Ia7080f5c44c2f59a386e00146b898228e5829988
Change-Id: Ia7080f5c44c2f59a386e00146b898228e5829988
2023-03-28 22:51:33 +00:00
TreeHugger Robot
df292224e2 Merge "Added "Speed and Compatibility" Settings page" into udc-dev 2023-03-25 08:01:30 +00:00
Becca Hughes
cbbab3632c Merge "Add settings intent dialog" into udc-dev 2023-03-23 17:07:56 +00:00
Tom Hsu
db94f350cb Merge "Remove Numbering System preference if no corresponding locale." into udc-dev 2023-03-23 06:41:37 +00:00
Weng Su
17631aeff7 Added "Speed and Compatibility" Settings page
- Show each band option individually in single-band devices
  - Show "2.4 and 5GHz" combined option in dual-band devices

- Disable 5 GHz option if the device is in the restricted country

- Disable 6 GHz option if the device is in the restricted country
  - Hide 6 GHz option if the old device does not support 6 GHz band.

Bug: 245258763
Test: manual test
atest -c WifiHotspotSpeedSettingsTest
atest -c WifiHotspotSpeedViewModelTest \
         WifiHotspotRepositoryTest

Change-Id: I358d4ff8d62df72fd5080e55f40d588c238d01fb
2023-03-23 10:53:43 +08:00
tom hsu
881e8ac556 Remove Numbering System preference if no corresponding locale.
- If locale has no multiple numbering systems, it shall not
   show the locale on list.
 - If there is no locale with numberung system, remove the entry of
   numbering system preference on UI.

Bug: b/274053189
Test: atest passed
Test: Manual test passed
Change-Id: If61c7e233630644e2d6245c5efd75d15d52cf94b
2023-03-23 01:44:46 +08:00
Becca Hughes
b5f8ba6945 Add settings intent dialog
Add a dialog that can be launched via
an intent to prompt the user to enable
the provider for credman.

Test: make & atest & manual
Bug: 267816998
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:9d74509888b7dd65b287bc68b9445d9e23809cce)
Merged-In: Id88cc7b3bf2829d075fbba87ea5dc0a245b9ae32

Change-Id: Id88cc7b3bf2829d075fbba87ea5dc0a245b9ae32
2023-03-21 22:07:29 +00:00
Becca Hughes
853c4a8683 Merge "Add subtitle to settings (settings)" into udc-dev 2023-03-20 16:01:08 +00:00
SongFerngWang
88717f2c3f Avoid ANR when UI query network selection state
Moving the quert network selection state to back ground
and listening the service state to detect the betwork selection
changed.

Bug: 270652395
Test: atest AutoSelectPreferenceControllerTest
Merged-In: I81a597f28cf7ce25ff4eff5100bdb4d29c897a14
Merged-In: Idfc7a07106d552c35a94414bb14eac0fbdc3974f
Change-Id: Ifb548de301021f992ef13c3d299de1642f379fbf
2023-03-20 14:42:18 +08:00
Becca Hughes
fb4488ea83 Add subtitle to settings (settings)
Allows a credential provider to show a
subtitle/summary underneath the title in
the list of providers.

Test: ondevice & atest
Bug: 253157366
Change-Id: I481da16985027a49ee464623b6db166d941cab55
(cherry picked from commit on googleplex-android-review.googlesource.com host: 6474e01372)
Merged-In: I481da16985027a49ee464623b6db166d941cab55
2023-03-17 17:29:23 +00:00