Commit Graph

143690 Commits

Author SHA1 Message Date
Android Build Coastguard Worker
3c11a92c50 Snap for 12309590 from b210f35a76 to 24Q4-release
Change-Id: I429de43972387705483c6836aab9c7d74556ed9a
2024-09-02 23:21:15 +00:00
Matías Hernández
b210f35a76 Prevent "new mode" and "choose schedule" dialogs from being created without a listener
This can happen if the activity is recreated; our approach doesn't support this case very well. With this change, the dialog is not reshown when the activity is recreated, which is not optimal but better than crashing (as it does today). There is no lost work because it's the first choice, and the follow-on steps (icon picker, etc) can be recreated without problems.

Fixes: 359746551
Test: manual, with don't keep activities
Flag: android.app.modes_ui
Change-Id: I84bdeb0007e8c50ec9dd8af61991c7e55ddb8298
2024-09-02 18:29:23 +02:00
Pavel Grafov
95efbfa8bb Clean up fully rolled out HeadlessSingleUserFixes
Flag was rolled out in Android V.

Bug: 335663055
Test: TH
Flag: EXEMPT flag cleanup
Change-Id: Iaccd1c594f588b40f46e653b83e257f90b048bf4
2024-09-02 16:44:04 +01:00
Yiyi Shen
85d1148e87 Merge "[Audiosharing] Avoid audio sharing dialogs in call" into main 2024-09-02 10:40:28 +00:00
Tetiana Meronyk
9ba90e5b3b Update main toggle state in User Settings onResume()
The toggle state used to be set on creation and only changed onSwitchToggled(). But the state can also change when restrictions are applied from outside of settings, or when user is added with toggle being off by default.

This change updates the state during execution of onResume() in Users Settings, which also aligns with the update strategy of other Toggles on this Settings page.

Bug: 362706097
Test: atest MultiUserSwitchBarControllerTest
Flag: EXEMPT bugfix
Change-Id: I8a994b2e0ddb672362e69653374b87f85ae1548c
2024-09-02 10:28:51 +00:00
Chaohui Wang
355ee0a1ee Refine CrossSimCalling updating
Currently, this setting depends on whether wifi calling is supported,
since wifi calling could takes some time to provision after sim is
turned on, this state could be wrong when set cross sim calling.

Use wifiCallingReadyFlow() to retrieve the latest state, and update
setting when state changes.

Fix: 352736998
Fix: 348529996
Flag: EXEMPT bug fix
Test: manual - by turn on / off sim
Change-Id: Id4b099e0c5d7cf47b007f37e6f278d1c46e58659
2024-09-02 17:58:17 +08:00
Matías Hernández
651c9b90c2 Merge "Replace "Priority Modes" with "Modes" (Settings)" into main 2024-09-02 08:59:10 +00:00
Yiyi Shen
b819fa9020 [Audiosharing] Disable main toggle till device gets active.
Broadcast <-> unicast costs some time, so we grey out the audio
sharing toggle until the device get active on unicast when users toggle
off the sharing.

Flag: com.android.settingslib.flags.enable_le_audio_sharing
Test: atest
Bug: 359755881
Change-Id: I868a470430f6fb54c142f17552d70fa5fa8a2476
2024-09-02 06:54:41 +00:00
Yiyi Shen
abd3889b5c [Audiosharing] Avoid audio sharing dialogs in call
Test: atest
Bug: 362714470
Flag: com.android.settingslib.flags.enable_le_audio_sharing
Change-Id: I972d65727865793454de3eb0d9f07926d236afd7
2024-09-02 13:41:09 +08:00
Yiyi Shen
a63f6cc528 Merge "[Audiosharing] Avoid dialog when onPlaybackStarted after call ends" into main 2024-09-02 05:24:06 +00:00
Chaohui Wang
e9136c7817 Merge "New isSubscriptionVisibleFlow" into main 2024-09-02 05:04:08 +00:00
Treehugger Robot
50ae8d3cc7 Merge "Fix WifiCallingPreferenceController crash" into main 2024-09-02 04:33:21 +00:00
Chaohui Wang
08319b18d6 Merge "Use simSpecificCarrierId for new apn" into main 2024-09-02 02:54:35 +00:00
Matías Hernández
49ef18e4a4 Replace "Priority Modes" with "Modes" (Settings)
Bug: 363445885
Change-Id: I3041cb2d5d8d67f5a208425393e8fdb2757c6757
Test: manual
Flag: android.app.modes_ui
2024-09-01 16:40:05 +00:00
Android Build Coastguard Worker
f235408f61 Snap for 12304452 from 9260350b93 to 24Q4-release
Change-Id: Ie73095ed17de92e1ff31742174db2b6446f9fdad
2024-08-31 01:21:17 +00:00
Priyanka Advani (xWF)
9260350b93 Merge "Revert "Clean up fully rolled out HeadlessSingleUserFixes"" into main 2024-08-30 22:10:24 +00:00
Priyanka Advani (xWF)
eff79d3365 Revert "Clean up fully rolled out HeadlessSingleUserFixes"
Revert submission 28993807-hdop-cleaup

