summaryrefslogtreecommitdiff
path: root/quickstep/src
AgeCommit message (Collapse)Author
2021-12-16Merge "Show Digital Wellbeing Banners for split tasks" into sc-v2-devTreeHugger Robot
2021-12-15Show Digital Wellbeing Banners for split tasksVinit Nayak
Fixes: 199936292 Change-Id: I38743d58f53a65ef717b1babc21ad1df2dc840a4
2021-12-16Merge "Save multiple RunningTaskInfo in GestureState" into sc-v2-devVinit Nayak
2021-12-15Merge "Set navBarDarkIntensity based on dark theme in SUW" into sc-v2-devTreeHugger Robot
2021-12-15Set navBarDarkIntensity based on dark theme in SUWTony Wickham
- Also remove old tinting based on textColorPrimary, as it's no longer necessary with dark intensity tinting. Test: Run SetupWizardTestActivity in both dark and light theme, ensure back button visible Fixes: 204384193 Change-Id: I2dc2e94bc0318ded62419b9ae0eed719db289d7f
2021-12-15Save multiple RunningTaskInfo in GestureStateVinit Nayak
* With new split screen running two active tasks for a given gesture, we need to get all running task infos instead of the single most recent used one * TODO(b/210903248) for proper refactoring for GestureState Fixes: 205675364 Test: Swiping up on overview no longer crashes Change-Id: Iea1f193149657182311a97f46007b4d43e8ad549
2021-12-15Merge "Scale, crop, and translate window when swiping back to home." into ↵Jon Miranda
sc-v2-dev
2021-12-15Merge "Wait for the Launcher activity to bind to TIS before animating" into ↵Winson Chung
sc-v2-dev
2021-12-15Fix testStressSwipeToOverviewTony Wickham
- Finish recents controller to app rather than to launcher, to ensure taskbar state uses in-app configuration - Also fix an issue when a gesture completes before onLauncherStart, which happens in 3 button mode. The error I saw in the test was: java.lang.AssertionError: http://go/tapl test failure: Failed to receive an event for the state change: expected [Overview], actual: [Background, Normal]; Context: want to switch from background to overview, clicking Recents button; now visible state is Background (This also accurately describes what I saw on the device, where the LauncherState went to Normal but the task was still running in the live tile) Test: testStressSwipeToOverview Fixes: 203577620 Change-Id: I19616f7921c9821f1b45a90a3e4bec4fb3b8a9d3 Merged-In: I19616f7921c9821f1b45a90a3e4bec4fb3b8a9d3 (cherry picked from commit ce6bf7dd7f4b9977012e23b4d5554b340907cf2d)
2021-12-15Fix issues with starting new recents animation before previous ↵Tony Wickham
onRecentsAnimationStart - Fix logic for canceling animation for continued quick switch, so that this case (starting a new gesture before onRecentsAnimationStart() of the previous gesture) instead goes to the STATE_FINISH_WITH_NO_END flow. - Update the end target so that we go to that state instead of always overview state if swipe was past the halfway threshold when we call endLauncherTransitionController(). This is specifically so we don't use OverviewInputConsumer on the second gesture, given the first one was canceled and didn't actually go to overview. - GestureState#isRecentsAnimationRunning() now checks for STATE_RECENTS_ANIMATION_STARTED rather than _INITIALIZED, to be consistent with its javadoc and TaskAnimationManager#isRecentsAnimationRunning(). This also ensures we can correctly calculate continued quick switch (see above). - Call cleanUpRecentsAnimation() before creating a new one in TaskAnimationManager. This ensures that the previous listener doesn't immediately cleanup the new gesture when it gets onRecentsAnimationCanceled() due to the new recents animation starting. Test: swipe to home twice from the app, locally ignoring the onRecentsAnimationStart() from the first one, and ensure the second one responds normally Bug: 193851085 Change-Id: I76e27c96b54293805546c0d6c82e77f975c69d7a Merged-In: I76e27c96b54293805546c0d6c82e77f975c69d7a (cherry picked from commit 66ed0ff23ec92f3871c536d477877ab15116aaa7)
2021-12-15Scale, crop, and translate window when swiping back to home.Jon Miranda
This makes the animation consistent with what happens when swiping up to home. Bug: 208292857 Test: open app, swipe back to close, test on portrait and landscape Change-Id: I096b20fe3d3398001e442d41981350e7b0321a46
2021-12-15Wait for the Launcher activity to bind to TIS before animatingVinit Nayak
- Mainly a test issue where we destroy the activity and immediately enter overview without preloading launcher. In this case, the task bar does not animate due to the delayed cycled of activity create -> bind service -> service connected -> taskbar ui controller init. As a result, the bar can occlude content from Launcher preventing the test from finding the overview actions. Instead, in cases where we need to animate with launcher, we wait for Launcher to be created (generally already the case) and the service has bound before proceeding. Bug: 189807374 Bug: 204891006 Test: atest NexusLauncherTests:com.android.quickstep.StartLauncherViaGestureTests Change-Id: I2cfccae67ac0e5a591639c6c99df032451dae16d
2021-12-14Merge "Ensure some taskbar states are initialized correctly" into sc-v2-devTreeHugger Robot
2021-12-14Ensure some taskbar states are initialized correctlyWinson Chung
- Update FLAG_IN_APP to account for setup state to ensure that the stashed state is correct. This needs to be done in the stash controller since SUW is the home activity on startup and the launcher state controller will not be initialized until after SUW finishes - Initialize the launcher state and resumed flags in case Launcher restarts while another app is resumed Bug: 204384193 Test: Run through SUW, ensure the background is not visible Change-Id: I5ce061ad16e79226c8428339ccd0b5ac55c07205
2021-12-14Merge "Don't clobber in progress page transition in applyLoadPlan()" into ↵Tony Wickham
sc-v2-dev
2021-12-14Don't clobber in progress page transition in applyLoadPlan()Tony Wickham
Also only reloadIfNeeded() instead of always reloading in showCurrentTask(), which is called twice as the gesture starts and could contribute to jank. Test: quickly quick switch from app A to B, ensure no jumpcut back to A Bug: 205499708 Change-Id: I516020551d3f76eb4025df848bf4c88adf5499b7
2021-12-12Add ALLOW_SLIPPERY_TOUCHES to make StatusBarTouchController slipperySiarhei Vishniakou
LauncherActivity uses FLAG_SLIPPERY for certain interactions. For example, when home screen is shown, and the user pulls down from not the top of the screen, and notification shade is getting displayed, then the touch should be getting transferred to the NotificationShade using FLAG_SLIPPERY. The newly introduced permission is added to launcher in order for this flag to be applied to the window. Bug: 206188649 Bug: 157929241 Test: reviewed logs, ensure that NexusLauncherActivity has FLAG_SLIPPERY Test: re-ran the performance regression test Change-Id: I8d05fa3663687b5382a59b0d47cdac404844c3b7
2021-12-11Merge "Report contentInsets only based on what they will be inside apps" ↵TreeHugger Robot
into sc-v2-dev
2021-12-10Report contentInsets only based on what they will be inside appsTony Wickham
This avoids changing them when going from an app to launcher (most obvious when going to overview). This also allows us to not change insets on apps when opening/closing IME, which reduces potential jumpiness. Finally, also use this logic for 3P launchers by calling directly from TaskbarDragLayerController instead of TaskbarUIController (which was only overridden by LauncherTaskbarUIController). This fixes some bad issues like sending fullscreen insets when opening a folder from taskbar. Test: Open Calculator, unstash taskbar, go to overview and ensure no jump as taskbar stashes. Fixes: 200805319 Change-Id: I4f1cc187398d0051863ff44ea90b7ab9c6aaa8f9
2021-12-10Merge "Fix taskbar being empty" into sc-v2-devTony Wickham
2021-12-10Fix taskbar being emptyTony Wickham
We set mIconAlignmentForResumedState in endGestureStateOverride(), but then we call applyState() which might aniamte mIAFRS to a different value. To avoid this, set it after applyState() instead. Specific repro: 1. Open Calculator 2. Go to Overview 3. Dismiss Calculator 3a. This calls endGestureStateOverride() because the running tile ends 3b. Previously, we called mIAFRS.updateValue(1) but then applyState() animated it to 0 because we're still in Overview which is an unstashed state. Now the animation to 0 is before setting explicitly to 1. 4. Go home (this sets mIconAlignmentForLauncherState = 1) 5. Open Calculator again. Previously, mIAFRS was already 0 so animating to 0 was ignored. Now, mIAFRS starts at 1 (which is right since launcher is resumed). Test: see above Fixes: 210109500 Change-Id: I13f40908f8636291d63ef4b885ac9d08bbf4d393
2021-12-10Don't snap to focused task in split selectAlex Chau
- In split select there is no overview actions, and focused task's snappign position is not centered, it's weird to snap so avoid it - Follow-up of ag/16378986 Bug: 208644826 Test: manual Change-Id: I260b5c6164db562717346396b1830af02d408944
2021-12-10Allow snapping to focused task in overview gridAlex Chau
Fix: 208644826 Test: manual Change-Id: Ia6fb2ae44209042f6d40bf8db5d1f43b3b6a27ee
2021-12-10Merge "Add split support for 3P launcher" into sc-v2-devAlex Chau
2021-12-10Merge "Do not start auto-pip transition when swiping from split" into sc-v2-devHongwei Wang
2021-12-09Do not start auto-pip transition when swiping from splitHongwei Wang
Also, pass a PictureInPictureSurfaceTransaction to hide the tasks in split-screen from Launcher to WM to avoid flicker when any one of the tasks enters PiP. Bug: 190855091 Bug: 205894095 Video: http://recall/-/aaaaaabFQoRHlzixHdtY/42RWtayanp2qG0mHSf4Q5 Test: manual, enter PiP from split-screen, see Video Change-Id: Ia8b6243c0d95c2be8007beeefa2083acc856e404
2021-12-09Merge "Only inset IME by 48dp instead of 60dp when taskbar is present" into ↵TreeHugger Robot
sc-v2-dev
2021-12-09Only inset IME by 48dp instead of 60dp when taskbar is presentTony Wickham
- Update providedInternalImeInsets whenever taskbar height changes, since the insets are subtracted from the taskbar window height. This ensures the IME always has the same bottom inset (48dp) regardless of taskbar's window size - Also translate nav buttons down to center in the new size when IME is showing Test: Open IME from home and in apps, both in gesture nav and 3 button mode. Ensure IME bottom inset is always 48dp and nav buttons center within that space Fixes: 201115344 Change-Id: I5ed25b0ffc08145b2221cc5c960e669cc21b2aa7
2021-12-09Add split support for 3P launcherVinit Nayak
* Copied logic mostly from Base/RecentsViewStateController * There's one KI crash specific to 3P (b/209694087) * Swipe to home animation is TODO, but then again it also seems incorrect for full-screen app. 3P has many cosmetic issues throughout. Bug: 195607777 Test: Tested w/ Nova launcher with grid and non-grid, able to invoke split screen with same animations as 1P launcher Change-Id: I35a1bc92a51caccac4214289e614000cd47bb503
2021-12-09TalkBack doesn't announce when a task has being closed.Sebastian Franco
Adding announceForAccessibility() in createTaskDismissAnimation() to announce the task has being closed. Test: Manually tested Fix: 186744160 Change-Id: I71f57e7ba03a61b2ced7e338da4251637e89bd16
2021-12-09Merge "Always draw background for task thumbnail" into sc-v2-devJerry Chang
2021-12-09Always draw background for task thumbnailJerry Chang
Always draw background for task thumbnail because the task snapshot might be translucent or partially empty. For example, when drag-to-dismiss split screen, it will reparent tasks from dismissing split root to the bottom of display. Task thumbnail of those tasks might be partially empty because the snapshot was taken in new bounds inherits from display but with split screen content. Fix: 200096421 Test: drag to dismiss split, observed task thumbnail no longger been cropped. Change-Id: I5d04daa55a558f79ccf5127080088bd0698d06d8
2021-12-08Merge changes I6cf84ec7,Iea599651,If3238286 into sc-v2-devTony Wickham
* changes: Improve quick switch from home to taskbar Cleanup some taskbar/hotseat handoff issues Fix taskbar stash misalignment when going from app to overview
2021-12-08Merge "Revert "Align OverviewActionsView for 3 button taskbar"" into sc-v2-devAlex Chau
2021-12-08Merge "Fix split animation for grid RTL" into sc-v2-devTreeHugger Robot
2021-12-08Handle split select rotationAlex Chau
- Update floatingTaskView, apply splitsSelectTranslation and splitPrimaryScorllOffest when rotating while in split select - Moved getSplitSelectTranslation to RecentsView - When in portrait, treat STAGE_POSITION_BOTTOM_OR_RIGHT as STAGE_POSITION_TOP_OR_LEFT in split translation calculation - Apply splitsSelectTranslation for portrait grid too Fix: 201721153 Test: manual Change-Id: I768a3b15de4d434674058b274c368798f5852917
2021-12-08Revert "Align OverviewActionsView for 3 button taskbar"Alex Chau
This reverts commit 0bd0733ef4c921ed9089d9e80e3db707d459e5de. Reason for revert: b/209025715 Bug: 189807374 Change-Id: I477bacc318e84c16f124cf776ddd8446959755aa
2021-12-07Fix split animation for grid RTLVinit Nayak
Fixes: 202156862 Test: Tested grid + non grid, RTL + LTR Change-Id: I303f60efdd9f2f2ea412e31e574d9a3b50fecf30
2021-12-08Merge "Align OverviewActionsView for 3 button taskbar" into sc-v2-devVinit Nayak
2021-12-07Improve quick switch from home to taskbarTony Wickham
- Add LauncherState#isTaskbarAlignedWithHotseat() which defaults to !isTaskbarStashed(), but is always false for quick switch from home - Replaced FLAG_TRANSITION_STATE_START_STASHED and FLAG_TRANSITION_STATE_COMMITTED_STASHED with FLAG_STATE_TRANSITION_RUNNING and a reference to mLauncherState. STATE_START is equivalent to TRANSITION_RUNNING changing to true, and STATE_COMMITTED is equivalent to TRANSITION_RUNNING changing to false. Then can get details from the state such as whether taskbar is stashed and icon alignment from mLauncherState Test: quick switch from home, both with taskbar stashed in apps and not Fixes: 194728611 Bug: 204657916 Change-Id: I6cf84ec73a4036e14cc7268667c6f62100884c27
2021-12-07Align OverviewActionsView for 3 button taskbarVinit Nayak
Bug: 189807374 Change-Id: I529dba5d4df3d0c3366c111e70991a36bec4bfc3
2021-12-07Merge "Remove LauncherState.TASKBAR visible element" into sc-v2-devTony Wickham
2021-12-07Animate split dividerVinit Nayak
* TODO currently it doesn't animate when dragging a split task back down because we need to sync that with the other task scaling animation playback controllers. * It also doesn't animate in when opening a split pair from overview because I think shell is setting it to be visible before the divider leash even makes it to launcher Bug: 202914644 Change-Id: I6c60cffdb63aa262d0b547f85acc604c0c8a3637
2021-12-07Use percentage scaling for overview thumbnail sizeAlex Chau
- Limit overview to screen ratio to be at max 70% - Tuned row spacing and page spacing - Added 2 more test activities to testOverviewForTablet to avoid dismissing tasks at end of grid, as more grid tasks are now shown Bug: 207350366 Test: manual Change-Id: Id04871464bdb3ef2d6b046977b0ffd9bd51bc230 Merged-In: Id04871464bdb3ef2d6b046977b0ffd9bd51bc230
2021-12-06Cleanup some taskbar/hotseat handoff issuesTony Wickham
- Clearly distinguish Home <-> App icon alignment (ForResumedState and ForGestureState) from Home <-> Home states (ForLauncherState) by renaming onIconAlignmentRatioChanged() to onIconAlignmentRatioChangedForAppAndHomeTransition (for the former) - Make sure initial state is properly applied by treating all flags as changed - onIconAlignmentRatioChangedForStateTransition only runs when launcher is resumed (fixes 208648294) - Animate taskbar background alpha when going between home and app, separate from icon alignment (bug: 204657916) - Only copy hotseat's alpha to taskbar when hotseat is originally visible (also bug: 204657916) Test: Open an app on small screen, open large screen and ensure taskbar stays at the bottom instead of aligning with non-present hotseat (bug: 208648294) Test: Swipe up and down on home scren, ensure taskbar background never appears and there's no jump between taskbar and hotseat Change-Id: Iea59965118f2bdbd8ce49279f76fb01fbd61f60b
2021-12-06Remove LauncherState.TASKBAR visible elementTony Wickham
It's no longer used, so removing to cleanup code and reduce confusion Test: no functional change Fixes: 209512651 Change-Id: Ibd671bde7190df976b5365331731a55a9abdbb35
2021-12-06Fix taskbar stash misalignment when going from app to overviewTony Wickham
Keep taskbar unaligned with hotseat if we're stashing anyway Test: Swipe up from app with taskbar present to overview, check frame by frame to ensure icons morph directly into the handle instead of above it Fixes: 208697792 Change-Id: If3238286b3383e75eb71fbd3b97d34bb3b44340b
2021-12-06Merge mpr-2021-11-05Eric Arseneau
Change-Id: I045d0ad50e724e4ff26510aea11dc14872e3cb78
2021-12-06Merge "Fix taskbar jumping when going home" into sc-v2-devTony Wickham
2021-12-06Merge "Play return to icon animation if user swipes back to All Apps." into ↵Jon Miranda
sc-v2-dev