Commit Graph

1799 Commits

Author SHA1 Message Date
Tony Wickham
b4d75d2931 Merge "Don't run finish callback until we actually finish" into ub-launcher3-rvc-dev 2020-05-28 17:18:09 +00:00
TreeHugger Robot
938fccd3da Merge "Move content resolver call to constructor and cache" into ub-launcher3-rvc-dev 2020-05-28 05:55:42 +00:00
Tony Wickham
5cf9edc1f2 Don't run finish callback until we actually finish
This fixes the issue where the app re-appears on top if you touch
the nav bar during the animation to home.

The sequence of events leading to this behavior is pretty long,
but actually always should have happened, it was just masked
until the ag/11172732 fix went in.

Here's an abbreviated version of what was happening
on the touch down during the animation to home:
1 Set mRecentsAnimationController#mTouchInProgress = true
2 Cancel the running animation to home
3 onSettledOnEndTarget(HOME) (this is what was missing before)
4 finishCurrentTransitionToHome(), which, due to #1, doesn't
  actually finish the controller, but does run the callback
5 Invalidate the handler due to #4, leading to TIS#reset()
6 Create a new handler (still from the original touch down),
  which is mResetGestureInputConsumer
7 mResetGestureInputConsumer handles touch down to finish
  the controller the app

This change addresses #4. Instead of calling the callback
immediately, we defer it to when we actually finish the
controller, which ensures there's no longer premature
cleanup that leads to the rest of the sequence.

Bug: 157407284
Change-Id: I0b2ff57bfa77a25c2bf1aece4b0ae7f943637ce6
2020-05-27 19:26:16 -05:00
thiruram
c85095b0e9 Fixes missing WW logs for drag and drop events.
Change-Id: I31f8aa132d70b42c3b8213daf0bbd5c555cf3895
2020-05-27 16:35:14 -07:00
Hyunyoung Song
cf0e79916d Merge "use LauncherAtom.ItemInfo.getDefaultInstance inside StatsLogManager" into ub-launcher3-rvc-dev 2020-05-27 21:29:54 +00:00
Sunny Goyal
a314d5ad58 Updating swipe up on home animations
> Scaling down home activity on swipe-up from home and spring back to place on cancel
> Fading out recents on swipe-up to home, so ensure that adjecent tiles also dissapear
> Instead of controlling alpha, controlling full transform for base and home task. This allows adding custom animation for home task on swipe up.
> Removing alpha hanging for fallback activity in baseSwipeHandler. Instead controlling full transform for home activity
> Adding feature flag to use QuickstepLauncher as 3P Launcher to make development easier.

Bug: 156398988
Change-Id: I69cc59f2c9c95d15df6926ba635e7d6c251dceb6
2020-05-27 19:49:46 +00:00
Vinit Nayak
281193e996 Move content resolver call to constructor and cache
Changing fixed rotation enabled system setting flag
should be followed by a restart of launcher for it
to take effect.

Bug: 149571513
Change-Id: I84fbb654c325076571a038604fa929984d22f254
2020-05-27 12:21:40 -07:00
TreeHugger Robot
37a7d2af42 Merge "Keep recents attached to app window on continued switching" into ub-launcher3-rvc-dev 2020-05-27 18:07:11 +00:00
Hyunyoung Song
a451508818 use LauncherAtom.ItemInfo.getDefaultInstance inside StatsLogManager
Bug: 153611516
Change-Id: I8531df7ee61c336c9919f5ff137bb1e113c126ea
2020-05-27 09:59:04 -07:00
Vinit Nayak
c217c72bcc Merge "Maintain fake nav bar position in overview for landscape" into ub-launcher3-rvc-dev 2020-05-21 20:59:25 +00:00
Vinit Nayak
c609421f2a Maintain fake nav bar position in overview for landscape
NavBar defaults to display when quickswitch ends,
which is always portrait since home is now always
in portrait. We keep the same nav region that the
user used to swipe up to enter recents and reset once
they swipe to home.

Fixes: 156053957
Test: Swipe up from landscape app, then swipe up
from the same nav bar region to go home.

