Commit Graph

6164 Commits

Author SHA1 Message Date
Tony Wickham d833fe4a12 Merge changes Ie55bd70e,I69bcfa97,I222522bc into tm-qpr-dev
* changes:
  Fix taskbar stash state not persisting properly across recreate
  Add support to Tapl to recreateTaskbar
  Don't rely on QuickstepLauncher instance for tests
2022-09-01 00:52:54 +00:00
Brian Isganitis 5166c5da3f Merge "Snap to last task if swiping down at a greater Y than X velocity." into tm-qpr-dev 2022-08-31 02:14:38 +00:00
TreeHugger Robot bcbba897fc Merge "Add app predictions to secondary display app drawer & fix tab UI." into tm-qpr-dev 2022-08-31 00:01:21 +00:00
Schneider Victor-tulias ff5ad47a06 Merge "Add gesture nav error state tracking and logging" into tm-qpr-dev 2022-08-30 22:42:46 +00:00
Sukesh Ram 1b4869fcbc Add app predictions to secondary display app drawer & fix tab UI.
Bug: 233926067
Test: Manual
Change-Id: I2f45a4b30964b365bf149e8864a3af2ea909a237
(cherry picked from commit 9e5fe63a22)
Merged-In: I2f45a4b30964b365bf149e8864a3af2ea909a237
2022-08-30 22:30:03 +00:00
Brian Isganitis c043d45c42 Snap to last task if swiping down at a greater Y than X velocity.
If you swipe down slightly diagonally, it will almost always be treated as a swipe to the next task rather than a return to the current task. If we are swiping down and the Y velocity is grater, we should snap to the current task instead.

Test: Manually in fully gestural mode.
Bug: 222117127
Change-Id: I8c3cd483f7ceefe0de1e24b6e98918b12428ed10
2022-08-30 20:59:40 +00:00
Tony Wickham e74569e935 Fix taskbar stash state not persisting properly across recreate
Because we check supportsVisualStashing() in
TaskbarStashController#init(), we need to avoid using
TaskbarUIController to provide that value since TaskbarUIController
isn't initialized until a bit later than the other controllers. So I
moved the logic from supportsVisualStashing() back to
TaskbarStashController, but still allow TaskbarUIController to override
it (e.g. for DesktopTaskbarUIController).

After that fix, I noticed that force stopping launcher (to test the fix)
would briefly show the taskbar background before resetting the stashed
state. This is also due to LauncherTaskbarUIController not being ready
immediately, since that's what sets FLAG_IN_APP due to launcher being
paused. To work around this, I set FLAG_IN_APP to true by default in
TaskbarStashController#init(), since that is the most common case, and
taskbar background/stashed handle isn't shown on home anyway.

Test: Force stop launcher while taskbar is stashed, verify it recreates
as stashed without background flicker; same when changing wallpaper
color on home or in app; also tested when taskbar isn't stashed and in 3
button mode for good measure
Test: testHideTaskbarPersistsOnRecreate
Fixes: 235986838

Change-Id: Ie55bd70e8288d5ad7433dde970f18c176831d747
2022-08-30 13:42:04 -07:00
Tony Wickham c8e824dbdb Add support to Tapl to recreateTaskbar
Also moved references of "tasbkar_view" to share TASKBAR_RES_ID constant

Test: compiles; see follow up CLs
Bug: 235986838
Change-Id: I69bcfa975550e567f3daa35af8a810546297d79c
2022-08-30 13:40:45 -07:00
Brian Isganitis 168482688a Merge "Simplify calculateEndTarget logic." into tm-qpr-dev 2022-08-30 20:09:10 +00:00
Schneider Victor-tulias 038922a653 Add gesture nav error state tracking and logging
- Added ActiveGestureErrorDetector
- Removed startQuickstep logs; these were confusing and not helpful in ActiveGestureLogs

