Commit Graph

83004 Commits

Author SHA1 Message Date
Marcelo Arteiro 2d7b004842 Fix home screen briefly flashes after setup.
Bug: 368521393
Change-Id: I5ef6a6332bb54f058fefe56cdada13952341bb22
Flag: EXEMPT bugfix
Test: Manual
2024-10-22 13:22:18 +00:00
Mykola Podolian 18b3171980 Merge "Revert "Made the taskbar touchable during animation to home."" into main 2024-10-22 03:59:13 +00:00
Mykola Podolian 164b832ec4 Revert "Made the taskbar touchable during animation to home."
This reverts commit d89732ef85.

Reason for revert: b/374080485
Flag: NONE
Change-Id: I56236f539957efaaa4caa30a4b887d017037709f
2024-10-21 17:36:49 -07:00
Anushree Ganjam bb996d1304 Make RefreshRateTracker to be injected by Dagger (11/n)
Bug: 361850561
Test: Manual
Flag: EXEMPT Dagger Integration
Change-Id: Ice5dc3364f90d2b9b99a0837702ae1d49a356f88
2024-10-21 17:20:38 -07:00
Artsiom Mitrokhin 76fa57f418 Merge "Update popup and arrow positioning logic" into main 2024-10-21 23:55:14 +00:00
Android Build Coastguard Worker b93ba761d5 Merge cherrypicks of ['googleplex-android-review.googlesource.com/29738756'] into 24Q4-release.
Change-Id: Id1d607c26e2f72ff2e6dcfdb0bbafd8adb1c4e1c
2024-10-21 23:31:04 +00:00
Jagrut Desai c4f9510874 Fix Taskbar to Hotseat Animation for Non-Predective back apps
- Refactored Taskbar animation duration to under one method and added logic to sync animation duration according to enableScalingRevealHomeAnimation.
- Change the interpolator for TaskbarLauncherStateController based on enableScalingRevealHomeAnimation.

Test: Presubmit, Manual
Bug: 369378541
Flag: EXEMPT Bug Fix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:0a65c5bd72d755856148faeb070a5d2ad2c79cb0)
Merged-In: I942829b475f91e9102801b758eb7ee0d27eee912
Change-Id: I942829b475f91e9102801b758eb7ee0d27eee912
2024-10-21 23:30:48 +00:00
Android Build Coastguard Worker 2bc8b3d467 Snap for 12530792 from d4a04f9de5 to 25Q1-release
Change-Id: I77b33888d7cf23dc7e3973ccf05baa2f9334ffb1
2024-10-21 23:23:08 +00:00
Uwais Ashraf bea43b0c03 Merge changes I54ea7a71,Ifd9c54fd into main
* changes:
  Set task properties to prevent the task being null. This behaviour is expected by existing callers and was likely broken by ag/28151977
  TaskRepository performance improvement
2024-10-21 22:40:51 +00:00
Treehugger Robot 80d18e0138 Merge "Fixing deadlock in dagger singletons" into main 2024-10-21 22:29:57 +00:00
Toni Barzic 9a5941ab91 Account for all apps offset during taskbar layout
When laying out its contents, TaskBarView generally lays the icons so
they get centered in the task bar - this is done by calculating the
total size of all icons during layout (this will generally be transient
taskbar icon sizes), and substracting extra margins that get removed
from the divider view. After initial layout, `TaskbarViewController`
adjusts the icon view positions to match expected icon sizes (it
offsets icons horizontally reducing margins between icons to match
intended icon sizes for the taskbar type). Additionally,
`TaskbarViewController` translates all apps button container - this
transformation is asymetric, and causes the task bar contents to become
off-center. To account for this, update taskbar layout to reduce the
total icon size used for centering icons by the amount all apps button
is offset. This makes the taskbar off-center after initial layout, but
by the amount by which all apps button is eventually offset (resulting
in centered taskbar content).

This alone worked for left-to-right UI direction, but not right-to-left.
To fix this, correct the reference point from which
TaskBarViewController offsets icon positions. The offset used to be
calculated by distance of an icon index from half of the icon count -
instead offset needs to be calculated relative to mid-index.
For example, icon at index i needs to be offset by
(mid_index - i) * difference_in_icon_size: ((n-1) / 2 - i) * diff).
Code used to work for LTR UI layout because the list of icons contained
invisible qsb view, which incresed both n and indices by 1, so
(n' / 2 - i') * diff_in_icon_size worked fine, as it evaluated to
((n + 1) / 2 - i - 1) * diff = ((n - 1) / - i) * diff

Bug: 372567501
Test: Verify that taskbar icons are centered when it needs to be, both
with ltr and rtl language UI.
Flag: EXEMPT bugfix

