Commit Graph

7276 Commits

Author SHA1 Message Date
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
ryanlwlin 1ee6bd7bb6 Fix the cutout of magnification border
If the window is unmagnifiable, it might cause the cutout of
magnification region.
To fix it, we set the flag when the touchable region is not the
entier window frame.

To fix NexusLauncherTests, we add a flag to avoid updateViewLayout
too frequently that would impact memory test and have the performance
issue.

Bug: 196510717
Test: manual test on gestural and 3-button navigation
      presumbit test pass
      run atest NexusLauncherTests with foldables
Change-Id: Ifef81640fe6c08ee1b0dcd3915227fba3002ea43
Merged-In: Ifef81640fe6c08ee1b0dcd3915227fba3002ea43
(cherry picked from commit c8d588cff6697ad2bd7eedd7e668f67a8d1ba9c1)
2021-11-10 09:51:54 +00:00
Tracy Zhou e89a83b65d Track LauncherState, RecentsAnimation, resumed state for task bar in one place
TODO:
- Consider delaying animating task bar to stashed towards all apps state until user releasing their finger (tho in this change heuristic is applied for stashing and unstashing respectively)
- Further consolidate some animation logic

Bug: 204220602
Test: manual

Change-Id: I58b4d035fcf65a9f5c68e69c129eae95b89b1c4a
2021-11-09 23:46:03 -08:00
Vinit Nayak 4d57e7091f Shows AppPairs in previous tasks
Fixes: 203006080
Change-Id: I63912a61e7617ec41f229c19cc267dc5a1857bae
2021-11-09 13:47:18 -08:00
Alex Chau 7c4bc7dd74 Don't skip adding stub home task if applyLoadPlan hasn't run
- In FallbackRecentsTest.goToOverviewFromHome, home task gesture starts before applyLoadPlan, causing shouldAddStubTaskView to return false because getTaskViewCount is 0. This falsely avoid home task to be added to RecentsView, causing the animation to be drastically different from what user sees outside the test
- Added a check on whether applyLoadPlan is ever called to solve the problem

Fix: 205580523
Test: FallbackRecentsTest.goToOverviewFromHome
Change-Id: I2e435e56008e916e8f7e1037d3fa3c8177437d13
2021-11-09 19:01:23 +00:00
TreeHugger Robot 055d9a5f07 Merge "Fix a case that task jump when dismissing" into sc-v2-dev 2021-11-09 16:03:45 +00:00
Evan Rosky e4102c6ffe Support multiple tasks in recentsaninmation onTaskAppeared
Needed for app-pairs support

Bug: 204094785
Test: TODO
Change-Id: I3c5f8097b04b4033ba887e3c6d9e5ffd900df80e
2021-11-08 17:40:13 -08:00
TreeHugger Robot ef18f8c5a2 Merge "Fixing allSet page not closed if recentsAnimation takes time to start" into sc-v2-dev 2021-11-09 01:35:48 +00:00
TreeHugger Robot 44fcfa5bfd Merge "Play fallback animation when overlay is shown." into sc-v2-dev 2021-11-08 20:49:58 +00:00
TreeHugger Robot c010ea2f1b Merge "Add temporary logging to try and debug: b/202414125" into sc-v2-dev 2021-11-08 20:33:00 +00:00
Alex Chau 5885b074dc Fix a case that task jump when dismissing
- Fixed an edge case that RecentsView was not snapped to last tasks, but become snapped to last tasks after dismiss, as last pages' scroll is the position where ClearAllButton is barely invisible, instead of aligned to mLastComputedTaskSize.
- Fixed a case that misclassifed as split select

