Commit Graph

48494 Commits

Author SHA1 Message Date
Chris Antol
4b73fbdb8e Merge "Ignore fragment attr from ext authenticator resource" into udc-dev am: 79ab22ba51
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/27675438

Change-Id: I4dbdf1e36fc580ac00f812d904bca9ad1c31ae1f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-21 01:55:42 +00:00
Chris Antol
d43f82be7a Ignore fragment attr from ext authenticator resource
Bug: 341886134
Test: Unit Test
Test: Manual - see ticket for steps
Flag: EXEMPT <security>

Change-Id: Id91c2b3b6d16ba3702ee2cd6723365a4db52863b
2024-06-04 20:14:58 +00:00
Weng Su
146d51f2cc [RESTRICT AUTOMERGE] Restrict WifiDppConfiguratorActivity am: 0ea027a71c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/26804708

Change-Id: I2f57a28bbc46a1f648d6ecf0a72eab3a884e69e4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-04 20:06:34 +00:00
Weng Su
0ea027a71c [RESTRICT AUTOMERGE] Restrict WifiDppConfiguratorActivity
- Don't show WifiDppConfiguratorActivity if user has DISALLOW_ADD_WIFI_CONFIG

- Don't show AddNetworkFragment if user has DISALLOW_ADD_WIFI_CONFIG

Fix: 299931076
Flag: None
Test: manual test with TestDPC
atest -c SettingsUnitTests:AddNetworkFragmentTest \
         SettingsUnitTests:WifiDppConfiguratorActivityTest

Change-Id: I34afe0f698e2dc43eba59b25f5f3f4f61e70166a
Merged-In: I34afe0f698e2dc43eba59b25f5f3f4f61e70166a
2024-04-03 03:52:07 +00:00
Jason Chiu
930a9f3180 Replace getCallingActivity() with getLaunchedFromPackage() am: ddc11bc03a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/26315861

Change-Id: I01598c3f2fa5432dc27357701ddcbb29b4c97776
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-05 04:47:38 +00:00
Jason Chiu
ddc11bc03a Replace getCallingActivity() with getLaunchedFromPackage()
getLaunchedFromPackage() reports who launched this Activity or built
PendingIntent used to launch it, whereas getCallingActivity() reports
who will get result of Activity.

Bug: 316891059
Test: robotest, manual
Change-Id: If97018c2741caef622f0596bbfeaa42ef1788b78
Merged-In: If97018c2741caef622f0596bbfeaa42ef1788b78
(cherry picked from commit 901880a1d2)
2024-02-22 03:43:50 +00:00
Weng Su
b33f9b8f8a [RESTRICT AUTOMERGE] Restrict WifiDialogActivity am: a0409e582c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/26069282

Change-Id: I95a273524cc758ed7abe08b76ae4b2631a850ff8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-04 23:20:04 +00:00
Weng Su
a0409e582c [RESTRICT AUTOMERGE] Restrict WifiDialogActivity
- Don't show WifiDialogActivity if user has DISALLOW_ADD_WIFI_CONFIG

Bug: 299931761
Flag: None
Test: manual test with TestDPC
atest -c SettingsRoboTests:WifiDialogActivityTest

Merged-In: Icbb8f45922ded163208976be9c2816060dcf09f1
Change-Id: Icbb8f45922ded163208976be9c2816060dcf09f1
(cherry picked from commit 51fa3d798a)
2024-01-30 21:23:08 +00:00
Treehugger Robot
8f3d594305 Merge "Validate ringtone URIs before setting" into udc-dev am: 410fe2f16e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24969251

Change-Id: Idefa9ae0fd0a1bbd2353d518307bf32369c1f21b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-08 18:46:03 +00:00
Treehugger Robot
410fe2f16e Merge "Validate ringtone URIs before setting" into udc-dev 2023-11-08 18:05:31 +00:00
Evan Chen
2abb356f2d Make sure work profile app cant enable notification listener services am: aa122da7d6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/25007537

Change-Id: Id0c70f2fac4631e1dd90070d43db8f735ceb22ed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-06 20:17:02 +00:00
Evan Chen
aa122da7d6 Make sure work profile app cant enable notification listener services
Fix: 282934003
Test: Run test app in work profile
Change-Id: I7fed6d1baa1a40e9126493d37e33d63236bb4b3c
Merged-In: 81893c2b6f
(cherry picked from commit 81893c2b6f)
2023-10-10 16:59:33 +00:00
Valentin Iftime
1876c44991 Validate ringtone URIs before setting
Add checks URIs for content from other users.
 Fail for users that are not profiles of the current user.

