Commit Graph

7275 Commits

Author SHA1 Message Date
Alex Chau 1bf0fe1b70 Add back screenshot button to Launcher3
- Also make spacing between buttons always 36dp
- Updated screenshot button image for Launcher3

Fix: 208384949
Test: Start overview in Launcher3WithQuickStep, test screenshot button is working
Change-Id: Ieb60ce134813202c1d14137fff0a131e1f5f8c96
2021-12-03 12:32:29 +00:00
Alex Chau 683b4cd824 Merge "Destroy activity/view references to avoid memory leak" into sc-v2-dev 2021-12-03 12:30:49 +00:00
Alex Chau 402252f4b6 Merge "Align OverviewActionsView for 3 button taskbar" into sc-v2-dev 2021-12-03 12:30:49 +00:00
Winson Chung e4dc13ac72 Fix issue with Shell listeners being unbound if SysUI is restarted
- If SysUI is restarted (ie. during dev or a crash), the components
  registering the shell listeners may not be aware of this, and
  listener callbacks will not be re-registered.  Currently all the
  listeners are managed correctly (bound & later unbound) so we can
  just keep the active listener references to re-register if this
  happens.

Bug: 207142749
Test: Kill SysUI, start some apps and ensure Launcher still shows them
      in recents
Change-Id: I47665180bbff3a12b12686e2ca3063ecd188bb56
2021-12-03 04:38:26 +00:00
Vinit Nayak 573fca80f6 Destroy activity/view references to avoid memory leak
Bug: 204891006
Change-Id: If60ac1716c30ebe68fb6e7457d71f542d3075422
2021-12-02 16:05:52 -08:00
TreeHugger Robot 9c7baac12d Merge "Fix direction of matrix inversion" into sc-v2-dev 2021-12-02 23:52:42 +00:00
TreeHugger Robot 7f54d5cde4 Merge "Add icons for staged split" into sc-v2-dev 2021-12-02 23:00:48 +00:00
Alex Chau b31176c83b Merge "Fix switch access for overview grid" into sc-v2-dev 2021-12-02 22:32:01 +00:00
Vinit Nayak 20cbfa5427 Fix direction of matrix inversion
* "And I would have gotten away with it too
if it wasn't for you meddling [matrices]"

Fixes: 208360236
Change-Id: I1607a19c81830f6a037d2337ee1d9e944096e0ac
2021-12-02 22:08:06 +00:00
Tony Wickham e59a723af3 Fix taskbar jumping when going home
- Set resumed state immediately when finishing recents controller to launcher, otherwise there's a race where we start animating gesture state to 0 before animating resumed state to 1, which causes the jump in the bug

Test: Swipe from app to home 10 times, no jump
Fixes: 203725820
Change-Id: Ie8a1add29902a9961ba4d7861ba5424ab656f1c8
2021-12-02 12:19:32 -08:00
Winson Chung eb4b2d0147 Merge "Fix NPE from null thumbnail data when canceling recents animation" into sc-v2-dev 2021-12-02 19:01:40 +00:00
Tony Wickham 3d2a1a7368 Merge "Remove TaskbarLauncherStateController#setIconAlpha()" into sc-v2-dev 2021-12-02 17:39:08 +00:00
Nick Chameyev c5d3a0d891 Do not animate QSB and hotseat when portrait
Disables fold/unfold animation for QSB and hotseat
icons when in portrait orientation. Launcher workspace
icons and widgets are still animated intentionally.
Reuses NaturalOrientationRotationProvider which is currently
used to disable fold/unfold animation in the status bar when
in non-natural orientation.

Bug: 201518277
Test: fold/unfold on launcher in landscape =>
 QSB and hotseat animated;
 rotate screen during fold/unfold animation =>
 translation reset after rotating to portrait,
 animated after returning to landscape;
 rotate after fold/unfold animation => no changes
Change-Id: I8ed405b09f445f554d7638ab44393c90773e0bb6
2021-12-02 14:39:08 +00:00
Schneider Victor-tulias fc846eef41 Update taskbar edu strings for i10n.
Fixes: 200777300
Test: none
Change-Id: I9d6e2575940d2fcdd354c94036662c178f9d6eee
2021-12-01 16:04:33 -08:00
Tony Wickham 488bca7934 Remove TaskbarLauncherStateController#setIconAlpha()
Instead use setTaskbarViewVisible directly. Now that we stash when going to overview, we shouldn't have any launcher state where we need to fade out TaskbarView icons

Test: quick switch from home (follow up CL)
Bug: 194728611
Change-Id: I03e1fa4037b7e8a08494f6b7e065d144c4bc4e1b
2021-12-01 15:27:44 -08:00
Vinit Nayak 455197bf41 Add icons for staged split
Fixes: 208649953
Change-Id: I8b7bb3a650e836608ebe6aa50631026f5f6a7c63
2021-12-01 14:58:53 -08:00
TreeHugger Robot 2bede2dbf2 Merge "Animate right icon of app pair" into sc-v2-dev 2021-12-01 20:06:56 +00:00
TreeHugger Robot 87f010f3bd Merge "Apply/reset split scroll offset regardless of previous state" into sc-v2-dev 2021-12-01 19:34:51 +00:00
TreeHugger Robot e7e3d6ad31 Merge "Removed onBackPressed handling in SplitSCreenSelectState" into sc-v2-dev 2021-12-01 18:21:05 +00:00
Alex Chau e81af3570b Animate right icon of app pair
Fix: 208647365
Test: Swipe up and observe right icon of app pair
Change-Id: I37a716c156d64c312d132bea80540ce922f3f709
2021-12-01 17:45:08 +00:00
Alex Chau 4536c2fc30 Apply/reset split scroll offset regardless of previous state
- Also do the same in setState without animation