Fix: 202941373
Test: manual
Change-Id: Ib50dda471189da4325cd8ed57d600cc64907c978
2021-11-08 16:57:38 +00:00
TreeHugger Robot 3555ef3b31 Merge "Add to tapl quickswitch test for testing intermediate carousel." into sc-v2-dev 2021-11-08 13:15:44 +00:00
Pat Manning 04486f19bb Add to tapl quickswitch test for testing intermediate carousel.
Test: TaplTestsQuickstep.java
Fix: 197630182
Change-Id: I5f325995e22b76eee710154ca54a050eaf70b150
2021-11-08 11:32:56 +00:00
Jerry Chang 2e2f49e8a5 Merge "Accept snapshot list when cancelling recents animation" into sc-v2-dev 2021-11-08 10:22:34 +00:00
TreeHugger Robot c2f320703c Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-v2-dev 2021-11-08 02:32:52 +00:00
Jerry Chang 331f46fab3 Accept snapshot list when cancelling recents animation
Bug: 200813008
Test: enter overview after activated split screen, observed task
      thumbnails showing with correct bounds after roation.
Change-Id: Ifea17d2c685d16db111c4fab88e131595254b9a5
2021-11-08 09:55:43 +08:00
Jon Miranda 4e5664ac28 Play fallback animation when overlay is shown.
Bug: 205086529
Test: go to -1, click to open app, swipe back
Change-Id: I905511e0ac7576d2134a10088289a5ca37d1b257
2021-11-05 16:16:12 -07:00
Bill Yi 1e479563d5 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I7998165953f478389339b0530be5b6a56e72950b
2021-11-05 22:09:01 +00:00
Zak Cohen 605d89af37 Add temporary logging to try and debug: b/202414125
Bug: 202414125
Test: Local
Change-Id: I4b3a9c9bfffe72990773344762187b6cd8bf09aa
2021-11-05 14:10:58 -07:00
Schneider Victor-tulias 2bfbf3bffa Add popup menu and click handling to taskbar.
- Added popup menu support to taskbar icons
- Added item click handling for taskbar icon popup menu items

Bug: 198438631
Test: long pressed taskbar icons, pressed popup menu items, dragged taskbar icons to start multi-window mode
Change-Id: Ibc59c1eada50a877a863c075fbfd3e4accaae008
2021-11-05 13:07:09 -07:00
Sunny Goyal beefd1890c Fixing allSet page not closed if recentsAnimation takes time to start
> Also finishing the activity so that it doesn't show in home settings backstack

Bug: 204541138
Test: Manual
Change-Id: I7deec0d1ef7eec0464a0f21bf30b25cd5e18d02d
2021-11-05 13:05:49 -07:00
TreeHugger Robot 160b1357bf Merge "Show divider when GroupedTaskView expanded from recents" into sc-v2-dev 2021-11-05 19:50:24 +00:00
Vinit Nayak d0eea50a0c Show divider when GroupedTaskView expanded from recents
* Also increased animation duration to allow
apps to get ready

Fixes: 202928293
Change-Id: I8814ec2415e7985e4f433695f6cc55f83f0c0ac2
2021-11-05 11:15:01 -07:00
Winson Chung cc4a1925a6 Remove debug tracing checks to get logs beteween tests
Bug: 201305599
Test: Presubmit
Change-Id: Iab4430f88a2cac97a056486edd97895bc30a03b1
2021-11-05 09:45:13 -07:00
Greg Kaiser 5b4145e34b Merge "Revert "launcher: use a different task menu for foldables"" into sc-v2-dev 2021-11-05 16:19:43 +00:00
Greg Kaiser 24898d3be0 Revert "launcher: use a different task menu for foldables"
This reverts commit 10eb3cd98b.

Reason for revert: Root cause of P0 b/205278434
Bug: 205278434
Bug: 193432925
Test: Local reverted and now launcher works on wembley