Test: atest DefaultRingtonePreferenceTest
Bug: 299614635
Change-Id: Ib266b285a3a1c6c5265ae2321159e61e08e349f6
Merged-In: Ib266b285a3a1c6c5265ae2321159e61e08e349f6
2023-10-09 12:59:16 +00:00
Edgar Wang
4bd401adf4 Update the API usage to get total size of devices
StorageStatsManager fixed in StorageStatsService#getTotalBytes
So that we should change back to call the API.

Bug: 295358118
Bug: 288103116
Test: verified manually
Change-Id: I3dcc9698403612f961cf0de41925dcbcb43e260b
(cherry picked from commit 2d57d002ae)
2023-08-30 13:28:46 +00:00
Austin Delgado
a73cee24d4 Fix talkback not announcing requirement in ChooseLock
Fix: 281955512
Test: Manual, verify talkback reads out password requirement on 17th digit
Change-Id: Ia274af9cc515d3ac9d344bd41d008ab5b4dbcabd
Merged-In: Ia274af9cc515d3ac9d344bd41d008ab5b4dbcabd
2023-08-21 20:35:39 +00:00
Eric Biggers
8f3ca8daeb RESTRICT AUTOMERGE: Catch exceptions from setLockCredential()
When LockPatternUtils#setLockCredential() fails, it can either return
false or throw an exception.  Catch the exception and treat it the same
way as a false return value, to prevent crashing com.android.settings.

Bug: 253043065
Test: Tried setting lockscreen credential while in secure FRP mode using
      smartlock setup activity launched by intent via adb.  Verified
      that com.android.settings no longer crashes due to the exception
      from LockPatternUtils#setLockCredential().
Change-Id: I48b9119c19fb6378b1f88d36433ee4f4c8501d76
(cherry picked from commit 05f1eff1c9)
(moved change into ChooseLockPassword.java and ChooseLockPattern.java,
 which are merged into SaveAndFinishWorker.java on udc-qpr-dev and main)
Merged-In: I48b9119c19fb6378b1f88d36433ee4f4c8501d76
2023-08-02 23:41:41 +00:00
Austin Delgado
c6e7b93f28 Merge "Announce requirements when setting PIN/Pass" into udc-d1-dev 2023-08-01 22:13:34 +00:00
Austin Delgado
035b661ea4 Announce requirements when setting PIN/Pass
Test: Manual, verify requirement is read
Fixes: 281955512
Change-Id: I6d963d545c68c4ec891d9ad8a7da8c0a0f6e9d6b
2023-07-31 17:50:39 -07:00
Wenhui Yang
5239911c6b Merge "Revert "Fix rotate device at face unlock detailed page, device will display"" into udc-d1-dev 2023-07-26 02:44:08 +00:00
Treehugger Robot
d86ec6652a Merge "Correct used size of Storage Settings." into udc-d1-dev 2023-07-26 01:47:59 +00:00
Treehugger Robot
57b00e28ea Merge "Restrict ApnEditor settings" into udc-dev am: 64c88a192a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23982512

Change-Id: Ic052e568818d4829fe40250e00679742fc816263
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-25 20:59:46 +00:00
Wenhui Yang
d26f18f727 Revert "Fix rotate device at face unlock detailed page, device will display"
This reverts commit 2ca753bd06.

Reason for revert: Fix b/289173795

Change-Id: Ieaabe550bcbaad21a2373f3c5c103c68739d45dc
2023-07-25 20:31:36 +00:00
Wenhui Yang
c6c9d74f06 Update learn more string for udfps fp settings
Update the learn more message for udfps fingerprint unlock to make it
consistent with sdfps.

Fixes: 289167628
Test: manual (see bug)
Change-Id: Iac6edb1c176dab462c91e1bf6236dfe4d0988693
2023-07-21 02:36:24 +00:00
Ken Lin
c655c82ada Settings crashed when changing the Screen Resolution
Check if index is out of bound

Bug: 288256336
Test: Change to Full resolution, set Smallest width to 426 dp, then
switch to High resolution
Test: atest ScreenResolutionFragmentTest

Change-Id: Ida4128e76e097050b01deae91c9d669e58ab9e8f
2023-07-18 02:30:09 +00:00
Chaohui Wang
fe38ff963a Merge "[Regulatory Labels] Load labels from overlays" into udc-d1-dev 2023-07-11 07:50:49 +00:00
SongFerng Wang
717ce2b91f Merge "To fix waiting too long issue when psim -> esim" into udc-d1-dev 2023-07-11 04:55:18 +00:00
Chaohui Wang
9132535e5e Fix crash when call getMobileTemplate
There are 2 versions of getMobileTemplate.

The previous Change I7865823d6af2c812afa35d047bd79b60ae4b0fb7 change
from the correct version to the wrong version.

Change back to fix the issue.

