Commit Graph

248 Commits

Author SHA1 Message Date
Andy Wickham 90c16ace8a Reduces padding of the Overview shelf in no button mode.
Before: https://screenshot.googleplex.com/iw6baTCfoy2.png
After: https://screenshot.googleplex.com/8CcsQvLhYDo.png
Desired: https://b.corp.google.com/action/issues/139551306/attachments/26925873?download=false

Test: Examined before and after padding and verified 3-button is unaffected.
Fixes: 139551306

Change-Id: Ia416399cf25e7c6c2fb8aa84ad20e7ad74dcd31b
(cherry picked from commit ddc9622e92)
2019-09-03 22:05:20 +00:00
Pinyao Ting e4061fc931 show dot in deep shortcuts when notification contains exactly identical
set of person

Bug: 132336512
Change-Id: I975524e28168c10a186cdc24b188c161faf433cf
Merged-In: I975524e28168c10a186cdc24b188c161faf433cf
2019-08-05 23:31:35 -07:00
Becky Qiu 84fa94e2fc Fill the log container as hotseat or workspace based on position.
Test: manual
Bug: 137953006

Swipe from workspace:
07-30 15:15:44.031  9779  9779 D UserEvent: action:FLING direction=UP direction=UP
07-30 15:15:44.031  9779  9779 D UserEvent:  Source child:WORKSPACE id=0 span(951,1313)	parent:WORKSPACE id=0
07-30 15:15:44.031  9779  9779 D UserEvent:  Destination child:ALLAPPS
07-30 15:15:44.031  9779  9779 D UserEvent:  Elapsed container 826 ms, session 9361 ms, action 0 ms

Swipe from hotseat:
07-30 15:15:46.010  9779  9779 D UserEvent: action:FLING direction=UP direction=UP
07-30 15:15:46.010  9779  9779 D UserEvent:  Source child:HOTSEAT id=0 span(786,1908)	parent:WORKSPACE id=0
07-30 15:15:46.010  9779  9779 D UserEvent:  Destination child:ALLAPPS
07-30 15:15:46.010  9779  9779 D UserEvent:  Elapsed container 1139 ms, session 11339 ms, action 0 ms

Change-Id: I959528889fda778efc569bb59e7f44d3bd5b81bc
2019-08-01 22:24:44 +00:00
Pinyao Ting bf608722b9 Ensure each dot contains only relevant notification to the shortcut
and displays system shortcut when long click on deep shortcut.

In this CR we
1) for each shortcut, we filters the notifications to ensure we only
 get notifications with identical shortcutId.
2) allow system shortcut to be displayed when user long click on a
DeepShortcut

Bug: 132336512
Change-Id: Idc9eaed55e900ed4027a43ee9c3fd7dc6f4480b2
Merged-In: Idc9eaed55e900ed4027a43ee9c3fd7dc6f4480b2
2019-07-31 23:56:54 +00:00
Pinyao Ting 4d1a0e2a7b show dot on shortcut when incoming notification contains exactly the
same shortcut id

Bug: 132336512
Change-Id: Iddf4cfe8ad60c12e8de8b171bed392f1bb0a6761
Merged-In: Iddf4cfe8ad60c12e8de8b171bed392f1bb0a6761
2019-07-30 19:39:10 +00:00
Sunny Goyal 4e6c45bcd3 Using the first frame delay based on the display refresh rate instead of
hardcoding it to 16ms

> Creating a utility class for caching display property changes

Bug: 128940249
Change-Id: I6f9a214548de65bd1c8530508d665ee88312da4a
2019-07-24 10:12:37 -07:00
vadimt c8d496fe00 Fix waiting for launcher initialization
Bug: 137836033

Change-Id: Ifc8ce867abd85eaeacd09a2b39636ecc4109c046
2019-07-18 18:31:49 -07:00
vadimt 853852351f Correctly restarting Launcher from OOP tests
Waiting for touch interaction service; waiting for package-restart
events.

Bug: 136215685
Change-Id: I0c31c09fe3a58b898168dfdb4e4d23757b94a47c
2019-07-11 14:17:06 -07:00
Sunny Goyal f11dd8e107 Using a higher priority executor than BackgroundExecutor for various recents tasks
BackgroundExecutor is also using thread pool executor where the order is perserved

Change-Id: Ieef8825599f35fe22da3e9adb1270c5525449d62
2019-07-11 09:38:54 -07:00
Sunny Goyal 4f2d926d42 Resetting UI state when the last has launched
Bug: 135038270
Change-Id: Ie0af9c7d47f69b32caedd72f98ed1706bdbef5fa
2019-06-28 14:50:24 -07:00
Winson Chung 0b70cd4ca4 Finish recents animation when starting a new activity
- Defer starting the activity when an activity is paused, and finish
  the current animation to trigger launcher to be resumed