Change-Id: I3605c01066a3ce383d45e0a938f1e00b3c7f7bb9
Merged-In: I5ee18d3ee1b671fcaedda633e7a268addd5c5c15
2021-11-05 16:19:05 +00:00
Alex Chau 67ddd0fefd Merge "Update overview clear all button to be larger" into sc-v2-dev 2021-11-05 11:49:56 +00:00
TreeHugger Robot e641701c9f Merge "Make Launcher activity restart on density change" into sc-v2-dev 2021-11-05 11:48:20 +00:00
Thales Lima ed7a7b23d4 Merge "launcher: use a different task menu for foldables" into sc-v2-dev 2021-11-05 10:13:38 +00:00
Winson Chung b35b56af65 Merge "Call into shell for recent tasks" into sc-v2-dev 2021-11-04 22:59:40 +00:00
Vinit Nayak 04d52b48ac Merge "Invoke IME switcher for taskbar through SysUI" into sc-v2-dev 2021-11-04 20:47:05 +00:00
Schneider Victor-tulias cc0224fe52 Merge "Fix lost gesture nav progress on screen rotation." into sc-v2-dev 2021-11-04 19:32:15 +00:00
Winson Chung f097e628dc Call into shell for recent tasks
- No change in behavior from today until groups are actually returned
  from the shell

Bug: 202740477
Test: atest RecentTasksListTest
Change-Id: I4ac7b472ce2e0a3b2574dc6d8f4c1761a0ad993a
Merged-In: I4ac7b472ce2e0a3b2574dc6d8f4c1761a0ad993a
2021-11-04 18:42:46 +00:00
Zak Cohen 75cc3a2f86 Merge "Add temporary logging to try and debug: b/202414125" into sc-v2-dev 2021-11-04 18:06:25 +00:00
Thales Lima 10eb3cd98b 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
Change-Id: Icb068954e1e20a52d80c16c52d8e38ce9a181a8b
Merged-In: Icb068954e1e20a52d80c16c52d8e38ce9a181a8b
2021-11-04 16:40:37 +00:00
Alex Chau 56bd257478 Update overview clear all button to be larger
- Tuned the size and corner radius
- Tuned the margin from screen edge
- Tuned the vertical position

Bug: 204153113
Test: manual
Change-Id: Ibf3df599b31c7ecc2c9c951fc89e7e09c90253ef
2021-11-04 16:02:17 +00:00
Alex Chau a8c19019c6 Merge "Disable Tapl pressBack and dragToFolder Tests" into sc-v2-dev 2021-11-04 14:29:13 +00:00
Alex Chau 84fe75d72e Make Launcher activity restart on density change
- Launcher used to restart when density changes before http://ag/14234761, which added smallestScreenSize and density in configChange
- http://ag/14234761 aims to avoid restart when switching display in split dispalys, for which only size changes, therefore density is unnecessary in configChange
- Keeping density in configChange make Launcher acitvity to stay after changing display size, making all buttons stays in old size in previous denstiy, which is a bug

Bug: 204157738
Test: manual
Change-Id: Ib85326078c67c35d90dc5e9ae5c20eeb5286a610
2021-11-04 11:33:16 +00:00
Benno Lin d80ed19ba6 Disable Tapl pressBack and dragToFolder Tests
The tests break on R3 and S5 devices.
Therefore the CL disable them temporarily until the issue being
resolved.

Bug: 205027405
Bug: 205014516
Test: disable tests that break ATP tests on R3 and S5.
Change-Id: Ib71c2f334d98445aeafa211d9bba2910d191b6fb
2021-11-04 02:46:48 +00:00
Winson Chung 3b5dddbce1 Merge "Add some logging for taskbar recreation" into sc-v2-dev 2021-11-03 23:41:07 +00:00
Zak Cohen a5c1f31110 Add temporary logging to try and debug: b/202414125
Bug: 202414125
Test: Local
Change-Id: I1a0a65467a911eed48592542f4f21bb784286eb2
2021-11-03 15:17:44 -07:00
Tracy Zhou 5b92dccc5e Merge "Revert "[Live Tile] App surface is above launcher even after reaching Overview"" into sc-v2-dev 2021-11-03 21:49:41 +00:00
Evan Rosky a3defa4d39 Merge "Provide app-process tokens to remote transitions so they can be boosted" into sc-v2-dev 2021-11-03 20:59:08 +00:00
Winson Chung 067faf3bbe Add some logging for taskbar recreation
Bug: 201305599
Test: Manual
Change-Id: I437fe3226657ebe7b5507146fbe5e7f32e2e2fce
2021-11-03 11:17:44 -07:00
Winson Chung d9db871f79 Merge "Revert "DO NOT MERGE Fix the cutout of magnification border"" into sc-v2-dev 2021-11-03 16:49:07 +00:00
Alex Chau c91a43e110 Revert "DO NOT MERGE Fix the cutout of magnification border"
Revert "Do NOT MERGE Fix magnification border includes taskbar"

