Commit Graph

256 Commits

Author SHA1 Message Date
Pinyao Ting
3ad4ace203 Revert "support scroll backward to minus one screen via voice/switch access"
This reverts commit d5af944f41.

Reason for revert: Test failure on master that might be related to this code change.

Change-Id: I269bf5b0a6505da291e1ff4ed181a851268d6ed8
2019-09-17 16:58:07 +00:00
Pinyao Ting
d5af944f41 support scroll backward to minus one screen via voice/switch access
Bug: 140406263
Test: Manual
Change-Id: I604b12f8ba8706cbabc28acafd6c151166832f22
2019-09-16 14:21:49 -07:00
Samuel Fufa
9fd21056c7 App shortcut overlapping app icon when selecting the app using USB mouse
Test: Manual
Bug:113287687
Change-Id: Ib02c736a312937a9b71d5168d965446b6fc5b7b7
2019-08-28 17:58:14 -07:00
Samuel Fufa
59cba191c3 Mouse wheel scroll apps with work profile enabled instead of switching tabs
Test: Manual
Bug:79164903
Change-Id: I4b382034ea5b91b24dcc158bd9fa46d64f54cc7a
2019-08-23 11:20:29 -07:00
yingleiw
02cc848896 Add directional accessibility page actions to PagedView
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
2019-08-14 18:05:08 +00:00
Tony Wickham
b6841ac630 Revert the changes that prevented touch on RecentsView during animation
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
2019-07-22 12:39:59 -07:00
vadimt
4d93df51a3 Switching flinging gestures injection to model time
This is a right thing to do in any case.

Change-Id: I34eeecac6d9eb13130eb1015f9a9a5e2a32974ec
2019-07-10 17:38:26 -07:00
Adam Cohen
ab6be31746 Fix issue where can't interact with Workspace while App => Home is running
=> Regression from recent CL ag/8074890
=> Fix which scopes the change down to the RecentsView, but not all PagedViews

Bug 136733573

Change-Id: I0abaa61b2b132d8086dc3b2cb3e3e9c1f181b5f5
2019-07-06 04:27:49 +00:00
Sunny Goyal
c4bb3739b1 Cleaning up some animation states:
> 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
2019-06-21 12:47:56 -07:00
Tony Wickham
312209b01a Set mNextPage after springBack when overscrolling
Bug: 134609899
Change-Id: I74294655689c4ccd66896550b74e205d1c3df543
2019-06-18 15:55:21 -07:00
Winson Chung
0e44900863 Continue gestures on interaction after recents animation finishes
- Detect when start of the next task is interrupted with another gesture
  (after finishing the recents animation but before the next task is
  launched), and ensure that the next gesture is continued with another
  other activity input consumer (but without actual remote animation
  targets)

Bug: 128376812
Test: Introduce artificial delay in recents animation finish, try to quick
      switch quickly

Change-Id: I057a0b2c4b7e8636467e37f5bbc8800b46c24345
2019-05-06 10:17:49 -07:00
Sunny Goyal
2acea9f872 Enabling quick-switch gesture in landscape mode (2 button UI)
Bug: 130689544
Change-Id: I6b424be4d80b3bf8263f456a024a81c63100030e
2019-04-29 14:33:56 -07:00
Tony Wickham
03f27013bf Log undo button click
Also fix a bug where we logged workspace swipe upon clicking undo, since
rebinding the pages causes us to reset mCurrentPage = 0 followed by
setCurrentPage(pageBoundFirst). Since the page isn't actually visibly
changing, we shouldn't log in that case.

Bug: 118758133
Change-Id: Ie87164a8c7c278680f67dee75657210bd33408a4
2019-04-25 14:22:54 -07:00
Tony Wickham
66d1c2fada Hide Clear all button during quick switch
- Add support for mMinScrollX to PagedView
- Add RECENTS_CLEAR_ALL_BUTTON as a state-specified visible element
- In BackgroundAppState, set Clear all invisible and bound RecentsView
  scroll to the last task

Test:
- Open an app, quick switch until reaching the end, ensure Clear all
  does not show up and an overscroll effect is performed
