Commit Graph

142371 Commits

Author SHA1 Message Date
Yiling Chuang
eae022088f RESTRICT AUTOMERGE FRP bypass defense in App battery usage page am: 23b88e0724
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/28550763

Change-Id: Ic394804c1f515b4e9a3fd4fae3df77c8d27b116a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-02 17:01:14 +00:00
Yiling Chuang
5fc9c5c21f RESTRICT AUTOMERGE FRP bypass defense in App battery usage page am: 23b88e0724
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/28550763

Change-Id: I164a16363045bf8ac2bd1a7ce2b77a45812351a7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-02 17:01:06 +00:00
Matías Hernández
0721f5c5b2 Replace direct usage of update origin by TestModeBuilder.setEnabled() overload
Bug: 333527800
Test: atest ZenModesListItemPreferenceTest
Flag: android.app.modes_ui
Change-Id: Ice6144b8a15641703495d18b57f5b56cda91e92a
2024-08-02 19:01:04 +02:00
Yiling Chuang
280948fb1c [automerger skipped] RESTRICT AUTOMERGE FRP bypass defense in App battery usage page am: 3c2a216bbb -s ours am: b0ecfd2b86 -s ours
am skip reason: contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/28559202

Change-Id: I0b5537d0d7a7e20ee181b1a4d3b9187ef37c2640
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-02 17:00:58 +00:00
Yiling Chuang
b3f4ad63ea [automerger skipped] RESTRICT AUTOMERGE FRP bypass defense in App battery usage page am: c9d2588c69 -s ours
am skip reason: contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/28550762

Change-Id: I867bf55f8636c7daf1e5431769e0c3ee5266b9c9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-02 17:00:38 +00:00
Yiling Chuang
b0ecfd2b86 [automerger skipped] RESTRICT AUTOMERGE FRP bypass defense in App battery usage page am: 3c2a216bbb -s ours
am skip reason: contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/28559202

Change-Id: I6165b67d64c40cd44a49aae95f87524f7dbb0228
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-02 17:00:37 +00:00
Matías Hernández
7a1039fea4 Merge "Overhaul the message senders screen" into main 2024-08-02 12:43:31 +00:00
Allen Su
4bdb1dbcce Merge "Expand ToA language support" into main 2024-08-02 10:48:30 +00:00
Matías Hernández
a4c99767b7 Overhaul the message senders screen
* Fix combinations of messages=all with other conversation values.
* Correctly display policies with CONVERSATION_SENDERS_ANYONE. An additional checkbox is included, but _only_ if the policy has CONVERSATION_SENDERS_ANYONE when shown.
* Changed updateState() to consider the possible cases one by one. Because multiple policies are mapped to the same checkbox states, the strategy of "checking whether the state matches what the checkbox wants to set" doesn't really work.
* Fix messages summary and circles to support CONVERSATION_SENDERS_ANYONE.
* Added a lot of tests (actually, hopefully ALL OF THEM) covering the user-visible behavior. :)

Fixes: 354658240
Test: atest ZenModesSummaryHelperTest ZenModePrioritySendersPreferenceControllerTest
Flag: android.app.modes_ui
Change-Id: I727496ca3eb820e4baaab942b61d2e57cdb491fc
2024-08-02 12:36:44 +02:00
josephpv
af87233e1e Show different error screen for PS creation based on error
This contains the change to show a different fragment on private space
creation error based on the error code returned by UserManager.
On private space create error checks for the returned error code and if
PS is not supported on the device showns error screen containing a link to Help
Center atricle to find out more about the reason for profile creation
failure.

ACTION_PRIVATE_SPACE_SETUP_SPACE_ERRORS metric is logged with the error
code on create error else 0 on sucessful space creation.

Recording: b/340130375#comment17

Bug: 340130375
Test: Manual
Flag: android.multiuser.show_different_creation_error_for_unsupported_devices
Change-Id: Ifa0345fb6aad64599009f8aa79d168f57fd35c03
2024-08-02 10:03:12 +00:00
Allen Su
a60a38dd39 Expand ToA language support
Flag: EXEMPT resource only update
Bug: 328697623
Test: manual
Change-Id: Icbc0c986508065a4daf15e9354e0aa4283315fa9
2024-08-02 09:37:45 +00:00
Angela Wang
a8297a313b Fix LE Audio toggle missing issue for dual mode hearing device
After the code change of ag/28283226, they hide the LE Audio toggle for
LE Audio only device since turning off the profile may cause this device
no functioning. But the dual mode hearing devices(LE Audio + Asha) are
wrongly recognized as LE Audio only devices since
HearingAidProfile.accessProfileEnabled() return false. This make the
users lost the ability to switch between profiles they preferred.