Fix: 290381395
Test: manual - on Mobile Settings page
Test: unit test
Change-Id: Icb3147558176d53dc77e7bd39ab54a5dad13c12b
Merged-In: I6227f973ec38e5b0520f54a41ac2ede2929a1bcc
2023-07-10 14:20:07 +08:00
Chaohui Wang
590b4e7af8 [Regulatory Labels] Load labels from overlays
When config_regulatory_info_overlay_package_name is configured, load
regulatory labels directly from overlay package.

Also fix RegulatoryInfoDisplayActivity missing dialog theme.

Bug: 283170651
Test: unit test
Test: manual - check regulatory labels
Change-Id: Ia1f6848abe0da9facf34f47abab09e88d57e74d6
2023-07-07 14:52:26 +00:00
Weng Su
5a17d39db7 Restrict ApnEditor settings
- Finish ApnEditor settings if user is not an admin

- Finish ApnEditor settings if user has DISALLOW_CONFIG_MOBILE_NETWORKS restriction

Bug: 279902472
Test: manual test
atest -c ApnEditorTest
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:4e18e7414c674a1c5bc69961c03499849b4aefd2)
Merged-In: Iecdbbff7e21dfb11e3ba385858747a220cfd3e04
Change-Id: Iecdbbff7e21dfb11e3ba385858747a220cfd3e04
2023-07-07 12:11:33 +00:00
SongFerngWang
d94ac12190 To fix waiting too long issue when psim -> esim
if the user swithes slot from psim to esim, then the settings
need to wait the simSlotMapping completed and it has a timer to avoid
UI stay here too long.

Since the framework did not sned the carrier config changed with vaild
subId in MEP + psim->esim case, it cause the settings does not know the
simSlotMapping completed and it stay here until timeout.

For MEP case, changing this condition as SimSlotStatusChanged

Bug: 273813956
Test: atest UiccSlotUtilTest
Change-Id: Ic09dbcb3629fe13770f3ad301c0a396d6745969f
2023-07-07 10:22:49 +00:00
Treehugger Robot
1f9f114495 Merge "Do not show LE audio toggle in Device Detail by default" into udc-d1-dev 2023-07-07 10:02:51 +00:00
Michael Mikhail
7c53d299a2 Merge changes I4bd65bdb,Ibe80b4b1 into udc-dev am: 83c13d6563
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23830044

Change-Id: I978498d9acbb734534bf2ad1dad7e5cfb2434237
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-05 15:51:23 +00:00
Michael Mikhail
83c13d6563 Merge changes I4bd65bdb,Ibe80b4b1 into udc-dev
* changes:
  Trigger talkback for notification volume change
  Add content description to volume title in settings.
2023-07-05 15:11:09 +00:00
Patty Huang
627a584f39 Do not show LE audio toggle in Device Detail by default
Bug: 289884263
Bug: 289957406

Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothLeAudioDeviceDetailsPreferenceControllerTest
Test: Checks the LE Audio toggle is not shown in Device Detail by default
Change-Id: I2c6430c791dd852d238d7122a72f218f395c4a0b
2023-07-05 11:51:50 +08:00
Edgar Wang
3335c72da9 Correct used size of Storage Settings.
Since StorageManager rounded the totalBytes of device storage but
they don't do that rounding for freeBytes.
So in some cases the freeBytes can be greater than totalBytes.

We propose to get totalBytes of device storage directly to calculate
correct privateUsedBytes.

Test: robotest
Bug: 281955532
Change-Id: I4f137c20e7c2f54f4e037d50e81b3176edc1a83a
(cherry picked from commit e52320e755)
2023-07-04 09:56:35 +00:00
Chaohui Wang
d42cc8e5e2 Fix DataUsagePreferenceController ANR
Offload calculation work from main thread to fix.

Fix: 286082055
Test: manual - on Mobile Settings page
Test: unit test
Change-Id: I7865823d6af2c812afa35d047bd79b60ae4b0fb7
2023-07-04 12:06:53 +08:00
Hao Dong
04b1932b25 Merge "Fix pattern rotation header text." into udc-d1-dev 2023-06-29 23:52:00 +00:00
Hao Dong
72f2058d3e Merge "Fix Fingerprint enrollment UI when display size is largest." into udc-d1-dev 2023-06-29 23:51:50 +00:00
Grace Cheng
25b489e212 Merge "Fix NPE in updateAddPreference" into udc-dev 2023-06-28 17:41:13 +00:00
Matías Hernández
aaddfd88e9 Merge "Settings: don't try to allow NLSes with too-long component names" into udc-dev am: 4d34eb2c7a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23726247