Fix: 208605204
Test: Exit split screen and enter overview
Change-Id: I34dd102527dffa90925b6f0fd22465f1fe6e819c
2021-12-01 17:23:46 +00:00
Alex Chau a307492525 Removed onBackPressed handling in SplitSCreenSelectState
- So it'll have exact same behavior as OverviewState to exit overview when going back
- Also removed RecentsView.cancelSplitSelect as it's longer needed

Fix: 181707736
Test: manual
Change-Id: Ide4dfc64680ecc9adfe245ae2de1463735b0490e
2021-12-01 16:24:10 +00:00
Vinit Nayak b15d3cfe73 Merge "Treat RTL split placeholder animation same as LTR" into sc-v2-dev 2021-12-01 16:01:36 +00:00
Fedor Kudasov d6a28fe202 Merge "Separate getTaskViewAt usage" into sc-v2-dev 2021-12-01 10:08:06 +00:00
TreeHugger Robot f7518d42eb Merge "Schedule OverviewCommandHelper callbacks for GroupedTaskView" into sc-v2-dev 2021-12-01 06:35:35 +00:00
Vinit Nayak f198f6e492 Merge "Add task unpinning support for 3 button taskbar" into sc-v2-dev 2021-12-01 04:34:06 +00:00
Vinit Nayak 09a822a6fe Schedule OverviewCommandHelper callbacks for GroupedTaskView
* Schedule runnables to clear pending queue in
OverviewCommandHelper similar to how TaskView does it.
* End callbacks get run when recents animation finishes in
RecentsView in the case of live tile when recents animation
is still running
OR
in directly when the split remote animation finishes

Bug: 207845542
Change-Id: I7e858ce55b08cde6436d44f2e857e28b73458f0b
2021-11-30 20:18:50 -08:00
Vinit Nayak b997930afc Treat RTL split placeholder animation same as LTR
* Since we're doing all transformations in screen
coordinates we don't need to account for RTL.

Bug: 202156862
Change-Id: Ibcbf698dbc5b8fabf2647949de6d2718937832d5
2021-11-30 19:58:00 -08:00
Vinit Nayak 570653346f Add task unpinning support for 3 button taskbar
Bug: 199544447
Test: Tested on small and large screen
Change-Id: Ib7785992ef11825cd07a929e2cb623d02ef246f1
2021-11-30 17:18:09 -08:00
Jon Miranda 5040335e35 Remove keepWindowOpaque and have the window always fade out.
We built this method so that the window would have
something to fade out on top of. But with longer icon loading times,
this causes a buggy experience since the window is opaque
for the entire duration of the animation.

Having the window always fade out is a better UX for now.
Next step is to always init the FloatingIconView with the
in-memory icon, and then possibly caching both layers
of AdaptiveIcon.

Test: restart phone, swipe up to home
      restart phone, back swipe to home (This flow never called keepWindowOpaque)
Bug: 207389002

Change-Id: Ida64829c60881786ed91e8641cdf7a278b37e201
2021-11-30 16:55:07 -08:00
TreeHugger Robot 96f3f2214c Merge "Fix potential memory leak by setting mControllers = null" into sc-v2-dev 2021-12-01 00:49:56 +00:00
Jerry Chang 36eb818600 Merge "Remove stage type from split screen APIs" into sc-v2-dev 2021-12-01 00:41:10 +00:00
Tracy Zhou d1f9fde371 Merge "[DO NOT MERGE] Make the cutout slightly smaller" into sc-v2-dev 2021-12-01 00:34:00 +00:00
Vinit Nayak 6e906f3436 Align OverviewActionsView for 3 button taskbar
Bug: 189807374
Change-Id: I3c7ec5f8c7b588032ff83ca7ab461d2aac7bfa35
2021-11-30 16:24:12 -08:00
Tony Wickham f6c28a4381 Fix potential memory leak by setting mControllers = null
Test: N/A
Bug: 202511986
Change-Id: Iad7cc89e0e68ce09ebe4ca3ab89392b50b6a82c7
2021-11-30 14:37:36 -08:00
TreeHugger Robot b78cbf29e5 Merge "Possible fix for NullPointerException b/206040100." into sc-v2-dev 2021-11-30 19:58:24 +00:00
Sebastian Franco 8afeba605a Possible fix for NullPointerException b/206040100.
There is a NullPointerException when trying to get the
length of the array.

Test: Manually tested
Fix: 206040100
Change-Id: I69a03fd3658094655eaf97fa21039fd373ee37d5
2021-11-30 10:09:02 -06:00
Alex Chau a8fc7e03fd Close task menu scrim when pressing home button
- Generally close all floating view when starting home from Recents

Bug: 193432925
Test: with 3 button, open task menu, then press home
Change-Id: Ic99c50333c797f222fc8e682fd0f3fcc4d641d47
2021-11-30 14:27:36 +00:00
Jerry Chang 8176366f54 Remove stage type from split screen APIs
Bug: 198438631
Test: manual check
Change-Id: Ic4f41e39013e4d49585da4cda9b28151c549357a
2021-11-30 17:15:40 +08:00
Tracy Zhou 260b90c7ad Merge "Reset live tile params along with resetTaskVisuals" into sc-v2-dev 2021-11-30 04:41:40 +00:00
Adam Bookatz cbafa6803b Merge "Revert "Fix issue with Shell listeners being unbound if SysUI is restarted"" into sc-v2-dev 2021-11-30 03:44:30 +00:00
Tracy Zhou bb594548bb [DO NOT MERGE] Make the cutout slightly smaller
Temporary fix for S. Leaving the bug open for a proper fix in T.

Since we reverted the z order back (launcher on top), we should apply this fix from S and find a proper solution in T