Bug: 132811175
Test: Swipe up and launch a new app
Change-Id: I78b76800052512eb93f69ccf0523f4d752a82ece
2019-06-26 14:01:56 -07:00
Rajeev Kumar 8ca7205c24 Fix NPE in OverviewComponentObserver constructor while accessing activityInfo.
Bug: 132461400
Test: Manual tests
Change-Id: Icee3730454db8129e597714c147c2cbaddc70987
(cherry picked from commit 219208a0f5)
2019-06-25 20:55:53 +00: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
Tony Wickham e8836dc082 Gracefully handle failed task launches during quick switch
When quick switching from home or overview, go to OverviewState if the
task launch failed. Otherwise we get stuck in BackgroundAppState.

Bug: 135038270
Change-Id: I42785c261cef0df95666bc106ec5ca6ef0553cc7
2019-06-12 15:24:58 -07:00
Tony Wickham a04e746e84 Fix getting stuck in BackgroundAppState for 2-button mode
When ending in recents, we reapply the state - therefore, it's important
to make sure we are in OverviewState before onSwipeUpComplete(). This is
done by mLauncherTransitionController, which sets OverviewState on end.
We already force mLauncherTransitionController to end before calling
onSwipeUpComplete(), but in this case we were calling cancel() and
setting mLauncherTransitionController = null, which meant we could never
call end() on it. Instead, we should always call end() if we set it to
null.

Also ensure mLauncherTransitionController is created even if the gesture
is completed, if an existing controller isn't already running. This can
happen if you swipe up quickly enough that we get onGestureEnd before
launcher is drawn, and in that case we still want the launcher component
to animate once its ready. This is even more important for 2-button
mode, because again, we rely on mLauncherTransitionController to set the
state to OverviewState before we reapply it.

Finally, clarified some methods by renaming "swipeUp" to
"swipeUpToRecents".

Bug: 132757019
Change-Id: Ieb24a4f36a39780e5d64d7bc312791608db474d1
2019-05-31 16:11:40 -07:00
Kevin 3c7d5fb9db Recents Go: Conform to device default style
System apps in Q should attempt to conform to device style, so naturally
Recents Go should also conform to this so that text changes with the
device style changing. This CL ensures all text views change font based
off system theming title fonts.

Bug: 131839392
Fix: 131839392
Test: Change device theme body font, see that change is propogated to
Recents Go app texts, clear all, and empty recents message
Change-Id: Ib85ff49383221ef18ed8aa9e53eff129129e37c2
2019-05-22 13:39:32 -07:00
TreeHugger Robot d2e40927a7 Merge "Scale down thumbnail with app surface" into ub-launcher3-qt-dev 2019-05-14 23:26:46 +00:00
TreeHugger Robot 512a3c59ea Merge "Fallback recents should wait for remote anim ready" into ub-launcher3-qt-dev 2019-05-13 19:21:04 +00:00
Kevin 8bab8fa391 Fallback recents should wait for remote anim ready
Hook into the remote animation API on the recents view for the
fallback recents code path. This ensures the views are attached before
attempting the layout animation.

Bug: 132112131
Test: Set separate default launcher, go to recents from app, views
animate correctly
Change-Id: Id73f18e5f864e1970f954c7ec633e25e466d832e
2019-05-13 12:06:10 -07:00
Sunny Goyal 7a39b1bc5f Fixing insets mapping in 3-button and 2-button mode
Bug: 131360075
Change-Id: If6e3a4fbb011fc313efeb91686a9d787761862c5
2019-05-13 10:29:11 -07:00
TreeHugger Robot 5ffdc9c625 Merge "Add bottom margin to recents Go again" into ub-launcher3-qt-dev 2019-05-13 16:10:29 +00:00
Hyunyoung Song 2aa9647321 Revert "Implement scrim method"
This reverts commit d849ef084c.

Reason for revert: not needed

I was too eager to merge this CL. It turns out all I need is these
three constants and doesn't actually need the aidl change.

public static final int MAIN_COLOR_LIGHT = 0xffdadce0;
public static final int MAIN_COLOR_DARK = 0xff202124;
public static final int MAIN_COLOR_REGULAR = 0xff000000;

