Commit Graph

3261 Commits

Author SHA1 Message Date
Winson Chung
0c36935be9 Merge "Don't rely on intent to call back from activity tracker" into sc-dev am: 1b369c4763
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14909197

Change-Id: Ic05028f7cbd58bd4312b04c32f60f31ec33a1721
2021-06-15 18:16:19 +00:00
TreeHugger Robot
5636db853d Merge "Fix foreground position during widget home animation" into sc-dev am: 3e366d6529
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14948450

Change-Id: If1d918feb23b9f2282bcc88107d9beaa65c21fcd
2021-06-15 18:16:00 +00:00
Winson Chung
1b369c4763 Merge "Don't rely on intent to call back from activity tracker" into sc-dev 2021-06-15 18:04:52 +00:00
TreeHugger Robot
3e366d6529 Merge "Fix foreground position during widget home animation" into sc-dev 2021-06-15 17:59:48 +00:00
Winson Chung
1c2d522d1b Don't rely on intent to call back from activity tracker
- The intent is not updated in certain cases which means that the
  callback may not be made if Launcher gets recreated. Instead
  have the tracker manage the set of registered callbacks.
- This change allows AbsSwipeUpHandler to continue to receive
  onActivityInit calls even if Launcher restarts, and also to
  handle a case where restarting while waiting for a page-settling
  callback will continue to finish the gesture.

Bug: 183962705
Test: Force recreate at various points in the gesture

Change-Id: Ib5ead8c868e798e26e56776f57bd715c79d087cd
2021-06-14 20:57:40 -07:00
Jonathan Miranda
620c7d1854 resolve merge conflicts of bea8267854 to sc-v2-dev
Bug: 181901105
Change-Id: I4bbe6258e0d2e5f04931d2a3d8d1f784a90f91de
Merged-In: Ia904b8b96301042c900e0589f33fc625c1c1148b
2021-06-15 02:32:30 +00:00
Hongwei Wang
7987decd95 Merge "Calculate the position from start bounds for auto-enter PiP" into sc-dev am: 5a2a6e7325
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14940622

Change-Id: I22c35c165d0e881f46843da229374f095b9a1e82
2021-06-15 01:03:08 +00:00
Jonathan Miranda
bea8267854 Merge "Address LAUNCHER_APP_LAUNCH_FROM_ICON jank." into sc-dev 2021-06-15 00:32:40 +00:00
Jon Miranda
0750f03c96 Address LAUNCHER_APP_LAUNCH_FROM_ICON jank.
- Delay app launch animations by a frame, and skip logic to skip the first frame.
- Note the icon pressed state animation still occurs, so there is still some
  visual feedback for the user that something is happening.

Bug: 181901105
Test: ensure animation still looks smooth (using window animation scale & record in slow mo)
Change-Id: Ia904b8b96301042c900e0589f33fc625c1c1148b
Merged-In: Ia904b8b96301042c900e0589f33fc625c1c1148b
2021-06-14 23:29:29 +00:00
Hongwei Wang
5a2a6e7325 Merge "Calculate the position from start bounds for auto-enter PiP" into sc-dev 2021-06-14 22:21:19 +00:00
Evan Rosky
1f804199c4 Merge "Finish wrapped launcher animations if impl is gone" into sc-v2-dev 2021-06-14 19:58:13 +00:00
Jon Spivack
7b57deb534 Merge "Send NIU Actions Intents to default Assistant" into sc-dev am: 3e48c63180
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14940621

Change-Id: I9f11bc98ec704e6eeb1e3c4ce278e92aadc5765f
2021-06-14 18:23:45 +00:00
Jon Spivack
3e48c63180 Merge "Send NIU Actions Intents to default Assistant" into sc-dev 2021-06-14 18:13:34 +00:00
Winson Chung
9f5ba22d74 Merge "Skip entering PIP when dismissing auto-enter pip task" into sc-dev 2021-06-14 16:39:19 +00:00
Winson Chung
c5d50f710a Skip entering PIP when dismissing auto-enter pip task
- Revert some changes from ag/14827090, we don't actually need to
  screenshot when dismissing, but we do need to prevent pip

