Commit Graph

335 Commits

Author SHA1 Message Date
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
Sunny Goyal
20a13ff54e Updating the swipe-to-dismiss animation
Swipe to dismiss animates the page translation so that the
final position at the endof swipe is same as the final position
on removing the task view.

Change-Id: I393acd5ae75cd94797bb4f1aa3dd3ec9017cbb47
2018-03-14 12:32:26 -07:00
Winson Chung
87dd782e40 Merge "Unloading thumbnails from task views once recents is hidden" into ub-launcher3-master 2018-03-13 23:42:46 +00:00
Winson Chung
c7c5158916 Unloading thumbnails from task views once recents is hidden
- Re-enabling the high res thumbnail loader, ensuring that we clean up
  the visible recent tasks when the associated views are removed
- When the recents state is re-entered, we will trigger the loading of
  the data anew (which will usually just fetch data from the existing
  cache if launcher was not stopped)

Bug: 74537246
Change-Id: I9cd69015461e1de34b4b65faeb9adb8aebd1dd3d
2018-03-13 20:47:36 +00:00
Sunny Goyal
7c7be8c20a Simplifying options popup and overview handling
> Removing support for page drag-n-drop from pagedView
> Removing Overview UI from Launcher3 without quickstep and using options popup instead
> Removing touch handlers from CellLayouts and showing options popup based on workspace long press
> Excluding touch outside inset when showing the popup

Bug: 74136505
Change-Id: I34c2a7ff58452db26f5d1a85d554be40fc75f2b8
2018-03-13 12:57:32 -07:00
Sunny Goyal
857b1b9469 Notifying page end transition if forceFinish is called in the middle
of page transition

This fixed the bug where onPageTransitionEnd is never called when using
quickswitch

Change-Id: I4196a8651ee67d175363d51165dd128fe0518341
2018-03-05 11:32:12 -08:00
Winson Chung
62a70be27a Enable trim memory callbacks to the loader, background task preloading
- Also enable the high-res thumbnail loader

Bug: 73651529

Change-Id: Ic23997f10289ea10cb1f41104e07029c9102c
Signed-off-by: Winson Chung <winsonc@google.com>
2018-02-28 12:55:19 -08:00
Tony Wickham
b7168cd019 Merge "Flip recents if setting is true" into ub-launcher3-master 2018-02-27 19:50:17 +00:00
TreeHugger Robot
f1e9a706f6 Merge "Use getScaledTouchSlop instead of MIN_LENGTH_FOR_FLING" into ub-launcher3-master 2018-02-27 18:07:23 +00:00
Tony Mak
2e564400ba Fix all apps tab fling detection
It is a regression when we changed from ViewPager to PagedView.
Unlike ViewPager, PagedView does not take "yDiff" into account
when determining should it intercept its child MotionEvent.

Override determineScrollingStart, just like what we did in Workspace

Change-Id: I25f7415c45c370629558d944f59bf95c741b9319
FIX: 73878167
2018-02-27 17:29:12 +00:00
Tony Mak
c25afd002b Use getScaledTouchSlop instead of MIN_LENGTH_FOR_FLING
MIN_LENGTH_FOR_FLING is not correct because it is not scaled
based on density.

BUG: 73878167
Change-Id: Ibbb58a573976224f33fd43de33719ddb62131329
2018-02-27 14:44:50 +00:00
Tony Wickham
dfb5cc9a09 Flip recents if setting is true
Bug: 72860694
Change-Id: I5cb71f553b2833a18a1b419b3744175bff963da8
2018-02-26 18:12:39 -08:00
Sunny Goyal
0bd7f4f2dc Using paged view for all-apps tabs
Bug: 72811152
Change-Id: I0cca426d935f079c923b93fe3d4399f87778fe95
2018-02-13 09:55:29 -08:00
Winson Chung
05a31ede4f Defer launching the quickscrub task until after the page settles
- Tweak the durations to be less laggy
- Add some state logging

Bug: 67957962
Bug: 70180755
Change-Id: Ia0caa5178b3ed976705eb2d973bc00d8f1b9e3ca
2018-02-09 12:43:36 -08:00
Sunny Goyal
85a7fe086b Some fixes for quickstep when configuration changes
> Creating the launcher animation after first draw, so that the UI is in correct state
> Using correct workspace size, when layout is not valid
> Snapping pagedView to correct page when page size changes
> Resoting to correct workspace page on rebind

Change-Id: I74e61a05aae3a3c4912d4c5c8eb4d5d036d9005a
2018-02-02 11:02:51 -08:00
Sunny Goyal
ce8809a588 Reapplying state UI when the insets change
Change-Id: Ief9588400f332b2c5b084a8a11c3102b2c20c4ea
2018-01-18 14:03:19 -08:00
Sunny Goyal
228153d92a Updating landscape layout for launcher/quickstep
> Hotseat is tied to navbar (on left in seascape)
> Search box shows up in Overview (clicking it would crash for now)
> All-apps is no longer fullscreen in landscape
> Recents cards are appropriately scaled down
> Hotseat is visible in Overview

Bug: 70179916
Change-Id: I53149eaeac9557e8a01021b7e2d139f3d6ceef37
2018-01-08 13:53:44 -08:00
Tony Wickham
07b1d670f2 Animate to the workspace card when transitioning from overview to home
Change-Id: Ib2c2288fd935f678a5c7a354be09c6d852d86b41
2018-01-05 14:15:10 -08:00
Sunny Goyal
e15e2a8267 Adding an empty page in Recents view corresponding to workspace
The page is aligned to the workspace card and shows a widgets button
in the empty region

Change-Id: I479c47a2fbac4b3ef1aaf833d9fe82b5d7e10ddc
2017-12-19 10:06:15 -08:00
Sunny Goyal
d0030b05f5 Adding placeholder method for compat implementations for Accessibility manager
> Moving some utility methods to the compat class

Bug: 69611105
Change-Id: Ide0cab0b926d7bc03617fc568d2a2b429ee00cd9
2017-12-08 16:09:45 -08:00
Sunny Goyal
bc683e9d06 Separating various UI properties into state variables
> Using workspace scale and translation for all-apps
> Without quickstep, workspace has the parallex effect as before
> With quickstep, workspace scales down to match the recents card width
> Using a single animator for recents views in case of state transtion and
  controlled transition to prevent going into inconsistant state.

Change-Id: I1864de6892052ca771f4d0062e3d60c28840a72d
2017-12-06 14:29:33 -08:00
Tony Wickham
1c9bf6a19c Add carousel curve effect to RecentsView.
Pages scale down and tuck underneath the centermost page.

Change-Id: I12686cd72634f758ef71828033eb4e22339ef185
2017-11-17 10:25:27 -08:00