Revert submission 16003793-magnification_border

Bug: 196510717
Reason for revert: Caused NexusLauncherTests and NexusLauncherOutOfProcTests to stop running
Reverted Changes:
Ibbc9c51ea:Do NOT MERGE Fix magnification border includes tas...
Ida2bb5bf1:DO NOT MERGE Fix the cutout of magnification borde...

Change-Id: I6b2123aedd2a2f23142a34f158d2d9ab71948a18
2021-11-03 14:19:23 +00:00
Benno Lin 97d749833c Merge "Implement pressing back button and swiping back" into sc-v2-dev 2021-11-03 06:03:49 +00:00
Ryan Lin 0ee6940bd0 Merge "DO NOT MERGE Fix the cutout of magnification border" into sc-v2-dev 2021-11-03 05:24:27 +00:00
Vinit Nayak 874ea446c9 Merge "Revert "Align OverviewActionsView for 3 button taskbar"" into sc-v2-dev 2021-11-03 05:04:32 +00:00
ryanlwlin 571df892f7 DO NOT MERGE Fix the cutout of magnification border
If the window is unmagnifiable, it might cause the cutout of
magnification region.
To fix it, we set the flag when the touchable region is not the
entier window frame.

Bug: 196510717
Test: manual test on gestural and 3-button navigation
Change-Id: Ida2bb5bf120038ac9153e12790b93bdec195adbc
2021-11-03 10:50:09 +08:00
Benno Lin 6c00386c2b Implement pressing back button and swiping back
This CL implements a pressBack function to press back button or swiping
back in gesture navigation mode.

Bug: 199120092
Test: atest -c Launcher3Tests:com.android.launcher3.ui.TaplTestsLauncher3#testPressBack &&
    atest -c NexusLauncherTests:com.android.quickstep.TaplTestsQuickstep#testPressBack
Change-Id: I001cea17d09ae1ab7952d04ee394a2afa5bf1e67
2021-11-03 02:28:37 +00:00
Bill Lin 6648ab32bc Merge "Allow One-handed gesture when densityDpi > 600" into sc-qpr1-dev 2021-11-03 00:59:46 +00:00
Zak Cohen 427113fa58 Merge "Add temporary logging to try and debug: b/202414125" into sc-v2-dev 2021-11-02 23:33:31 +00:00
Vinit Nayak 3fabe054c2 Revert "Align OverviewActionsView for 3 button taskbar"
This reverts commit 97d64ea8a1.

Reason for revert: b/204891006

Change-Id: I9d40a5c8c9bce6b818779ebaf748bb9bd9231caf
2021-11-02 22:08:33 +00:00
Zak Cohen 21f6189cd5 Add temporary logging to try and debug: b/202414125
Bug: 202414125
Test: Local
Change-Id: I641f9877972f3f584e5fc618d89c65c52f0d1da0
2021-11-02 14:17:15 -07:00
Alex Chau b290e94020 Crop letterbox insets when thumbnail is from different aspect ratio
- Extracted isAspectLargelyDifferent and use that to determine if letterbox inset should be cropped
- Always attempt to fit thumbnail width to avoid drawing area outside the thumbnail