Change-Id: Ia4cf8172850b991aa5e145897622be3b2afa3779
2020-05-21 11:24:16 -07:00
Tony Wickham
17312c3566 Keep recents attached to app window on continued switching
- LAST_TASK now has recentsAttachedToAppWindow = true, to match
  NEW_TASK. Though this does mean there's a small chance of
  seeing recents translating in if you swipe up and back down,
  this is preferable to seeing recents translate away if you
  swipe right and back left in two consecutive gestures.
- Until passing the touch slop for a new gesture, keep recents
  attached to the app window. This avoids cases where you
  could have recents view translate away mid-gesture, such as
  in the following case: swipe from A to B, swipe from B back
  to A, touch down during the transition back to A. Before this
  change, you would see recents translate away; with this
  change, recents instead stays in place until we get another
  signal indicating it should detach, such as swiping to home.

Bug: 157153404
Change-Id: I63a3a8b988af1aac5177f101b0b75e73e56b1ceb
2020-05-21 00:55:54 -05:00
Tony Wickham
c7c883a880 Update some TouchInteractionService logs
- Move "finishRecentsAnimation" for NEW_TASK to where we actally
  finish the controller after onTaskAppeared()
- Add "setEndTarget" and "onSettledOnEndTarget" logs

Bug: 156412706
Change-Id: I0a0f81d3b601fc1eed72b372235bbb92368ec246
2020-05-20 14:30:31 -05:00
Jon Miranda
517cec5344 Add all apps education tutorial.
* Added FeatureFlag.ENABLE_ALL_APPS_EDU
* When user swipes up on nav bar three times and goes to hint state
  consecutively, we show the new All Apps education tutorial.
* For now we block interaction while the animation is playing,
  and we remove the view when the animation is done.
* Future CL will leave view up until user successfully reaches All Apps state.

Bug: 151768994
Change-Id: I903e0a3914d0558950ecb8cd714d97ddc10ca06b
2020-05-20 11:44:23 -07:00
Sunny Goyal
672d02cd39 Unifying swipe handling for fallback launcher
Previosuly we had a different swipe handler for 3P Launcher which
started either recents or Launcher based on the initial interaction
(horizontal or vertical). This was primarily because we had to wait
for recents transition to finish before starting another activity
which could delay going to home.

Now we always start recents transition to recentsActivity. This allows
us to use the same swipe handling logic as QuickstepLauncher. Home
activity can be started while recents transition is running and can be
controlled using onTaskAppeared callback.

Bug: 156924169
Bug: 156398988
Bug: 156295255
Change-Id: Ib9f02e0281e8d674bde2f4a81eca5fc8a5962144
2020-05-19 19:41:30 -07:00
TreeHugger Robot
a41f9dcbe9 Merge "More logging for swiping to Overview instead of All Apps" into ub-launcher3-rvc-dev 2020-05-19 21:04:20 +00:00
Vinit Nayak
a8f083b581 Merge "Increase overview thumbnail size for 2 button landscape." into ub-launcher3-rvc-dev 2020-05-19 20:49:08 +00:00
vadimt
f95cfce267 More logging for swiping to Overview instead of All Apps
Bug: 156095088
Change-Id: Ia4d59b43225c7652cfc0ae72c05a5477deeb842b
2020-05-19 12:49:17 -07:00
Vinit Nayak
88830c0657 Increase overview thumbnail size for 2 button landscape.
With shelf hidden in 2 button landscape, need to fill
in the extra space w/ larger thumbnail.

Fixes: 156442623
Test: Larger thumbnail shows up in 2 button landscape
Change-Id: Ie2856c8d248b28ae7c06cbe40c7417a827c2bd96
2020-05-19 12:07:37 -07:00
Vinit Nayak
4ae95beb9b Merge "Override Rect#contains() to include bottom right" into ub-launcher3-rvc-dev 2020-05-18 22:21:55 +00:00
TreeHugger Robot
d5315f8c29 Merge "Using taskView simulator for animation a task to recentsView" into ub-launcher3-rvc-dev 2020-05-18 19:02:30 +00:00
Vinit Nayak
08619f8600 Merge "Hide shelf in 2-Button Landscape" into ub-launcher3-rvc-dev 2020-05-17 23:32:00 +00:00
Vinit Nayak
23681083b2 Hide shelf in 2-Button Landscape
Disable overview rotation in 2-Button.

Fixes: 154181816
Test: Tested no button and 2 button,
overview actions worked as before.