- Enter overview, scroll to the end and ensure Clear all shows up
- Same tests in RTL and 3rd party launcher

Bug: 130160876
Change-Id: I5fb958744d0055b83ced1f8b0d7face0e06a0cc5
2019-04-24 17:09:34 -07:00
Tony Wickham
44a58888c7 Remove PagedView#isTouchPointInViewportWithBuffer()
It's no longer necessary, and causes issues when trying to scroll
a PagedView that only takes up the bottom half of the screen (e.g.
RecentsView in split screen mode).

Bug: 126606858
Change-Id: I117dfe9416cdeef1247d6e783390cf5c391e8254
2019-04-09 14:27:51 -07:00
Winson Chung
1942d5a54a Fix issue with flashing on overscroll
- Apply the bounded current scroll to the overscroll instead of assuming
  the max scroll (on the last tick, the overscroll amount can be zero,
  causing us to shift to the max scroll until the next draw)

Bug: 126767319
Change-Id: Ia60ecb0c3f18e68d0c91620aa79b21df72c213cf
2019-03-01 13:32:32 -08:00
Winson Chung
1de3c5078c Fix small issue with overscroll not being dampened on the left edge.
Change-Id: I113425e6bae2ff6f6f143526a7e06363fb8d4320
2019-02-25 18:56:21 +00:00
Sunny Goyal
4bb8b06ef3 Passing all events to RecentsView instead of passing the calculated velocity
Velocity tracker is able to calculate the velocity using cached copy of motionEvent
as long as the event as correct timeStamp

Change-Id: I2b0f612e010fdfcf144d5bed928c5a96b36f3ac7
2019-02-20 13:45:27 -08:00
Tony Wickham
023f404a12 Make quick switch ("hook") more reliable
- Add max orthogonal displacement to MotionPauseDetector to avoid
  pausing when swiping left or right
- When gesture in ambiguous between swipe up for home or swipe over
  for the new task, base the decision on the faster velocity component
- Disable recents freescroll mode when dispatching motion from the nav
  bar. This way recents handles it naturally and we don't need custom
  logic to snap to the next page at the end of the gesture.
- Fix a bug where you couldn't hook to start a new task when SWIPE_HOME
  was disabled

Bug: 111926330
Change-Id: If63aa2bb32b57c3f401c5df8b3f6f4efec97b1fa
2019-01-29 17:11:12 -08:00
Sunny Goyal
703ee9f675 Passing proper velocity information when simulating touch events on recents view
Change-Id: I488b8d61c47e49dbdc65b16e2470b171912efc3f
2019-01-28 16:46:48 -08:00
Jon Miranda
71cb80cccb Add springs when snapping between pages on the workspace.
- Behind feature flag QUICKSTEP_SPRINGS
- Springs control settling the page and allow for overscroll for the
  first/last pages

Bug: 111698021
Change-Id: Ib4a9ef59463cc46e31ac0766bf7705612f6c63c1
2019-01-24 21:25:32 -08:00
Tony
50876bfac7 FeatureFlag: quick scrub is now quick switch
- Scale down current task and translate it to the left
- Translate previous task in from the left
- This is a toggle; quick switch again returns to the first task

Currently this is implemented by repurposing onQuickScrub(progress) to update the positions
of the first two pages. This makes tracking velocity a bit difficult; if we want to go down
this path in the long run we should probably track velocity properly on MotionEvents.

Change-Id: I4445b5f08b6e88e71cbb5e30b1f1d45c5f1edc68
2018-11-01 17:26:31 -04:00
Tony Wickham
cb3f870054 Reading window_animation_scale from Settings.Global
It moved from Settings.System, so there were constant warnings in the
logs. This only affects dogfood builds.

Change-Id: Ic3c179837f78a8040579fcc6ad485f6fabe1c2a1
2018-08-27 17:36:03 -07:00
Sunny Goyal
b7b0135c93 Adding overscroll in recents view
Bug: 109828536
Change-Id: I4fe94bd157c2b65f80604751e6f0f7d5d81d058d
2018-08-10 22:41:20 +00:00
Sunny Goyal
aad3359e8e Removing unused touch handling in PagedView so that it is similar to various platform class
Bug: 109828536
Change-Id: Ibaba3fb4298f2dc055d125acea5f4c47403bbef0
2018-08-08 12:12:46 -07:00
Santiago Etchebehere
260b4cbd90 Revert "Adding overscroll effect in recents list"
This reverts commit 4d6b1a95a1.