Fixes: 190751761
Test: Swiping up from YT -> PIP
      Swiping up from YT to Overview to home -> PIP
      Swiping up from YT to Overview
Change-Id: I2057467d5146be6edc382d3745a1e5269cd76a6b
Merged-In: I2057467d5146be6edc382d3745a1e5269cd76a6b
2021-06-14 16:39:11 +00:00
Winson Chung
443d89cec5 Merge "Ignore source hint rect if it is too small" into sc-dev am: a50c38c457
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14930117

Change-Id: I8afccaf98f67909f907c72d75f49db7b241701b4
2021-06-13 23:09:38 +00:00
Winson Chung
8e92b41238 Merge "Skip entering PIP when dismissing auto-enter pip task" into sc-v2-dev 2021-06-13 22:55:57 +00:00
Winson Chung
a50c38c457 Merge "Ignore source hint rect if it is too small" into sc-dev 2021-06-13 22:55:48 +00:00
Winson Chung
4cbe0ec253 Merge changes Ib7d3a07e,Ic22ccf17 into sc-dev am: b009faca5e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14930113

Change-Id: Ie92bd9c58262bc945383a8ab417b39389d4eeddc
2021-06-13 21:31:12 +00:00
Winson Chung
302a3df29a Merge "Ensure we pass the pointer id to the velocity tracker and not the index" into sc-dev am: be2a0989ce
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14940326

Change-Id: I0ec916b62730bf129588b97f676da55893861487
2021-06-13 21:31:07 +00:00
Winson Chung
8e0bb9a12f Skip entering PIP when dismissing auto-enter pip task
- Revert some changes from ag/14827090, we don't actually need to
  screenshot when dismissing, but we do need to prevent pip

Bug: 190751761
Test: Swiping up from YT -> PIP
      Swiping up from YT to Overview to home -> PIP
      Swiping up from YT to Overview
Change-Id: I2057467d5146be6edc382d3745a1e5269cd76a6b
2021-06-13 20:52:30 +00:00
Winson Chung
b009faca5e Merge changes Ib7d3a07e,Ic22ccf17 into sc-dev
* changes:
  Disallow auto-enter PIP when there is an existing PIP
  Don't use icon home animator when entering PIP
2021-06-13 20:50:51 +00:00
Winson Chung
be2a0989ce Merge "Ensure we pass the pointer id to the velocity tracker and not the index" into sc-dev 2021-06-13 20:49:58 +00:00
TreeHugger Robot
bd54f2bcb6 Merge "Polish the gesture navigation tutorial sandbox" into sc-dev am: cfa0baeca6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14924450

Change-Id: I21c2b5eb3d8b4d4d4c2cfdf16411a55b8bc6be1c
2021-06-13 01:45:59 +00:00
TreeHugger Robot
cfa0baeca6 Merge "Polish the gesture navigation tutorial sandbox" into sc-dev 2021-06-13 01:25:56 +00:00
Winson Chung
62b5692736 Ignore source hint rect if it is too small
- When the source hint rect is too small, we can't do a nice transition
  when going home (it would require scaling the surface up to fit the
  rect, which conflicts spatially with the crop down to launcher
  icon/pip), so in this case, just fallback to the overlay

Bug: 190464560
Test: Enter YT Pip, play video, swipe it down to miniplayer then
      enter pip
Change-Id: I44b253ca440f6d2ca0eb20eef3454c5d4e3ae3e9
2021-06-12 13:58:32 -07:00
Winson Chung
954681d837 Disallow auto-enter PIP when there is an existing PIP
- Remove some deprecated calls when registering task stack listeners

Bug: 190464560
Test: Enter YT Pip, try to enter another auto-enter PIP app
Change-Id: Ib7d3a07effadb7b13f7c37f938741e27cf0e254e
2021-06-12 13:58:32 -07:00
Winson Chung
5300fce94f Don't use icon home animator when entering PIP
- If the app supports pip, can just do the fallback workspace
  home animation since the app will not be going to the icon