Make HearingAidProfile.accessProfileEnabled() return true and hide the
Hearing Aid toggle by default since it's also meaningless to turn off
the Asha profile for Asha-only devices.

Flag: com.android.settingslib.flags.asha_profile_access_profile_enabled_true
Bug: 356530795
Test: manual checking the UI
Test: atest BluetoothDetailsProfilesControllerTest
Change-Id: Ica350b4c16c1b07945399bfee1038f7b0824baed
2024-08-02 07:11:25 +00:00
Chaohui Wang
a7c152816d Speed up BasePreferenceController.updateNonIndexableKeys
By avoid unnecessary calls to getAvailabilityStatus(), which also avoid
unnecessary crash potential.
- When key already marked searchable="false" in xml, no need to check
  getAvailabilityStatus() again.
- When getAvailabilityStatus() return AVAILABLE, no need to call it
  again to check it not equals to AVAILABLE_UNSEARCHABLE.

Bug: 352455031
Flag: EXEMPT refactor
Test: redo search index - by changing locale
Change-Id: Ic0c43b9bcd5974907b3a7d4aba73d4c7203f8af4
2024-08-02 13:35:42 +08:00
Yiyi Shen
7edad1c84a [Audiosharing] Returns BluetoothDevice when fetchConnectedDevicesByGroupId
CachedBluetoothDevice can change its member variable mDevice, so we can
not rely on the CachedBluetoothDevice#getDevice when we add source to
it. This change will return BluetoothDevice instead of
CachedBluetoothDevice when fetchConnectedDevicesByGroupId, so that we
won't add source to unintended BluetoothDevice via
CachedBluetoothDevice#getDevice.

Fix: 350877510
Test: atest
Flag: com.android.settingslib.flags.enable_le_audio_sharing
Change-Id: I4ee41b8f1449e7176f0a05a7dd4e59034c161824
2024-08-02 05:20:31 +00:00
Chaohui Wang
c311354d10 Show uncheck toggle when wep not supported
When wep not supported, wep is always not allowed, so we should show
unchecked toggle for "Allow WEP networks"

Bug: 356326814
Flag: EXEMPT bug fix
Test: manual - on Network preferences
Test: atest WepNetworksPreferenceControllerTest
Change-Id: I408434fbbf48e1010710ecf3bf9f7988e521b076
2024-08-02 11:43:20 +08:00
Treehugger Robot
b6e0cd99c1 Merge "Add whether app optimization mode mutable in BatteryUsageDiff proto." into main 2024-08-02 03:36:39 +00:00
mxyyiyi
59e5dc720a Add whether app optimization mode mutable in BatteryUsageDiff proto.
Bug: 350657779
Test: atest ConvertUtilsTest
Flag: EXEMPT bug fix
Change-Id: I80a5e6513e1bee88f85caeed7661b10204df8a51
2024-08-02 10:41:24 +08:00
Yuri Lin
cb824ccbd9 Resize & round corners on a placeholder interstitial image
This isn't a real image yet (just draws a diagonal gradient), but should now be roughly ready for inserting the correct drawables based on the mode whenever those are available.

Bug: 332730534
Test: manual, SetupInterstitialActivityTest
Flag: android.app.modes_ui
Change-Id: I45a78950f671a989258a85525a7a8ee0c445a332
2024-08-01 18:44:27 -04:00
Yuri Lin
65548c0e56 Add interstitial for modes that are disabled but not by user
This covers both the case of navigating to the mode page through the mode aggregator menu as well as if an app sends an intent to go to the mode.

The interstitial visuals are not done yet; in particular, the image is just a gray box for now.

Manual tests done:
- visually verifying the interstitial page in both portrait and landscape
- accessing the mode page from modes list, confirming interstitial pops up
- accessing enabled and disabled-by-user mode page from modes list (no interstitial)
- getting to the mode page from intent through an app
- accessing enabled and disabled-by-user mode pages from app intent (no interstitial)
- adjusted display and font size (it looks bad with max display & font size, maybe not much to be done)

Bug: 332730534
Test: manual, ZenModeFragmentTest, SetupInterstitialActivityTest
Flag: android.app.modes_ui
Change-Id: I21f13b0842d5b118a341f7d85e8fcac947ca3a06
2024-08-01 18:44:22 -04:00
Chun-Ku Lin
5460a244be Don't truncate the title in Color Correction options
By default, the SelectorWithWidgetPreference hard coded the maxlines of
the title to be 2 lines. Updating the SelectorWithWidgetPreference to
accept changes on maxlines on title.