Bug: 199743725
Test: manual
Change-Id: I2a7b20730055858b2376788e3a1fbbc66c0967e2
2021-11-02 18:09:34 +00:00
Tracy Zhou b58eb1bc63 Revert "[Live Tile] App surface is above launcher even after reaching Overview"
This reverts commit e9e5e51d73.

Reason for revert: This change breaks image indicators feature

Fixes: 195665605
Change-Id: I2abff19955e1594a40f06bfb4972721eed1ee16f
2021-11-01 23:49:00 -07:00
Vinit Nayak ac24e7f6f0 Merge "Align OverviewActionsView for 3 button taskbar" into sc-v2-dev 2021-11-02 05:37:45 +00:00
Vinit Nayak a216ad2c36 Merge "Check if RemoteAnimationTargets apps are present" into sc-v2-dev 2021-11-02 05:37:13 +00:00
Bill Lin 2b74e3c290 Allow One-handed gesture when densityDpi > 600
This logic was aim to prevent tablet device enable One-handed gesture
so added displayInfo.densityDpi < DisplayMetrics.DENSITY_600 before.

However, it seems this densityDpi=600 does not able to represent to
tablet device, instead we already have system property
"ro.support_one_handed_mode" which provides feasibility to config false
on tablet project, as the reason we can safe to remove this condition.

Bug: 203936659
Test: adb shell wm density 600 , and observe OHM gesture is available
Test: atest WMShellUnitTests
Change-Id: Ic7ae10e8a47d26b9bb39ab80e22d591d74f89ae5
Merged-In: Ic7ae10e8a47d26b9bb39ab80e22d591d74f89ae5
2021-11-02 02:50:09 +00:00
Vinit Nayak 97d64ea8a1 Align OverviewActionsView for 3 button taskbar
Bug: 189807374
Change-Id: I028ae31b98e28bc372f0148a28755d067fe50678
2021-11-02 01:13:02 +00:00
Schneider Victor-tulias 724b7c5c30 Fix lost gesture nav progress on screen rotation.
Rotating the device during the gesture nav tutorial cases the current step to repeat. This is unecessary after a successful gesture. Added some state tracking and handling

Test: roating the device several times while doing the tutorial and after successful gestures.
Bug: 204407899
Change-Id: I2f4102edc187137309f6231b88074f5db82ea0cd
2021-11-01 14:58:43 -07:00
TreeHugger Robot 651b93bb53 Merge "Do not use shared lib resources" into sc-v2-dev 2021-11-01 20:40:43 +00:00
Tony Wickham c29f5441da Merge "Reapply TaskViewSimulator in onApplyWindowInsets()" into sc-v2-dev 2021-11-01 20:17:53 +00:00
Jonathan Miranda 9b85616119 Merge "Remove PROTOTYPE_APP_CLOSE feature flag and associated code." into sc-v2-dev 2021-11-01 18:35:44 +00:00
Vinit Nayak 6e5f4e3184 Merge "Clean up RemoteTargetHandles when RecentsAnimation ends" into sc-v2-dev 2021-11-01 18:01:37 +00:00
Tony Wickham d48fbecd1a Merge "Add null check when settling on LAST_TASK" into sc-v2-dev 2021-11-01 16:22:15 +00:00
Thales Lima 33f9de0225 Merge "add kotlin support for launcher" into sc-v2-dev 2021-11-01 16:03:58 +00:00
Nick Chameyev 5f11bf60a8 Do not use shared lib resources
Temporary removes usages of SysUI shared
resources as it leads to crashes in Launcher
tests.

Bug: 204727471
Test: install launcher, try autorotate suggestion
Change-Id: I1e3c1f5b331a22a753acc3fe0ee544d50fba5c18
2021-11-01 15:49:54 +00:00
Nick Chameyev 0288d2e8bb Move floating rotation button handling to Launcher
Moves handling of floating rotation button when navigation
bar is not created to the launcher. This button was not
showing when taskbar is visible as it was initialized in
navigation bar (which is not created for large screens).