Change-Id: Ic06873cc225a4361d9140d72c055db23f446a1ad
2024-10-21 20:49:05 +00:00
Treehugger Robot e6e9cd23c5 Merge "Don't enforce max tasks in KeyboardQuickSwitchView" into main 2024-10-21 20:26:27 +00:00
Brian Isganitis 27e05992f6 Update recent indicators to match spec.
Does not implement any animations.

Flag: com.android.window.flags.enable_desktop_windowing_taskbar_running_apps
Fix: 356394053
Test: go/testedequals
Change-Id: If8e319b605beedd0e9b14dc37da1b5ffa12f3c9f
2024-10-21 15:04:03 -04:00
Brandon Dayauon 13b964f91d Instead of checking for locale, check language specifically.
Should be checking for english language as seen here: https://source.corp.google.com/h/googleplex-android/platform/superproject/main/+/main:libcore/ojluni/src/main/java/java/util/Locale.java;l=1374?q=locale%20getLanguage&sq=repo:googleplex-android%2Fplatform%2Fsuperproject%2Fmain%20b:main

This gives the language code which is what we should be checking against according to https://yaqs.corp.google.com/eng/q/4542431059247104.

bug: 373670311
Test: Manually - tried with various other "ENGLISH" languages besides US. Including Bermuda/UK and non english languages
Flag: NONE locale checking
Change-Id: Ib2eff4c9a13b74ede8575ee8d5280bbf9b9b8729
2024-10-21 11:32:13 -07:00
Artsiom Mitrokhin ade96d0199 Update popup and arrow positioning logic
1) By default, it's centered relative to the event position
   https://screenshot.googleplex.com/5Wri2CX3vASCxWt
2) It becomes left or right aligned near edges of the screen
   https://screenshot.googleplex.com/9AEQxWcmYX63jTv
   https://screenshot.googleplex.com/39KMeG2eWKr2QC6
3) And never goes beyond the minimum padding
   https://screenshot.googleplex.com/5LiPHiXiJSyGdx5
   https://screenshot.googleplex.com/86KQnKXa38NoYpM

Bug: 297325541
Flag: com.android.launcher3.show_taskbar_pinning_popup_from_anywhere
Test: manual, flip the flag, open popup from different positions
Change-Id: I06cf0c0352da946da7a62413144c304623557216
2024-10-21 14:32:00 -04:00
Sunny Goyal 0b7f4cf1e2 Fixing deadlock in dagger singletons
Bug: 373557167
Flag: EXEMPT dagger
Test: atest DaggerSingletonDeadlockTest

Change-Id: I2304237bfd818c99b82bbfceea8a81ddb136b5a1
2024-10-21 18:09:37 +00:00
Treehugger Robot d4a04f9de5 Merge "Update removeTaskInternal Desktop case" into main 2024-10-21 16:21:13 +00:00
Uwais Ashraf 36402adaa6 Set task properties to prevent the task being null. This behaviour is expected by existing callers and was likely broken by ag/28151977
Fix: 374339873
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: manual
Change-Id: I54ea7a714174375eb0d7481cab246fbbe9133fb4
2024-10-21 14:44:23 +00:00
Uwais Ashraf 62495bbda7 TaskRepository performance improvement
This CL improves Overview's performance by preventing multiple thumbnail and icon fetches for visible tasks. It introduces manual cancellation and removal of tasks that are no longer visible to prevent fetching and listening to changes in such tasks.
- Renamed 'augmentedTasks' to 'tasks' and updated it to be a MutableStateFlow with a map of Task Id and Task.
- When a new task becomes visible, the task is added to a list of requests along with a Job that fetches the Thumbnail and Icon. Additionally, 'taskVisualChangesDelegated' is added and removed for that task per request.
- When a task becomes invisible, the Job is canceled to prevent fetching the Thumbnail and Icon. The thumbnail and icon are cleared from the list of tasks, and the listener from 'taskVisualChangesDelegated' is unregistered.
- The list of tasks is updated when the list of visible tasks changes and a new thumbnail or icon is updated. This list is also updated when a force fresh from getAllTaskData is requested.

Fix: 373361888
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: TasksRepositoryTest
Change-Id: Ifd9c54fdfcb85463c043c121fb829dec3e9faedc
2024-10-21 14:34:12 +00:00
Jordan Silva 9dbae036d3 Merge "Fix crash when initiating split with 5 instances of Chrome in Desktop Windowing" into main 2024-10-21 13:55:56 +00:00
Orhan Uysal ea49585931 Update removeTaskInternal Desktop case
- Pass TaskView directly to removeTaskInternal
- Update the bug id