Change-Id: If35fbb5c16a642b56de29012ce43ecd7f068d5b8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-28 17:14:55 +00:00
Matías Hernández
4d34eb2c7a Merge "Settings: don't try to allow NLSes with too-long component names" into udc-dev 2023-06-28 16:42:13 +00:00
Hao Dong
7b99d92464 Fix pattern rotation header text.
Bug: 278055194
Test: atest ChooseLockPatternTest
Change-Id: I36ec325b46d7a7f583d94dc26f9962cadc3874cd
Merged-In: I36ec325b46d7a7f583d94dc26f9962cadc3874cd
2023-06-27 17:50:15 +00:00
Hao Dong
2ca3f3232c Fix Fingerprint enrollment UI when display size is largest.
1. Remove land/udfps_enroll_enrolling and use the default land layout
instead. Swap header and content when necessary to avoid overlap.
2. Add UdfpsEnrollEnrollingView.java

Test: manual test - 1. Set system display and font size largest
	            2. Launch fingerprint enrollment and check UI.
Test: atest FingerprintEnrollEnrollingTest
Bug: 269060514
Bug: 283169056
Change-Id: Ifbe6c92c4213979952f2f89a1cd595c9c4bff6ec
Merged-In: Ifbe6c92c4213979952f2f89a1cd595c9c4bff6ec
2023-06-27 17:48:16 +00:00
Michael Mikhail
6308e3fb2a Trigger talkback for notification volume change
Triggers talkback to say the content description of the title of
notification volume when notification volume is set to vibrate or silent
mode.

Fixes: 285453719
Fixes: 285455826
Test: manually checked when the ring volume is set to 0% and when the
notification volume is set to 0%. Check the video in the bug link.

Change-Id: I4bd65bdbfa41793fc8e32c295185363ca36cc0d7
2023-06-27 17:01:18 +00:00
Michael Mikhail
499f965c1c Add content description to volume title in settings.
Adds content description that is announced by talkback when a11y focus
is on volume preference. This improves talkback announcement when view changes.

Fixes: 285529113
Bug: 285455826
Fixes: 285487766
Test: atest VolumeSeekBarPreferenceControllerTest
Test: atest VolumeSeekBarPreferenceTest
Change-Id: Ibe80b4b1d489dc058df1cc79c96b034d5ddc6e56
2023-06-26 23:35:39 +00:00
Hao Dong
be823bc598 Wait for systemui udfps overlay ready to show settings udfps enroll view.
Previously, we show settings's udfps enroll animation view (the fingerprint icon and progress view) once the FingerprintEnrollEnrolling is shown.
However, touch events have to wait for systemui's udfps overlay to be valid. This CL lets settings's udfps enroll view wait for systemui's overlay.
1. Sets udfps enroll animation view's default visibility Gone.
2. Propagates FingerprintManager#onUdfpsOverlayShown to
   FingerprintEnrollEnrolling and when it's called, set the enroll view
   visible.

Besides, this CL renames onPointerDown() and onPointerUp() with Udfps.

Bug: 280718879
Test: atest FingerprintEnrollEnrollingTest
Change-Id: Ieed3e74c182828918785edcacb021f19a3665f2a
2023-06-26 20:21:05 +00:00
Hao Dong
bf84218753 Fix delete face button disappear after reenroll
Test: manual test - 1.enroll a face 2. delete the face and reenroll 3.
back to face settings page, the button is delete button instead of set
up button
Bug: 285806446

Change-Id: I6739296b0b099446489956f8f609c87600ffdaa3
2023-06-21 18:45:40 +00:00
Matías Hernández
027f0a46ae Settings: don't try to allow NLSes with too-long component names
* NotificationAccessConfirmationActivity (triggered through CompanionDeviceManager) -> Don't show the dialog, bail out early similarly to other invalid inputs.
* NotificationAccessSettings (from Special App Access) -> No changes, but use the canonical constant now.
* ApprovalPreferenceController (used in NotificationAccessDetails) -> Disable the toggle, unless the NLS was previously approved (in which case it can still be removed).

Fixes: 260570119
Fixes: 286043036
Test: atest + manually
Change-Id: Ifc048311746c027e3683cdcf65f1079d04cf7c56
2023-06-21 17:02:32 +02:00
TreeHugger Robot
c548cdc4a9 Merge "Remove Wi-Fi hotspot from settings search for non-admin users" into udc-d1-dev 2023-06-21 04:25:57 +00:00
Weng Su
7bd6646e5f Remove Wi-Fi hotspot from settings search for non-admin users
- Don't use ViewModel if the settings UI is restricted

Bug: 284931681
Test: manual test
atest -c WifiTetherSettingsTest

Change-Id: I3ae23b01b3be821c3560552b39cbd83ab51b2095
2023-06-21 06:58:18 +08:00