Commit Graph

84 Commits

Author SHA1 Message Date
vadimt
5466699f0b Removing debug tracing for flakes that stopped reproing
Bug: 139941530
Bug: 140311911
Change-Id: Idf4c013373e627db92aa96f9207e25336ee039f8
2019-09-23 13:57:32 -07:00
vadimt
7bfc820d0c Adding tracing for mismatch between current and stable states
Bug: 140311911
Change-Id: Ie6196015a3f1b35b1403a12540ff7e3290f8cb3d
2019-08-30 17:13:43 -07:00
vadimt
197ae725a0 Adding debug tracing for All Apps appearing instead of Overview
Bug: 139941530
Change-Id: Ia9827c6edd48c559e9602e1e37de83293517ad5e
2019-08-23 12:11:00 -07:00
vadimt
7a4ed2f258 Removing tracing for fixed bugs
Bug: 133009122
Bug: 133765434
Bug: 134532571
Change-Id: I37aa1851a1bc0874c0b9acf561bde28966e9b523
2019-07-15 18:48:06 -07:00
vadimt
2af71dd058 Removing tracing for a fixed bug.
Bug: 133867119
Change-Id: I796118f5ff0c27db002bb0e3369e651c95b06bbe
2019-07-11 20:18:32 +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
59c6901823 Some improvements to home to overview transition for 0 button mode
- Peek in overview further, and with more overshoot
- Fade out and scale down workspace faster while swiping up
- Scale and translate workspace slower when letting go to enter
  overview (so it doesn't zoom out at warp speed)
- Fade in all apps shelf sooner

Bug: 132455160
Change-Id: Ieafad0ccf9bb587889bc35d536627661db10e358
2019-06-19 14:48:57 -07:00
Sunny Goyal
8be504000a Fixing onStateTransitionEnd is not called at the end of reset state
Bug: 135299165
Bug: 133867119
Change-Id: Ifac762a44fa45dfef72a9357f09fc96c34162565
2019-06-18 12:03:51 -07:00
vadimt
8f9cf2f38f Calling sendStateEventToTest() from a place guaranteed to be called
See discussion in the bug

Bug: 133867119
Change-Id: Id162cfa3b0a0aafe17dd9b41e2c4b5d02c411830
2019-06-10 18:01:58 -07:00
vadimt
a8f77a6afd More debug tracing for switching to all apps not sending the final event
(to the test)

Bug: 134172603
Bug: 133867119
Change-Id: I00cf3a35daefa23d2e72a89d21e6ce37c8a9a46d
2019-05-31 13:34:24 -07:00
Sunny Goyal
ab3963ddcf Moving TestInformationProvider to Launcher3 so that it can be used for
testing Launcher3 without quickstep

Also keeping the provider as disabled until needed

Change-Id: Ib5f459e02ae551724b390f3b74f43d601568d749
2019-05-23 14:02:33 -07:00
vadimt
e17d1feb79 Adding tracing for a lab-only flake
We had a resolved case in the past where an app's context menu didn't
open on a long click (thanks to app updates), now the menu opens, but
the drag gesture doesn't drag the icon.

Bug: 133009122
Change-Id: I45d104a92fab6556ecd937aef76f0a8147e67f56
2019-05-21 17:19:23 -07:00
Sunny Goyal
dedda05568 Using a proxy activity for startActivityForResult
This ensures that the home task is never blocked by a different task

Bug: 74500048
Change-Id: I01fd26f1d6242e39b2d8fabac5e064b748aebe62
2019-05-15 16:33:06 -07:00
Sunny Goyal
9cc1b2f242 Calling onTransitionEnd when starting a user controller animation so
that any transient property is cleared

Bug: 80529128
Bug: 131360075
Change-Id: I613a0df4a06861be1c7195e1473c907489de1d1a
2019-05-03 11:56:18 -07:00
Hyunyoung Song
a310a80c7b Add important dump logging
Bug: 130851537
Bug: 119992316

Change-Id: I3de7c1d910d1aecd80b47a85284565c79fe0e2cc
2019-04-25 15:14:44 -07:00
Sunny Goyal
7368fa4369 Skip state animation if animations are disabled
> Also update the animation disabled check to use new-API

Bug: 118678948
Change-Id: Ib709844e34bdb7e369b368a7c33f2e8ff120024b
2019-04-22 10:00:01 -07:00
vadimt
a42dc530ee More improvements for wellbeing tests
Change-Id: I3c5866660bfb96378cdc80c1afc70ec438fc9add
2019-04-15 16:50:12 -07:00
Tony Wickham
7f78e23ccc Don't scale/translate hotseat icons if they are visible in overview
Bug: 129145824
Change-Id: I02af7ad21b6dbc46041e774dfc6f5d3efb0ab8a9
2019-04-10 14:02:38 -07:00
Tony Wickham
96d065d87d Make sure overview visibilty is GONE when it stops peeking
Bug: 129711952
Change-Id: Ib33c3d360e8810e5cbf59049dd90ba28957dbe8f
2019-04-02 16:00:13 -07:00
Tony
e4c2e2b86c Add QuickSwitchTouchController on home
- Added QuickSwitchState, which we animate to when swiping right
  on the nav bar from NORMAL state
- Task launches when the state transition to QuickSwitchState ends

Bug: 126596417
Change-Id: Id66650401d817703fc6d044fb26a25cccbc07e11
2019-03-28 15:09:25 -05:00
Tony
1787ee9596 Peek overview on motion pause, then animate fully on touch up
Add AnimationComponents.ATOMIC_OVERVIEW_PEEK_COMPONENT, and rename
previous ATOMIC_COMPONENT to ATOMIC_OVERVIEW_SCALE_COMPONENT.

When SWIPE_HOME is enabled:
- Overview lives to the left of Workspace, which is encoded in
  LauncherState.NORMAL.getOverviewScaleAndTranslation().
- Create atomic animation based on ATOMIC_OVERVIEW_PEEK_COMPONENT
  and OVERVIEW_PEEK state when swiping and holding from home screen.

Bug: 111926330
Change-Id: Iab6dbef7238dae15b3036d4b2a026b781eee6b4b
2019-03-27 19:45:04 -05:00
Tony
9244f518f2 Add FLAG_DONT_ANIMATE_OVERVIEW to AnimatorSetBuilder
This allows us to specify when a second animation will handle the overview
animation, so it doesn't conflict with existing state transitions.

Bug: 125362112
Change-Id: I497c02924862bfba558c107bee3c88a9f40ec0f1
2019-03-27 14:21:06 -05:00
Sunny Goyal
2db5342f04 Fixing some Launcher crashes because of using old model data even
after launcher has reloaded

Bug: 126289691
Bug: 124288578
Change-Id: Id7fb29716241a13f4e03ee0fc0e879523de4f878
2019-03-05 12:43:50 -08:00
Tony
4bb4b89b9a Scale and translate hotseat with workspace instead of all apps
- Move the hotseat alongside workspace instead of on top of all apps in xml layout
- Set pivot point of hotseat to match the workspace's, and apply the same scale
- Translate the hotseat with the workspace instead of all apps
- SpringLoadedState does not scale or translate the hotseat

Change-Id: Ic45fe99f83f0e0012afa78073d9577e65da444e2
2019-03-03 15:43:50 -08:00
Sunny Goyal
b52ff2269b Fixing alt-tab is properly dispatched to the RecentsView
Change-Id: I14a5569877bc0e7fe3aa30d3cd1fa74920b3e9db
2019-02-14 13:49:57 -08:00
Sunny Goyal
7f45514d15 Unifying the two different state listeners
Bug: 123376689
Change-Id: I61d4865044a1bd27ee78002a4083a686233740b7
2019-01-28 11:56:54 -08:00
Hyunyoung Song
63dd081b36 setVisibility should not propagate focus on children views
Bug: 120064903
Change-Id: I2d58d1ef89db7749f9e6551c716b3cc0567915b3
2018-11-30 13:31:37 -08:00
Sunny Goyal
d230307a95 Migrating to android-x
Change-Id: I9a774152d13a541e8496dd84f2469bfed407f86d
2018-08-14 15:22:12 -07:00
Sunny Goyal
379e8e0fa2 Preventing state change duing the swipe up animation when the previous app
transition is not complete

> This state change causes the RecentsView to get reset making the first
task visible

Bug: 111404703
Change-Id: I8ff2577bf965fb4cdf736fb18683ded63ade1872
2018-07-12 15:15:00 -07:00
Matthew Ng
f8fafa2847 Immediate 2nd quickscrub should not cancel if same state
Trigging quickscrub immediately after a previous quickscrub would cause
the controller to cancel even if the state change was from overview to
overview, then controller will not do auto-advancing because it thinks
quickscrub has been cancelled. If the state changes but both are
overview then do not cancel and quickscrub can do auto-advancing.

Change-Id: I309937572ad23eea14662501f41c13cd79dd10ab
Fixes: 110006796
Test: quickscrub, then let go and soon after quickscrub again
2018-06-14 11:05:44 -07:00
Android Build Merger (Role)
69652337ef [automerger] Revert "Set mState = mCurrentStableState in onAnimationCancel" am: d6692cedff
Change-Id: Ic38e6db9bb62e04d017db93e906be2be02a33294
2018-06-06 18:48:00 +00:00
Sunny Goyal
d6692cedff Revert "Set mState = mCurrentStableState in onAnimationCancel"
This reverts commit 8935d9515c.

Reason for revert:
Bug: 109814458
Bug: 79935289

Change-Id: I33e4933a68060b6055ad7af8e45cffceec14880d
2018-06-06 18:47:59 +00:00
Sunny Goyal
87a6ad18cd Fixing controller state is not properly cleared when the animaiton is cancelled.
This was leading to a pending animation running while the state had changes,
leaving user in an inconsistent state.

Various atomic animation fixes
> Ensuring that there is only one success listener on atomic animation, so that atomic
  controller is created only once and to the final mToState
> If atomic controller is already running, skip animating the atomic conmonenets as
  part of main animaiton
> Cancel atomic controller if it is going to a different state

Bug: 80549582
Bug: 109583168
Change-Id: Ie7a032e0fa73b1f1c2ef53055c08d16444f0385e
2018-06-05 16:07:29 -07:00
Sunny Goyal
d936f6a5e9 Do not change state in the middle of quickstep gesture
Changing states causing quickscrub to get cancelled and recentsView to
get reset to page 0, causing an abrupt jump.

Bug: 80537625
Bug: 80497058
Change-Id: I19cfe4380bbff15734b9d90dc31596904da27483
2018-06-05 10:12:23 -07:00
Tony
67f9cad75a Fix animation not playing when going home while another animation is playing
When going to a new state, we cancel any currently playing animation. When
canceling the animation, we reset mState = mCurrentStableState. Thus, when
determining the duration of the new animation, we have both state == NORMAL
and mState == NORMAL, leading to a duration of 0 and therefore no animation.
Storing the fromState before canceling/resetting fixes the issue.

Change-Id: I92332deae8058c4dd41212fe7f749955ede28b1c
2018-05-29 17:33:16 -07:00
Tony Wickham
8935d9515c Set mState = mCurrentStableState in onAnimationCancel
mState is set when the transition starts toward that state even if it is
never reached. If the animation is canceled, therefore, we should reset
mState = mCurrentStableState since that is the state we came from.

For instance, when swiping up from overview, mState = ALL_APPS, but when
swiping back down we cancel that animation and create the task launch
animation. When creating the task launch animation, we reapplyState(),
which, before this change, was still ALL_APPS instead of OVERVIEW.

Bug: 79935289
Change-Id: I59c5799e92350747e4ef1d99a80ba678a2ce7b98
2018-05-29 21:58:52 +00:00
TreeHugger Robot
159d6949a1 Merge "Fix prediction tip shows when user attempts but does not swipe up all the way to All Apps when quickstep is disabled." into ub-launcher3-edmonton 2018-05-25 00:49:23 +00:00
Tracy Zhou
5d89e1be98 Fix prediction tip shows when user attempts but does not swipe up all the way to All Apps when quickstep is disabled.
Bug: 80268964
Test: Manual test
Change-Id: I9b0620d57ccd466392c1db4c4899da3368a854db
2018-05-24 17:24:23 -07:00
Vadim Tryshev
1b0c5032d1 Fixing keyboard navigation when Overview list is empty
Bug: 80155387
Change-Id: Ife86fe4b718ef01291a04b21020155110d75fa7b
Testing: Manual
2018-05-24 13:06:18 -07:00
Tony Wickham
4e21c1b552 Cleanup how we set back button alpha
Add BackButtonAlphaHandler to set back button alpha, instead of setting
it from multiple places.

Also force back button alpha to be 1 if swipe up is disabled (b/80091187)

Change-Id: I49b63a0e6b033a3a947a847669a398f1b9ff0564
2018-05-22 11:05:01 -07:00
Tony Wickham
b2ddf10041 Update interpolators and durations for state animations
When we enter overview (overview appears, workspace disappears):
- Workspace scales down from 1f to .8f with OvershootInterpolator(1.2f) at 200 ms
- Workspace fades from 1f to 0 with OvershootInterpolator(1.2f) at 200 ms
- Overview scales down from 1.33f to 1f with OvershootInterpolator(1.2f) at 200 ms
- Overview fades from 0 to 1f with OvershootInterpolator(1.2f) at 200 ms

When we exit overview (overview disappears, workspace appears):
- Workspace scales up from .92f to .1f with DecelerateInterpolator() at 200 ms
- Workspace fades from 0 to 1f with AccelerateInterpolator() at 200 ms
- Overview scales up from 1f to 1.1f with AccelerateInterpolator() at 180ms
- Overview fades from 1f to 0 with DecelerateInterpolator(1.7f) at 200 ms

Parallax while the finger moves: Workspace translates half the distance as the shelf

Bug: 79776746
Change-Id: I319d982cf202bcd6dbbcd68ffc5c0c7853629c7e
2018-05-16 15:59:31 -07:00
Tony Wickham
d4ece9a74c Don't reapply state when setting user controlled animation
Bug: 79525106
Change-Id: Ia41a51559196d4aa657fae47727c7366d9073295
2018-05-10 10:03:54 -07:00
Tony Wickham
6becf7c07d Add atomic recents animation while swiping up
State handlers can now specify atomic and non-atomic components of
their animations to states, which can be specified when creating a
new animation. There is now one atomic animation, when going from
NORMAL to OVERVIEW (and in reverse):
- RecentsViewStateController's animation (scale/alpha) is all atomic
- WorkspaceStateTransitionAnimation has atomic and non-atomic:
  - Hotseat and workspace alpha is atomic, as is workspace scale
  - Everything else (scrim, translation, qsb and drag handle alpha) is
    non-atomic
- All apps progress is non-atomic

Also simplified dragging through overview; no longer pulls against you,
so we use an OvershootInterpolator when flinging instead of our custom
interpolator for the spring effect.

Bug: 76449024
Bug: 78089840
Change-Id: Iafac84d0c2b99ee9cf9dd5b30e2218286713b449
2018-05-09 12:33:46 -07:00
Sunny Goyal
a6616dec28 Fixing stateManager not correctly deduping existing animations
Bug: 79251716
Change-Id: I40c3ebf0ec4d49aa1fe1948ad3d83eb87cc1c5f1
2018-05-08 09:16:04 -07:00
Tony
31fbd4c08b Fix some state issues with user-controlled animations
Previously, user-controlled animations weren't properly being canceled when a
non-user-controlled animation started, e.g. when hitting home. Thus, we could
end in the wrong or inconsistent state because the user-controlled animation's
end runnable was still used. Now we add a cleanup callback for when we reset
the user-controlled animation for one that isn't user-controlled.

Also fixed a couple typos.

Tests (easier with animation durations extended):
- Swipe up and hit home before reaching overview -> land on home
- Go to overview, swipe down slightly (before threshold to go to workspace)
  and let go -> return to overview without flash (recents was resetting)
- Swipe up, press home while swiping -> goes home, stops responding to drag
- Start dismissing task and hit home before it finishes (or while dragging)
  -> goes home, stops responding to drag

Bug: 78249220
Change-Id: If11d8999e3fadba38c987b25af67cd2304cd859b
2018-05-01 13:45:27 -05:00
Sunny Goyal
ed2d2bcbb8 Force finish any pending animations if the insets or orientation change
Some animation might be running from a previous orientation, which can cuase property changes
to get skipped.

Bug: 77848165
Bug: 77774619
Change-Id: I3e198196192746abdd72a1970ff2ef407bf4aff9
2018-04-20 20:53:16 +00:00
Sunny Goyal
d754dcd5d9 Only skip the animation, if we are going to the same state
Bug: 77487950
Change-Id: I2d3e376094b0fb0d3120ab6c4d6569f52ab8273f
2018-04-12 14:17:06 -07:00
Sunny Goyal
7eff40ff2d Several app transition fixes:
> If launcher already started, creating the state transition only after threshold crossed, so that previous animations are not cancelled
> Not posting animaiton callbacks at the front of the queue, as that sometimes causes it get executed before onNewIntent
> Farking the activity as forceInvisible while launching an opaque app, so that quickly pressing home/back runs the reverse animation
> Not running state animations when force-invisible is true

Bug: 77830325
Bug: 77898806
Change-Id: I50a7e915ca35fd6aeb284c8f321ecca74396fe98
2018-04-11 17:08:31 -07:00
Sunny Goyal
b35f50cf55 Do not reset the previous state animation, if it is a part of the new state animaiton
Change-Id: Ic433db8cd2b0701923185d0a2db2a4361567437f
2018-04-09 16:31:12 -07:00
Sunny Goyal
1c6d566870 Ensuring that previous animation is completed before starting a new state animation
Bug: 76231621
Bug: 77150113
Change-Id: I086e8063b08d2ba69ead1bd0ee1772d65fb6075c
2018-04-02 15:29:47 -07:00