Commit Graph

403 Commits

Author SHA1 Message Date
Vinit Nayak 7a78147ba3 Use same calculation for portrait as fake landscape for layout of split thumbnails
* Partially revert ag/20330754, not entirely sure why we switched from
using dp.isLanscape to splitInfo.appsStackedVertically, since the two
represent different states (specifically for fake landscape)

Fixes: 280783620
Flag: None
Test: Tested on foldable, small + large screen.
Fake and real landscape on small screen.
Rotated while in overview.
Slight sliver of wallpaper shows on large screen, but that
issue has been there.

Change-Id: I13d834a31417751dd3b757344ec7b4d9a174090e
2023-05-12 10:40:59 -07:00
Andy Wickham 830e4b7ce0 Add long swipe from app to overview gesture (with flag).
High level:
 - As you swipe up from an app (OtherActivityInputConsumer),
   a state transition animation to All Apps is created in
   AnimatorControllerWithResistance. The animation is played
   alongside the Recents resistance animation (i.e. past the
   settling point of Overview, which is at mCurrentShift 1).
 - The actual state transition to All Apps only happens if you
   release your finger in the "all apps region." This is set to
   mCurrentShift 2, so double the distance that Overview rests.
 - A haptic plays whenever you enter or exit this region, and
   the all apps animation is set to 0 until the region is
   active. This is so it's clear that something different is
   happening.
 - The panel that was previously used for tablets is now used
   for phones during this transition. It comes in at full
   opacity when you enter the region, and the contents (apps
   and search suggestions) fade in as you continue swiping.
 - The only gesture that is recognized in the all apps region
   is a fling downwards, which will return you to the previous
   app. Otherwise a left/right/up fling or slow release will
   finish the all apps transition.
 - The threshold is ignored if the flag is disabled (default)
   or if FallbackActivityInterface is active.

Flag:
The threshold is ignored if ENABLE_ALL_APPS_FROM_OVERVIEW is
disabled (default).

Bug: 259619990
Bug: 275132633
Test: Manual with and without the flag enabled
Change-Id: Ie311b77252416d97677b2c56fad61dfd392b6fe8
2023-04-26 10:52:04 -07:00
Thales Lima 6ca92a383c Merge "Fix TaskView cropping for transient taskbar" into udc-dev 2023-03-10 15:52:16 +00:00
Thales Lima 3a6193517d Fix TaskView cropping for transient taskbar
TaskView clipping is not necessary anymore because task in Overview will always be the same aspect ratio as the app when in fullscreen.

Fix: 268211636
Test: manual trigger of Overview (landscape, portrait, split screen)
Change-Id: Ib4faeda6f0cccef3b23fcbacb89c6d2832c0df59
Merged-In: Ib4faeda6f0cccef3b23fcbacb89c6d2832c0df59
2023-03-09 20:24:53 +00:00
Vinit Nayak aa7bf8b394 Add initial split from GroupedTaskView animation
* Created SplitAnimationController to prevent more
RecentsView bloat
* Extract SplitSelectSource attributes into separate class
* http://recall/-/cMb5xTTxhmZtFt04eYnmQj/eACJq1un8Ef91LgmQblpAw

Bug: 267370106
Change-Id: I5d430c091ac84bbbc30319e7b78711b610a21252
2023-03-08 15:17:57 -08:00
Alex Chau 8aa3f00238 Land ENABLE_TASKBAR_IN_OVERVIEW
Fix: 270393449
Test: manual
Change-Id: I731bfa8ee86154fd034781e27272abc81a6fe6c6
2023-02-28 20:18:32 +00:00
Brandon Dayauon 12c193e6c5 Implement diff haptics going into all apps
Notes:
* the reason why 0.6 -> 1 never happened was because of AllAppsSwipeController where
it had a clampToProgress. By changing lowerbound to 0 the progress actually shows fully 0->1

- composed the haptics in the constructor
- added new listener class in AATransitionController

Added featureflag

bug: 233751149
test: Manually - presubmit, ran “make -j7 Launcher3” from master branch  photo: https://screenshot.googleplex.com/8r5FZh6buzkQMjk
Change-Id: I5e1a24170fdbfdd35b8d8f24af0ec5e8586641a2
2023-02-07 11:36:42 -08:00
Vinit Nayak 6fa1ab9441 Merge "Unify split options into single option" into tm-qpr-dev 2023-02-03 06:07:41 +00:00
Vinit Nayak 5a6863f14a Unify split options into single option
* No more split left/right/top, only have
splitscreen and icon shows vertical or horizontal
split windows
* Replace existing split icon for FreeForm

Fixes: 264930810
Test: Tested landscape and portrait, workspace,
overview, allapps