Test: printed logs after several gestures
Bug: 227514916
Design: go/gesture-nav-logging
Change-Id: Ia2a7e4f90a3a371d9a92190aa66eb07acd061d6c
2022-08-30 12:18:29 -07:00
Pat Manning b4a30ab955 Merge "Refactor overview progress as splash progress." into tm-qpr-dev 2022-08-30 13:29:53 +00:00
Pat Manning 81dc9ad131 Refactor overview progress as splash progress.
This also avoids showing splash in split select state

Fix: 242284413
Test: follow up after b/238405972
Change-Id: I2e83fa3d030e8a74edb4152c472dbf02ac5a80b1
2022-08-30 11:23:08 +01:00
Tony Wickham b6f593042d Don't rely on QuickstepLauncher instance for tests
Instead, bind to TouchInteractionService and use that binder to call into taskbar.

Test: TaplTestsTaskbar
Bug: 235986838
Change-Id: I222522bc53c9d1698542fbae52c37889f14abf41
2022-08-29 17:27:27 -07:00
Brian Isganitis 2303eb0aac Simplify calculateEndTarget logic.
This method has grown quite large and has a lot of if-else nesting. We
can address these readability issues by defining some helper methods for
specific cases (e.g. flingY and non-fling).

Bug: 222117127
Test: Manual
Change-Id: Ia6012dbcee9a842b4b5bd2ffdb9aea978cfdfc26
2022-08-29 20:47:32 +00:00
Brian Isganitis dc643f9bea Add doc clarifying Taskabr icon alpha consumer purpose.
The motivation ternary `alpha > 0 ? 0 : 1` was not immediately clear, so adding some clarification for future readers.

Test: No
Change-Id: I558e86153e68572a519317dba7fbba180cb5678e
Fix: 239074423
2022-08-27 20:46:49 +00:00
Schneider Victor-tulias 7fb96a5305 Merge changes I562abc6c,I7a48d960,I0916f969 into tm-qpr-dev
* changes:
  Update ActiveGestureLog to store n-gestures rather than n-events.
  Add input consumer selection reason to active gesture logs
  Collapse EventLogArray into ActiveGesture log.
2022-08-25 20:42:13 +00:00
Schneider Victor-tulias 976fdbe623 Update ActiveGestureLog to store n-gestures rather than n-events.
Test: printed logs after several gestures
Bug: 227514916
Change-Id: I562abc6c5c43e53a53b085234b0be01dae90ac06
2022-08-25 17:05:01 +00:00
Schneider Victor-tulias 24637f50c5 Add input consumer selection reason to active gesture logs
Test: manually tried gestures in 3 button and gesture nav and checked logs
Bug: 227514916
Change-Id: I7a48d960ef5a41ddee95153fa08a2345f00cbef7
2022-08-25 10:03:30 -07:00
Schneider Victor-tulias a0cd3e0295 Collapse EventLogArray into ActiveGesture log.
EventLogArray is never used directly, only used as a super class of ActiveGestureLog. Simplifying the hierarchy to simplify follow-up changes.

Test: manually tried gestures in 3 button and gesture nav and checked logs
Bug: 227514916
Change-Id: I0916f969a776953ddc4886846ad2f4936566e7d7
2022-08-25 09:59:13 -07:00
Sunny Goyal d6801af69a Inlining BaseQuickstepLauncher to QuickstepLauncher
Bug: 243022799
Test: Presubmit
Change-Id: I3706fc1f10d88ea73bd873c7e94c3e78795791eb
2022-08-24 12:51:21 -07:00
Jeff Chang 831f5ee748 Merge "Launch split task with correct UserHandle" into tm-qpr-dev 2022-08-24 07:48:09 +00:00
Jeff Chang 9f27fa3687 Launch split task with correct UserHandle
PendingIntent#getActivity gets the owner UserHandle from the app
context. That makes the activity launch fail since the app only exists
in the work profile environment(secondary user).

This CL gets the correct Userhandle from Launcher and use
PendingIntent#getActivityAsUser to launch split task.

