Commit Graph

18081 Commits

Author SHA1 Message Date
Pajace Chen
ab697ce33f Merge "[Bugfix] Fix the failed test case" into main 2024-07-30 02:43:19 +00:00
pajacechen
a9eb7c90dd [Bugfix] Fix the failed test case
Fix the failed test case that missed from ag/28495857

Test: Unit Test
Fix: 348563863
Fix: 356152111
Flag: EXEMPT bug fix
Change-Id: I852da018c6967c6ca13e3aea72290a2d6be8bfdd
2024-07-30 10:10:35 +08:00
Matías Hernández
149bd0a5a4 Merge "Improve lifecycle of ZenModeFragment & friends" into main 2024-07-29 20:28:55 +00:00
Matías Hernández
b8b897e552 Improve lifecycle of ZenModeFragment & friends
* Don't keep Settings observers longer than start-stop.
* Only call updateState() once on controllers during create->start->resume.
* Remove some duplicate controller update methods from ZenModesFragmentBase (we can directly call DashboardFragment's).
* Don't update controllers if unrelated modes were changed.
* Extract ZenSettingsObserver for use in the link tile later.
* Add tests.

Fixes: 353946788
Test: atest com.android.settings.notification.modes
Flag: android.app.modes_ui
Change-Id: I64b51714d699b5c3a592a76fcb615d2999998829
2024-07-29 20:10:03 +02:00
Alina Zaidi
441a202444 Merge "[dev_option] Update 'Desktop mode on secondary toggle' to be 'Freeform windows on secondary diplay'." into main 2024-07-29 17:49:54 +00:00
Diya Bera
c5e36291ab Merge "Hide background when identity check auth is requested" into main 2024-07-29 16:57:35 +00:00
Matías Hernández
e19b8743c8 Merge changes from topic "fix-weird-animation" into main
* changes:
  Fix jiggle when opening custom manual modes
  Allow turning off currently active modes
2024-07-26 20:58:15 +00:00
Chun-Ku Lin
75db151f96 Merge "[Flag cleanup] edit_shortcuts_in_full_screen is always on now" into main 2024-07-26 17:46:52 +00:00
Matías Hernández
e8306014f0 Fix jiggle when opening custom manual modes
Looks like setting Preference visibility in updateState() is too late to avoid an animation, and isAvailable() should be used instead. This forces us to split ZenModeSetTriggerLinkPreferenceController (which handled the category and its two children) into separate controllers for the category and each child. Although untangling this code was annoying, the result is arguably cleaner, since the two child preferences deal with different things.

Fixes: 355623101
Test: atest com.android.settings.notification.modes
Flag: android.app.modes_ui
Change-Id: I5fb1b3cbe424973b852f820ecf948491c050421f
2024-07-26 17:44:53 +00:00
Treehugger Robot
c9433c2d52 Merge "Sync settingslib/datastore library" into main 2024-07-26 17:36:14 +00:00
Alina Zaidi
e85695f88c [dev_option] Update 'Desktop mode on secondary toggle' to be
'Freeform windows on secondary diplay'.

Make sure the toggles enables freeform support on devices. This remove
reliance on 'Enable freeform windows suppport' toggle when using this
toggle.

Also update strings for all toggles to just use term 'freeform windows'
instead of 'desktop mode' or 'freeform windowing experiences'.

Two toggles have the same name 'enable freeform windows', but users will
see only one of them at a time.

Test: Added new tests
Bug: 348193756
Bug: 348186127
Flag: EXEMPT minor change
Change-Id: Ic4528618e6902d084c58a6b5ddeb4b92d63386d6
2024-07-26 13:33:23 +00:00
Matías Hernández
69ce43462e Allow turning off currently active modes
Even if they don't allow manual invocation. The button will disappear afterwards -- maybe not perfect but good enough.

Fixes: 355613076
Test: atest ZenModeButtonPreferenceControllerTest
Flag: android.app.modes_ui
Change-Id: I36cc96f7da78266be1a03e947304fc8e600899de
2024-07-26 14:47:07 +02:00
Jacky Wang
5164cd8cbd Sync settingslib/datastore library
Bug: 325144964
Test: atest SettingsRoboTests:BatteryOptimizeUtilsTest
Flag: EXEMPT sync library source code
Change-Id: I3d980f1d36e9fce7633df23107fae612bc028b5e
2024-07-26 19:40:50 +08:00
Chun-Ku Lin
919019ca56 [Flag cleanup] edit_shortcuts_in_full_screen is always on now
- Cleaned up the code that won't be executed when the flag is on
- Remove unused resources

Bug: 300302098
Test: Manually verify the user can change the shortcut type, and the
changes are saved
Test: atest com.android.settings.accessibility
Flag: EXEMPT removing com.android.settings.accessibility.edit_shortcuts_in_full_screen

Change-Id: I1e32b724ca3da909feda55e20fb1d51dc4680c09
2024-07-25 22:49:02 +00:00
Matías Hernández
e6198dea95 Merge changes Ibd89a826,I7e788b9b into main
* changes:
  Fixes to CircularIconsPreference & friends
  Update top of modes page
2024-07-25 22:03:15 +00:00
Matías Hernández
d0fc102275 Fixes to CircularIconsPreference & friends
Fixed view reuse. The views obtained from the ViewHolder should not be stored in Preference fields, since they can be rebound and thus a Preference can end up updating the wrong view.

Also added equivalence to the item class in the People segment so there is no flicker when the mode is reloaded.

Fixes: 346551087
Test: atest com.android.settings.notification.modes
Flag: android.app.modes_ui
Change-Id: Ibd89a826b19acabd9a46bb3ba2916453689636ed
2024-07-25 20:33:16 +00:00
Diya Bera
31ec11f0b6 Hide background when identity check auth is requested
Flag: android.hardware.biometrics.flags.mandatory_biometrics
Fixes: 354014097
Test: atest UtilsTest
Change-Id: I3af06fd9dca2bdc306496f1db832e1d1e2bfe8d2
2024-07-25 17:00:05 +00:00
Quang Luong
2f257a1982 Merge "Fix mac randomization value mismatch" into main 2024-07-25 10:45:54 +00:00
Tom Hsu
e7f0d6c688 Merge "Fix crash if trying to erase the FRP data." into main 2024-07-25 08:57:25 +00:00
tomhsu
fbb56c4d1c Fix crash if trying to erase the FRP data.
- Once factory reset protection is on, user data shall not be erased.

Flag: EXEMPT bug fix
Fix: 345587437
Test: Manual test passed
Test: atest passed
Change-Id: I9506224cae7ba12c4181f2b2c676e5eb8ec27431
2024-07-25 07:21:24 +00:00
Matías Hernández
92e46317d2 Merge "Disable all preferences (except toggle) when a mode is disabled" into main 2024-07-24 22:56:40 +00:00
Matías Hernández
38aaa27625 Disable all preferences (except toggle) when a mode is disabled
Also set some alpha on the circles so that they look more or less disabled as well.

Fixes: 354867828
Test: atest com.android.settings.notification.modes
Flag: android.app.modes_ui
Change-Id: I53ef5e381d37afa20b0532f3c7ddb3f106b2e85e
2024-07-24 17:57:10 +02:00
Pat Manning
2649a7bf56 Merge "Log metrics for pointer icon settings changes." into main 2024-07-24 15:05:57 +00:00
Treehugger Robot
28323b908f Merge "Clear cache data to recalculate usage slot after receiving timezone change intent." into main 2024-07-24 13:22:30 +00:00
Matías Hernández
5eb776adef Merge "Show confirmation dialogs when enabling or disabling a mode" into main 2024-07-24 12:33:56 +00:00
Matías Hernández
77191e9519 Show confirmation dialogs when enabling or disabling a mode
(Strings are not final, but structure is there).

Bug: 349376785
Test: atest ZenModeSetTriggerLinkPreferenceControllerTest
Flag: android.app.modes_ui
Change-Id: Ia9e604483b90bc30ad1c12e5663a07e251084073
2024-07-24 13:14:41 +02:00
mxyyiyi
9933688333 Clear cache data to recalculate usage slot after receiving timezone change intent.
- Clear usage slot & even hour calculate event.

Bug: 355084572
Test: atest BootBroadcastReceiverTest
Test: atest BatteryEventDaoTest
Flag: EXEMPT bug fix
Change-Id: I0bc8b71219ce8cea3987a7bfc39b69e0c6047e3d
2024-07-24 18:02:00 +08:00
Yuchen Sun
ed3594fe61 Merge "Clean up preference_summary_default_combination in Settings." into main 2024-07-24 04:29:03 +00:00
Yuchen
48f304a23f Clean up preference_summary_default_combination in Settings.
Test: Existing tests passed
Flag: EXEMPT clean up
Bug: 328519240
Change-Id: I86996c43243b7a8e2d4b1a83180c189986b3a6ca
2024-07-24 02:36:09 +00:00
Matías Hernández
6a5e7b9631 Merge "Changes to the trigger segment" into main 2024-07-23 20:02:56 +00:00
Daniel Norman
914643da7d Merge "Checks that prebundled categories contain only preinstalled contents." into main 2024-07-23 19:14:59 +00:00
Matías Hernández
9e2ac046e4 Changes to the trigger segment
* Switch is always visible, even without a configuration activity
* Custom icon, title, and summary for some mode types (such as SCHEDULE_TIME, etc).
* Default texts in case of missing trigger description.
* Different icons for having/missing configuration activity.
* Move the section to the top of the screen.

Bug: 349376785
Test: atest ZenModeTriggerLinkPreferenceControllerTest
Flag: android.app.modes_ui
Change-Id: I960318899cf4da20ffc5765818429d5790d05067
2024-07-23 18:14:34 +02:00
YK Hung
ba11a4246a Merge "Ignore broadcast intent from additional profile." into main 2024-07-23 15:35:46 +00:00
mxyyiyi
d4965bd5cc Ignore broadcast intent from additional profile.
- Use isAdditionalProfile() to ignore intent from either work or private profile.

Bug: 354828134
Test: atest SettingsRoboTests:com.android.settings.fuelgauge.batteryusage
Flag: EXEMPT bug fix
Change-Id: Ic0c91d956e4bfcd53576629efab4be847c94155e
2024-07-23 19:31:05 +08:00
Treehugger Robot
b761f43fd2 Merge "Add mandatory biometric prompt to platform surfaces (3/N)" into main 2024-07-23 05:20:19 +00:00
Diya Bera
9bae71c15c Add mandatory biometric prompt to platform surfaces (3/N)
Pass user ids for identity check. This is to make sure that the right
user is requested auth for different profiles.

Flag: android.hardware.biometrics.Flags.MANDATORY_BIOMETRICS
Bug: 339910718
Test: atest UtilsTest
Change-Id: I953b56e9bfd1edd49d080124905d42a23247b7a7
2024-07-23 04:07:08 +00:00
Chelsea Hao
7a01fb2679 Merge changes Ibb68252c,Ide20e07f,I5d2e2c70 into main
* changes:
  Add accessibility label for "QR code" scanner. Also added landscape mode.
  Add accessibility label for "QR code" image. Also added landscape mode.
  Add accessibility label for "QR code" button in Audio sharing page.
2024-07-23 02:52:11 +00:00
Ram Peri
34152fae41 Merge "Robolectric upgrade" into main am: 71b2be5571 am: 119d1e9f43
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/3185301

Change-Id: Ide8c2fe010260f3ae172c0b2537d6d879212b333
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-23 01:25:50 +00:00
Ram Peri
119d1e9f43 Merge "Robolectric upgrade" into main am: 71b2be5571
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/3185301

Change-Id: I9469f534e375c589f0a7dbac20f185f61ae69295
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-23 01:08:54 +00:00
Pajace Chen
7ec1355922 Merge "[BugFix] Fix the incorrect state for dockdefend on battery settings page" into main 2024-07-23 00:37:13 +00:00
Isaac Chai
8b1135e1c9 Merge "feat(color correction): Disable slider when not applicable" into main 2024-07-22 22:43:39 +00:00
Daniel Norman
20d2eabe35 Checks that prebundled categories contain only preinstalled contents.
Bug: 353888087
Test: atest AccessibilitySettingsTest
Test: manually check all prebundled services are still in their proper
      groups, even after installing an APK update
Flag: com.android.settings.accessibility.check_prebundled_is_preinstalled
Change-Id: I023db9c37d7990deb50c9eec516619f0a8db65b7
2024-07-22 21:42:59 +00:00
Isaac Chai
581fbc8dfa feat(color correction): Disable slider when not applicable
We received feedback that slider should be disabled when it's not
applicable, namely when it's off and when mode == gray scale.

Bug: 351920992
Test: Locally tested + unit tests
Flag: com.android.server.accessibility.enable_color_correction_saturation

Change-Id: I1162a501a797a1d2b30da76f0c75e5fdea3f61d2
2024-07-22 21:09:54 +00:00
Treehugger Robot
0dcf3ff102 Merge "[Dev options] Conditionally show Freeform toggle: Only display when freeform is NOT available by default on the device." into main 2024-07-22 20:34:19 +00:00
Alina Zaidi
9609216cb5 [Dev options] Conditionally show Freeform toggle: Only display when freeform is NOT available by default on the device.
Previously Freeform Toggle was a no-op when freeform was by default available on devices

On the other hand Desktop mode toggle is displayed only when freeform IS available by default on the device. (This is because desktop mode support is tied to devices with default freeform capability.)

Also update toggle strings for a clearer user experience

Test: Updated tests
Bug: 348193756
Bug: 348186127
Flag: com.android.window.flags.show_desktop_windowing_dev_option
Change-Id: I29e36a939db78010bb3153e756f95bb6c21a31f9
2024-07-22 18:11:14 +00:00
Ram Peri
f5b58ea3be Robolectric upgrade
Test: atest SystemUIGoogleRoboRNGTests
Flag: TEST_ONLY
Change-Id: I833ac67223875480994f947907754290bb25c946
2024-07-22 13:48:09 -04:00
Joshua Mccloskey
bc726eda18 Merge "Refresh templates when fp removal fails" into main 2024-07-22 17:33:15 +00:00
Joshua McCloskey
f624d6adf7 Refresh templates when fp removal fails
Test: atest
Fixes: 339556796
Flag: EXEMPT bugfix
Change-Id: I369e37f170a57bc9ced98f9728d06f2072c01263
2024-07-22 17:33:03 +00:00
Matías Hernández
44c7272733 Final (?) touches to people/apps/sound circles
* Support comparing icon sets with a custom equivalence (needed because AppEntry doesn't implement equals(), and somewhat tricky because CircularIconPreference itself is not generic).
* Use final icons for allowed sounds.
* Use final appearance for +n icon.

Test: atest com.android.settings.notification.modes
Bug: 346551087
Flag: android.app.modes_ui
Change-Id: Iceadf4a182e607111afb72ff36bca872a62ae040
2024-07-22 17:06:38 +02:00
Matías Hernández
d8b9fe8f01 Show icons for allowed contacts
Test: atest com.android.settings.notification.modes
Bug: 346551087
Flag: android.app.modes_ui
Change-Id: If2b6b06b4a9c16bdefb03850ad1615e96c601fbd
2024-07-22 14:20:25 +02:00