Change-Id: I443f93b6b01760b726bf9f024fb1324fdf0ed03c
2023-02-01 17:27:57 -08:00
Sunny Goyal 126ac14112 Merge "Introducing CellPosMapper which allows mapping between UI position and model position" into tm-qpr-dev 2023-01-31 18:20:35 +00:00
Sunny Goyal 669b71f5b3 Introducing CellPosMapper which allows mapping between UI position
and model position

Test: atest CellPosMapperTest
Bug: 188081026
Change-Id: If5c6b3df5ad240317bb535c675f6ead94084238e
2023-01-30 12:17:09 -08:00
Luca Zuccarini 2098381808 [Toast] Introduce SysUI's animation library to the transition manager.
Bug: 250588519
Test: manual, see videos in bug
Change-Id: Iccc440c95ecc14d39e35d911798e239b698b950a
2023-01-27 13:49:40 +00:00
Luca Zuccarini 51c89ca493 Merge "Revert^2 "Update timings for the Home <> All Apps transition."" into tm-qpr-dev 2023-01-12 14:06:07 +00:00
Sunny Goyal 5fe99d560e Fetching the session info on the background thread when launching pening icon
Bug: 242669604
Test: Verified that the RPC is not made on UI thread
Change-Id: I4299628b8b3e9aa2844f5556c57f47d997dd85e1
2023-01-10 11:02:58 -08:00
Luca Zuccarini fb4429f0b0 Revert^2 "Update timings for the Home <> All Apps transition."
e18ac479e5

Change-Id: Id09987b2c67be70e62349574973d4bc62b10bc9d
Bug: 263221786
2023-01-10 17:05:29 +00:00
Luca Zuccarini 2da05f367d Merge "Revert "Update timings for the Home <> All Apps transition."" into tm-qpr-dev 2022-12-28 14:03:58 +00:00
Luca Zuccarini e18ac479e5 Revert "Update timings for the Home <> All Apps transition."
Revert submission 20641089-b/254835725

Reason for revert: b/263221786

Reverted changes: /q/submissionid:20641089-b/254835725

Change-Id: I6aa0955b4ac7ed47ea254514b364b0ab94b632bf
2022-12-27 14:18:05 +00:00
Luca Zuccarini 49d07b1688 Merge "Update timings for the Home <> All Apps transition." into tm-qpr-dev 2022-12-19 11:10:14 +00:00
Jeremy Sim 2ebdc76fa5 Merge "Fix juttering problem with split staging animation" into tm-qpr-dev 2022-12-15 21:38:31 +00:00
Jeremy Sim 8e8352e27e Fix juttering problem with split staging animation
This patch makes it so that app icons no longer jutter uncomfortably when staging and confirming a split from home.

The problem occurred because I used Math.round when calculating the position at which to center the app icon within the SplitPlaceholderView. When an inexact integer is used to calculate the x and y position on every frame, it creates juttering, especially when numerical values are small.

Solved by removing Math.round and using floats going forward.

Fixes: 262308025
Test: Manual
Change-Id: If91d1d3ee52652c155ed7e4e1d4f4620fdc41cc9
2022-12-12 18:18:20 -08:00
Fengjiang Li a6a67e347d Support mouse right click on HomeScreen to show the customization menu
Bug: b/250089861
Fix: b/250089861
Test: Manual Testing
Video: https://b.corp.google.com/action/issues/250089861/attachments/40243664?download=true
Change-Id: Ia23e302bf8f3e18fafd6ccd079740c8005ae7860
2022-12-09 02:44:09 +00:00
Luca Zuccarini 43e3d45042 Update timings for the Home <> All Apps transition.
Also updates some interpolators to make the manual and atomic
transitions more homogeneous.

Also also updates the commit point so it matches the transition point
between the two states exactly.

Note: the background scale is currently too much, and it needs to be 1/3
of the total distance to match the Workspace scaling. To do this, we
simply scale down the depth by a factor of 3 when calling the background
zoom-out API in the DepthController.

Bug: 254835725
Test: see videos in bug

Change-Id: I605546921e9ee4dfc852794c56495c72f0b916e1
2022-12-07 13:12:16 +00:00
Sunny Goyal 9a616213e1 Removing SearchActionItemInfo
> Instead introducing an interface for handling click events
> Linking this interface to other UI which handle clicks

Bug: 259733681
Test: Presubmit and verified manually
Change-Id: I9cbf2d009d64254f513deb909a151e46e860d039
2022-11-30 10:59:07 -08:00
Holly Sun 259723de32 Catch exception to prevent crash.
Bug: 258234624
Test: QA verify
Change-Id: I31df77b33f19426d136673d1ce9866fa6e60729c
2022-11-22 20:58:36 -08:00
Vinit Nayak 29e71bdd72 Improve Split portrait gesture animation
* Crop out taskbar from bottom thumbnail for vertical split
* TODO: Need to re-calculate thumbnail sizes if taskbar
 is stashed. There's also a very slight rounding error
 somewhere even in the unstashed case that needs to be
 revisited

