Commit Graph

12553 Commits

Author SHA1 Message Date
Uwais Ashraf f7093d445e Create scope for TTV attached to run collections that modify UI within.
Bug: 335396935
Test: Manual checking shows clear improvement of preformance problems
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: I92aa4ce3edfe297cc5a177a2d93837d33cdfb548
2024-07-15 10:09:26 +00:00
Riddle Hsu cbc84d96ef Avoid changing transform when touching in progress
After swiping from a landscape app to portrait home, the touch
orientation may be changed if there the touch event comes in a
short time (e.g. click app icon immediately):
 DOWN
 MOVE...
 SimpleOrientationTouchTransformer#onDisplayInfoChanged
 MOVE... (start to transform with inconsistent orientation)
 UP

That could disturb the gesture detection:
OverviewInputConsumer#onMotionEvent
 > BaseDragLayer#proxyTouchEvent
  onInterceptTouchEvent, findControllerToHandleTouch
  > PortraitStatesTouchController#onControllerInterceptTouchEvent
   > BaseSwipeDetector#onTouchEvent
which may show the app drawer unexpectedly.

http://recall/-/b2qm27pJZxFIWQccA9qE9Q/ggLXlE5kf7AWMOjUc0FCUU

Bug: 351755391
Flag: EXEMPT bugfix
Test: atest NexusLauncherTests: \
            com.android.quickstep.OrientationTouchTransformerTest# \
            testSimpleOrientationTouchTransformer
Change-Id: Ic0e9d8292606837feb4775663abb60229c90e9c5
2024-07-15 16:41:42 +08:00
Brian Isganitis fd1cc12054 Merge changes I2b87ab88,I939d8202,Ibedd8cae into main
* changes:
  Introduce rule for changing taskbar pinning preferences.
  Reinject controllers when Taskbar recreates itself.
  Inline showTaskbarFromBroadcast.
2024-07-13 19:01:33 +00:00
Hongwei Wang a531da0b85 Merge "Revert "Disable gesture nav while PiP anim is running"" into main 2024-07-13 08:16:44 +00:00
Treehugger Robot 41d50792f4 Merge "Clamp scrim progress for slow taskbar animation duration to max 1f" into main 2024-07-12 23:29:56 +00:00
Ikram Gabiyev fa096a77f6 Merge "Allow extra pixel for app bounds containment PiP" into main 2024-07-12 21:29:16 +00:00
Brian Isganitis 1a03740ebd Inline showTaskbarFromBroadcast.
Feels like it should be the activities' responsibility to coordinate the EDU with stashing. All of these methods are also public to TaskbarActivityContext.

Test: Compiles
Bug: 346394503
Flag: EXEMPT refactor
Change-Id: Ibedd8caec59da3b3a14c15d0c948bf1069ca3c6c
2024-07-12 16:00:50 -04:00
Ikram Gabiyev 402a96f588 Allow extra pixel for app bounds containment PiP
Allow an extra one pixel delta on each side of the
app bounds for source-rect-hint containment checks
when swiping to enter PiP.

Bug: 349821386
Flag: EXEMPT bugfix
Test: swipe PiP to home with 21:9 video from landscape to portrait
Change-Id: Ibc53e426b49cfcd58e977433358b9980732ac289
2024-07-12 10:46:16 -07:00
Liran Binyamin b67d4cc134 Merge "Fix regression in bubble animation" into main 2024-07-12 17:01:30 +00:00
Schneider Victor-tulias 25ff85efdc Merge "Add temporary debug logs to OtherActivityInputConsumer" into main 2024-07-12 16:57:31 +00:00
samcackett 0337520c7f Maintain if any task has been dismissed in RecentsView state
Fixes an issue in large screen layouts where the task order was
incorrectly being recalculated and the user would see their previous
tasks swap places.

Fix: 352308373
Test: Manual. In tablet view, open several apps, go to Overview, dismiss
 a task so the top row order changes, then swipe down the current
 focused task to resume. Observe order stays the same.
Flag: EXEMPT bugfix
Change-Id: Ic59e3125f69d36ba32d13436dba872f4d3a3d0df
2024-07-12 17:45:37 +01:00
Liran Binyamin ef08582d36 Fix regression in bubble animation
This was a bug introduced in ag/28230638. Accidentally passed the
wrong boolean value. The bug is that the initial state animation
does not play, and the bubble bar remains invisible.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 352119655
Fixes: 352412093
Test: manual
       - Clear all bubbles
       - Send initial bubble
       - Observe that the initial state animation plays correctly