Bug: 370757235
Test: Manual
Flag: EXEMPT No-op
Change-Id: I0ad0d42541221d1ce6e27c708f469e5c0757b8ef
2024-10-21 13:53:35 +00:00
Jordan Silva ca034f122a Fix crash when initiating split with 5 instances of Chrome in Desktop Windowing
When opening 5 instances of Chrome in Desktop Windowing, navigating back to Overview and trying to split a new Chrome instance from the Taskbar resulted in a crash.

This happened because SplitSelectStateController searches for the last active task of the app chosen to be in split. Then, it returns its taskId that is used in RecentsView to find the TaskView to be animated to split.

However, after the 5th Chrome instance in opened in Desktop Windowing, the last active taskId is no longer visible in Overview or Desktop Windowing. Then, RecentsView won't find any TaskView with that taskId and mSplitHiddenTaskView will be null. This will result in a crash because we have some if-else conditions assuming that is not null because of mSplitSelectStateController has a task to be dismissed during the split animation.

More info in the bug report.

Bug: 372400577
Flag: EXEMPT bugfix
Test: Manual. Steps in the bug report.
Test: Manual. Open 5 windows of Chrome in Desktop Windowing. Go Home. Open a Fullscreen App. Go Overview. Split a new Chrome instance from the Taskbar.
Change-Id: I0f3757e898b606b4e0a180f43c73f1e2d887e996
2024-10-21 13:33:41 +00:00
Jordan Silva 4a08fcc3d9 Merge "Revert "Update OverviewCommandHelper to use Executors.MAIN to reduce the percentage of missed frames"" into main 2024-10-21 13:18:28 +00:00
Alex Chau 5d40236037 Merge "Update comments on createAdjacentPageAnimForTaskLaunch" into main 2024-10-21 12:46:23 +00:00
Liran Binyamin 2c908e2c10 Merge "Wire up flyout to new bubble animation" into main 2024-10-21 12:20:23 +00:00
Jordan Silva 3a4d67b965 Revert "Update OverviewCommandHelper to use Executors.MAIN to reduce the percentage of missed frames"
This CL didn't improve the performance metrics significantly enough to use Executors.MAIN. b/366077002#comment12

This reverts commit 7eae20bcb1.
Reason for revert: 366077002

Change-Id: Ic92b83a65aef7f8cd5c00110fb1ab7343d4b12b6
2024-10-21 10:21:56 +00:00
Alex Chau 758bbeb6eb Update comments on createAdjacentPageAnimForTaskLaunch
- Added comments to clarify pivot/drawBelowRecents is only needed if live tile isn't launching
- Otherwise TaskViewUtils.createRecentsWindowAnimator already take cares of the scrol offset and drawsBelowRecents.

Fix: 361744056
Test: manual
Flag: EXEMPT refactor
Change-Id: I10e7d72daaa13787a9fd19524f7f45c4b0d31642
2024-10-21 10:52:29 +01:00
Android Build Coastguard Worker 7e1b997bdb Snap for 12525496 from c1c1c873b9 to 25Q1-release
Change-Id: I7a46efcc570d87cb3e928f2a8b73b690418de2a8
2024-10-19 21:22:11 +00:00
Android Build Coastguard Worker 271fba9800 Snap for 12524026 from b484225cb6 to 25Q1-release
Change-Id: I1957145a4fa21a60c5f5cbdc599578a0a173a17c
2024-10-19 01:27:39 +00:00
Toni Barzic 41b48b31ab Don't enforce max tasks in KeyboardQuickSwitchView
The number of tasks to show should not be limited when KQS gets shown in
desktop windowing - instead of enforcing the limit on tasks shown in the
KQS view itself, trust the KeyboardQuickSwitchController to pass in
correctly sized list of tasks to show (KeyboardQuickSwitchController
does limit the task list size passed to the view).

Bug: 374329990
Test: Open 6+ tasks in fullscreen, and in desktop windowing. Verify that
the number of tasks shown in KQS is limited to 6 when shown from a
fullscreen app context, and not limited when shown when in desktop
windowing.
Flag: EXEMPT  bugfix

Change-Id: I245d05239f2fc025ef40085aff4bece694e0f76c
2024-10-18 23:53:35 +00:00
Brandon Dayauon c1c1c873b9 Merge changes from topic "fastScrollerPrivateSpaceDrawableToLetters" into main
* changes:
  Update letter list textview background color to spec.
  Remove color animations when scrolling.
2024-10-18 23:07:09 +00:00
Android Build Coastguard Worker 180186f546 Merge cherrypicks of ['googleplex-android-review.googlesource.com/29943251'] into 25Q1-release.
Change-Id: I6fb051d1178146ce38cfb594f7e74fb01bb5b57b
2024-10-18 21:48:50 +00:00
Winson Chung 4dfb35acc1 Remove user TIS unlocked runnable when a TIS instance is destroyed
- If the TIS instance is destroyed, then we should remove any queued
  user-unlocked runnables to ensure that they do not attempt to run
  again