Bug: 189265196
Test: https://screenshot.googleplex.com/75fgCva736rqwg5
Change-Id: Ice3b189a41f759e090334e360e44543eabc4836d
(cherry picked from commit 26f47c711a)
2021-11-30 01:01:59 +00:00
Tracy Zhou a56dc760dd Reset live tile params along with resetTaskVisuals
The dismissal animation doesn't return the translationY to 0, but resetTaskVisuals does.

Fixes: 207782306
Test: Drag live tile to dismiss lightly so it doesn't succeed. When it comes back, make sure it matches the cutout.
Change-Id: I64ee06ad72c403ab4fdd4671d08b1843a3e89253
2021-11-30 00:49:02 +00:00
Adam Bookatz 3d34f94784 Revert "Fix issue with Shell listeners being unbound if SysUI is restarted"
This reverts commit 34e384d2e1.

Reason for revert: Multiuser performance (b/208276322)

Change-Id: Icd27ab3095c446895360f8e2faa7f9c92ab2cf01
Bug: 208276322
2021-11-30 00:19:05 +00:00
TreeHugger Robot ed05712f04 Merge "Handle configuration changes in floating rotation button" into sc-v2-dev 2021-11-29 19:41:26 +00:00
Nick Chameyev ed6b29f211 Merge "Add WRITE_SECURE_SETTINGS permission to Launcher" into sc-v2-dev 2021-11-29 17:14:09 +00:00
Nick Chameyev c52ec89e1b Add WRITE_SECURE_SETTINGS permission to Launcher
We reused a code that handles rotation suggestion button
from SysUI in Launcher. It requires WRITE_SECURE_SETTINGS
permission to write how many times we have shown this button
to show ripple only the first 3 times.
AOSP Launcher didn't have this permission and it was crashing.

Bug: 205491152
Test: tap on rotation suggestion button when in AOSP launcher
Change-Id: I216abb86d43cc505aec1ff581c1f332ae3ad0db4
2021-11-29 12:21:35 +00:00
TreeHugger Robot c5f18aa980 Merge "Resets taskSplitTranslation of inactive orientation" into sc-v2-dev 2021-11-26 18:23:43 +00:00
Alex Chau 9ead9ca226 Fix switch access for overview grid
- Removed overscroll checking in switch access, as overscroll isn't supported via snapToPage
- Don't show forward/backward action if no further scroll is possible
- When scrolling right in overveiw grid, snap to the next non-fully visible task
- When scrolling left in overview grid, snap to a position that next non-fully visible task is on the left of the screen

Fix: 204162346
Test: Use switch action in Workspace/Recents with and w/o RTL
Change-Id: I0d4f201edf2da543703e88420e6f3255fb2ba16f
2021-11-26 17:51:32 +00:00
Alex Chau 9a5f99bfe6 Resets taskSplitTranslation of inactive orientation
Fix: 204185003
Test: manual

Change-Id: I10e49994e8a9723f39d7f9159de7c1f8216ea77f
2021-11-26 12:04:47 +00:00
Nick Chameyev 71eed5ca35 Handle configuration changes in floating rotation button
Update resources in floating rotation button
when configurations such as screen density, screen size,
current locale have changed.

Bug: 200103245
Test: change display size, locale, fold/unfold
 -> check that floating rotation button resources
    are updated
Change-Id: Ia69f4f8b393a686012e286a1e39822650c562d52
2021-11-26 11:38:28 +00:00
Jerry Chang 71b7d1537d Merge "Support to launch app pair from overview with recorded split ratio." into sc-v2-dev 2021-11-26 05:43:34 +00:00
Alex Chau b3a9386556 Use alternative way to fix split select page snapping issue
- Reverted to before ag/16095449 where reset() is called after state transition completed
- Call pageBeginTransition in dismiss animation to make sure onPageEndTransition is triggered to clear mCurrentPageScrollDiff properly
- Fixed a condition in resetFromSplitSelectionState ot use DeviceProfile.overviewShowAsGrid, as when state is in transition, showAsGrid() would be false

Fix: 207744890
Test: manual
Change-Id: I5a812a7ee26df2f953f7fed0155880620d2c4e66
2021-11-25 16:48:39 +00:00
TreeHugger Robot 32ebd9f94f Merge "Fix ClassCastException in QuickstepModelDelegate" into sc-v2-dev 2021-11-25 04:00:37 +00:00
Jerry Chang 279c3b7fa2 Support to launch app pair from overview with recorded split ratio.
Bug: 207479945
Test: Quickswitch back to app pair keep split ratio
Change-Id: Id24195c15fe59053cc51515a942f72c3b8e87ba7
2021-11-25 11:38:14 +08:00
TreeHugger Robot 79132556f7 Merge "Add TaskbarControllers#runAfterInit()" into sc-v2-dev 2021-11-25 00:08:08 +00:00
Tony Wickham a143500a69 Add TaskbarControllers#runAfterInit()
And use it in TaskbarModelCallbacks#commitItemsToUI(), which in rare cases can run during init() before other controllers (namely TaskbarStashController) have been initialized.

Test: call commitItemsToUI() in TaskbarModelCallbacks#init(), ensure no crash
Fixes: 204847702
Change-Id: Ib9df3ea91d41c76ad1d3392e43b444b8b4a91374
Merged-In: Ib9df3ea91d41c76ad1d3392e43b444b8b4a91374
2021-11-24 23:14:06 +00:00
Schneider Victor-tulias 380f8fd890 Fix ClassCastException in QuickstepModelDelegate
- Added a casting check as an immediate fix to b/173838775
- Added logging to help debug the corrupt state where an item of type other than FolderInfo is used as an other item's container.
- Added LoaderMemoryLogger for adding large logs that are only conditionally printed.

