Commit Graph

1895 Commits

Author SHA1 Message Date
TreeHugger Robot
ab32753382 Merge "[Use] Replace settings LocalePreference with androidx LocalePreference" into udc-dev 2023-05-16 03:51:45 +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
Milton Wu
abfb8a5e9d Fix FaceUpdater.enroll unit test fail in aosp
Ignore related tests

Bug: 281627891
Test: atest FaceUpdaterTest
Change-Id: I028a7dd7fd2e56889ac27051678ca954c896da20
2023-05-14 02:57:05 +00:00
Zoey Chen
4d917d990f Merge "[Panlingual] Do not show dialog in recycle. Set LocaleEditor as the parent fragment and control the dialog." into udc-dev 2023-05-12 03:37:37 +00:00
Zoey Chen
fb6b6b0bcc [Panlingual] Do not show dialog in recycle. Set LocaleEditor as the
parent fragment and control the dialog.

Keep the dialog and the locale list after rotation

Bug: 279527362
Change-Id: I349fd9d0fea5b43a8bbb2a23fa60fc4c5436c5cf
Test: make RunSettingsRoboTests -j128 ROBOTEST_FILTER=LocaleListEditorTest
Test: atest LocaleDialogFragmentTest
2023-05-12 02:40:13 +00:00
Yuxin Hu
6e3aba5366 Merge "Add AndroidJUnitTest for developer option switch" into udc-dev 2023-05-11 20:48:57 +00:00
Yuxin Hu
715a70603c Add AndroidJUnitTest for developer option switch
Bug: b/270994705
Test: m -j45
atest SettingsRoboTests:GraphicsDriverEnableAngleAsSystemDriverControllerTest
atest -c GraphicsDriverEnableAngleAsSystemDriverControllerJUnitTest

Change-Id: Idbb93458a64894c3eba78a8f9373c40e3ddf35c5
2023-05-11 17:59:21 +00:00
Derek Jedral
9c67ee1eb1 Merge "Remove feature flag for active unlock" into udc-dev 2023-05-09 17:17:11 +00:00
Derek Jedral
501f3635dc Remove feature flag for active unlock
Active Unlock was guarded behind a feature flag for two main purposes.
1) To select the unlock intent or biometric failure layout. We've
   settled on unlock intent, so we no longer need the biometric failure
   codepath.
2) To guard the feature rollout. However, the additional platform guard
   is not necessary, since this feature availability is still guarded
   based on whether the secure settings are flipped to valid targets.
In order to keep the scope of this CL small, useBiometricFailureLayout
always returns false. Another CL will clean up all areas where it and
useUnlockIntentLayout are referenced.

Test: make RunSettingsRoboTests
Bug: b/280306741
Change-Id: I331afe9654b72249d461007c087e7f81783d7625
2023-05-08 12:46:36 -07:00
Chaohui Wang
2901125674 Fix flicker in SIM card page
Before fix, the DefaultSubscriptionController will set an empty summary
before data is ready.

Not set the summary before data is ready to fix.

Also fix the ignored tests.

Fix: 277301125
Test: Manual on Mobile Settings
Test: Unit test
Change-Id: I07d964b9f9ce21f8f168cb775eea188e48172c5d
2023-05-08 19:07:28 +08:00
Chaohui Wang
ab8a130674 Clean up DefaultSubscriptionController.getSummary
Which is always overridden by subclass after Change
I7d29b58ca5476ae0bb6fe2e04fecb96164cb1ada

This is a no op.

Bug: 277301125
Test: Manually with Mobile Settings
Test: Unit test
Change-Id: Ifa5928e1026b18c33f2bdd51fdcba267249dcee5
2023-05-08 18:56:06 +08:00
TreeHugger Robot
3a2b8e81e5 Merge "[Settings] Remove WFC enabled state condition of querying Telecomm." into udc-dev 2023-05-04 14:57:36 +00:00
Tom Hsu
99e03458fa Merge "[Settings] Fix NPE from updating subinfo changed." into udc-dev 2023-05-04 04:21:51 +00:00
Becca Hughes
b21df6c5fc Align settings with new mocks
Test: ondevice
Bug: 278919696
Change-Id: I274126bce3616596c4a81dd3385f0844d8bdbf71
2023-05-02 23:50:22 +00:00
Becca Hughes
ddf359d0f8 Fork autofill default app selection
We are merging the default app selection for autofill
with credman so this forks the existing UI (so we can
flag it off).

Test: ondevice
Bug: 278919696
Change-Id: I96bcf1ff86b169a182b9974f7384c45b474c3d5d
2023-05-02 20:31:14 +00:00
tom hsu
21860761e8 [Settings] Remove WFC enabled state condition of querying Telecomm.
- Query WFC enabled state by querying Telecomm may have problem.
 - Only use ImsMmTelManager API to check WFC enabled state.

Bug: 278108377
Test: atest passed
Change-Id: I6d1122bcf66ed5cd274e99b7b4f13558ab922162
2023-05-02 12:57:35 +00:00
tom hsu
fa0bdabc6a [Settings] Fix NPE from updating subinfo changed.
- Refactor code to avoid NPE.

Bug: 278721219
Test: make passed
Test: atest MobileDataPreferenceControllerTest passed
Change-Id: I1fe57b8835677335ae9102cfff71451060ea4f78
2023-05-02 11:40:12 +00:00
Tom Hsu
bd9263b391 Merge "[Settings] UI part: Add metrics for language" into udc-dev 2023-04-28 02:49:59 +00:00
Zoey Chen
cfaa13442c [Settings] UI part: Add metrics for language
Bug: 279915462
Test: atest
Change-Id: Ie13c57b2b398beb48dfe0ac289ec336483575445
2023-04-27 15:55:45 +00:00
Becca Hughes
99f1d5448d DO NOT MERGE Hide provider from this list if autofill provider
Since we are merging the two lists we should
hide the provider from this list to avoid
duplicates.

Test: local & unit
Bug: 279205251
Change-Id: I70ec4a4bda13bdcd5fd8f82f6ba6045e94d5daa9
2023-04-26 21:23:30 +00:00
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