Commit Graph

78507 Commits

Author SHA1 Message Date
Xin Li bf5332b378 [automerger skipped] Merge "Merge 24Q3 to AOSP main" into main am: 3b0deb9ab7 -s ours
am skip reason: Merged-In I8474e73e2714ee72633075aeb8de710f19f813fa with SHA-1 9d3826700d is already in history

Original change: https://android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/3255952

Change-Id: I58faef65ab7ed3d9266fc14686e4187de9818e67
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-07 02:33:55 +00:00
Xin Li b028f58a39 [automerger skipped] Merge 24Q3 to AOSP main am: add25e2b81 -s ours
am skip reason: Merged-In I8474e73e2714ee72633075aeb8de710f19f813fa with SHA-1 9d3826700d is already in history

Original change: https://android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/3255952

Change-Id: Ia13fc7d064def9d5125e77a9b2694ded09cce670
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-07 02:33:52 +00:00
Xin Li 3b0deb9ab7 Merge "Merge 24Q3 to AOSP main" into main 2024-09-07 01:12:39 +00:00
Zak Cohen 7493f450f3 WidgetPicker - enable enterprise string cache in standalone activity.
The WidgetPickerActivity wasn't exposing a string cache for enterprise
overrideable strings, meaning that default fallback messages were showing
when the picker was in standalone (not in the launcher) mode.

Bug: 358002534
Test: Manual
Flag: EXEMPT bug fix

Change-Id: I67ccd46370708fb70a3a5233929a9c3b33c312f7
2024-09-06 14:35:20 -07:00
Vinit Nayak 4cfbf6b7e0 Merge "Don't rely on stale DP.isLeftRightSplit for app pair landscape launch" into main 2024-09-06 20:35:25 +00:00
Charlie Anderson 0c44432d06 Add additonal logging around PackageUpdatedTask to detect app updates for User
Bug: 350144057
Flag: EXEMPT just logging
Test: local debugging
Change-Id: I317bee94342ad5022025ec52c992c5eeb906efa5
2024-09-06 15:24:51 -04:00
Treehugger Robot 2334f34cb3 Merge "Add flags for OneGrid project" into main 2024-09-06 19:00:45 +00:00
Treehugger Robot 2dfe33b165 Merge "Fix broken Splitscreen in Overview on orientation change in foldables" into main 2024-09-06 18:13:31 +00:00
Treehugger Robot 9a01a9f584 Merge "Add constant DEFAULT_LPNH_TIMEOUT_MS in client code." into main 2024-09-06 18:08:10 +00:00
Liam Lee Pong Lam c17b7d4464 Merge "Refactor SettingsChangeLoggerTest imports" into main 2024-09-06 17:38:14 +00:00
Alex Chau 4b3da8caea Merge "Set DigitalWellBeingToast to GONE when there is no limit" into main 2024-09-06 17:03:11 +00:00
Ahmed Fakhry d5a4e2e4e2 Fix broken Splitscreen in Overview on orientation change in foldables
We should make sure that only either `topMargin` or a Y translation is
used at a time on an Overview snapshot view to avoid seeing the snapshot
shifted down by an unexpected amount.

Detailed explanation can be found here: https://b.corp.google.com/issues/347143158#comment16

Fixes: 347143158
Test: Manually by following the steps described in the above comment and
      verifying the bug no longer repros.
Flag: EXEMPT bugfix
Change-Id: I699b0ccd9630c10d973fc28abb1228359184929b
2024-09-06 16:09:00 +00:00
Treehugger Robot 255bb6a80c Merge "Improve Task launch logging and function naming" into main 2024-09-06 15:15:50 +00:00
Treehugger Robot e08d6831eb Merge "Adds a timeout for OverviewCommandHelper commands (3/3)" into main 2024-09-06 15:02:25 +00:00
Treehugger Robot 987002bc91 Merge "Fix crash when OverviewCommandHelper queue is cleared before callback response" into main 2024-09-06 14:56:42 +00:00
Alex Chau 98484db4ea Set DigitalWellBeingToast to GONE when there is no limit
- Surprisingly swithcing between GONE and VISIBLE doesn't cause a jank when swiping up
- Having DigitalWellBeingToast GONE should reduce the amount of time to layout RecentsView when there is no banner, which should fix b/364621823
- It might or might not reduce memory usage in b/364568201
- Also add missing accessibiltiy node for DigitalWellBeingToast