Change-Id: Ic22c791c7a93460840d54aaf0bf32884cc110e19
2020-05-17 15:17:11 -07:00
Tony Wickham
39f2f1029b Log last appeared task id instead of target
Might be slightly more useful (e.g. if we
need to compare against last started task id)

Change-Id: I3617be270bec6841fbd943e681de78ada549ff84
2020-05-15 16:32:04 -05:00
Sunny Goyal
b9abae9f0f Using taskView simulator for animation a task to recentsView
Also applying transform params in DeviceLockedInputConsumer directly
instead of going through AppWindowAnimationHelper

Bug: 156398988
Bug: 155816922
Change-Id: I791e1a9feb07c4fb787130f8d040a4f404faf734
2020-05-15 14:07:29 -07:00
Vinit Nayak
9c62e18660 Remove debug logs, root cause found.
Bug: 146964271
Change-Id: I38ed3b4b1a90fa1ff9a3aa4bb5547300ddd92358
2020-05-15 10:04:51 -07:00
Vinit Nayak
c40352ef8c Override Rect#contains() to include bottom right
In landscape, the lowest coordinate touch registered
is the actual lowest pixel possible by the screen.
For portrait/seascape the lowest coordinate
is (lowest pixel possible - 1). The difference of the
one pixel makes Rect#contains() return false since
only top left Rect points are inclusive and bottom
right points are exclusive.

Fixes: 156333291
Test: Always able to smoothly go to overview from
landscape.

Change-Id: I6beddad99ae076a167d2a5f5e5acc6e466bff544
2020-05-14 17:26:15 -07:00
James O'Leary
4cb77a60aa Merge "Compose gesture integrated fully into Launcher" into ub-launcher3-rvc-dev 2020-05-14 20:20:13 +00:00
James O'Leary
74a2746b35 Compose gesture integrated fully into Launcher
- Support dismissing Compose via the reverse gesture from the appear
gesture
- Use Tony Wickham's ag/10204761 with some glue code to enable the
app below Compose panning in the same direction as the gesture as
Compose peeks in
- Add feature flag to use Compose hosted in a window (permits underlying
app panning)
- Use InterpolatingVelocityTracker to fix OtherActivityInputConsumer
processing swipes in the wrong direction ~20% of the time due to a bug
in VelocityTracker (see go/quirky-bubbles)

Change-Id: I3adbaee1763f21557fb628b60d03b0a03e7079ab
2020-05-14 14:18:19 -04:00
Winson Chung
034ce6fd94 Update shelf offset earlier when in gesture nav
- Provide a hint to Launcher to indicate it will be resumed when
  swiping home, which allows us to notify sysui before any potential
  pip invocation, reducing the likelyhood of two conflicting animations
  when entering pip

Bug: 156637223
Change-Id: Iae773e1aac88bbea6f74e1d1332417b448126471
2020-05-14 10:55:14 -07:00
Sunny Goyal
d9c0349c1a Merging WindowSizeStrategy with BaseActivityInterface
Also converting BaseActivityInterface to an abstract class instead of interface
so that it can hold member variables

Change-Id: I04cab934137eb1d6f470c6a7618c50a2ed2c71c1
2020-05-14 01:22:25 -07:00
thiruram
b9080c2a15 Add support to log LauncherEvent without ItemInfo.
Change-Id: I145a9500b0442c2b5d9f7f691460465b2bb13a07
2020-05-13 22:58:23 +00:00
Sunny Goyal
f190fd2d4e Build fix. Unifying task size calculation code.
Change-Id: Iaed3a28a9e74c39da8d01aa42b30c96bdb69a661
2020-05-13 14:06:07 -07:00
TreeHugger Robot
e0fef877e4 Merge "Changing RecentsView layout based on the split screen task size" into ub-launcher3-rvc-dev 2020-05-13 18:35:05 +00:00
TreeHugger Robot
d893a478a3 Merge "Adds Settings button back to Back gesture tutorial." into ub-launcher3-rvc-dev 2020-05-13 18:34:37 +00:00
Becky Qiu
dc48fc4f84 [Overview Actions] Adjust the select mode taskview UI.
It will have a 30dp horizontal paddings and vertically in the middle of the screen.

Test: local
Bug: 155444014