Set titleMaxLines as 2147483647 (Integer.MAX_VALUE) as there is no
alternative to clear the maxLines that are already set by the Preference

Bug: 356726764
Test: manually tested the color correction screen in Deutsch
Test: verify the Wifi Hotspot sceurity screen is not affected by this
change (still have 2 as the max lines of the title)
Flag: EXEMPT resource only

Change-Id: I1414b6212b75d3f28bef6aad50a31ea7861d5811
2024-08-01 22:33:11 +00:00
Abdelrahman Awadalla
f2d6fe9e32 Add "Touchpad visualizer" to input developer options
Bug: 286551975
Bug: 350039816
Test: atest TouchpadVisualizerPreferenceControllerTest
Test: Manual testing using
      $ adb shell settings get system touchpad_visualizer
Flag: com.android.hardware.input.touchpad_visualizer

Change-Id: Ic5de704c49aabf1a80d202aa890055f7337d45d4
2024-08-01 13:34:32 +00:00
Chaohui Wang
09fb13fd1c Merge "Settings search for Vo5G" into main 2024-08-01 07:19:08 +00:00
Chelsea Hao
09f62d72d2 Merge changes Id0882547,I427e08a3 into main
* changes:
  [Audiosharing] Change text color.
  [Audiosharing] When user enters a bad code, apply error color on summary.
2024-08-01 05:50:04 +00:00
Tom Hsu
d26c804af1 Merge "[Settings]Check the Satellite modem state instead of enabled state only." into main 2024-08-01 05:27:06 +00:00
chelseahao
cd6f77d432 [Audiosharing] Change text color.
Bug: 356080864
Flag: com.android.settingslib.flags.enable_le_audio_sharing
Test: atest
Change-Id: Id0882547343cb63149f8a9335b023e9f50649e07
2024-08-01 04:25:43 +00:00
chelseahao
e85e1c823a [Audiosharing] When user enters a bad code, apply error color on summary.
Bug: 356071392
Flag: com.android.settingslib.flags.enable_le_audio_sharing
Test: atest
Change-Id: I427e08a3cce8d0e85f29f821d9b779acc95217b1
2024-08-01 04:25:21 +00:00
tomhsu
90553d91f1 [Settings]Check the Satellite modem state instead of enabled state only.
Flag: EXEMPT bugfix
Fix: 354806125
Test: Manual test pass
Change-Id: Iaa8d1c9d3df36e40fafda0117234036d9451a4fa
2024-08-01 03:38:48 +00:00
Yiyi Shen
12469371b4 Merge "[Audiosharing] Not announce enable/disable when toggle main switch" into main 2024-08-01 03:05:58 +00:00
Chun-Ku Lin
b656d7b2c4 Merge "Update color correction red-green options text" into main 2024-08-01 01:43:07 +00:00
Chun-Ku Lin
a5636c1cb9 Update color correction red-green options text
Bug: 354776203
Test: manually (see screenshots in the ticket)
Flag: EXEMPT resource only update
Change-Id: Iffda7f965e046ef5c6493ac5f9eb410e4db96790
2024-07-31 19:51:42 +00:00
Chun-Ku Lin
1c3cc5bedd Merge "Physical keyboard related options shouldn't be searchable when invisible" into main 2024-07-31 19:09:06 +00:00
Chun-Ku Lin
767f58785a Physical keyboard related options shouldn't be searchable when invisible
Physical keyboard options category is hidden when there is no hardware
keyboard. It's related preferences are hidden in this case. Hence those
preferences shouldn't be searchable.

Bug: 351047456
Test: manually search "bounce keys", "sticky keys" and "slow keys",
they're not searchable when invisible on Accessibility page
Test: atest
Flag: com.android.settings.accessibility.fix_a11y_settings_search

Change-Id: I1eb465dd34e59d856bb1fa7c06bc253971a8c8d0
2024-07-31 18:04:55 +00:00
Treehugger Robot
e79de39723 Merge "Revert^2 "Tweak Modes layouts and use updated strings to match mocks"" into main 2024-07-31 17:35:10 +00:00
Diya Bera
bc915e7bdc Merge "Add mandatory biometric prompt to platform surfaces (4/N)" into main 2024-07-31 17:06:14 +00:00
Matías Hernández
4222bed264 Revert^2 "Tweak Modes layouts and use updated strings to match mocks"
This reverts commit 9804955ad5.

Reason for revert: Wrongly reverted; unrelated to the error