Bug: 364621823
Test: Swipe up with the app having DWB banner in different index, no jank when landing to Overivew
Flag: EXEMPT BUG_FIX
Change-Id: Ibf5a7f5318de509fe572779dd774dce71881aabe
2024-09-06 14:26:14 +00:00
Nick Chameyev 11c0ebcd57 Capture Launcher icon positions by reusing UiObject2
Reuse the same UiObject2/HomeAppIcon objects
when capturing Launcher icon positions.

When invoking 'launcher.workspace.allWorkspaceIcons'
we wait for the animation to finish which makes
the test fail as we expect to capture icon positions
midway through the animation.

Test: atest LauncherFoldAnimationTest
Bug: 315163608
Bug: 296991492
Flag: EXEMPT bugfix
Change-Id: I668d15165e4c777b3be24d66ad3f7888eaca2fea
2024-09-06 14:13:36 +00:00
Jordan Silva ad3c422f6c Adds a timeout for OverviewCommandHelper commands (3/3)
We had several bugs in the past months related to recents button not displaying Overview when using 3 button navigation. For some of the bug reports, we noticed the OverviewCommandHelper pending commands list got stuck and stopped processing the next commands in the list. Sometimes, the pending commands list was cleared while some command was being processed, allowing newer commands to be executed while another command is already running. This resulted in the second callback never returning and inconsistent states for OverviewCommandHelper and RecentsView.

Our logs showed OverviewCommandHelper often got stuck and didn't finish the commands correctly.

To mitigate these issues we updated the following behaviors:
- Implemented a timeout to process the commands in the queue. If the callback doesn't return in a given time, it will drop that execution and process the next one in the queue.
- Fix clearPendingCommands to clear only the pending commands from the queue, and not the running command.

Bug: 352046797
Fix: 351122926
Fix: 361768912
Flag: EXEMPT bugfix.
Test: OverviewCommandHelperTest
Change-Id: I47adf0c54dcbaef63d9b72055e000c26114e96e1
2024-09-06 13:58:10 +01:00
Jordan Silva ef1bab89f7 Fix crash when OverviewCommandHelper queue is cleared before callback response
This issue should not happen after b/364860731 fix. The issue happened because the queue was cleared while a command was being processed. Then, onTransitionComplete callback returned and checked if the first item of the queue was the same processed, but the queue was empty.
To prevent future cases of NoSuchElementException, we updated the logic to check the firstOrNull item from the queue.

Fix: 364986456
Bug: 364860731
Flag: EXEMPT bugfix
Test: Manual
Change-Id: Iaa606943db3ff89a7f3012260663c41954d720a7
2024-09-06 12:49:26 +00:00
Alex Chau adccfa9aa6 Add logs around taskStack changes in RecentsView
Bug: 310064698
Test: manual
Flag: EXEMPT REFACTOR
Change-Id: I2334b0203d17fe534c2a715d3233e800036f0a36
2024-09-06 12:47:59 +01:00
Xin Li add25e2b81 Merge 24Q3 to AOSP main
Bug: 357762254
Merged-In: I8474e73e2714ee72633075aeb8de710f19f813fa
Change-Id: Ic2ecb5375ddd3b1f6550f295a0c8607fc01ac1a1
2024-09-05 17:02:56 -07:00
Vinit Nayak ef3207aef2 Don't rely on stale DP.isLeftRightSplit for app pair landscape launch
* If phone auto-rotate is on but launcher rotation is off, if you
launch app pair holding phone horizontally the apps will launch in
landscape but DeviceProfile will report portrait.
* Now we see if all the leaf tasks have their top bounds be 0 to
determine leftRight split-ness
* Animation is still wonky, but acceptable for this edge case for now