Bug: 200103245
Test: rotate phone when autorotate disabled on inner screen
Test: showing rotate suggestion when gesture nav enabled/disabled
Change-Id: I13dd555bcd811f1524be7ab9ad51b2b012b3b749
2021-11-01 10:36:34 +00:00
Bill Yi dee85291d4 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I9a64b39bfc779dc7c8261f0571aee1b4e53ea605
2021-10-30 01:20:28 +00:00
Bill Yi 9dda7b700b Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ia72585210d668abd01bdce2556e1cf6265af4f8e
2021-10-30 01:19:55 +00:00
Bill Yi eceff103d4 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I1fb8644a05495e312925301f254e67ba58cd50e9
2021-10-30 01:19:24 +00:00
Jon Miranda 029a644a6e Remove PROTOTYPE_APP_CLOSE feature flag and associated code.
Flag was never enabled, safe to remove.

Bug: 200999899
Test: manual
Change-Id: Ie2646d8c4b9a1c40fac1bfd7dadf4ec714171aec
2021-10-29 16:07:29 -07:00
Tony Wickham 2ca7e2695c Add null check when settling on LAST_TASK
Test: N/A
Fixes: 203237855
Change-Id: I511fde0ba3f22720ed1fe29769c97a3207a98a4b
2021-10-29 14:15:53 -07:00
Vinit Nayak 0ca3f98ec6 Invoke IME switcher for taskbar through SysUI
Bug: 191814219
Test: IME switcher works small and large screen
Change-Id: Ic2db60357a13846bb34dddd64b27ecbbf8ff656f
2021-10-29 11:46:18 -07:00
Thales Lima 26f44911a6 add kotlin support for launcher
Bug: 193432925
Test: click on the app icon and check logcat
Change-Id: I2ca4d57105fe4e1b1dfc6c968a7c1bbd3cbd2151
2021-10-29 15:40:41 +00:00
Tony Wickham 5a5a926945 Recreate taskbar when dark mode changes
Also dispatch sysui flags to all controllers upon recreate, not just NavbarButtonsViewController. Additionally, tell the controllers to skip the animation due to the flag changes if it's fromInit.

Test: Enable themed icons, switch dark theme in quick settings, ensure taskbar updates
Fixes: 204403933
Change-Id: Ic43a50cf0456175f9beba5c29360440f051cbd2d
2021-10-28 17:49:03 -07:00
Tony Wickham 00841576d4 Merge "Fix NPE when TaskView isn't attached to RecentsView" into sc-v2-dev 2021-10-28 22:40:01 +00:00
TreeHugger Robot da86c0e64d Merge "Update taskbar drag and drop treatment" into sc-v2-dev 2021-10-28 20:54:09 +00:00
Tony Wickham 956ce16f51 Fix NPE when TaskView isn't attached to RecentsView
Test: theoretical
Fixes: 201481275
Change-Id: Ie10b5ebac373e41a4d4113ee3cda737d88adad8a
2021-10-28 13:21:15 -07:00
TreeHugger Robot d84aaad11f Merge "Make gesture nav tutorial skip button always visible." into sc-v2-dev 2021-10-28 19:51:05 +00:00
Tony Wickham 3c848b0dee Reapply TaskViewSimulator in onApplyWindowInsets()
Test: Long press on bottom of taskbar to stash without moving my finger, ensure underlying app draws all the way behind the stashed handle
Fixes: 204165836
Change-Id: Ia1e138b9c369ac789e862ba760068f90bd64d312
2021-10-28 12:50:58 -07:00
Vinit Nayak 0c05634a16 Clean up RemoteTargetHandles when RecentsAnimation ends
* When in SplitScreen in overview, rotation causes
surfaces to get released, so we tell RecentsView
to null out references to them.
* Unclear why this wasn't/isn't neceessary for a
single, fullscreen task.

