When navigating in Launcher home using a controller,
the mCurrentPage variable isn't updated properly which
results in out of order navigation.
Test: manual
Before: http://shortn/_c8A8mKiplN
After: http://shortn/_ctxIaweqZY
Bug: 187205980
Change-Id: I9ff4019b608e999749c4d0835cc3ceb35be93a3f
> Using EdgeEffect in PagedView for overscroll
> Keeping RecentsView overscroll similar to S, by created a custom EdgeEffect
Bug: 183966408
Test: Manual
Change-Id: Ia547cf14ea315468b12a4ff5f389ac2d2beceafa
Calling cancelLongPress on all the visible pages when needed
and enabling hardware acceleration on them when a folder
animation is in progress.
Test: manual
Bug: 174464691
Change-Id: Ib11265abfd184fed41acc9a6347a32aec12895f2
- Align pages to right (instead of left) in RTL, to make scroll calculation for grid overview easier for out of orientation tasks
- Changed TaskView pivot direction to be consistent with page alignment
- Add scroll offset for ClearAllButton to align to left in RTL
- Fixed Workspace scroll issues in RTL, and removed needs to use panelCount when calculating page scroll
Bug: 175939487
Test: Test carousel/grid overveiw, Workspace, Folder scroll view for normal/RTL
Change-Id: Ic0ba88e5d58638e1149d97a68a978d80fbf26774
- Grid scaling has problem that scales task icon and menu, which makes it hard to control icon size and text size in the manula
- Replaced the whole concept with dedicated Task size calculation in grid layout
- Support different icon size in TaskView in grid and removed task_thumbnail_top_margin
- Removed grid progress in TaskViewSimulator as well
- Refactored how ClearAllButton scroll and translations are calcualted to align clear all properly in grid
- Make page center calculation aware of PagedView pivot and scaling
Bug: 174464863
Test: Manual on two screens
Change-Id: I47b13ef6e55c6e16c52ea04225f5bde02ed82fc2
Recently we have added support for multiple panels
on the home screen but the current StaggeredWorkspaceAnim
logic only supports animation for the leftmost panel.
Test: manual
Bug: 183032642
Change-Id: I539e1c1a26292b75801eb3070e22f0fbde1ebc7e
Since we added support for multiple panels on the home screen,
we need to call cancelLongPress on all the visible pages not
just on the leftmost visible page.
Test: manual
Bug: 178582378
Change-Id: I88ded543a16b1bbf2a53a627e5725f68b42e742b
- Pagespacing set to 0 to have similar design to figma
- Added padding to left side of left panel and right side of right panel to match figma
- getPageScrolls changed to support two page scrolling
- validateNewPage changed so that only even indexed pages can be switched to
- getPageWidthSize added for measurements, it returns half screen width when two panel is active
- onMeasure changed to use getPageWidthSize
- panelCount has been increased from 1 to 2 when two panel is active
- add feature flag for two panel home
- shouldConsumeTouch changed so not only currentpage is checked but currentpage+1 screen as well
- add one more extra check for setDropLayoutForDragObject for currentpage + 2, next to right panel
- using new grid option for two panel home screen
Test: manual
Bug: 174464115
Change-Id: I1bad7eecc67f65fb833608744a5aa5aca65373b4
The fixes are:
1. For widgets shown in TableRow, aligns them center vertically.
This is useful when widgets of different height are shown in
the same row.
2. Remove background color from WidgetCell
3. Re-enable swipe in FullWidgetsSheet
4. Use the WidgetCell image as the single & long press area because
1. Previews are now scaled to their default size. The touch area
should already be larger for widgets that are bigger than 2.4
cells
2. WidgetCells also render description. If the user long press the
description area, the drag view will not align in the middle of
the user touch / drag area.
Test: Drag-n-drop widgets from FullWidgetsSheet, BottomWidgetsSheet
and pin widget flow.
In FullWidgetsSheet, swipe left and right to switch work /
personal tab.
Video: https://drive.google.com/file/d/1Ur7PwF1a7iwGGRTZczfc0BSVu-Ta6-Vm/view?usp=sharing
Bug: 179797520
Change-Id: I6fe4bc88d1e1b35b1819d8d7f046105f5ed27043
- Introduced gridProgress to RecentsView/TaskView ofr animating into grid
- Introduced gridProgress dependant translation and scale properties in TaskView
- Animate running task into grid with TaskViewSimulator
- Remove overview actions (for now) but keep clear all button in large screens
- Adjust ClearAllButton translation to acoomodate for grid
- Use screen width +-50% to calculate task visibility
- Use the position where TaskView is on screenEnd as pageScroll
- TODO: Handle separate recents activity
Doc: go/foldables-launcher-overview
Video: http://dr/file/d/107Aydii1LoFCwP63nWG3Twr2PBDE5ZgD/view?resourcekey=0-aUjdnx8ezimS9tmAgao9ag
Test: Test Launchering overview and launching overview from apps with folloiwng combination:
- large / small screen sizes
- portrait / landscape
- thumbnails from different screen sizes / orientations
Bug: 174464863
Fixes: 181509346
Change-Id: I4b691cde774f2e37532b68ba83c6eed399f2332e
Video: https://drive.google.com/file/d/1TORRNcvVM7fIvNd_WZaajLbI7D9z4VFA/view?usp=sharing
Test: Main profile only: run AddConfigWidgetTest.
With work profile: manually launch the full widgets sheet.
Go to the personal tab: only personal widgets are shown.
Go to the work tab: only work widgets are shown
Successfully add personal / work widgets from the full widgets
sheet.
Bug: 179797520
Change-Id: Iad8b90c2af35e0580319d7a05510ec88e4f8b86c
- Introduced a feature flag
- Refresh TaskView size when thumbnail is refreshed or Recents resizes
- Disable edge scale down in large screens
- Added temp method to get task width/height ratio
- In fullscreen, scale down TaskThumbnailView and disable TaskView elevation
- Task boxing mechanism: http://screen/3NkePthAVUVH2Rv.png
Bug: 174464656
Test: Manually test overview and quickswitch for folded and unfolded, including with RTL.
Change-Id: I2ce24d588a246cc6a2408039a37d884021aa0800
Instead of calculating an overall distance for tasks to translate
based on RecentsView width, calculate the distance for the tasks
to the left and right of the midpoint based on how far the first
adjacent tasks in those directions are from being offscreen.
Changes made to make "distance to offscreen" calculations possible:
- Update TaskView curve scale to reach final scale as soon as it is
completely offscreen. Before, it would reach its final scale just
shy of that point (calculations were off).
- As we update RecentsView scale, calculate how much the new scale
will push out tasks that are just offscreen.
- With both above, we can calculate the scale and position of a
TaskView such that it is just offscreen, and interpolate
between its current position and that position.
Tests:
- Task comes in immediately when quick switching from home, and
doesn't shift as you swipe directly upwards.
- When swiping far up from an app, tasks come in from all the way
offscreen, and cover distance appropriately (e.g. if you're
scrolled a bit to the right when you pause, the left adjacent
app will move faster to cover the farther distance).
- Task modalness: entering Select mode now animates adjacent tasks
at the same rate as the scaling up, because they move only the
distance needed to get offscreen (before they moved way too far
and thus seemed to be much faster than the rest of the animation).
Bug: 149934536
Change-Id: Ie3fffe0e5c304cb16e7637f058f5ce72cee40aeb
- Reduce slop for gestural mode (and apply multiplier to slop
at checktime)
- When quickswitch threshold is passed, reduce the total movement
check and reduce the velocity needed to fling to the next page
to accommodate short swipes
- Use touch slop to determine scrolling in paged view, and only
use paging slop to determine flinging to the next page (when
easy flings are disabled (which is the default))
Bug: 157165240
Test: Ensure the flings in normal overview/paged views don't change,
check short flings from quickswitching
Change-Id: Idd04ce23f53c06759e84ac8ad73cf2cc6dff6975
Test: clear app recent apps, open Calculator, open Clock,
quick switch to Calculator and see no jump
Bug: 154815348
Change-Id: I6289d43efe5d850cb2fd807d15115c5ce38c16dd
> Fixing crash when some properties are not initialized if draw is not called
> Adding robolectic support for UI testing
> Adding robo tests to verify workspace, all-apps, widgets and folder scrolling
Bug: 147312357
Change-Id: Id7756e07f06396359e441cdff2e4f992bdcb97bb
Before, we did this by extending the window/launcher animation to
match the scroller duration. But now that we are using springs to
control the scroller, that duration is not really accurate. So
instead, we now let the window/launcher move at its own pace, and
wait for both that animation and the scroller to finish before
calling onSettledOnEndTarget().
Bug: 147302669
Change-Id: I37a9dd3eea17ebe663c33c3a4478b1b53a63dcc2
This sets the feature flag on launcher side
and also updates the setting in Settings.Global
Launcher DOES NOT listen to the Settings.Global
change from adb anymore. This should take
preference over setting it from command line.
Also fix a related swipe to home animation bug
that happened w/ merge conflict.
Fixes: 150260456
Test: Set and unset, visually verified behavior.
Tested w/ autorotate on and off.
Checked Settings.Global value correctly updated
via "adb shell settings get global
fixed_rotation_transform"
TODO: Update tests to reflect this new
default-on fixed rotation behavior.
Change-Id: Id95f006eb1e92a59e24b05567298fd21b1409b13
Also stop OrientationTouchTransformer from
spamming logs
b/150214193 should track properly handling
this in the future
Fixes: 146176182
Test: New vertical layout showed up when
swiping to Overview w/ landscape app.
Works for both autorotate on and off.
Change-Id: I3707cf7b5693be0fcf4d63491901f4ec00793f4f
WM is making changes which allows apps to maintain
their orientation independent of the orientation of
the foreground app. This allows recents to always start
in portrait even when the app currently running is in
landscape. This means we have to give the illusion of
a landscape oriented overview when user swipes up in
gesterual nav when launcher is started in portrait
configuration.
PagedOrientationHandler abstracts all coordinate specific
logic from Paged/RecentsView primarily, but also all
other dynamic calculations throughout launcher.
PagedViewOrientationState is the single point of exposure
to other classes that depend on those changes. The goal
is to also minimize holding state to allow for default
implementations of PagedOrientationHandler for all the
3p/Fallback classes. PagedViewOrientationState also
holds other data around rotation that isn't
specifically tied to view logic.
The fake landscape overview can be toggled with:
adb shell settings put global forced_rotation [0/1]
Fixes: 146176182
Change-Id: I65d8d4e9f92b93931cbe0053ccaf0cda8d2ffd6c
The flag is only set when building from Android Studio... and is never
used for dogfood.
Test: local
Change-Id: I898d585f4558c2437f0152ef102bea59c351f80b
Send TYPE_VIEW_FOCUSED in the following places:
- When page transition ends on a task
- When finishing state transition to overview
- When un-hiding the current running task view
Bug: 145647019
Change-Id: I7bb357ea60e1dea79daf2ad50efa51071e064da8
Forcing OverviewActions buttons to appear as if it is shown only once in overview screen by overlapping all instances in the same spot.
Change-Id: I195d5455d5eb9f12a19c352169bc995849e59281
- Don't set current page to running task when applying load plan,
if we are already settling on a new task to launch.
- When starting a new task, finish to the running app if that's
the task being started (should not happen with above change)
- When disabling free scroll mode, don't snap to a page if we're
already on it. This was setting mNextPage so the first check
was falsing.
Bug: 142068081
Change-Id: I5b392d9726a81c51718d2f94eee6cd4f78b61f69
The logic to keep mIsBeingDragged when touching down during a scroll
animation was in onInterceptTouchEvent(), which we were bypassing by
using onTouchEvent() directly. Now we update mIsBeingDragged on touch
down in both onInterceptTouchEvent() and in onTouchEvent().
Bug: 141024521
Change-Id: I77abd4c36f3ccee27e160c817dadb3923e6cfc06
This reverts commit d5af944f41.
Reason for revert: Test failure on master that might be related to this code change.
Change-Id: I269bf5b0a6505da291e1ff4ed181a851268d6ed8
For PagedView, when isPageOrderFlipped is true, it means the LTR mode is
flipped. For the "recents" in launcher, isPageOrderFlipped is true.
However, this doesn't affect the directional page operations since
scrollLeft()/Right() already has correct Rtl considerations. See
b/78788182 for more information on the LTR mode.
Test: Tested with the "recents" in launcher. Verified that page left
action always move pages to the right (so that the next page from the
left side shows), and page right actions always move pages to the left
(so that the next page from the right side shows). Also tested with the
home screen 1/2, 2/2 paging.
Bug: 136277517
Change-Id: I965d651c37d258eaa8ea347d1ad6f698f9b590bf
The original bug that was solving seems to be fixed by other changes,
and this allows users to scroll, dismiss, etc on recent tasks before
fully reaching overview from an app.
Bug: 137487381
Change-Id: I28a708811bba3ce739ce261f19eb29558d8f0e7d
=> Regression from recent CL ag/8074890
=> Fix which scopes the change down to the RecentsView, but not all PagedViews
Bug 136733573
Change-Id: I0abaa61b2b132d8086dc3b2cb3e3e9c1f181b5f5
> When running one-off animations during quickstep, cancelling prevoisly
running animations.
> Cancelling such one-off animations when state is reset
> Preventing touch proxied from recent transition to affect quickswitch
(by affecting pagedView)
Bug: 135686388
Bug: 135571566
Change-Id: Id647015a583761d8fd46a02e3e2d88027e282a79