Bug: 173838775
Test: manually checked logs
Change-Id: I9491cb421b9fb807d5fb110b04ad069481de768f
2021-11-24 14:26:45 -08:00
Fedor Kudasov 4e678ff6d5 Separate getTaskViewAt usage
getTaskViewAt is used in two different contexts with different
assumptions:
1. In the context of iterating over the all TaskViews, where
the valid tasks indices are know.
2. In the context of requesting some TaskView by index, where
the caller expects null when the input index is invalid.
The nullability status of the method differs in these contexts
and therefore getTaskViewAt usage can be separated into two
different methods.

Bug: 205828770
Test: m LauncherGoResLib
Change-Id: I42c04c115c309f1849f9dfbb05c74b9b080acf13
(cherry picked from commit 4da3b4bdddbbff7a0dee1f57b3a74c616231e100)
2021-11-24 21:19:22 +00:00
Alex Chau 376b09ade2 Merge "Consider two panel in home to overview transition" into sc-v2-dev 2021-11-24 20:33:32 +00:00
Alex Chau 6095333370 Consider two panel in home to overview transition
- Get the value from DeviceProfile directly

Fix: 202444558
Test: manual
Change-Id: Ifadbbf34c8103d7275b8b4043dcae47d1168ae83
2021-11-24 18:11:45 +00:00
Tony Wickham b4aefc1277 Merge "Stash taskbar when IME is present, including during gestures" into sc-v2-dev 2021-11-24 17:54:18 +00:00
Alex Chau 226bd5b973 Merge "Fix grid layout problem after going back from split select" into sc-v2-dev 2021-11-24 10:32:46 +00:00
Winson Chung b9a3a8f7ab Fix NPE from null thumbnail data when canceling recents animation
Bug: 206339573
Test: Presubmit (unable to reproduce)
Change-Id: Ia4144fe1d09e7a0a178b9d4f102769c3ab3c376a
2021-11-24 04:23:10 +00:00
Tony Wickham 821e37b447 Stash taskbar when IME is present, including during gestures
- SysUI removes SYSUI_STATE_IME_SHOWING when starting a gesture from an app, but because unstashing has implications on the gesture transition (e.g. clips the bottom of the app), we defer handling the ime hiding until the gesture settles. Repurposed the flow that swaps the taskbar background during the gesture to support this case as well.
- Delay the unstash when IME is closing, to align with the end of the IME exit transition
- Remove TaskbarViewController.ALPHA_INDEX_IME now that we stash when IME is opening, since stashing already hides the taskbar icons
- Also support passing a starting progress to the stashed handle reveal animation, to allow it to be reversed when cancelled. For example, when returning to an app that has IME showing, we first start unstashing because we're in an app, but then we get the signal that IME is attached so we stash again almost immediately (within a frame or two).

Test: In both 3 button and fully gestural, open a keyboard in an app, ensure taskbar gets out of the way and then reappears at the end when the keyboard is dismissed
Bug: 202511986
Change-Id: I93c298a98ba369ea6310466ff3f802231c582687
2021-11-23 16:37:06 -08:00
Winson Chung 2919653136 Merge "Prevent setting launcher layer has opaque when there is content behind" into sc-v2-dev 2021-11-23 23:04:01 +00:00
Winson Chung c1afaa4042 Merge "Removing logs" into sc-v2-dev 2021-11-23 21:58:14 +00:00
Vinit Nayak 458832c09e Merge "Show multiple App Info A11y options for split app icons" into sc-v2-dev 2021-11-23 20:09:47 +00:00
TreeHugger Robot db5f5f05e7 Merge "Add scrim below TaskMenu" into sc-v2-dev 2021-11-23 19:29:00 +00:00
Jon Miranda c4a99bff04 Play return to icon animation if user swipes back to All Apps.
Bug: 205187702
Test: open app in all apps, swipe back to go back to all apps
Change-Id: I9e79c8365fdf667321343aaac2f8d77cb60a316a
2021-11-23 11:27:42 -08:00
Alex Chau 460638e5ef Fix grid layout problem after going back from split select
- Don't reset mFocusedTaskViewId when focused task become split, so it's reset properly when it's added back to RecentsView
- Moved applySplitScrollOffset to RecentsViewStateController to be called after mSplitHiddenTaskView is added back to RecentsView
- Update scroll after going back from split
- Don't reset mSplitHiddenTaskView's translation as it'll clear the grid translations

Test: manual
Bug: 181707736
Change-Id: I4bd204fc537ee520216f875b3eddf4dc94f7bfd8
2021-11-23 16:07:25 +00:00
Thales Lima f316a267d8 Add scrim below TaskMenu
When opening a menu, a scrim with 80% alpha should be shown on top of
Recents view.

Align task menu second row with icon: when the menu shows up in the
bottom row in landscape, the menu should be aligned on the second row.

TODO: there is a RTL bug that I'm waiting because it also affects other
parts, not only this menu.

Bug: 193432925
Test: open Overview and tap the app icon
Change-Id: I6846ee937cb5e739e8be64d17045bc3b32e28e46
2021-11-23 09:13:25 -03:00
Winson Chung 34e384d2e1 Fix issue with Shell listeners being unbound if SysUI is restarted
- If SysUI is restarted (ie. during dev or a crash), the components
  registering the shell listeners may not be aware of this, and
  listener callbacks will not be re-registered.  Currently all the
  listeners are managed correctly (bound & later unbound) so we can
  just keep the active listener references to re-register if this
  happens.

Bug: 207142749
Test: Kill SysUI, start some apps and ensure Launcher still shows them
      in recents