Bug: 219411750
Test: Start gesture animation in split in potrait
Change-Id: I35f2415e13af7467e0735ac8865cee0e3e3d27f8
2022-11-08 11:33:08 -08:00
Vinit Nayak b9b7c38d55 Merge "Improve TaskMenuView layouts for split pairs" into tm-qpr-dev 2022-10-21 00:07:53 +00:00
Jeremy Sim 8edca84cd5 Merge "Prevent doubling up on split placeholder insets" into tm-qpr-dev 2022-10-20 20:59:49 +00:00
Vinit Nayak 0f6526e0c4 Improve TaskMenuView layouts for split pairs
* Instead of basing calculations on the TaskView view,
use the TaskThumbnailView as the anchor.
This helps us prevent having to re-calculate positions
that were already done to layout the thumbnails
* TODO: Gracefully handle re-positioning task menu view
on rotation

Bug: 249693334
Test: Manual, opening task menu view in
land/seascape in portrait, w/ and w/o home rotation

Change-Id: I02da96d2735657d5340e23056de69392ff8452c4
2022-10-13 14:15:14 -07:00
Vinit Nayak 0bc70442d6 Merge "Fix casts to Math.round() in real landscape" into tm-qpr-dev 2022-10-13 20:02:05 +00:00
Vinit Nayak b26664800e Fix casts to Math.round() in real landscape
Fixes: 248575056
Test: Wallpaper no longer bleeds through on split
animation in real landscape.

Change-Id: Ia59efda737de94a4b64f9d0a1f84cd116539107b
2022-10-13 13:01:39 -07:00
Jeremy Sim 0ac4708396 Prevent doubling up on split placeholder insets
This patch makes it so that the split placeholder uses only one inset for buffering the top of the icon: either the default split placeholder inset, or the device's built-in screen inset.

Currently, when we determine the size of the split placeholder, we add the placeholder's default inset to the device's built-in screen inset (camera cutouts, etc.). On some devices, this causes a very large combined inset, and it doesn't leave enough room for all the other UI elements, especially when 3-button mode is active. This patch cuts out one of the insets by selecting only one of the insets to respect (the larger one).

Fixes: 241164191
Test: Manual, checked all emulated inset types on a variety of screen sizes
Change-Id: Ica0e791bf4b8b757ad3fb87ab1cf3105b97a61dc
2022-10-11 21:26:43 -07:00
Alex Chau e2791f0cf6 Merge "Fix positioning of split instruction and share targets with taskbar in overview" into tm-qpr-dev 2022-10-11 14:04:57 +00:00
Alex Chau 8949c583ee Fix positioning of split instruction and share targets with taskbar in overview
- When taskbar is in overview, overview actions has dedicated space and no need to align to nav buttons
- Add a bottom margin to split instruction and share targetse that is equal to the space below overview actions

Bug: 245320601
Test: Test split select and share target with different screen sizes
Change-Id: I6aec325da9cc4c43c84ba8bed5f0e087c57d6925
2022-10-08 10:15:58 +01:00
Vinit Nayak 8f54d597bf Round split layout values instead of using int cast
* Silly us, we forgot that int casting always floors.
Math.round() does a mathematical round.

Fixes: 248575056
Test: Wallpaper no longer bleeds through on split
animation.

Change-Id: I068c030ce6b86fc12faee7778c0d87a0d5aea487
2022-10-07 14:46:25 -07:00
Vinit Nayak c7d676ce15 Improve splitscreen recents animation in seascape
* We need to swap the primary and secondary thumbnail
positions in fake seascape since the primary is the
visually left app (which is the bottom in portrait)

Bug: 249693334
Change-Id: I325133ab86e4fcd26c6162a3de007d68e9ba6bf1
2022-10-06 21:32:20 -07:00
Sihua Ma 8e66905618 Merge "Showing Toast message when the target package is null for the disabled shortcut" into tm-qpr-dev 2022-09-19 23:20:12 +00:00
Jeremy Sim 21a5b12b6f Update animations for TM-QPR: Overview > OverviewSplitSelect transition
This change updates the Overview > OverviewSplitSelect animation to the latest spec. This is a re-upload of a previous change, ag/19464657, but no longer will cause the b/241165022 issue.

Includes:
- New timings
- Task thumbnails slide in with an "overshoot" animation
- Icons fade out and fade in appropriately
- SplitInstructionsView has a new compound "unfold" animation