Fixes: 202780874
Test: Can rotate in split screen, no crash
Change-Id: Ifdfa74943945029edec37dfeeb4187616e4a23d8
2021-10-28 12:21:46 -07:00
Tony Wickham 89ef745d1c Update taskbar drag and drop treatment
- Disable the FastBitmapDrawable icon instead of setting it to invisible
- Suspend auto hide during drag and drop (moved to new TaskbarAutoHideSuspendController)

Test: Drag and drop from taskbar and ensure the original icon stays in place but desaturated
Test: Open immersive app, drag and drop from taskbar and ensure taskbar doesn't hide before drop
Fixes: 200816442
Change-Id: I4b895efd043be75e7e7034bd75e751ffdd2cfdd7
2021-10-28 11:43:49 -07:00
Vinit Nayak 5e27c021ac Check if RemoteAnimationTargets apps are present
* Before the refactor to use RemoteTargetGluer,
we only set the preview if the runningTaskTarget wasn't
null, that check got removed during the refactor.
* Why that check was there to begin with is a bit
of a mystery, sadly

Fixes: 199658495
Change-Id: I053fac0fa0eee0979dff651c01287d04d06298e6
2021-10-28 11:41:43 -07:00
bquezada e12b321d5f Change AppTargetId for launcher events to align with other AppTargetId's.
Bug: 202535375
Test: Manual
Change-Id: I0c28f7f64935fdaf08edb7781e4e7378a068e8e6
2021-10-28 17:52:02 +00:00
Alina Zaidi 29c3f23be5 Merge "Send widget added and removed events to AiAi." into sc-v2-dev 2021-10-28 16:45:22 +00:00
TreeHugger Robot ce597d786f Merge "Prevent launching app in split if task split is unsupported" into sc-v2-dev 2021-10-28 11:19:39 +00:00
Alex Chau 14c8f45b5e Merge "Fix scroll task off screen to support different screen dimensions." into sc-v2-dev 2021-10-28 10:27:30 +00:00
Bill Lin 497d08aa01 Merge "Allow One-handed gesture when densityDpi > 600" into sc-v2-dev 2021-10-28 02:20:24 +00:00
Tony Wickham c1cdadf6ea Merge "Fix testStressSwipeToOverview" into sc-v2-dev 2021-10-27 21:39:45 +00:00
Tony Wickham ce6bf7dd7f Fix testStressSwipeToOverview
- 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
2021-10-27 12:35:31 -07:00
Schneider Victor-tulias 9188b6b993 Update the hotseat edu layout for foldable devices.
Test: ran the hotseat edu on folded and unfolded foldable device in portrait and landscape mode and in three-button and gesture nav mode. ran hotseat edu on regular phone
Fixes: 203734732
Change-Id: Iea2140c8241cdea60cb5db37fbfb7f7701d63bd6
2021-10-27 17:48:46 +00:00
TreeHugger Robot 3edb8de094 Merge "Add mock animated taskbar to gesture nav tutorial for foldable devices." into sc-v2-dev 2021-10-27 17:45:38 +00:00
Tracy Zhou c6bdd9243a Merge "Delete TaskbarStateHander" into sc-v2-dev 2021-10-27 02:11:12 +00:00
Pablo Gamito aae8a2a2a5 Merge "Set custom task transition spec when taskbar is visible" into sc-v2-dev 2021-10-26 21:32:16 +00:00
Tracy Zhou 72f1afcf02 Delete TaskbarStateHander
Bug: 204220602
Test: N/A
Change-Id: I6c26b4d3b8acb35750be56986555350e84f31ecb
2021-10-26 13:26:27 -07:00
TreeHugger Robot 3cbee2d1d7 Merge "Using a different transition for All-set activity" into sc-v2-dev 2021-10-26 20:00:21 +00:00
TreeHugger Robot 766549a4ca Merge "Fix overview clear all tasks button text color." into sc-v2-dev 2021-10-26 18:37:58 +00:00