Change-Id: Ie1435539e348c0a92a11db0b58a0b3bce6525cc0
2024-07-12 15:55:36 +00:00
Schneider Victor-tulias f67d384f86 Merge "Revert^2 "Add CUJ instrumentation for KQS"" into main 2024-07-12 14:59:45 +00:00
Alex Chau e74d34673b Merge "Perform state switch to Overview from -1 screen" into main 2024-07-12 10:08:41 +00:00
Vinit Nayak f92a34ff43 Clamp scrim progress for slow taskbar animation duration to max 1f
* Overview to workspace taskbar animation changed duration, and
with the new longer duration we no longer need to speed up the
scrim animation.
* The new longer duration was actually slowing down the scrim
interpolator

Fixes: 351911299
Test: Tested on small and large screen.
Tested w/ the flag off and there is a flicker, but that was
present without these changes as well
Flag: EXEMPT bugfix

Change-Id: I5dc219de541f3c2fb29a5a91a4770b0dece0259e
2024-07-11 15:48:25 -07:00
Fengjiang Li dd7471f3bf Merge "[Launcher Jank] Improve SimpleBroadcastReceiver.java" into main 2024-07-11 20:22:22 +00:00
Hongwei Wang 8eafa16ecc Revert "Disable gesture nav while PiP anim is running"
Revert submission 28059459-disable-gesture-on-pip-animation

Reason for revert: b/352475079
Reverted changes: /q/submissionid:28059459-disable-gesture-on-pip-animation

Change-Id: I83f28fb74277b7d2ddefed0efaf784c2848c811d
2024-07-11 19:07:09 +00:00
Schneider Victor-tulias 2ba69c2d3e Add temporary debug logs to OtherActivityInputConsumer
Flag: EXEMPT debug logs
Bug: 339905514
Test: Swiped home from running apps and checked logs
Change-Id: Ib13c19df45edba2112afd9603caf5cb0e60fd1d0
2024-07-11 14:30:00 -04:00
Fengjiang Li b87ad6f945 [Launcher Jank] Improve SimpleBroadcastReceiver.java
Bug: 348649441
Flag: NONE - jank fix
Test: manual - presubmit
Change-Id: I17bd7e4d7f0640522476e94edae691f983835f62
2024-07-11 11:12:29 -07:00
Treehugger Robot 9ef16e5cd3 Merge "Fix NPE of BaseContainerInterface#calculateTaskSizeInternal" into main 2024-07-11 16:30:31 +00:00
Treehugger Robot 2d73c5ef1b Merge "Change drawing in TTV to use Views rather than Canvas" into main 2024-07-11 15:03:18 +00:00
Alex Chau 1cd3fe27f2 Perform state switch to Overview from -1 screen
- This fixed a regression caused by ag/27904180, where -1 is no longer considered `visibleLauncher`. -1 still have Launcher being top activity, and recents animation will always fail
- Added isInMinusOne in LauncherActivityInterface, and return Launcher in getVisibleLauncher for -1 case
- -1 should be the only case where Launcher is top activity, but is not started

Fix: 352254279
Test: Recents button from the following scenarios: Home, -1, apps, transparent apps, video from -1
Flag: EXEMPT bugfix
Change-Id: I0898d202b9dd4742c0c7d2c0d6b340c748e8acf7
2024-07-11 15:53:26 +01:00
Uwais Ashraf 7e7afac7c0 Change drawing in TTV to use Views rather than Canvas
Fix: 352332386
Test: Presubmit, Manual
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: Ia1b7b6dc3d093d431ce022e793f40e61cec38ac6
2024-07-11 13:19:21 +00:00
Shamali Patwa d16ea2650e Align predictive back in standalone picker activity
Bug: 346332606
Test: Manual
Flag: EXEMPT BUGFIX
Change-Id: I34882389029a5f095ab8d910791f7be34f7b8355
2024-07-11 13:03:55 +00:00
Treehugger Robot 1d73fdd4ac Merge "Add icon loading to TasksRepository" into main 2024-07-11 11:26:23 +00:00
Cosmin Băieș 33f8bfbadf Add IME switch button long click support
This adds support for handling long clicking on the IME switch button.
Initially it will behave exactly like short clicking, i.e. show the IME
switcher menu.

Flag: android.view.inputmethod.ime_switcher_revamp
Test: atest
  TaskbarNavButtonControllerTest#testPressImeSwitcher
  TaskbarNavButtonControllerTest#testLongPressImeSwitcher