Change-Id: Iafd539a06455ba0878a6d3750f3c7194f8919fbf
2019-05-11 07:50:34 +00:00
Lucas Dupin d849ef084c Implement scrim method
Bug: 130451254
Test: make
Change-Id: Ifd66f9e53dd86d21fe66e4617cc4b209fecd7328
(cherry picked from commit 904c429b99)
2019-05-11 05:29:39 +00:00
TreeHugger Robot 3ab2ada712 Merge "Add task launch logging to Recents Go" into ub-launcher3-qt-dev 2019-05-11 02:11:02 +00:00
Kevin 162e2c5fb0 Add bottom margin to recents Go again
Navigation bar insets are not always transparent and shouldn't be used
for margin. So we put the margin back to get a bit more space from the
nav bar.

Bug: 132461256
Test: Manual test, see margins
Change-Id: Id92e8b80a0d2c18c0a603942600366e355649ea8
2019-05-10 16:48:58 -07:00
Kevin fd968a79a8 Scale down thumbnail with app surface
The recents Go app to overview transition has app scale down to a
thumbnail but normally covers the thumbnail.  However, apps with
transparency will be semi-visible and will allow the user to see
the thumbnail in the back at its final size. Instead, we should fit
the thumbnail to the surface so that they both scale down at the same
time.

Bug: 132458092
Test: Go to app with transparency, scale down
Change-Id: Iaebeaaf2ddcfc86fd4f55ef9d8c3f19583947c48
2019-05-10 16:09:04 -07:00
TreeHugger Robot 695e8df526 Merge "Add basic home to recents anim for fallback recents" into ub-launcher3-qt-dev 2019-05-10 21:08:28 +00:00
TreeHugger Robot 76696be287 Merge "Fix missing early return." into ub-launcher3-qt-dev 2019-05-10 21:07:57 +00:00
Kevin d0863ae5c4 Add basic home to recents anim for fallback recents
For users/OEMs who ship with a different default launcher, we should
provide at least a basic animation from home to recents. This creates a
simple cross-fade animation if coming from a separate home activity.

Bug: 132449252
Test: Have different default launcher, go to home, go to recents
Change-Id: I5ac7b0eedbcdf1e020c31d9cf120887a4bb3826a
2019-05-10 13:46:23 -07:00
TreeHugger Robot 763a7bffa3 Merge "Refactor lambda to use listener instead" into ub-launcher3-qt-dev 2019-05-10 19:49:36 +00:00
Kevin 8f1ac1efeb Refactor lambda to use listener instead
We should not use an in-line lambda here as we allocate a new
RemoteAnimationProvider object to do so which hooks into the already
existing AppToOverviewAnimationProvider. This can be a problem if
AppToOverviewAnimationProvider overrides methods as we would not use the
overridden methods but instead the default ones.

Instead, we use the same AppToOverviewAnimationProvider object but hook
into the activity ready and window animation calls with a listener to
add on the logging logic.

Bug: 132112131
Test: Manual test; app to overview functions as before
Change-Id: Ie70541691ed420c33770d6ed4f54d9555374dc0a
2019-05-10 12:19:11 -07:00
Kevin b35b7dee18 Update scrim if insets are added later.
If insets are set after the activity requests the foreground scrim to be
shown, the scrim will not be correctly added. This is an issue for
fallback recents which requests the foreground scrim right after
initialization.

To fix this, we save the request to show the scrim in a local variable
and check this on inset updates to determine whether we should show the
scrim or not.

Bug: 131853975
Test: Fallback recents now has foreground scrim added correctly
Change-Id: I15a19a3184bbc97a20fbcbba2106fd7221410df0
2019-05-10 12:13:00 -07:00
TreeHugger Robot 7b48548546 Merge "Set "usingRemoteAnim" for fallback recents" into ub-launcher3-qt-dev 2019-05-10 18:30:37 +00:00
Kevin 3792c733f8 Fix missing early return.
Fix a missing early return for when we don't have the bottom view laid
out on remote animation start.

Test: Builds
Change-Id: Iba0d5097ce59d017dc43030552f2171c5e6e4fb1
2019-05-10 11:19:37 -07:00
Kevin 32f55bf02d Set "usingRemoteAnim" for fallback recents
Ensure fallback recents uses the correct layout animation by hooking
into usingRemoteAnim API.

Bug: 132112131
Test: Manual test
Change-Id: I9bb96dbf436018e5488ede0c5ca48af787180aec
2019-05-10 10:28:07 -07:00
Kevin 47fc4f1316 Only do content fill anim after layout anim
The new remote animation may start after the tasks are loaded and we
start the content fill animation. This means the layout happens after
and the content fill animation will conflict with the layout animation.
To fix this, we should only do the content fill animation after the
layout animation as intended. If the tasks load before we start the
layout animation, we should just directly update to the latest UI
without animating as the views won't be visible before the layout
animation starts.