Change-Id: Iba3b11ee972caf8f0b482942d38c3a7359211180
2021-11-23 08:04:14 +00:00
Winson Chung 6526973952 Prevent setting launcher layer has opaque when there is content behind
- This can prevent the layered content behind to not be visible (and
  since launcher draws a cutout and the wallpaper isn't shown, may
  result in a black rect.  We only specialize for this case while
  Launcher is in Overview.
- Also don't need to defer updating drawsBelowRecents, this can result
  in the state not being reflected since it runs after the last update
  of the transform params

Bug: 205789573
Test: Swipe up from app and ensure behind layers are visible (also
      ensure this doesn't affect blur during the swipe or optimizations
      after you leave overview)
Change-Id: I07689b3d9b65708797576e5fbefe12fb1f544119
2021-11-23 05:21:31 +00:00
TreeHugger Robot 0b7ed895e7 Merge "Invoke Assistant on 3 button long click on Taskbar" into sc-v2-dev 2021-11-23 03:34:04 +00:00
Vinit Nayak bca13abc82 Invoke Assistant on 3 button long click on Taskbar
Bug: 204273914
Change-Id: I757fa40ad9ac0ace44b57c7dd08ec30b4c0ae6d0
2021-11-22 17:32:16 -08:00
Winson Chung a5642379d9 Merge "Skip scheduling frame callback if view root is already detached" into sc-v2-dev 2021-11-23 00:41:30 +00:00
Tony Wickham 426b021e22 Merge "Add support for dark tint on taskbar nav buttons" into sc-v2-dev 2021-11-22 22:05:35 +00:00
Alex Chau 48644c75b3 Merge "Consider launching task's position on screen in pivot calculation" into sc-v2-dev 2021-11-22 21:07:41 +00:00
Winson Chung 550dc8dc69 Merge "Clear ref after animation if visual stashing not supported" into sc-v2-dev 2021-11-22 17:22:16 +00:00
Alex Chau 3c2298668a Merge "Remove temporary logging for NO_SCREENSHOT bug/." into sc-v2-dev 2021-11-22 11:12:23 +00:00
Winson Chung e2074f01c0 Skip scheduling frame callback if view root is already detached
- Also remove references to deprecrated compat class

Bug: 206932656
Test: Presubmit
Change-Id: I1add65b0fe03dedea872d162e51095bf9c648acf
2021-11-20 00:58:43 +00:00
Winson Chung c2a84d887f Clear ref after animation if visual stashing not supported
Bug: 206814323
Test: Presubmit
Change-Id: Ia38bd2707edbddf1b1f2ad98b3cdac4c8c62a6d3
2021-11-19 23:52:18 +00:00
Winson Chung 5e49df2bbe Merge "Set sync applier on the transform params for the glued targets" into sc-v2-dev 2021-11-19 22:24:13 +00:00
Jonathan Miranda 2d9ac4e67f Merge "Use empty intent instead of null when creating stub TaskKey" into sc-v2-dev 2021-11-19 22:05:07 +00:00
Vinit Nayak 54baaae0ab Merge "Open taskMenu based on TaskIdAttributeContainer" into sc-v2-dev 2021-11-19 21:51:03 +00:00
Zak Cohen d95942132d Remove temporary logging for NO_SCREENSHOT bug/.
Bug: 202414125, 203583301
Test: Local
Change-Id: I8345bd9f1c3ee93971d64ed49cf613cfd09ce10c
2021-11-19 13:49:36 -08:00
Jon Miranda 1f2b9b1c36 Use empty intent instead of null when creating stub TaskKey
Bug: 199027804
Test: manual
Change-Id: Ie66c8740453088791e026fa51a2842f59c6c67fd
2021-11-19 12:06:42 -08:00
Vinit Nayak a59835214f Open taskMenu based on TaskIdAttributeContainer
* We were always passing in the same task no matter
which task icon was clicked.
* Use TaskIdAttributeContainer to associate
IconViews with their respective tasks

Fixes: 206154715
Test: Correct menu opens for split and fullscreen
tasks

Change-Id: I5f264bb69828532bdefffb7ec4b9ff1e501de086
2021-11-19 11:38:31 -08:00
Winson Chung a5960223cf Set sync applier on the transform params for the glued targets
Bug: 199043513
Test: Swipe up with split task and scroll really quickly
Change-Id: Ie10b27457903d8db4d4c973ab5b7e669da2c4998
2021-11-19 19:33:54 +00:00
Jonathan Scott 6547721d8c Merge "Revert "Open taskMenu based on TaskIdAttributeContainer"" into sc-v2-dev 2021-11-19 16:44:30 +00:00
Jonathan Scott ec79eb9cbc Revert "Open taskMenu based on TaskIdAttributeContainer"
This reverts commit c1ec2d4260.

Reason for revert: broken build b/207126572

Change-Id: I0908e8e6579bc54c6ce1dff88bddf8b030f336d9
Fixes: 207126572
2021-11-19 16:43:45 +00:00
TreeHugger Robot 988a87526e Merge "Open taskMenu based on TaskIdAttributeContainer" into sc-v2-dev 2021-11-19 16:06:30 +00:00
Alex Chau 2998307cd6 Use only current density to check isTablet
- Removed DeviceProfile.allowRotation and use DeviceProfile.isTablet instead, which only uses current density to calculate its value
- Reverted default allow_rotation preference handling to before ag/14234761

Fix: 203817448
Test: isTablet is set correctly in different screen sizes
Change-Id: Ic6c8dfc774e7787f62d489ad27720a7644c1e8c7
2021-11-19 15:27:01 +00:00
Alex Chau 6499e83c57 Consider launching task's position on screen in pivot calculation
- Instead of using RecentsViewScroll, put task's position offset versus current scroll as TaskRect calculation, so it's considered when calculating for putting task to full screen
- Revert back RecentsViewScroll to apply before RecentsViewScale
- Added new property in PagedOrientationHandler to apply both primary/secondary param without clearing the other, and renamed an existing method

Fix: 206972618
Test: Quick switching
Test: Launch task from grid, launch side task from carousel overview
Change-Id: I5977975ed1e930ad70b81d83513d8f3a00c0aed4
2021-11-19 14:42:20 +00:00
Fedor Kudasov 039501f41f Merge "Move FloatingTaskInit set up into init method" into sc-v2-dev 2021-11-19 10:26:46 +00:00
Vinit Nayak f957244b88 Show multiple App Info A11y options for split app icons
* AccessibilityNode actions are required to have a
unique resourceId to show as an action in A11y dialog.
For now, only AppInfo option is shown for each app in split,
but moving forward we'll need to add resourceIDs for
each option that can show up for either app.

Fixes: 200609838
Test: Saw multiple options for App Info for each app
come up in talkback mode

Change-Id: I92b349347354ac639537021d775eea814c866a0e
2021-11-18 23:22:46 -08:00
Vinit Nayak 788821ec4e Launch GroupedTaskView from thumbnails
* Previously when starting the remote animation
we were relying on SplitPlaceholderViews to
animate into the proper place since we weren't
launching from the TaskView itself
* Now when launching from a GroupedTaskView,
we use the existing animation that handles that
animation in addition to showing the new split tasks

Fixes: 206608786
Test: Thumbnails animate from home -> overview -> launch
Change-Id: I1499ead7d90cd41e285ed0f4df66ea31f0dfbc95
2021-11-18 22:58:53 -08:00
TreeHugger Robot 84b64d7910 Merge "Reset split selection state when RecentsView resets" into sc-v2-dev 2021-11-18 23:51:47 +00:00
Vinit Nayak 97f9bd575a Reset split selection state when RecentsView resets
* We weren't calling reset on the views
involved in split selection when recents view gets
a reset call (oops)
* Use device theme for split placeholder theme instead
of hardcoding to white

Fixes: 206155455
Change-Id: I3768fd574cb21eec9562d89c1a93eaa3f53d5ff1
2021-11-18 14:06:27 -08:00
TreeHugger Robot 39aceb6dc7 Merge "Check if ThumbnailData's bitmap is null in TaskThumbnailCache" into sc-v2-dev 2021-11-18 19:46:50 +00:00
Thales Lima bd1aec6721 Merge "open grid task menu to the right of icon" into sc-v2-dev 2021-11-18 18:19:58 +00:00
Alex Chau 4670d37e55 Check if ThumbnailData's bitmap is null in TaskThumbnailCache
- This makes sure TaskThumbnailCache fetch for thumbnail when its Bitamp is null

Fix: 206959035
Test: See steps in b/206959035
Change-Id: I03b574b0f8cc7390a8cad618bd810f44f0dee279
2021-11-18 15:57:28 +00:00
Thales Lima 45f2306ce9 open grid task menu to the right of icon
This makes the TaskMenuViewWithArrow open to the right of the icon if
there is enough space, and to the left if not. It also works correctly
in RTL, inverting the side to open by default.

Bug: 193432925
Test: open Overview and tap the app icon
Change-Id: Ib1098f48ed28d2e0758fb0e3fb733e86271fa1a0
2021-11-18 12:01:16 -03:00
TreeHugger Robot 1edee616ae Merge "Move live tile app to top when the task view is tapped" into sc-v2-dev 2021-11-18 12:26:05 +00:00
Alex Chau 60d5315e19 Refresh overlay when thumbnail was set for first time
Bug: 202414125
Test: TaplTestsNexus.testOverviewActions && TaplTestsQuickstep.testOverviewActions
Change-Id: I2cc38df4c891fb21a8295d4f9c75e396c71449f2
2021-11-18 10:31:13 +00:00
TreeHugger Robot 5394db834f Merge "Use split thumbnail width/height directly" into sc-v2-dev 2021-11-18 04:42:27 +00:00
Vinit Nayak be7ce023de Use split thumbnail width/height directly
* When swiping to QS from home, the
bounds for the rect on screen are incorrect
because it's technically off-screen when
it's being queried

Fixes: 206155441
Change-Id: Ibb17f2ac291f867b6de06041c980e434ce92cf27
2021-11-17 19:05:29 -08:00
Tony Wickham 9ceae57095 Add support for dark tint on taskbar nav buttons
Tint the buttons when taskbar isn't drawing a background (either due to alpha or offset).

Test: Dark icons on a light wallpaper on home screen, dark icons when light IME is showing
Bug: 204256643
Change-Id: Iae634a1b604f50edc102905abd0d812a43c5346e
2021-11-17 16:28:21 -08:00
TreeHugger Robot 010faef3a5 Merge "Add animated background to the suw all set page." into sc-v2-dev 2021-11-18 00:07:35 +00:00
TreeHugger Robot ec2bd55047 Merge "Use TOUCHABLE_INSETS_REGION when IME is visible" into sc-v2-dev 2021-11-17 23:57:56 +00:00
Vinit Nayak c1ec2d4260 Open taskMenu based on TaskIdAttributeContainer
* We were always passing in the same task no matter
which task icon was clicked.
* Use TaskIdAttributeContainer to associate
IconViews with their respective tasks

Fixes: 206154715
Test: Correct menu opens for split and fullscreen
tasks

Change-Id: I79a32541ea9ebae9ad78ad933f55212d0bc64b56
2021-11-17 15:29:42 -08:00
Fedor Kudasov c8f686710e Move FloatingTaskInit set up into init method
This makes the code more tidy and consistent with
other classes. Additionally, this allows for easier
annotation of the initialization code.

Bug: 205828770
Test: m LauncherGoResLib
Change-Id: Ib7ecf32cffd5c6af67a4c2095d7cb3e3a2f387e4
(cherry picked from commit f50acd3ed855f21a4aca0d98ef9fc6c1099423d2)
2021-11-17 22:13:43 +00:00
Tony Wickham bf4a91b0f1 Use TOUCHABLE_INSETS_REGION when IME is visible
This ensures the dismiss button is fully clickable even if taskbar is stashed.

Test: Stash taskbar, can dismiss keyboard by tapping anywhere on the back button
(Same with taskbar unstashed)
Fixes: 206851484

Change-Id: I06f86191e36b596a928c8db8d67a012be033daba
2021-11-17 14:04:25 -08:00
Tracy Zhou 5163574b7a Move live tile app to top when the task view is tapped
- transition animation for foldables need it

Bug: 205789573
Test: manual
Change-Id: Icf11d204968dbffa6bb9c930deaa57d35e2eff4a
2021-11-17 13:59:49 -08:00
Alex Chau 7c9055fc6b Merge "Fix launch animation from bottom row and end of grid" into sc-v2-dev 2021-11-17 21:02:16 +00:00
Tracy Zhou a37f8baa1d Merge "Refine when to move live tile app below recents view" into sc-v2-dev 2021-11-17 19:53:14 +00:00
Winson Chung 0e1cd933ba Merge "Fix issue with grouped task rects being calculated slightly off" into sc-v2-dev 2021-11-17 19:42:53 +00:00
Winson Chung 9304879387 Fix issue with grouped task rects being calculated slightly off
- This was causing bleed through between split tasks and perhaps
  some rounded corners to be calculated incorrectly
- Also reset the translation after it is adjusted for dismissing
  in case the dismiss gesture is canceled.  This doesn't fix the
  issue with bleed through between the task views (to be fixed
  separately), but makes sure it isn't permanently set on the task

Bug: 206739664
Test: Split tasks, swipe up and check the bounds

Change-Id: I34430e958ca7a75f48621bc27a281e93fdf97179
2021-11-17 17:40:58 +00:00
Fedor Kudasov 3256e1e744 Add some more @Nullable annotations
Bug: 205828770
Test: m LauncherGoResLib
Change-Id: I6d2f269c4ec5f6cdee31ad68545c2720fbf1d8fc
(cherry picked from commit 9385170c1b3b295c8d087cbc1de761f25aadc1ba)
2021-11-17 08:40:17 +00:00
Tracy Zhou a4edc07ec8 Refine when to move live tile app below recents view
- We will still need to figure out why, but currently the overview scrim blocks the cut out during transition. To go around this, we need to move live tile app after the overview transition animation is over
- Some of the logic in RecentsView is no longer necessary since we are no longer reusing live tile params and simulator, but assign new targets each time

Fixes: 205587164
Test: manual
Change-Id: Icadf26182112bba544a4103b626effa37d4028b5
2021-11-16 21:17:19 -08:00
TreeHugger Robot b797ca77b2 Merge "Fix memory leak in TaskbarLauncherStateController" into sc-v2-dev 2021-11-16 21:34:52 +00:00
TreeHugger Robot 36705e6039 Merge "If hometask is last task to be dismissed, show empty recents instead of home screen" into sc-v2-dev 2021-11-16 20:25:06 +00:00
Tracy Zhou 1fdea66f16 Fix memory leak in TaskbarLauncherStateController
mIconAlphaForHome.setConsumer(null) in onDestroy()

Test: Run BinderTests#testSwitchToOverview locally
Bug: 206633573
Change-Id: I912cd66097b113ee84197f23a5862e333d7e63f2
2021-11-16 11:31:15 -08:00
Alex Chau 04309940c0 If hometask is last task to be dismissed, show empty recents instead of home screen
- http://ag/16221737 ensure homescren stub is always added if tasks hasn't been loaded in RecentsView. This introduced an edge case that after dismissing home task view, no task remains in overview and it get dismissed
- The fix is to show empty recents instead of home screen if last task dismissed is a home task (showing empty recents isn't always correct, as there might be unloaded tasks, but it's better than dismissing overview)
- Also tuned the timing of when mLoadPlanEverApplied is set

Fix: 206462357
Test: FallbackRecentsTest.goToOverviewFromHome
Change-Id: I0f395639f57a1a57fddf750623a8a74b8ede8555
2021-11-16 18:48:28 +00:00
Alex Chau 1c4871298e Merge "Crop letterbox insets when thumbnail is from different aspect ratio" into sc-v2-dev 2021-11-16 18:40:31 +00:00
Alex Chau b7abf7e96d Fix launch animation from bottom row and end of grid
- Apply gridTranslationY when calculating taskRect so it's used to calculate RecnetsView pivot
- Moved recentsViewScroll to RecentsView group and applied after recentsViewScale
- Before: http://dr/file/d/1-Nrqa80J4FRbjcdZ3GZSeKwfQF8fN9a1/view?resourcekey=0-gYT9z1HA0YksW5Ujbzsmeg
- After: http://dr/file/d/1-DpZrg5_nFeUKS-8APnLvG8SJVvke9BU/view?resourcekey=0-p59hm-abzpU7Y7tqWyneTQ

Fix: 200813202
Test: Launch task from grid from top/bottom/left/right/focus
Test: Launch task from left/middle/right in small screen
Change-Id: I814512c02611f59a5a6d1f53411d42cf4f0f26b3
2021-11-16 13:55:38 +00:00
Fedor Kudasov 72c8e71e06 Merge "Annotate RecentsView with @Nullable" into sc-v2-dev 2021-11-16 10:26:23 +00:00
Tracy Zhou 0200636585 Merge "Track LauncherState, RecentsAnimation, resumed state for task bar in one place" into sc-v2-dev 2021-11-16 09:41:58 +00:00
Fedor Kudasov 3a0f8a90bd Annotate RecentsView with @Nullable
Bug: 205828770
Test: m LauncherGoResLib
Change-Id: I44a4f7ce4258e54d43ca2c5a3937c81a4a686f80
(cherry picked from commit ac9cee5a7cc8b471f276307389c0bbccbbaa61c7)
2021-11-15 20:39:07 +00:00
Fedor Kudasov 9d6fb64f45 Simplify getTaskViewAt call
RecentsView getTaskViewAt method is nullable and is safe
to call for an out of bound index.

Bug: 205828770
Test: m LauncherGoResLib
Change-Id: I7709d63ad4490fd756a50caaf42ba70c4fad4d06
(cherry picked from commit 41edede1eed666fe9ffdfcd0d379d65252302e1e)
2021-11-15 20:37:12 +00:00
Fedor Kudasov ba47b591c4 Merge "Add @Nullable annotations for simple cases" into sc-v2-dev 2021-11-13 09:00:32 +00:00
Winson Chung ea77e49524 Merge "Freeze task list if requested when launching split tasks" into sc-v2-dev 2021-11-12 20:51:15 +00:00
Winson Chung 21d129de28 Removing logs
Bug: 201305599
Test: Builds
Change-Id: Ic480136ee6b158dc614d43beaed1dfce91b9ca8a
2021-11-12 17:18:11 +00:00
Alex Chau f75725830a Fix launch animation from grid
- Fixed calculateGridTaskSize to algin to taskRect instead of gridRect
- Extracted end of grid's scroll diff calculation to getOffsetFromScrollPosition to accurately calculate end of grid task's offset between its scroll and visual position (End of grid task's scroll is all the same at the position where ClearAllButton is just invisible)
- Extracted isGridTask in TaskView so TaskViewSimualtor can use the correct task size depedning if it's grid task or not

Bug: 200813202
Test: manual
Change-Id: I11a980345aee2680abf1c2563baadd9718a40192
2021-11-12 16:13:47 +00:00
Fedor Kudasov 2ca545c387 Add @Nullable annotations for simple cases
Add @Nullable annotations for the fields that are expected
to be null at arbitrary lifecycle time and are their usage
is protected by null checks.

Bug: 205828770
Test: m LauncherGoResLib
Change-Id: I9c31e1dc0d01cdd68dfff0a005ba1f40c257f8ea
(cherry picked from commit 920dc2f28f81ce2aec07477dfb6f4efd8f91e4ad)
2021-11-12 10:01:33 +00:00
Fedor Kudasov 6c7c91fe86 Merge "Annotate AttributeSet with @Nullable" into sc-v2-dev 2021-11-12 08:17:55 +00:00
Hyunyoung Song 664f685336 Merge "Address AppEventProducer to correctly send search-result location on AppTargetEvent" into sc-v2-dev 2021-11-12 07:46:23 +00:00
Winson Chung d0e6c8b2e7 Freeze task list if requested when launching split tasks
Bug: 206000278
Test: Quickswitch from app pair and back
Change-Id: I76af1396145e121e7f66f9e6b97f21a85c075e8e
2021-11-12 06:27:26 +00:00
Hyunyoung Song 1e5b621a50 Address AppEventProducer to correctly send search-result location on AppTargetEvent
Bug: 191362091
Test: logcat printout

11-10 20:27:02.290 32215 32237 D QuickstepModelDelegate: notifyAppTargetEvent action=1launchLocation=search-results

Change-Id: I16ef7679116e397a8a108cc291f5741febf2e453
2021-11-11 21:27:01 -08:00
Alex Chau 80836f637f Update corner radius of both snapshot in app pair
Fix: 206002609
Test: manual
Change-Id: I6af28c6948769eac53326d61e84ac39196bd840f
2021-11-11 19:40:42 +00:00
Fedor Kudasov b498b648ae Annotate AttributeSet with @Nullable
Bug: 205828770
Test: m LauncherGoResLib
Change-Id: Ib8584e1bbcc7061aef2eb4813a8f6aa41d3c7362
(cherry picked from commit 96f8792c04d3bb8154d4699c88d73d006cce9c21)
2021-11-11 08:16:08 +00:00
Vinit Nayak 185da72e98 Merge "Finish recents animation for app-icon tap" into sc-v2-dev 2021-11-11 06:03:47 +00:00
Ryan Lin b6e3caeb7a Merge "Fix the cutout of magnification border" into sc-v2-dev 2021-11-11 01:56:21 +00:00
Schneider Victor-tulias d0865f8219 Add animated background to the suw all set page.
Test: Ran all set page in landscape/portrait, dark/light mode
Fixes: 190828563
Change-Id: Ie7fbc6ce6777e9cec8d4dcb5dff3090dc167a161
2021-11-10 14:15:55 -08:00
TreeHugger Robot 0aadbc6b37 Merge "launcher: use a different task menu for foldables" into sc-v2-dev 2021-11-10 19:45:36 +00:00
Vinit Nayak 2db58f68ee Finish recents animation for app-icon tap
* There is a layering issue w/ live tile
* Also, order tasks for app-pair when binding

Bug: 205354856
Change-Id: I4fb5b9ed070e96299fd4b58d172ebba93789d009
2021-11-10 10:21:02 -08:00
Thales Lima c335ad28a2 launcher: use a different task menu for foldables
Foldables use a different menu from phones, positioned either to the
right or left of the app icon, and display an arrow. Since TaskMenuView
is very specific for handhelds, it was cleaner to create another class
to handle foldables case extending from ArrowPopup.

This creates a working menu, the correct style will come in later CLs.

Bug: 193432925
Test: open Overview and tap the app icon

Fixes: 205298731
Test: atest NexusLauncherTests

Change-Id: I7a5c1fb4800a309f40fadb2df0f6c3a4c3f42679
2021-11-10 17:30:13 +00:00
Winson Chung 7ce4af988b Merge "Support multiple tasks in recentsaninmation onTaskAppeared" into sc-v2-dev 2021-11-10 17:05:46 +00:00
Vinit Nayak 524d6b83e9 Merge "Shows AppPairs in previous tasks" into sc-v2-dev 2021-11-10 16:33:50 +00:00