Bug: 311791923
Change-Id: Ibd0d6bce2bab11511bc082f46731ec86038c8cf8
2024-07-11 11:42:16 +02:00
Uwais Ashraf b59d86112c Add icon loading to TasksRepository
Bug: 334826842
Test: TasksRepositoryTest
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: I75f2e0e9aae4663993ca54742f653f4c7c04fdfe
2024-07-11 09:40:57 +00:00
Andy Wickham 17533ace66 Invert the 2 stage LPNH logic to lower false positive triggers.
Previously, we would extend the touch slop and duration when the
standard gesture slop was passed. This would actually increase
mistriggers, because it effectively doubles the trigger slop
allowance. Additionally, it seemed to usually get aborted by
gesture nav, which takes over after the first slop is passed.

With this change, we instead break down the gesture nav slop in
half (customizable by a new config parameter). In the second half,
we double (still customizable - but expressed as a percentage to
give us more flexibility than just 2x, 3x, etc) the duration to
trigger. This means omnient will be cancelled more quickly when
starting any swipe gesture, but if the user continues to dwell in
the navbar region for an extended time, omnient will still trigger.

Bug: 334860966
Test: Manual with ENABLE_LPNH_TWO_STAGES on and logging with
adb shell setprop log.tag.NavHandleLongPress VERBOSE
Flag: EXEMPT legacy DeviceConfig ENABLE_LPNH_TWO_STAGES DISABLED

Change-Id: Ida5c8e19b414a2bf0008b78b7bf0e7d41d3ff609
2024-07-10 18:51:17 -07:00
Fengjiang Li eef1599c06 Fix NPE of BaseContainerInterface#calculateTaskSizeInternal
Fix: 351861547
Flag: NONE - Bug fix
Test: Presubmit
Change-Id: I984748a6c5487a946a96aa3e2183b5d13a370b6d
2024-07-10 14:43:15 -07:00
Mykola Podolian 103191c589 Merge "Shadow for bubble icons fixed." into main 2024-07-10 19:38:23 +00:00
Alex Chau 33da74f8c2 Merge "focusTransitionScaleAndDimOut should always go from 1f to 0f" into main 2024-07-10 16:41:03 +00:00
mpodolian a3921ddb67 Shadow for bubble icons fixed.
The bubble's outline was hardcoded with a fixed size. This caused a
shadow to be drawn using the hardcoded outline size, regardless of the
actual bubble view size. The BubbleView logic has been updated to use
the actual bubble size for the outline. The guarding flag has been
removed.

Bug: 340445019
Flag: com.android.wm.shell.enable_bubble_bar
Test: http://recall/-/gx8ASgewUeUS3QYohfrd1J/hqFtAZJnX0tCRONoFpSK3i
Change-Id: Iaa2c2d0bfeee2af9840acbcf11daaf8be2e0b7af
2024-07-10 16:36:22 +00:00
Liran Binyamin e29e31922f Merge "Fix squished hotseat due to bubbles" into main 2024-07-10 16:10:41 +00:00
Liran Binyamin bdd96de69a Send the bubble removal timestamp to wm shell
The removal and update of bubbles happen in different processes, so
it's possible for race conditions to allow users to remove bubbles
without knowing that an update exists.

Passing the removal timestamp allows wm shell to determine whether
the removal happened before or after the latest update was received
for the bubble. This largely mitigates the race but does not solve
it completely. Will file a separate bug to track that.

Flag: com.android.wm.shell.enable_bubble_bar
Bug: 351026092
Test: Manual
       - Note the issue here is a race condition so requires code
         changes to force repro it
       - Locally I added an artificial delay between the time the
       - bubble is removed and until the removal is sent to wmshell
       - Create bubbles and expand the bubble bar
       - Dismiss bubble by dragging it to dismiss
       - Send an update to the same bubble before removal is processed
         in wmshell
       - Verify bubble is added back
       - Verify bubble is not removed when the removal is processed
         in wmshell
Change-Id: I05ddc692fe30709125e380351b223d20a0778264
2024-07-10 11:40:54 -04:00
Schneider Victor-tulias a929c7ab75 Revert^2 "Add CUJ instrumentation for KQS"
0947d9f618

Change-Id: Ifc6f2ae8f447939f274fb6167cc74c0cd2e89652
2024-07-10 14:30:58 +00:00
Liran Binyamin 4cebffa209 Merge "Fix missing bubble update dot" into main 2024-07-10 14:23:16 +00:00
Liran Binyamin c79119e911 Merge "Fix bubble update animation" into main 2024-07-10 14:23:04 +00:00
Alex Chau c378e64b75 focusTransitionScaleAndDimOut should always go from 1f to 0f
- Also updated AnimatedFloat to accept a Consumer<Float>, so a lambda can be used as updateCallback with refernce to udpated value
- Also updated PendingAnimation to accept Animator with TimedInterpolator without specifying SpringProperty