Bug: 242039471
Test: Launch Google chat by shortcut to enter split (work-profile)
Change-Id: Ie1db8a858bf9cee700cb3ff3a9e607a5d1dbad30
2022-08-24 10:39:04 +08:00
Winson Chung c04576ad6e Merge "Defer adding surface changed callback until view root is valid" into tm-qpr-dev 2022-08-23 21:32:48 +00:00
Pinyao Ting 023b973d15 Explicit Nullbility in Launcher (Part 2)
This CL updates the nullabality on methods associated with IconCache in Launcher.

Bug: 242895652
Test: manual
Change-Id: I4832c0950141c8a52c8a9e62659ccabb082897c8
2022-08-22 17:15:44 -07:00
Sunny Goyal 211496e3d8 Merge "Removing some obsolete features" into tm-qpr-dev 2022-08-22 20:27:45 +00:00
Ats Jenk 5db5015fe2 Merge "Hide freeform button from app menu in recents" into tm-qpr-dev 2022-08-20 00:37:56 +00:00
Ats Jenk 6b31ed99d9 Hide freeform button from app menu in recents
When desktop windowing prototype is enabled, we should only be able to
switch apps to freeform mode via the quick tile.
Disabling other routes to put individual apps to freeform.

Test: visually verified that freeform button is not visible when desktop
windowing prototype flag is enabled
Bug: 242906219

Change-Id: Ib1ce75969b67f30d82262927e2e4113fab2c4956
2022-08-19 12:35:26 -07:00
Jeremy Sim 5ea6cfdb7e Merge "Revert "Update animations for TM-QPR: Overview > OverviewSplitSelect transition"" into tm-qpr-dev 2022-08-19 13:37:58 +00:00
Jeremy Sim 2fe7dd7306 Revert "Update animations for TM-QPR: Overview > OverviewSplitSelect transition"
This reverts commit a50bb39048.

Reason for revert: Causes a P1 bug (b/241165022).

Fixes: 241165022
Bug: 236760307
Change-Id: Icc080d9a37e26d70d0f4cf846a4fd39df3b71625
2022-08-18 21:28:54 +00:00
Winson Chung b8a2a026a5 Defer adding surface changed callback until view root is valid
- It appears there are cases where the view root is not valid (in
  which case schedule() returns false and we don't wait to handle
  the callback) which causes an NPE, but in these cases we don't
  need to add the surface changed callback at all.

Bug: 202776119
Bug: 242347940
Bug: 242897135
Test: Launch an app with sharesheet, swipe up and verify that
      screenshot callbacks

Change-Id: Icc3afc604bd925c5d49c693b7de51755f5a8bd42
2022-08-17 20:27:57 +00:00
Evan Rosky 4a8871ce4c Merge "Notify recents controller when no-longer finishing-to-home" into tm-qpr-dev 2022-08-16 16:02:45 +00:00
Jeremy Sim cf03d04469 Merge "Update animations for TM-QPR: Overview > OverviewSplitSelect transition" into tm-qpr-dev 2022-08-15 21:19:21 +00:00
Evan Rosky 4b8f86ebcc Notify recents controller when no-longer finishing-to-home
Bug: 241818882
Test: open app, swipe to recents, restore app
Change-Id: Ifb258319b7a54917f9f6ac08ccefeed5a47480e2
2022-08-15 10:26:49 -07:00
Jeremy Sim a50bb39048 Update animations for TM-QPR: Overview > OverviewSplitSelect transition
The animation from Overview to OverviewSplitSelect is now updated to the latest spec. See bug for details.
- New timings
- Task thumbnails slide in with a new spring animation
- Icons fade out and fade in appropriately
- SplitInstructionsView has a new compound "unfold" animation