Change-Id: I94a2b05589fa80218db184e192f1c4a633ab61b0
2024-07-31 15:45:11 +00:00
ELIYAZ MOMIN
39a56459a5 Merge "Revert "Tweak Modes layouts and use updated strings to match mocks"" into main 2024-07-31 15:40:04 +00:00
Tetiana Meronyk
593f96a559 Merge "Fix toggle when no_user_switch is applied without EnforcedAdmin" into main 2024-07-31 15:11:42 +00:00
Matías Hernández
ff2d85a6fe Merge "Add new icons to the Modes icon picker" into main 2024-07-31 15:06:19 +00:00
ELIYAZ MOMIN
9804955ad5 Revert "Tweak Modes layouts and use updated strings to match mocks"
This reverts commit 0359aaeb47.

Reason for revert: <Potential culprit for b/356564046  - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.>

Change-Id: I980838773078d822d20608e5975a26cf8dbed2be
2024-07-31 14:56:30 +00:00
Tetiana Meronyk
061669815a Fix toggle when no_user_switch is applied without EnforcedAdmin
If EnforcedAdmin is null, calling setDisabledByEnforcedAdmin does not disable the setting. So if this restriction was applied by a source different than admin, the toggle was still active for users to change (even non-main).

After this change, the restriction is correctly processed both when it is applied by admin or by some other source.

Bug: 356387759
Test: atest MultiUserSwitchBarControllerTest
Flag: android.multiuser.fix_disabling_of_mu_toggle_when_restriction_applied
Change-Id: I5d38e250359ccbee67ac747f1d8a0a2143f4c216
2024-07-31 13:55:10 +00:00
Matías Hernández
0b7a22210a Add new icons to the Modes icon picker
Bug: 333901673
Test: atest IconOptionsProviderImplTest
Flag: android.app.modes_ui
Change-Id: I6fa15fa12238eb9c0d1b93803010349b9092812b
2024-07-31 14:12:37 +02:00
Edgar Wang
790fad6df0 Merge "Use SwitchPreferenceCompat instead of SwitchPreference" into main 2024-07-31 12:10:21 +00:00
Yiyi Shen
124a9e1ebd [Audiosharing] Not announce enable/disable when toggle main switch
Fix: 356318679
Test: atest
Flag: com.android.settingslib.flags.enable_le_audio_sharing
Change-Id: I3331f9ded48352f442712287a6b536da883fe73d
2024-07-31 18:56:33 +08:00
Oli Thompson
3554f45f7b Merge "Fix UnsupportedOperationException from immutable set" into main 2024-07-31 10:35:22 +00:00
Chaohui Wang
874c818b31 Settings search for Vo5G
Also adding keywords support to MobileNetworkSettingsSearchItem.

Fix: 262684662
Flag: EXEMPT bug fix
Test: manual - search vo5g
Change-Id: Ic73b76a2a7b2ef238b167fe3673835298d8939fd
2024-07-31 17:47:21 +08:00
Matías Hernández
d21dec33d1 Merge "Fix Zen tests that were failing with modes_ui enabled" into main 2024-07-31 09:21:04 +00:00
Chaohui Wang
b7f68b4a60 Merge changes from topic "MobileNetworkSettingsSearchIndex" into main
* changes:
  Fix search for MMS Message
  Show category when search "Mobile data"
2024-07-31 09:07:20 +00:00
Chaohui Wang
d8db9fa466 Merge "Improve the robustness of updateNonIndexableKeys" into main 2024-07-31 09:06:53 +00:00
Yiling Chuang
6ccef63fce RESTRICT AUTOMERGE FRP bypass defense in App battery usage page
Before the setup flow completion, don't allow the app info page in App battery usage to be launched.

Bug: 327748846
Test: atest SettingsRoboTests + manual test
- factory reset + launch app battery usage app info via ADB during Setup -> verify app closes
Flag : EXEMPT bugfix

Change-Id: I486820ca2afecc02729a56a3c531fb931c1907d0
Merged-In: I486820ca2afecc02729a56a3c531fb931c1907d0
(cherry picked from commit 419a6a9079)
2024-07-31 07:38:39 +00:00
Yiling Chuang
2659f8416c RESTRICT AUTOMERGE FRP bypass defense in App battery usage page
Before the setup flow completion, don't allow the app info page in App battery usage to be launched.

Bug: 327748846
Test: atest SettingsRoboTests + manual test
- factory reset + launch app battery usage app info via ADB during Setup -> verify app closes
Flag : EXEMPT bugfix

Change-Id: I486820ca2afecc02729a56a3c531fb931c1907d0
Merged-In: I486820ca2afecc02729a56a3c531fb931c1907d0
(cherry picked from commit 419a6a9079)
2024-07-31 07:36:04 +00:00