Fixes: 356763330
Test: No crash, app pairs launch fine in normal portrait and landscape
Flag: EXEMPT bugfix
Change-Id: I0a067b50751b919bda5446c3e36055e58222bcab
2024-09-05 16:21:05 -07:00
Treehugger Robot 359fb55a26 Merge "Send message to launcher renderer to update grid (3/3)" into main 2024-09-05 21:45:44 +00:00
Anushree Ganjam 3b5afe2854 Add constant DEFAULT_LPNH_TIMEOUT_MS in client code.
Bug: 364389624
Test: Manual
Flag: NONE Bugfix
Change-Id: I7410227835012e7f608d6619c2e792120c484c26
2024-09-05 14:36:20 -07:00
fbaron c370894c06 Add flags for OneGrid project
Bug: 364711825
Flag: EXEMPT adding flag
Test: EXEMPT adding flag
Change-Id: I94e2769d717dd89550aa7a795b76e9ac18116a94
2024-09-05 21:26:49 +00:00
Shuming Hao 1dc86702be Merge "Set KeyboardQuickSwitchView ratio correctly." into main 2024-09-05 21:24:54 +00:00
Liam, Lee Pong Lam f83a6e8001 Refactor SettingsChangeLoggerTest imports
Bug: 364938368
Test: Unit test
Flag: EXEMPT bugfix
Change-Id: I91e48c1effdb8a0f5252c3f3c6b38407e44fd917
2024-09-05 20:35:39 +00:00
Sebastian Franco 4e65f94200 Removing screen record from TaplWorkProfileTest
Fix: 322823478
Test: TaplWorkProfileTest
Flag: TEST_ONLY
Change-Id: I4f5b2da8e1909b90146025654d100b9eadd0e577
2024-09-05 11:00:10 -07:00
Treehugger Robot 084fc6a362 Merge "Import translations. DO NOT MERGE ANYWHERE" into main 2024-09-05 17:51:46 +00:00
Shuming Hao 3ff6087d98 Set KeyboardQuickSwitchView ratio correctly.
This CL sets the thumbnailView ratio correctly in Alt-Tab UI. The currently supported ratios are `SNAP_TO_30_70, SNAP_TO_50_50, SNAP_TO_70_30`. This can be extended when we add more split modes later.

Bug: 328691131
Test: manual in both landscape and portrait mode.
Flag: EXEMPT bugfix
Recall: http://recall/clips/79f3b250-d691-4b03-93c3-825a80478ae0

Change-Id: Idf4f174d1b222a8f3c80e5c6ed17c5bf53d3368c
2024-09-05 10:13:36 -07:00
Sebastián Franco e862ed4ca5 Merge "Reducing the wait time for events for less than the Test timeout" into main 2024-09-05 17:07:35 +00:00
George Lin de4d7457a8 Send message to launcher renderer to update grid (3/3)
This CL supports external surface view callbacks to send messages to
update the launcher's preview grid.

Bug: 348664593
Test: Manually tested. See bug.
Flag: com.android.systemui.shared.new_customization_picker_ui
Change-Id: I8108ae2c49af6b4fc1a207c6ece23e82616baa61
2024-09-05 16:49:15 +00:00
Treehugger Robot 40de6c4c12 Merge "Fix Overview crash with 3 button navigation when animation is disabled" into main 2024-09-05 16:41:00 +00:00
Alex Chau 54fc5e0e52 Improve Task launch logging and function naming
Fix: 360186814
Test: manual
Flag: EXEMPT REFACTOR
Change-Id: I22c5a08382800941f0dd8f64f6129438ac04edaa
2024-09-05 16:58:06 +01:00
Jordan Silva 64ad4e34ab Fix Overview crash with 3 button navigation when animation is disabled
The OverviewCommandHelper conversion to kotlin introduced a bug when using 3-button-navigation to go to Overview when the animation is disabled. A NullPointerException happens in the AnimatorListenerAdapter implementation in OverviewCommandHelper when StateManager.goToState calls onAnimationEnd providing a null argument to a function that shouldn't allow a null value.

The abstract class AnimatorListenerAdapter implements AnimatorListener functions containing @NonNull Animator. However, AnimatorListenerAdapter overrides the interface functions without adding a @NonNull annotation in the arguments. In Java, this is allowed, causing only a warning. In Kotlin, due to the null safety nature, the compiler forces a null check for nullable types and doesn't allow the implementation of a @NonNull argument to become nullable.

To fix this issue we created a empty AnimatorSet to provide to onAnimationEnd instead of null.

For more context when @NonNull was added:
- The @NonNull annotation was added to fix b/206801689, however it was never updated for AnimatorListenerAdapterImproved Commit Message