Bug: 236760307
Test: Manual on tablet. Made sure the b/241165022 issue is fixed.
Change-Id: Ia22f6b6d7b9474b782e693fae2320a34a2985b18
2022-09-14 18:06:05 -07:00
TreeHugger Robot d581f40b30 Merge "Removing some unused code:" into tm-qpr-dev 2022-09-12 19:24:20 +00:00
Vinit Nayak f5e5c8e1ce Merge "Place TaskMenuView aligned with secondary split thumbnail" into tm-qpr-dev 2022-09-12 18:29:22 +00:00
Sunny Goyal eb018d8004 Removing some unused code:
> intrinsicIconScaleFactor is no longer read
> We no longer generatepreview outline for drag

Bug: 245997823
Test: Presubmit
Change-Id: I17ed25239d0affe89482da3406d529d323a426d9
2022-09-09 16:02:13 -07:00
Vinit Nayak 2e4dcb16a7 Place TaskMenuView aligned with secondary split thumbnail
* Use consistent divider calculations in
different methods

Fixes: 245610772
Fixes: 218784487

Test: Open task menu view in split pair in landscape/
seascape/portrait, real and fake.

Change-Id: If1bbc7a0d4f1767584d0fc8cf549130f35b8e4a3
2022-09-09 11:25:08 -07:00
Alex Chau e818bcb997 Use real IDP in DeviceProfileTest
- Mock WindowManagerProxy instead of IDP in DeviceProfileTest
- Extracted NavigationMode to standalone class
- Moved parseNavigationMode to WindowManagerProxy so it can be mocked
- Moved DeviceProfileTest to internal repo

Bug: 242086027
Test: DeviceProfileTest
Change-Id: Ia5a43293b1380f04d786d2adf8503cfd10f7674a
2022-09-07 10:35:21 +01:00
Alex Chau 3193522616 Change wallpaper depth value in AllApps bottomsheet
- Cap AllApps wallpaper zoom to workspaceContentScale rather than all the way to max depth (config_wallpaperMaxScale)
- Changed both workspace scale and depth interpolator to correlate with AllApps threshold

Bug: 240580498
Test: manual
Change-Id: I0342a37c72206268dcffc5697a212704a41b020f
2022-09-01 21:26:30 +01:00
Brandon Dayauon dc51afd920 Merge "Fix jumpiness when dragging surface down and up." into tm-qpr-dev 2022-08-23 20:38:52 +00:00
Brandon Dayauon d4a60b394f Fix jumpiness when dragging surface down and up.
Currently the overshoot only works when you first open all apps and try
to extend the all apps to the top (making it overshoot). This pull works
when you go mFromState:Normal -> mToState:AllApps. However once the all
apps is set and you move the surface down then up..that overshoot
animation jumps AFTER your finger goes all the way up and off the
screen. At this point, once all apps is completely opened.. the states are
mFromState:AllApps -> mToState:Normal.

Now with this change, it addresses the jumpiness by considering the
current states (mFromState==AllApps) by
including the same onPull() but with different calculations

bug: 240669628
test: manual - videos included in bug thread
Change-Id: I7873f1ec22574f87fab3d2f11d1f5a5f81dfb5bc
2022-08-23 01:20:22 +00:00
Jeremy Sim 2fe7dd7306 Revert "Update animations for TM-QPR: Overview > OverviewSplitSelect transition"
This reverts commit a50bb39048.

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

Fixes: 241165022
Bug: 236760307
Change-Id: Icc080d9a37e26d70d0f4cf846a4fd39df3b71625
2022-08-18 21:28:54 +00:00
Jeremy Sim a50bb39048 Update animations for TM-QPR: Overview > OverviewSplitSelect transition
The animation from Overview to OverviewSplitSelect is now updated to the latest spec. See bug for details.
- New timings
- Task thumbnails slide in with a new spring animation
- Icons fade out and fade in appropriately
- SplitInstructionsView has a new compound "unfold" animation

Bug: 236760307
Test: Manual on tablet and phone. Looks good on both true and fake orientations.
Change-Id: If98d4464aa51c876d79bee9672279992a2cf9026
2022-08-14 10:34:51 -07:00
Sihua Ma 1d8b7cba31 Showing Toast message when the target package is null for the disabled shortcut
The shortcut for a certain set of apps could have their component names set to null. In this case, if we still need the package name for the shortcut, we should use the package name from the intent, which is accomplished in getTargetPackage. Additionally, if the target package is still null, we are falling back to showing the Toast messages only.

Fix: 239685630
Test: Verified that the crash no longer happens after clicking on grayed out shortcuts
Change-Id: I4de68ea1a227032e16e5c00407f75159a7aba30f
2022-08-02 11:17:29 -07:00
Jeremy Sim b7a781b599 Merge "Update animations for TM-QPR: OverviewSplitSelect > Home transition" into tm-qpr-dev 2022-07-29 18:57:00 +00:00
Jeremy Sim fe5bccbf6f Merge "Update calculation method for Overview UI placement on tablets" into tm-qpr-dev 2022-07-29 18:56:40 +00:00