Bug: 236760307
Test: Manual on tablet and phone. Looks good on both true and fake orientations.
Change-Id: If98d4464aa51c876d79bee9672279992a2cf9026
2022-08-14 10:34:51 -07:00
Stefan Andonian 28d354c9a1 Merge "Fix for bug where expensive launcher animations were being paused and never resumed." into tm-qpr-dev 2022-08-12 17:07:03 +00:00
Stefan Andonian 8b336195a6 Fix for bug where expensive launcher animations were being paused and never resumed.
Bug: 240623130
Test: Verified on device that the issue is not reproducible after fix.
Change-Id: I7b1e2f70fd75b1eddf340a4f85465cc6d5b65f73
2022-08-11 20:36:41 +00:00
Jerry Chang 4322190a24 Merge "Integrate split pair cold launch transition with shell transition" into tm-qpr-dev 2022-08-11 07:05:18 +00:00
Winson Chung 99b1580d79 Merge "Force finish pending frame drawn callback once launcher is stopped" into tm-qpr-dev 2022-08-11 05:32:41 +00:00
Winson Chung e7bf15932b Force finish pending frame drawn callback once launcher is stopped
- In rare cases, we may schedule to update the taskview with a
  screenshot but Launcher will not finish calling back because
  the activity is stopped (can be the result of the animation
  cancelling back to the app), which prevents Launcher from
  scheduling any frames and properly decrementing the frame
  count.

Bug: 202776119
Test: Launch an app with sharesheet, swipe up and verify that
      screenshot callbacks
Change-Id: I6b7e121fd5d9ef27ef5cccca060a4ff819fe9acc
2022-08-10 19:58:19 +00:00
Alex Chau 360ec033ac Use WindowManagerProxy.getRotation to determine if rotation has changed
- Follow-up of http://ag/19559863 as Config diff on windowConfiguration does not work on 3P Launcher, so diff WindowManagerProxy.getRotation instead
- Also centralized Configuration diff logic into StatefulActivity

Bug: 240730723
Test: manual on 90/180 degree rotation in Launcher, RecentsActivity and 3P Launcher
Change-Id: Ib368ed5d749841a6873a03e2644608ff68885922
2022-08-10 18:14:06 +01:00
Nicolò Mazzucato 92b4a88f78 Merge "Disable hinge sensor while the screen is off" into tm-qpr-dev 2022-08-10 09:32:53 +00:00
Alex Chau 16b6511e14 Merge "Detect potential WindowConfiguration change at onApplyWindowInsets" into tm-qpr-dev 2022-08-10 09:14:11 +00:00
Vinit Nayak 89be3a4c6d Merge "Show 3 button nav on phone in Taskbar (1/2)" into tm-qpr-dev 2022-08-10 03:06:53 +00:00
Vinit Nayak 8a3d05587e Show 3 button nav on phone in Taskbar (1/2)
* TODO: Landscape/seascape support,
        Separate nav spacing out into
        separate class/add tests

Bug: 219035565
Change-Id: I8f5c007f04ea4d6df15962772806356181d764ff
2022-08-09 13:25:50 -07:00
Alex Chau ccc430e2c1 Detect potential WindowConfiguration change at onApplyWindowInsets
- Invoke onConfiguration when receiving inset changes
- In Laucnher/RecentsActivity onConfiguration, additionally detect for windowConfiguration's rotation change; if Configuration stays the same, it'll be ignored.

Bug: 240730723
Test: manual on 90/180 degree rotation in Launcher and RecentsActivity
Change-Id: I7087878af847d62e1c715a4f52a18818d1a6c258
2022-08-09 19:09:42 +01:00
Jon Miranda b4972a3291 Merge "Make windows transform into icons quicker for certain devices." into tm-qpr-dev 2022-08-09 16:14:58 +00:00
Alex Chau aae5739511 Merge "Update hotseat QSB alpha after isQsbInline changes" into tm-qpr-dev 2022-08-09 14:23:33 +00:00
Jon Miranda da8c0f9926 Make windows transform into icons quicker for certain devices.
Bug: 240671690
Test: manual
Change-Id: Ie36a68c1e92443ca453778df6b8f7549d6e1f7e1
2022-08-08 16:58:04 +00:00
Jerry Chang 3a971a67d6 Merge "Fix no action menu for split pairs in overview panel" into tm-qpr-dev 2022-08-08 14:38:13 +00:00
Pat Manning 80d33f35a9 Merge "Skip button layout spacing call when kids nav bar is active." into tm-qpr-dev 2022-08-05 23:29:24 +00:00