Commit Graph

48315 Commits

Author SHA1 Message Date
Weng Su
34b0650655 [RESTRICT AUTOMERGE] Restrict WifiDppConfiguratorActivity am: 0ea027a71c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/26804708

Change-Id: I28bc46ff37bf11a9fa6b92eaa78c6d77f7cd4e8e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-04 20:06:48 +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
ea126ae386 Replace getCallingActivity() with getLaunchedFromPackage() am: ddc11bc03a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/26315861

Change-Id: Ib4054f4a6aceb589a157eccf713a13b5abac01bf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-05 04:49:40 +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
Chaohui Wang
14b8df172f Remove ExperimentalLifecycleComposeApi
Fix: 276310170
Bug: 271609607
Test: m Settings
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:8d220f064127826d0a5ec9b085d7cc7e49090dfb)
Merged-In: I8798f723bc821241d70fc8e5cb2c6ae59d7115af
Change-Id: I8798f723bc821241d70fc8e5cb2c6ae59d7115af
2024-02-08 09:49:32 +00:00
Weng Su
dbc5512077 [RESTRICT AUTOMERGE] Restrict WifiDialogActivity am: a0409e582c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/26069282

Change-Id: Idb35be691b002767e241c331ab9df5ba7420bf8d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-04 23:21:48 +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
38906db8fe 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: I4e52611bce13f21ccafddd730509f8da21495731
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-08 18:43:52 +00:00
Treehugger Robot
410fe2f16e Merge "Validate ringtone URIs before setting" into udc-dev 2023-11-08 18:05:31 +00:00
Evan Chen
4231ecf16b 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: I6f970cea31ac0771e9a3413bb8e1af113d7eba4b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-06 20:14:51 +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
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
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
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
Grace Cheng
25b489e212 Merge "Fix NPE in updateAddPreference" into udc-dev 2023-06-28 17:41:13 +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
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
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
Julia Tuttle
b23136041d Fix colors in importance and conversation priority preferences
This would have been simpler and faster, but the ChannelPanelActivity
was giving me a context where Material colors always inflated in light
theme even if the device was in dark theme, so I had to work around it.

On the plus side, whoever next needs to change these colors will find
them neatly organized in themes.xml!

Bug: 284380876
Test: manual
Change-Id: I2eee877fe44d307a96d60168d0317444ff002669
2023-06-16 19:17:09 +00:00
Matías Hernández
dcbe38baa9 Don't hide approved NLSes in Settings am: ff255c6eda am: 50df60c93c am: a49e14f8ff am: 0aa241be99 am: 2b1faa0aea
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23563580

Change-Id: I69d2ef43afb54ce3b9d141d4f676b688dd1c5c59
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 15:52:58 +00:00
Matías Hernández
2b1faa0aea Don't hide approved NLSes in Settings am: ff255c6eda am: 50df60c93c am: a49e14f8ff am: 0aa241be99
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23563580

Change-Id: I715da9406bd9d3fe88ff7b5353db1780109880e0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 15:09:53 +00:00
Matías Hernández
0aa241be99 Don't hide approved NLSes in Settings am: ff255c6eda am: 50df60c93c am: a49e14f8ff
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23563580

Change-Id: I8cd7cc9605b3728f9f96c3479d17aa1b362d9cda
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 14:22:10 +00:00
Matías Hernández
a49e14f8ff Don't hide approved NLSes in Settings am: ff255c6eda am: 50df60c93c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23563580

Change-Id: I840d7836ae899bcd40eafc772b96c9460c3f8a02
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 13:42:07 +00:00
Matías Hernández
50df60c93c Don't hide approved NLSes in Settings am: ff255c6eda
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23563580

Change-Id: I42099e38ef7b479b9339b545fe8d12d3bbe95112
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 12:57:15 +00:00
Zaiyue Xue
8c25fe4c60 Merge "Don't load battery entry names and icons in offline job to improve memory usage." into udc-dev 2023-06-14 03:01:25 +00:00
Grace Cheng
f58714496a Fix NPE in updateAddPreference
Update mAddFingerprintPreference to avoid NPE

Fixes: 286495189
Test: Rotate screen during first fingerprint enrollment, complete enrollment, and observe no crash
Change-Id: Id7edde492168b467360c6c99b326721cd883bba8
Merged-In: Id7edde492168b467360c6c99b326721cd883bba8
2023-06-13 19:23:04 +00:00
Treehugger Robot
decc428857 Merge "DO NOT MERGE: Prevent non-system IME from becoming device admin" into udc-dev 2023-06-12 19:57:26 +00:00
Han Xu
b452bc9f9d Add manufactured year into hardware info page
Bug: 285471557
Test: manual visually
Change-Id: Iaab254ac6ee77217e29d89524d782577f44119cb
2023-06-12 17:43:55 +08:00
Zaiyue Xue
ec032710dc Don't load battery entry names and icons in offline job to improve memory usage.
Risk: low (The name and icon will be always loaded again in the UI.)

Bug: 280720236
Fix: 280720236
Test: manual
Change-Id: I86f50e953ffd4910acbf9f318e1cc1caa3a7a232
Merged-In: I86f50e953ffd4910acbf9f318e1cc1caa3a7a232
2023-06-12 10:49:01 +08:00
Avinash Vadlamudi
01637b556e [Auto Pin Confirmation]: Add talkback capability for Auto-confirm correct PIN checkbox even if it is not in focus
- set accessibilityLiveRegion as Polite mode to allow talkback to announce the state of checkbox even if is not in focus