Bug: 190464560
Test: Open YT, swipe up, ensure it goes to the icon,
      Reopen YT video, swipe up, ensure it goes into PIP without
      icon animation
Change-Id: Ic22ccf17c664b9941ed944c0e39dc1f8d4efa84a
2021-06-12 13:58:17 -07:00
Cyrus Boadway
801dbf90c4 Merge "Use the splash screen background color as the fallback background color" into sc-dev am: 3616f29f83
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14881306

Change-Id: I5ad3b65fb0e74ca77e37aa9bea590f82519283a0
2021-06-12 17:27:27 +00:00
Cyrus Boadway
5fcc3a90b0 Fix foreground position during widget home animation
The home return animation applies a position animation to all views in
the workspace. Since the widget uses a GhostView of the original widget
to represent the foreground of the animation, that animation was
reflected in the foreground's positioning.

The CL creates an ignore list of workspace views to which an animator
should not be applied.

Bug: 190488979
Test: manual
Change-Id: I5a86165e945336693eedd253a02bda1e1eb6662d
2021-06-11 22:00:53 +00:00
Jon Spivack
77edb686d7 Send NIU Actions Intents to default Assistant
This changes the recipient for NIU Actions from a package hard-coded in a config file to the currently selected default Assistant. The user can change this under Settings -> Default apps.

ImageActionUtils has also been updated to handle the case where its
Intents cannot be resolved, preventing a crash if the user sets the
default Assistant to something that cannot receive NIU Actions.

Bug: 186655099
Test: Manual (Pixel 3A, set default Assistant to Google Go and None)
Test: m -j RunLauncherGoGoogleRoboTests
Change-Id: I03b93597092575902d507615f32b63f4050c4c69
2021-06-11 13:58:57 -07:00
Schneider Victor-tulias
7fec8fc10c Polish the gesture navigation tutorial sandbox
- Updated in-memory tutorial steps to a array so we can better track the tutorial progress after changing the theme.
- Added a 1.5 second delay for the gesture video when the user first starts a step, and when the app resumes.
- Updated the tutorial step indicator color: previous color was invisible against the background.

Bug: 188972959
Test: manual
Change-Id: Ia1a67f7cd9e7ed9802dbc0d88d1e3b432acfa127
2021-06-11 12:16:28 -07:00
Hongwei Wang
cb5c35e5d1 Calculate the position from start bounds for auto-enter PiP
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/eUpkH2il1vYBVBPt1Vks2u
Bug: 190748719
Test: manual, see video
Change-Id: I053bd5607200ad6341d04c9bcfec5222f101cf65
2021-06-10 17:59:00 -07:00
Evan Rosky
8a672e15cc Finish wrapped launcher animations if impl is gone
If the runner impl is gone (since it is a weakreference), we
still need to complete the animation contract by calling the
finish callback, so do that.

Bug: 183993924
Test: atest ActivityMetricsLoggerTests
Change-Id: Idce1859f0417cb74bbb9884e0d06750539e4545e
2021-06-10 14:54:12 -07:00
Winson Chung
e46c7613a3 Ensure we pass the pointer id to the velocity tracker and not the index
Bug: 189259717
Test: Swipe up with two fingers using accessibility + gesture nav
Change-Id: Icef48276c6da824d43dea0f7d567691af9cdedaf
2021-06-10 14:50:17 -07:00
Cyrus Boadway
9f06168692 Use the splash screen background color as the fallback background color
For the widget transition animation fallback background color, use either
the splash screen background color if a task is starting or the task
description-attached background color.

With a background in place, allow the window to fully fade out before
fading in the widget, by moving the window alpha math into an animation
factory-specific implementation.