Flag: EXEMPT bugfix
Bug: 373671447
Test: atest NexusLauncherTests
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a9355d4dba3f0bf93cb1a28eb738c6c05dc43ca9)
Merged-In: I8ca3cdfa6f849bce5d347f14038e1ebd6bc6ff06
Change-Id: I8ca3cdfa6f849bce5d347f14038e1ebd6bc6ff06
2024-10-18 21:48:38 +00:00
Randy Pfohl b484225cb6 Merge "Adding a flag for launcher recents in window" into main 2024-10-18 21:38:40 +00:00
Treehugger Robot 11a4676c92 Merge "Make mAllAppsButtonContainer not Nullable" into main 2024-10-18 20:51:23 +00:00
Jagrut Desai ed5edb7dee Merge "Enable TaskbarEduTooltipControllerTest" into main 2024-10-18 18:31:54 +00:00
Schneider Victor-tulias 65fb226f29 Merge "Update RecentsWindowSwipeHandler to animate home alpha properly" into main 2024-10-18 18:21:20 +00:00
randypfohl 009d9dac30 Adding a flag for launcher recents in window
Test: none

Flag: EXEMPT adding flag

Bug: 292269949

Change-Id: I0d69ce7d338359f564549b7bcdf984be7b270840
2024-10-18 11:15:15 -07:00
Toni Barzic 6957a037fe Make mAllAppsButtonContainer not Nullable
Bug: None
Test: None
Flag: EXEMPT cleanup
Change-Id: Iebf2eff8e9657e5960375f80a0f5bc4d46dcead3
2024-10-18 17:14:01 +00:00
Winson Chung fd91b7be4e Merge "Remove user TIS unlocked runnable when a TIS instance is destroyed" into main 2024-10-18 17:03:55 +00:00
Artsiom Mitrokhin a182675128 Merge "Open taskbar pinning popup view from anywhere" into main 2024-10-18 16:25:15 +00:00
Jagrut Desai c1227779a6 Enable TaskbarEduTooltipControllerTest
Test: Presubmit
Bug: 374312336
Flag: EXEMPT enabling ignored test
Change-Id: I606ab909d5d9b366674492855a940a0f6cc77a86
2024-10-18 09:20:41 -07:00
Liran Binyamin 12f77ba713 Wire up flyout to new bubble animation
When a bubble is created or updated we now animate the flyout view
as part of the bar animation.

Note that the flyout is not clickable yet, and that we're not yet
handling bubble notifications interrupting each other.

Flag: com.android.wm.shell.enable_bubble_bar
Bug: 277815200
Test: atest BubbleBarViewAnimatorTest
Test: atest BubbleBarFlyoutControllerTest
Test: manual
       - verify flyout view is showing when creating bubble
          - on home
          - in app
          - when bubble bar is empty
Change-Id: I315e46c89a4d20aaaa22972f0d71290a63481d9d
2024-10-18 08:00:05 -04:00
Treehugger Robot fb172faa7f Merge "Fix split selection translation when focused task is selected for splitscreen" into main 2024-10-18 09:26:05 +00:00
Winson Chung a9355d4dba Remove user TIS unlocked runnable when a TIS instance is destroyed
- If the TIS instance is destroyed, then we should remove any queued
  user-unlocked runnables to ensure that they do not attempt to run
  again

Flag: EXEMPT bugfix
Bug: 373671447
Test: atest NexusLauncherTests
Change-Id: I8ca3cdfa6f849bce5d347f14038e1ebd6bc6ff06
2024-10-18 04:26:37 +00:00
Treehugger Robot 4d2af8ec6c Merge "Move ContextualSearchHapticManager to MainThreadInitialiedObject" into main 2024-10-18 04:08:21 +00:00
Android Build Coastguard Worker 91c4f68dfe Snap for 12517605 from 42e6127c2b to 25Q1-release
Change-Id: I2411aec6a34c792da7ee7a8e3f6166c18f0a5cba
2024-10-18 01:22:22 +00:00
Treehugger Robot 71c3d1f089 Merge "Handle enter key as editor action in search bar" into main 2024-10-18 01:18:40 +00:00
Charlie Anderson 7f50e9c66a Merge "Prevent archived apps content description from being overridden unexpectedly" into main 2024-10-18 00:24:49 +00:00
Mykola Podolian 42e6127c2b Merge "Refactored hotseat translation X logic" into main 2024-10-17 23:23:08 +00:00