Bug: 281950677
Test: Manual test by flashing on device and checking in talkback mode
Change-Id: Ia1066e2df1f40e6c339a4cd63f92acf0858f8f3d
2023-06-10 01:25:18 +00:00
Mady Mellor
57406435cf Merge "Update the colors for bubbles settings based on new spec" into udc-dev 2023-06-09 15:33:30 +00:00
Oli Thompson
01b382546e Merge "Fix emergency button not visible on pattern work challenge screen" into udc-dev 2023-06-09 15:31:17 +00:00
Oli Thompson
dcce8fa662 Fix emergency button not visible on pattern work challenge screen
Hide the subtext for work challenge pattern,so everything fits and
adjust some spacing

Test: btest a.d.g.WorkTelephonyTest#workChallengePatternScreen_whenAllSubscriptionsManaged_hasEmergencyButton -nm
Bug: 283137301
Bug: 286391641
Change-Id: Ia6214b624f8d7328f7445f01a08166b8ab33fdec
2023-06-09 13:06:39 +00:00
Mady Mellor
fb1e921bd9 Update the colors for bubbles settings based on new spec
Test: manual - get a bubble, go to that apps bubble settings screen,
               observe the colors look correct, switch theme and
               check again.
Bug: 283951560
Change-Id: I28fa64f8d7b53419a57615bf3da4da7eff049674
2023-06-08 13:23:54 -07:00
Mady Mellor
8a47899369 Merge "Fix colors in bubble settings so they're more visible" into udc-dev 2023-06-08 17:35:55 +00:00
Mady Mellor
f184678802 Fix colors in bubble settings so they're more visible
Test: manual - get a bubble, go to that apps bubble settings screen,
               observe the colors look correct, switch theme and
               check again.
Bug: 283951560
Change-Id: I361b1c20e293c02b4d604e0b5845a074c31e5103
2023-06-08 09:21:13 -07:00
Aleksandar Kiridžić
b5b15a6689 Merge "speech: On-device recognition settings profile selector" into udc-dev 2023-06-07 17:53:38 +00:00
TreeHugger Robot
3e374cc7a7 Merge "[Settings] Fix crash when user enter bluetooth page quickly." into udc-dev 2023-06-07 12:13:51 +00:00
tom hsu
bf7865b27e [Settings] Fix crash when user enter bluetooth page quickly.
- When SliceManager try to pinSlice, process may not have the permssion
   yet, so in Androix lib it use try/catch to avoid Security exception.
   However, if SliceManger quickly unpinSlice after pinSlice, process
   may still not get the permission yet, then due to no security
   exception, it cause the settings crash.

Bug: 283065718
Test: atest passed
Test: Manual test passed
Change-Id: I2293fca73e65dfaa34237abe57e0c6a3fe0f62bb
2023-06-07 09:37:21 +00:00
Ale Nijamkin
b5dda005fd Merge "Fixes nav stack issue." into udc-dev 2023-06-06 18:48:59 +00:00
Matías Hernández
ff255c6eda Don't hide approved NLSes in Settings
Note that an NLS that shouldn't be approvable (because its name is too long) but was already approved (either before the max length check was introduced, or through other means) will disappear from the list if the user revokes its access. This might be somewhat confusing, but since this is a very-edge case already it's fine.

Bug: 282932362
Test: manual
Change-Id: I4c9faea68e6d16b1a4ec7f472b5433cac1704c06
2023-06-06 19:07:58 +02:00
Aleksandar Kiridzic
a882fd268d speech: On-device recognition settings profile selector
`Settings > System > Languages > On-device speech recognition`
entry is currently proceeding to the settings page for the personal
profile by default. If a work profile exists,
a profile selector should be shown first.

Bug: 269575714
Test: Manual, already existing robotests
Change-Id: Id95a9716358ec3a813c77275bd65f0cbdfc9aefc
2023-06-06 14:10:34 +01:00
Alejandro Nijamkin
6f9f3a4594 Fixes nav stack issue.
By marking the Intent that's being sent to WPP as "launched from
settings", the code in CustomizationPickerActivity can correctly
conclude that the multi-pane wrapper does not need to be applied to the
intent, preventing the odd "disordering" of the back stack in the bug.

Fix: 284809020
Test: manually verified, on a large screen device with a multi-pane
settings configuration, that going to Display > Lock screen > Shortcuts
and then swiping back off the left edge of the display correctly exits
settings instead of revealing an incorrect screen like it did in the
bug.
Test: also manually verified that the long-press on the home screena and
on the lock screen paths both open the right tab in WPP in settings
correctly.

Change-Id: Iac2b4e9fa5bab91b6a5251f1c51b4d21a0824f00
2023-06-05 16:02:17 -07:00
Justin Gross
89e829e3dc Merge "Enable vendors to add preference controllers in mobile network settings" into udc-dev 2023-06-05 18:00:15 +00:00
Taran Singh
9260c67352 DO NOT MERGE: Prevent non-system IME from becoming device admin
Currently selected IME can inject KeyEvent on DeviceAdminAdd screen to
activate itself as device admin and cause various DoS attacks.

This CL ensures KeyEvent on "Activate" button can only come from system
apps.

Bug: 280793427
Test: atest DeviceAdminActivationTest
Change-Id: I6470d1684d707f4b1e86f8b456be0b4e0af5f188
(cherry picked from commit 70a501d02e)
2023-06-02 22:20:30 +00:00
TreeHugger Robot
25d24e0cf0 Merge "Restrict SimDialogActivity" into udc-dev 2023-06-02 20:41:47 +00:00
Jason Chiu
b2ed35b2ae Merge "Do not init dashboard categories when SetupWizard isn't finished yet" into udc-dev 2023-06-02 10:27:14 +00:00
Chaohui Wang
122ba16792 Merge "Hide Show System on SPA version App languages" into udc-dev 2023-06-02 06:41:54 +00:00