Bug: 132381412
Test: Manual test
Change-Id: Ibb55d8ef4499260ffa4bef5c6bba605ffdc85da7
2019-05-10 10:18:05 -07:00
TreeHugger Robot fc65c357a1 Merge "Fix anim done callback not being called sometimes" into ub-launcher3-qt-dev 2019-05-10 01:42:47 +00:00
Kevin f574bd5535 Ending pending anim should set to end values.
Pending animations have not started but when ending animations, we
should ensure they are set to their end values based off the
documentation for ItemAnimator's endAnimations and endAnimation.

Bug: 132285006
Test: Build using endAnimations and manual test
Change-Id: I3039a4f192d68a0ead700cd81675b3e7b4ef51f9
2019-05-09 17:47:37 -07:00
Kevin b0fcded7aa Move shared end pending anim logic for reusability
Some of the logic in endAnimations and endAnimation is shared and should
be moved to a common helper method.

Test: Builds and functions as before
Change-Id: I4973d50ad8778bb397938b5d65d9f95f48ff145b
2019-05-09 17:40:08 -07:00
TreeHugger Robot f079b277cf Merge changes from topic "polish-app-recents-anim" into ub-launcher3-qt-dev
* changes:
  Polish app => recents animation (5/5)
  Polish app => recents animation (4/5)
  Polish app => recents animation (3/N)
  Polish app => recents animation (2/N)
  Polish app => recents animation (1/N)
2019-05-10 00:07:18 +00:00
Kevin 5c0ee7ca37 Polish app => recents animation (5/5)
Add the part of the animation where task views fade in from bottom to
top. For the app animating in, we only fade in the label and the icon as
the snapshot needs to be visible as the app window scales down to it.

Bug: 132112131
Test: Manual test animation
Change-Id: Ia3fb98fde0b14fa4f72b53a1941cc2ee6b9f2294
2019-05-09 16:38:54 -07:00
TreeHugger Robot 1350be3c21 Merge "Use Animator cancel instead of end" into ub-launcher3-qt-dev 2019-05-09 23:25:54 +00:00
TreeHugger Robot f66f6aefcc Merge "Fix fallback recents not updating list from app" into ub-launcher3-qt-dev 2019-05-09 23:24:53 +00:00
Kevin 4ff2a278a2 Use Animator cancel instead of end
Animtor's cancel() skips some animator init logic that end() does so
we'd like to use that instead. The on end callback will still set the
animation value to its target end value so this doesn't affect
correctness.

Bug: 132285006
Test: Build and manual test endAnimations
Change-Id: I450a888c7b37a7dc74f24035d9abc5bda1cbbbd8
2019-05-09 16:08:09 -07:00
Kevin 63517a7a07 Fix anim done callback not being called sometimes
We should call dispatchFinishedWhenDone in endAnimations instead of
calling dispatchAnimationsFinished as the former will run the listener.
However, we only do this if we were running animations in the first
place.

Bug: 132285006
Test: Build and manual test endAnimations() call
Change-Id: I31afdc4c9e3ef5f56eda6178569d5c264c16ae78
2019-05-09 16:01:01 -07:00
Kevin 90137b035c Add task launch logging to Recents Go
Add logging points for launching tasks in Recents Go to match up with
non-Go Recents.

Bug: 131840601
Test: Log calls to confirm writing to stats log on task launch
Change-Id: I3d7b1ed30f99ce9f551c3481628ca81540e366b5
2019-05-09 14:12:40 -07:00
Kevin cde60e24b0 Fix fallback recents not updating list from app
When launching an from recents, onStop is not called until the app is
fully taken over and the remote animation finishes. As a result, if the
user hits the overview button right before the animation finishes, we
animate back to recents but never call onStart which is where we hook in
to update the recents list.

The fix naturally is to move this to onResume instead as once the
animation begins, the activity is paused.

Bug: 132293341
Test: Repro from bug, correctly updates
Change-Id: Ie6cfdc4d5aa6b1742a3bce3e14ab5ab6a4f05526
2019-05-08 18:23:52 -07:00
TreeHugger Robot 75d2bcbe41 Merge "Apply insets correctly to fallback Recents Go" into ub-launcher3-qt-dev 2019-05-09 01:21:19 +00:00
TreeHugger Robot 8c61598243 Merge "Fix 1.5x layout values" into ub-launcher3-qt-dev 2019-05-09 00:59:48 +00:00
Kevin 249e19fde9 Fix 1.5x layout values
Some of the values in the 1.5x scale layout dimens were incorrect. This
fixes them so that they are correctly roughly 1.5x the 1.0x dimens while
still being aligned to the 4 dp grid.

Test: Test on walleye_svelte, more closely aligns mocks
Change-Id: I26d2e216c67c523799e3a159d864718da211cec1
2019-05-08 17:41:37 -07:00