Fix: 364860731
Bug: 352046797
Flag: EXEMPT bugfix
Test: Manual. Instructions in the bug.
Change-Id: I120af3d75e614581d6ac0f867a8c6f9419ee1bd3
2024-09-05 15:19:32 +01:00
Bill Yi 61883e91aa Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I8bc2a79264ec572124b6b1ca9c2487cff4a484d4
2024-09-05 07:03:16 -07:00
Wei Sheng Shih 9c1fd149dd Merge "Ensure the scrim layer above home task & wallpaper." into main 2024-09-05 02:14:55 +00:00
Treehugger Robot 9982cf96d0 Merge "Fixing UI leaks when using inline-subclass" into main 2024-09-05 00:21:36 +00:00
Sunny Goyal 46d2cc6edf Fixing UI leaks when using inline-subclass
Bug: 364363493
Flag: EXEMPT bug fix
Test: Presubmit
Change-Id: I8881569b021ab3737130d6d07ff3383dfab8df35
2024-09-04 20:47:14 +00:00
Bill Yi 9074e19dad Merge "Import translations. DO NOT MERGE ANYWHERE" into main 2024-09-04 19:22:20 +00:00
Marcelo Arteiro 13d9588f88 Merge "Updates many launcher color to new dynamic tokens" into main 2024-09-04 11:27:16 +00:00
wilsonshih 4f5c7f6254 Ensure the scrim layer above home task & wallpaper.
Sepcify a positive number which must larger than task layer, to ensure
the scrim layer must occludes home task and wallpaper. Otherwise any
reparent transaction without specify layer could affect the visual
order.

Flag: EXEMPT bugfix
Bug: 363927522
Test: verify the scrim layer above home and wallpaper while playing
back-to-home animation.

Change-Id: I558e29e0ebe72b8efb42cacc9cafd7869b09a40e
2024-09-04 09:32:41 +00:00
Treehugger Robot 648320044e Merge "Dagger codeswap setup between Quickstep and NexusLauncher (2/n)" into main 2024-09-04 05:08:10 +00:00
Treehugger Robot 4394cc777d Merge "Fix Square Recent button unresponsiveness" into main 2024-09-03 20:57:49 +00:00
Sebastián Franco 6d508c702a Merge "Remove event signaling logic from Launcher to the tests" into main 2024-09-03 20:43:55 +00:00
Sebastian Franco 750e8496ef Reducing the wait time for events for less than the Test timeout
The test timeout is the time the test infraestructure allows a test
to be idle for. Because of it, we don't get the event tiemout error
so reducing the timeout wait will allow us to get the event error.

Bug: 352569050
Test: IntegrationReorderWidgetsTest
Flag: TEST_ONLY
Change-Id: Ic43210a3ca5b5239b1156753bdf8253cd738bdec
2024-09-03 12:55:38 -07:00
Alex Chau fae91d5e57 Include DigitalWelllBeing banner in task XML to avoid addView during animation
- Also simplified DigitalWellBeingToast to be an actual View that is a children of TaskView
- Split out getDwbLayoutTranslations into 2 methods
  - One that update layout will be called earlier during TaskView.updateTaskSize. It now takes calcualted split snaphsot size and layoutParams sizes instead of using measured sizes so it can run before onMeasure. Also make sure updateLayoutParams is called.
  - One that calulate translations only can be called more frequently without causing jank during animation
- TaskView.updateTaskSize now always set the exact sizes as layoutParams instead of MATCH_PARENT, so we can use the values for updateDwbBannerLayout
- Simplified outline and splitOffsetTranslation calculations

Fix: 345789862
Fix: 362435532
Test: Presubmit and manually testing DWB banner in variaous configuration single/split real/fake portrait/landscape/fake
Flag: EXEMPT bugfix
Change-Id: Ibde877c5f983689e0ef8104ba344b5947d0e3948
2024-09-03 17:02:31 +00:00
Alex Chau 09623dd5e5 Merge "Fix talkback in split mode" into main 2024-09-03 17:02:04 +00:00
Ats Jenk 32f22de97d Merge "Reuse stash handle alpha animation constants" into main 2024-09-03 16:09:51 +00:00
vinayjoglekar 3359fa7f32 Fix talkback in split mode
1. Announce description of both snapshot in GroupedTaskView.
2. Announce them in correct order.

After setting right content description for both the apps in split mode, announcement order was reverse. Seems that order of the node tree which android sees was wrong. Also order did not change even in RTL mode.

see here https://paste.googleplex.com/6492038621298688.

The correct order is manually set using addChildrenForAccessibility in GroupedTaskView. (similarly being used in RecentsView since we use reverse order for overview). Also considered RTL.
See order after fix here
https://paste.googleplex.com/6492038621298688

https://drive.google.com/file/d/1BA1YKkcNsovEu4us9cvq5xOdXviTR1OV/view?usp=drive_link

Other alternatives tried were fixing order using android:accessibilityTraversalAfter and android:accessibilityTraversalBefore, both in layout and programatically which doesn't seem to work.

Test: Manual - Using Node tree debugging of talkback developer options.(Print and filter by tag TreeDebug)
BUG: 330424779
Flag: EXEMPT bugfix
Change-Id: If3c360277bd951d2d2b223bab7844e078e9c7d27
2024-09-03 15:22:30 +01:00