Reason for revert: Droidmonitor created revert due to b/363275535. Will be verifying through ABTD before submission.

Reverted changes: /q/submissionid:28993807-hdop-cleaup

Change-Id: I89127e1c6e445adb21dbf96c6bbbec8935bf6296
2024-08-30 19:04:56 +00:00
Treehugger Robot
df4ecbdc01 Merge "Add updateState to AutoTimeZonePreferenceController" into main 2024-08-30 17:07:05 +00:00
Treehugger Robot
42f9496b54 Merge "Add DND icon as option in the icon picker" into main 2024-08-30 16:21:03 +00:00
Geoffrey Boullanger
970d364d07 Add updateState to AutoTimeZonePreferenceController
The summary (i.e. description under the toggle title in Android settings) from AutoTimeZonePreferenceController is only used in wifi-only devices, like Tangor. We have found that since V, the summary was no longer displayed in the Date and time settings page. This fix brings the summary back.

Bug: b/363176828
Test: tested on a Tangor tablet
Flag: EXEMPT bugfix

Change-Id: I1f118b8e1d5e0d8d1b0f5b515d79522b72fb4fa4
2024-08-30 16:03:22 +00:00
Pavel Grafov
6886e03e44 Merge "Clean up fully rolled out HeadlessSingleUserFixes" into main 2024-08-30 15:20:28 +00:00
Matías Hernández
916d02c958 Add DND icon as option in the icon picker
Goodbye croissant mode. 🥐🥲

Bug: 361597532
Test: manual
Flag: android.app.modes_ui
Change-Id: Ic8c3dc0d45eab660da84ea844d3315b425954564
2024-08-30 15:25:43 +02:00
Matías Hernández
50c954923f Support (non-editable) display of DND with a filter != PRIORITY
Whenever setInterruptionFilter() is called with NONE or ALARMS, the Do Not Disturb mode now shows the current policy (nothing allowed or alarms/media allowed), instead of the normal PRIORITY policy. This policy is read-only in the UI since it cannot be customized.

This should be, or at least become, pretty rare (with small exceptions, apps targeting V that call setInterruptionFilter() will use an implicit mode instead of changing the global zen mode, plus using these filters is quite nonstandard in itself).