Bug: 110279118

Change-Id: I794b2c7af076d63901f2286fd2ff3d06c6e39fee
2018-06-15 23:55:03 +00:00
Sunny Goyal
4d6b1a95a1 Adding overscroll effect in recents list
Bug: 109828536
Change-Id: If2b65cfc2b7f14deb721436f7aa378c4a2c5c468
2018-06-11 16:42:37 -07:00
Sunny Goyal
c82c6396e9 Moving clear all button inside the recents view
Bug: 72222505
Bug: 109828536

Change-Id: I843b79db3e47abc2c41ed78f186b9c941941ddef
2018-06-11 13:51:03 -07:00
Sunny Goyal
9bb8ffb5e3 Various quickscrub fixes
> Fixing PagedView resetting the currentPage, if scrollToPage was called before first layout
  This causes quickscrub to jump back to the current task if launcher activity was dead.
> Fixing missing callbacks in DeferredTouchConsumer causing missed quick scrub flings
> Sending the resents animation callbacks on the motion queue thread, to avoid synchronization
  issues with sysui callbacks.
> Waiting until the recents animation is received before starting the scale down animation
> Calculating the offset for quickscrub statically incase launcher activity was dead

Bug: 80214390
Change-Id: I1b7d00b7b266655a92fcd6239f25ba191655150f
2018-05-29 12:17:20 -07:00
Vadim Tryshev
528b9e0615 Reporting range of visible tasks
Also fixes task position being incorrectly reported specifically for
swipe events due to using stale getCurrentPage().

Bug: 72222505
Test: Manual
Change-Id: Ic79b67f8a6ffbfabc397b411b14afc309405197e
2018-05-25 12:24:40 -07:00
Sunny Goyal
7f28fd55ff Increasing the overview size while in QuickScrub mode
Bug: 80139193
Change-Id: I19ea05d3cc083628364651e9d9f581fe1aaaeaaa
2018-05-23 15:55:51 -07:00
Vadim Tryshev
98913d0c95 Remove code duplication
Bug: 72222505
Test: Manual
Change-Id: I6ae6ac7474b44c16bd765635e32d2e843bc02cac
2018-05-18 18:41:34 -07:00
Vadim Tryshev
4ae69dea49 Merge "Fixing reverted order of accessibility scrolling in Recents" into ub-launcher3-edmonton 2018-05-19 00:54:37 +00:00
Vadim Tryshev
e628c474ea Fixing Recents sometimes restoring in Clear-all-reveal position.
This happened if a task was added between openings of Recents.

Bug: 72222505
Test: Manual
Change-Id: Id4cc8e7cbdb493973d329466369b62e4ac8ee0b3
2018-05-16 15:00:52 -07:00
Tony Wickham
46afdf5194 Merge "Tune quick scrub" into ub-launcher3-edmonton 2018-05-15 21:34:34 +00:00
Tony Wickham
d58c2d5a48 Tune quick scrub
- Change durations/interpolators when starting from home vs an app
- Increase dim animation duration after quick scrub from an app
  - Also fixed contention between setting dim alpha for the animation
    and setting dim alpha for scrolling
Change-Id: I2c9ea52d4eafaad8954f3ff9d3c0c459a07953bc
2018-05-15 11:49:09 -07:00
Vadim Tryshev
3154cd16b0 Keep clear-all button revealed after dismiss
If it was visible before the dismiss, it will be visible after that.
As a nice side effect, it will preserve visibility on any layout, say,
after a rotation.

Bug: 79117932
Test: Manual
Change-Id: Ia8a544af1326458d4e2d7a07ae2b668f604bc0b3
2018-05-15 11:28:24 -07:00
Vadim Tryshev
eb701c6360 Scrolling on the most recent task upon Overview start
Fixes this problem:
1. Open a single task in Recents
2. Dismiss via Clear-all
3. Start a task
4. Press Home
5. Press square button
get Recents revealing Clear All button