Change-Id: I4f3d627008b2c114cc4921bf683919c6044926e4
2020-05-13 18:23:28 +00:00
Andy Wickham
ee1203e436 Adds Settings button back to Back gesture tutorial.
Uses a simpler Intent which actually works :)

Fixes: 149348244
Bug: 148542211
Change-Id: I5e28c63d1eec93b4642e398c7532e7ec4809d6e2
2020-05-13 10:48:38 -07:00
Andy Wickham
65381300f2 Minor cleanup in RecentTasksList.java
Change-Id: I8a496300c936e4d3f2bcd6b0c6c482e5bbb0452d
2020-05-13 09:34:49 -07:00
TreeHugger Robot
7c604edf92 Merge "[Overview Actions] Put the taskview in the middle of the screen." into ub-launcher3-rvc-dev 2020-05-12 23:01:25 +00:00
Becky Qiu
073cbca370 [Overview Actions] Put the taskview in the middle of the screen.
Using horizontal padding 48dp to adjust the scale of the taskview and put it in the middle of the vertical space.

Test: local
Bug: 155444014
Change-Id: Iee6096baf18ae1106c24c83b4675abd4d3ff4d4f
2020-05-12 15:00:54 -07:00
Sunny Goyal
b78ea4b4fc Changing RecentsView layout based on the split screen task size
Bug: 155816922
Change-Id: I33f69d72f8a27e3621d029c6ee4045c3664f3ac9
2020-05-12 14:04:19 -07:00
Sunny Goyal
3f948e3f42 Adding state manager to fallback recents activity
Bug: 156398988
Change-Id: Id0a106ef888ade5223940ac8243108c39b4d6b98
2020-05-12 13:31:48 -07:00
Sunny Goyal
4888790bde Simplifying animation creating logic for app-to-overview
Removing optional 'shouldAnimate' flag. This was false only in 3-button mode but
the code was also handling animation, leading to inconsistent expectations. Instead
always assuming animation and finishing the animation promptly.

Change-Id: Ic56476dc5ea64c9a7d7e9744f3e33cd61dfde9e8
2020-05-12 16:37:27 +00:00
TreeHugger Robot
b8759f9b26 Merge "Fixing pullback factor not initialized after launcher process death" into ub-launcher3-rvc-dev 2020-05-12 03:06:29 +00:00
TreeHugger Robot
eb0136b7c4 Merge "Abstracting out state handler logic into base classes so that it can also be used in different activity" into ub-launcher3-rvc-dev 2020-05-12 00:29:52 +00:00
Sunny Goyal
35e7d38681 Abstracting out state handler logic into base classes so that it can
also be used in different activity

Change-Id: Ic5e60b21e1429c71f1cd4e7041e70bf4fc9761b7
2020-05-11 16:38:26 -07:00
Tony Wickham
a57000c33d Restart running task if another task was started but not appeared
If we just finish the controller to resume the running task like
we normally would, the delayed task will appear on top when it's
ready. Instead, we need to start the original task in this case.

- Move mLastStartedTaskId to GestureState, shared between swipe
  handlers when continuing the gesture.
- Update logic to change LAST_TASK to NEW_TASK if a task was
  started (but not appeared) during the same gesture; likewise,
  only change NEW_TASK to LAST_TASK if no task was started.
- Finish the controller when successfully starting the task
  that already appeared, since we won't get onTaskAppeared().

Bug: 156132424
Change-Id: I1e9af297840745ab3d5e90214425f10a2616d90a
2020-05-11 18:26:06 -05:00
TreeHugger Robot
6459397e3d Merge "Temporarily removes Settings button from Back tutorial." into ub-launcher3-rvc-dev 2020-05-11 21:10:46 +00:00
Sunny Goyal
ef44cf8f45 Fixing pullback factor not initialized after launcher process death
Instead of storing it on first swipe-up, computing it when required

Change-Id: I4b37002a016328e3b2d1c8535198ec8a6b56faf3
2020-05-11 13:28:53 -07:00
Andy Wickham
168aaf9682 Temporarily removes Settings button from Back tutorial.
Currently it just crashes, so it shouldn't be there. If
and when we decide to add it back, we will need to get
our package whitelisted to send the necessary Intent.

Bug: 149348244
Change-Id: I5ab292d04ebc5679e34e5a92141df3d86ef6e551
2020-05-11 13:24:06 -07:00