Fixes: 361586248
Test: atest & manual (toggling DND via cmd shell)
Flag: android.app.modes_ui
Change-Id: If2439480235d30aa310ad8925341183b9761784c
2024-08-30 15:03:03 +02:00
Weng Su
e8c9816d15 Merge "Fix WifiPrivacy for special SSID AP" into main 2024-08-30 09:25:46 +00:00
Weng Su
407f69fec5 Fix WifiPrivacy for special SSID AP
- root cause: specail SSID AP(contain '%', end with '\' or '/' and end with '???'), andriodx Navigation cannot find destination

- changes: use Base64 UrlEncode replace String

Bug: 360304229
Flag: EXEMPT bugfix
Test: Manual testing
atest -c WifiPrivacyPageProviderTest

Change-Id: Ifb89451477f2ba143f504b94c8d4d9167aee2c2e
2024-08-30 16:24:49 +08:00
Chaohui Wang
1b3a315d06 New isSubscriptionVisibleFlow
Use this instead of mSubscriptionInfoEntity, so MobileNetworkSettings
not closed unexpectedly.

Bug: 358238959
Flag: EXEMPT bug fix
Test: force stop settings & settings search - mobile settings
Test: adb shell am start -a android.settings.NETWORK_OPERATOR_SETTINGS
Change-Id: I34286da808600d8b9faa0da85a59665707ecfde3
2024-08-30 15:55:44 +08:00
YK Hung
2d07418b8b Merge "Add log for fetch data from BatteryStatsManager." into main 2024-08-30 07:34:31 +00:00
Chaohui Wang
d54d112e17 Fix WifiCallingPreferenceController crash
When sub id is invalid.

Bug: 325956182
Flag: EXEMPT bug fix
Test: adb shell am start -a android.settings.NETWORK_OPERATOR_SETTINGS
Change-Id: I09995095e2f38030eca0c9b5898d910530ee6237
2024-08-30 15:23:17 +08:00
Yiyi Shen
bece2128d2 [Audiosharing] Avoid dialog when onPlaybackStarted after call ends
Test: atest
Flag: com.android.settingslib.flags.enable_le_audio_sharing
Bug: 362714470
Bug: 355222285
Change-Id: I9f6e1138f0877b607fb75ffef2ff249ef1114e6d
2024-08-30 14:50:05 +08:00
mxyyiyi
f4f78a7382 Extend sleep timeout to fix flake tests.
Fix: 363146362
Test: atest PeriodicJobReceiverTest
Flag: EXEMPT bug fix
Change-Id: If62ed640d25a3ebb3ab1ac0929e8075a2008f4cf
2024-08-30 14:29:48 +08:00
mxyyiyi
5a9c00e63e Add log for fetch data from BatteryStatsManager.
Bug: 362177550
Bug: 357978626
Test: manual
Flag: EXEMPT bug fix
Change-Id: Iec6e7ccb871cc34d5ab3d2c8d8414edef0118024
2024-08-30 14:13:22 +08:00
Bill Yi
f5e3823452 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: If4cd1ea1aa66e201f364d30e508d797469cac285
2024-08-29 22:24:44 -07:00
Bill Yi
1a2dfb2c8b Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I11b453d82ca14af9e94ed50cb334c9bdc97bd571
2024-08-29 22:22:47 -07:00
Chaohui Wang
c72c540ab6 Merge "Clean up InternetPreferenceController" into main 2024-08-30 03:29:56 +00:00
Chaohui Wang
5b4748919a Use simSpecificCarrierId for new apn
Currently in TelephonyProvider, it uses tm.getSimSpecificCarrierId() to
get the specific carrier id to retrieve the apns, update Settings to
match.

Fix: 360917123
Flag: EXEMPT bug fix
Test: manual - new apn
Test: atest ApnRepositoryTest
Change-Id: I982e0026acdf34ccec7508c41f83718894f7da57
2024-08-30 11:16:34 +08:00
Chris Antol
0e1d5fdce4 Merge "Only check INTERACT_ACROSS_USERS_FULL when user handle is not current" into main 2024-08-30 01:10:54 +00:00
Chun-Ku Lin
f4be805b6d Use the correct package name for DevelopmentMemtagFooterPreferenceController
The package name doesn't match the one used in
development_memtag_page.xml. This would result in the controller can't
be found when the DashboardFragment trying to instantiate the controller
defined in xml.

Bug: 245624194
Flag: EXEMPT low risk bugfix
Test: Examing the log and verify there is no "Cannot instantiate controller
from reflection" for DevelopmentMemtagFooterPreferenceController

Change-Id: I63ba96d587525c08cf1409883e2bd09bc85bfc41
2024-08-30 00:28:04 +00:00
Android Build Coastguard Worker
92ee44acff Snap for 12296955 from 4f8e95fb57 to 24Q4-release
Change-Id: If544eda285f37211f6c0d9cb78b35c4ae09f2594
2024-08-29 23:18:52 +00:00
Chun-Ku Lin
d077ca6dd9 Pass null looper if the looper is not prepared in the calling thread
**Root cause**
The PreferenceController can be constructed by the
SettingsSearchIndexablesProvider where the looper of the thread is not
prepared. This result in not able to construct the PreferenceController
that will be used as part of the SettingsSearch.

Currently, if the SettingsSearchIndexablesProvider is not able to
construct the PreferenceController defined in xml, it would just
silently failed.

Test: atest SettingsUnitTests
Test: atest SettingsRoboTests

Flag: EXEMPT low risk bugfix
Bug: 352622249
Change-Id: I72a4ce24ec6842b9efe067e3cb7d1c73cd98a566
2024-08-29 23:02:34 +00:00
Treehugger Robot
e6aaa5c87b Merge "Make ZenIconLoader injectable (in SystemUI)" into main 2024-08-29 22:59:49 +00:00
Treehugger Robot
6faaf80204 Merge "Allow Watch Unlock to exit back to Device Unlock settings." into main 2024-08-29 21:00:16 +00:00
Chris Antol
78ee160c20 Only check INTERACT_ACROSS_USERS_FULL when user handle is not current
Bug: 326057017
Change-Id: I83ab4461f28e7f40c676099213c840a1a7dc932a
Test: atest; open app info pages from both primary and secondary profile -> verify they open as expected
Flag: EXEMPT bug fix
2024-08-29 19:53:08 +00:00
Fan Wu
20024f00a5 Checks cross user permission before handling intent
Bug: 326057017

Test: atest

Flag: EXEMPT bug fix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d3b3edd45167515579ab156533754e56ac813f35)
Merged-In: I3444e55b22b7487f96b0e3e9deb3f844c4c4723a
Change-Id: I3444e55b22b7487f96b0e3e9deb3f844c4c4723a
2024-08-29 17:38:33 +00:00
Fan Wu
ff4daf4bf4 Checks cross user permission before handling intent
Bug: 326057017