Bug: 187706750
Test: Manual
Change-Id: I2b5a7783b0585d447ad60534bc48d2e2176877ed
2021-06-10 21:03:24 +00:00
Tony Wickham
51edca003c Merge "Reorganize taskbar controllers" into sc-v2-dev 2021-06-10 15:38:00 +00:00
Vinit Nayak
1e846622c7 Merge "Check for null shortcut before adding new split select options" into sc-v2-dev 2021-06-10 05:38:34 +00:00
Vinit Nayak
be00d16934 Check for null shortcut before adding new split select options
Bug: 190494300
Test: Manual
Change-Id: I8fe2b2fa0b1d9d4300b0bc306aa2e0667e5faa1c
2021-06-09 14:21:24 -07:00
Tony Wickham
36696d62b0 Reorganize taskbar controllers
Organize existing properties as follows:
- TaskbarViewController contains properties affecting TaskbarView (though child icons are still supplied by TaskbarHotseatController)
- TaskbarDragLayerController contains properties related to TaskbarDragLayer itself
- Renamed NavbarButtonUiController to NavbarButtonsViewController, following the pattern of TaskbarViewController and TaskbarDragLayerController
- TaskbarControllers contains the different controllers to make it easier to construct, initialize, destroy, and pass them around
- Removed TaskbarIconController as its responsibilities were moved to more specific controllers

Test: compiles and runs, manually tested
Bug: 187353581
Change-Id: Idccd95d47117101bf9617e5532a5b87635d2b8f6
2021-06-09 13:27:02 -07:00
Alex Chau
3f88ded2bc Merge "Use FINAL_FRAME for leaving grid animation" into sc-v2-dev 2021-06-09 18:00:50 +00:00
Pat Manning
206db75b87 [DO NOT MERGE] Animate live tile translation and update live tile page scroll on dismissal of non-live tile tasks.
Test: manual
Fix: 188453992
Bug: 188453992
Change-Id: I661c7a2900118ea02e4947feed99308d1a3a5619
2021-06-09 16:17:29 +00:00
Alex Chau
6f736fac65 Avoid unnecessary onLayout if gesture is going to HOME
Fixes: 186508379
Test: manual swipe up to carousel, then to home
Change-Id: I97a642a6fc4c4d0ca3805b79db60b6dfdaea1315
2021-06-09 13:07:32 +01:00
Alex Chau
838414ab3a Use FINAL_FRAME for leaving grid animation
Bug: 14844554
Test: manual
Change-Id: I9a8cf94a448de2520c4cc434f15377fa1f2d202e
2021-06-09 10:41:02 +01:00
Shawn Lin
34be7f366b Merge "Play the nav bar animation for app launch from recent in live tile" into sc-dev am: f0ebf00394
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14878297

Change-Id: Ie63f9cc2645c21c4a3de111b9c3411ff66616c6d
2021-06-09 02:05:24 +00:00
Shawn Lin
f0ebf00394 Merge "Play the nav bar animation for app launch from recent in live tile" into sc-dev 2021-06-09 01:39:49 +00:00
Vinit Nayak
d897514642 Merge "Support A11y contextual button" into sc-v2-dev 2021-06-08 22:07:53 +00:00
TreeHugger Robot
437b22e203 Merge "Make all tasks in intermediate carousel have the same size" into sc-v2-dev 2021-06-08 20:49:38 +00:00
TreeHugger Robot
010e3dfb26 Merge "Consider TaskView's scale when calculating corner radius" into sc-v2-dev 2021-06-08 19:04:27 +00:00
Alex Chau
36e9de1199 Make all tasks in intermediate carousel have the same size
- Replace fullscreen translation/scale with nonGrid, which applies whenever tasks are not in grid, so that intermediate carousle's tasks have the same size as focused task
- Avoid showing task icon in intermediate carousel as its scaled up. During swipe up, all task icons only appear after gesture is finished consistenly, regardles if it's running task.
- When swipe up from home, make tasks join the grid immediately
- Make pageOffset calculation consider task scale
- Tuned resistance and scale when RecentsView is swiped up

Bug: 187417137
Test: manaul
Change-Id: Ide55a32241a3551a58e12c399c22420562848c70
2021-06-08 19:47:50 +01:00