Bug: 79117932
Test: Manual
Change-Id: I47bcc50cb72f1757025d2abac0196460e0bb3f36
2018-05-14 17:24:00 -07:00
Vadim Tryshev
0fc0713253 Fixing reverted order of accessibility scrolling in Recents
Bug: 78788182
Change-Id: I275381e65bbd2fa24e427fea0bb9ca44366e0357
Testing: Manual
2018-05-07 16:28:46 -07:00
Vadim Tryshev
a9283beebc Settling scrolls over clear-all button.
Per UX feedback, we divide the "overscroll area" 50/50 and settle to the
closest of the most recent task position and the fully scrolled
position.

Bug: 72222505
Test: Manual
Change-Id: Ic98fa5ae2f14f274f6a425ac687f13f7b3a4332e
2018-05-02 13:30:27 -07:00
Vadim Tryshev
84b46f0257 Fixing task misalignment
Bug: 78793769
Test: Manual
Change-Id: I49f8213bf412f63fc296a8be5bd49950e4c01175
2018-04-27 18:00:14 -07:00
Vadim Tryshev
cc0c98ad94 Enable Clear-all button by default
Making it work with all 4 combinations of RTL and flip-recents.

Bug: 72222505
Test: Manual
Change-Id: Ifb2428e006674abfe9a2609fd3d8f3f648eff0b8
2018-04-27 13:32:28 -07:00
Vadim Tryshev
77cb385d47 Improving highlight for Clear-all button.
Better shape + now has hover state.

Bug: 72222505
Test: Manual
Change-Id: I24ba55c760b15d71406a35ea5f7bf54f505741d6
2018-04-25 13:20:37 -07:00
Vadim Tryshev
a2adac6a91 Removing accessibility description from page indicators
The current page is announced upon switching to it.
Is should be done this way for all future page implementations with
indicators.

Bug: 77827828
Change-Id: I8ba3bd9d068954df51d6de45da79133ede12c96d
Test: Manual
Merged-In: I8f2f163a261dd7098939674d39e014236fc66d5d
2018-04-17 19:52:18 +00:00
Vadim Tryshev
eeaa8ee6c2 a11y: disabling animation for task list swipes
Bug: 77632611
Test: Manual
Change-Id: Ibbfba5f3219d63a5604544eea33422ee91f54c01
2018-04-11 12:23:42 -07:00
Vadim Tryshev
2c430b34cb Avoid duplicate accessibility announcement upon switching to -1st page
Since -1st window already has accessible description, no need to
announce "Page X of Y" for it.

Bug: 74210311
Test: Manual
Change-Id: I5cbfd763778b5f7049be732a750df4501b5419e0
2018-04-05 10:53:08 -07:00
Vadim Tryshev
e6bbefb768 Making task list carousel accessibility-scrollable
No pane titles yet, as they are not yet reasonably supported by
Talkback.

Bug: 72409756
Test: Manual
Change-Id: I3d2317b9180ac6b02977a4ee8212ae30f0533b2f
2018-04-03 14:38:44 -07:00
Sunny Goyal
00c9c9a6fc Adding an empty message in RecentsView
Moving the content instead of translating the view. This ensures
that the empty message fades in place while the other content come-in
from the side.

Change-Id: I081d2e21206de24ad530814cb6a8ca7c3e293724
2018-03-26 17:24:12 -07:00
Sunny Goyal
a9f554681d Applying the alpha to individual tasks instead of the view
> Removing hotseat from overview in transposed layout
> Removing face scrim from recents view in transposed layout
> Removing focued background from pagesView as individual poges have focus states

Change-Id: I620527241bf7240009c4187f53f5a5cff0c3e2b1
2018-03-26 12:11:00 -07:00
Tony Mak
4f521af287 Fix work tab is not highligted properly
Change-Id: Iffa14e56f16bf67f1c6e605b2d303dd8fb38ba6e
FIX: 71703082
2018-03-15 16:37:34 +00:00