Test: atest

Flag: EXEMPT bug fix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d3b3edd45167515579ab156533754e56ac813f35)
Merged-In: I3444e55b22b7487f96b0e3e9deb3f844c4c4723a
Change-Id: I3444e55b22b7487f96b0e3e9deb3f844c4c4723a
2024-08-29 17:38:13 +00:00
Fan Wu
c24808f9b6 Checks cross user permission before handling intent
Bug: 326057017

Test: atest

Flag: EXEMPT bug fix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d3b3edd45167515579ab156533754e56ac813f35)
Merged-In: I3444e55b22b7487f96b0e3e9deb3f844c4c4723a
Change-Id: I3444e55b22b7487f96b0e3e9deb3f844c4c4723a
2024-08-29 17:37:49 +00:00
Fan Wu
964908bc14 Checks cross user permission before handling intent
Bug: 326057017

Test: atest

Flag: EXEMPT bug fix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d3b3edd45167515579ab156533754e56ac813f35)
Merged-In: I3444e55b22b7487f96b0e3e9deb3f844c4c4723a
Change-Id: I3444e55b22b7487f96b0e3e9deb3f844c4c4723a
2024-08-29 17:37:08 +00:00
Fan Wu
39836d6c2c Checks cross user permission before handling intent
Bug: 326057017

Test: atest

Flag: EXEMPT bug fix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d3b3edd45167515579ab156533754e56ac813f35)
Merged-In: I3444e55b22b7487f96b0e3e9deb3f844c4c4723a
Change-Id: I3444e55b22b7487f96b0e3e9deb3f844c4c4723a
2024-08-29 17:36:39 +00:00
Fan Wu
7d2552bf93 RESTRICT AUTOMERGE Checks cross user permission before handling intent
Bug: 326057017

Test: atest

Flag: EXEMPT bug fix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d3b3edd45167515579ab156533754e56ac813f35)
Merged-In: I3444e55b22b7487f96b0e3e9deb3f844c4c4723a
Change-Id: I3444e55b22b7487f96b0e3e9deb3f844c4c4723a
2024-08-29 17:35:06 +00:00
Fan Wu
0c72cfad1e RESTRICT AUTOMERGE Checks cross user permission before handling intent
Bug: 326057017

Test: atest

Flag: EXEMPT bug fix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d3b3edd45167515579ab156533754e56ac813f35)
Merged-In: I3444e55b22b7487f96b0e3e9deb3f844c4c4723a
Change-Id: I3444e55b22b7487f96b0e3e9deb3f844c4c4723a
2024-08-29 17:34:22 +00:00
Pavel Grafov
93c566ef5b Clean up fully rolled out HeadlessSingleUserFixes
Flag was rolled out in Android V.

Bug: 335663055
Test: TH
Flag: EXEMPT flag cleanup
Change-Id: I7de1f400d03662b690f4a77a379994985797a3fe
2024-08-29 17:04:36 +01:00