Fix: 352195519
Test: manual
Flag: EXEMPT bugfix
Change-Id: Ifb78c1bcd3ca215a5d214f986a107d0988bff13b
2024-07-10 13:40:22 +01:00
Alex Chau 0ac34a3388 Add use case for split animation to retrieve thumbnail
Fix: 349120849
Test: TaskSplitAnimationHelperTest
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: I7d4bcbdbeacd56356c71eb18c73ceef8446011d1
2024-07-10 09:37:33 +00:00
Liana Kazanova 5de87a8908 Merge "Revert "Add CUJ instrumentation for KQS"" into main 2024-07-09 22:10:40 +00:00
Priyanka Advani 0947d9f618 Revert "Add CUJ instrumentation for KQS"
Revert submission 28049476-kqs-cuj-instrumentation

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

Reverted changes: /q/submissionid:28049476-kqs-cuj-instrumentation

Change-Id: I8bfe7bfe4ce1bd816f138dbd4d5915f837ab97a0
2024-07-09 22:04:38 +00:00
Liran Binyamin e3eaacdcb2 Fix missing bubble update dot
Don't update the dot scale if the bubble bar is not collapsing or
expanding.

Flag: com.android.wm.shell.enable_bubble_bar
Bug: 351904597
Test: manual
       - Create 2 bubbles in the bubble bar
       - Select both bubbles to clear the dot
       - Launch an app to stash the bar
       - Send updates to both bubbles
       - Observe dot appears during each animation
       - Swipe up on the bubble bar
       - Observe dot disappears for the selected bubble but remains
         for the unselected bubble
Change-Id: I2cb6dd7ded261686ae73e497bd5d4841ebde35ef
2024-07-09 17:58:41 -04:00
Liran Binyamin e1d5ce2fda Merge "Dump some bubble data to dumpsys" into main 2024-07-09 21:41:46 +00:00
Liran Binyamin fef9d249bd Fix bubble update animation
Fix bubble update animation when the updated bubble is the only
bubble in the bar.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 352119655
Test: Manual:
       - Create 1 bubble in the bubble bar
       - Send an update for that bubble
       - Observe bubble bar is animated correctly
Change-Id: If569810dacf0ef77147a822c53ddebd09e35fe15
2024-07-09 16:47:36 -04:00
Liran Binyamin a7a5617466 Merge "Fix bubble translation x when bar is collapsed" into main 2024-07-09 19:54:05 +00:00
Treehugger Robot 6f7be465c0 Merge "Taskbar running apps: show one icon per task + tap opens that task" into main 2024-07-09 19:01:02 +00:00
Winson Chung b5522f0564 Merge "Workaround for crash with null icon drawable" into main 2024-07-09 17:42:28 +00:00
Liran Binyamin 0f08377436 Fix bubble translation x when bar is collapsed
Previously the translation x value for bubbles when the bar is
collapsed and on the right was 0 for the first bubble and some
fixed value for the rest of the bubbles. But if only 1 bubble
is visible when the bar is collapsed, as in the case when there
is only 1 bubble and the overflow, this ends up pushing the
overflow too far to the right.

This change updates the translation x value for bubbles when the
bar is collapsed and on the right, so that if only 1 bubble is
visible when collapsed, all bubbles have tx 0, otherwise if 2
bubbles are visible, the first has tx 0 and the rest have the same
tx value.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 350962159
Test: manual
       - Add 1 bubble to the bubble bar
       - Make sure bubble bar is on the right
       - Expand and collapse the bar
       - Observe the overflow tx value is correct during the animation
Change-Id: I8401d70fa6f374ace58d9cdbe3302e39e7aedc70
2024-07-09 13:10:12 -04:00
Schneider Victor-tulias d0811445d4 Merge "Add CUJ instrumentation for KQS" into main 2024-07-09 17:07:42 +00:00
Gustav Sennton f3108c59ed Taskbar running apps: show one icon per task + tap opens that task
Before this CL we would show only one Taskbar icon per app, making it
impossible (through the taskbar) to switch between several windows of
the same app.
With this CL we add one icon per task instead, making it possible to
bring each task to the front individually.

Flag: com.android.window.flags.enable_desktop_windowing_taskbar_running_apps
Bug: 351118893
Bug: 349790805
Bug: 351156858
Test: Started several Chrome windows -> taskbar has one icon per window

Change-Id: Ia692977effceb9ce339906bf6ca24d73e19d8769
2024-07-09 14:48:04 +00:00