From eb66898be068c8dc7521723d948dd400f4b8fc12 Mon Sep 17 00:00:00 2001 From: Hyunyoung Song Date: Mon, 1 Jul 2019 14:39:40 -0700 Subject: [PATCH 1/6] [DO NOT MERGE] Disable swipe down to pull noti shade for Q Bug: 136293958 Change-Id: Iac169d91a784b5f2d05410a06cd358f85b533562 (cherry picked from commit 4bfcf04ae9228f912ac151009800a9f3cd205550) --- .../com/android/launcher3/uioverrides/RecentsUiFactory.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsUiFactory.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsUiFactory.java index 6ecf1c11bd..a3c2e3cc81 100644 --- a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsUiFactory.java +++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsUiFactory.java @@ -164,12 +164,6 @@ public abstract class RecentsUiFactory { } } - if (FeatureFlags.PULL_DOWN_STATUS_BAR && Utilities.IS_DEBUG_DEVICE - && !launcher.getDeviceProfile().isMultiWindowMode - && !launcher.getDeviceProfile().isVerticalBarLayout()) { - list.add(new StatusBarTouchController(launcher)); - } - list.add(new LauncherTaskViewController(launcher)); return list.toArray(new TouchController[list.size()]); } From 6a2718b24144d53908ff5f9e565a3c642762bbd7 Mon Sep 17 00:00:00 2001 From: Anna Wasewicz Date: Thu, 11 Jul 2019 18:58:05 -0700 Subject: [PATCH 2/6] Set the chips flag to false in QP1A. This flag should be off by default. Chips should not be running in QP1A. Bug:137290162 Change-Id: I159e1bd00d1f9ff4f6cf63daf93a68e3e8d063c8 (cherry picked from commit 7400bb3f725d288766ddf9e9256327fcb90015c5) (cherry picked from commit 31d0a9c562c39b9feb8a75c89bde147a24a21e32) --- src/com/android/launcher3/config/BaseFlags.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/launcher3/config/BaseFlags.java b/src/com/android/launcher3/config/BaseFlags.java index 54efcb7868..45639e0a43 100644 --- a/src/com/android/launcher3/config/BaseFlags.java +++ b/src/com/android/launcher3/config/BaseFlags.java @@ -105,7 +105,7 @@ abstract class BaseFlags { "ENABLE_QUICKSTEP_LIVE_TILE", false, "Enable live tile in Quickstep overview"); public static final TogglableFlag ENABLE_HINTS_IN_OVERVIEW = new TogglableFlag( - "ENABLE_HINTS_IN_OVERVIEW", true, + "ENABLE_HINTS_IN_OVERVIEW", false, "Show chip hints and gleams on the overview screen"); public static final TogglableFlag FAKE_LANDSCAPE_UI = new TogglableFlag( From 0473dcee070b9ea827d32bfd998a0c7cc19a0312 Mon Sep 17 00:00:00 2001 From: Jon Miranda Date: Tue, 2 Jul 2019 14:35:11 -0700 Subject: [PATCH 3/6] Fix bug where icon is no present during app close animation. * WindowTransformSwipeHandler closes all AbstractFloatingViews, including ListenerView, which results in FloatingIconView getting removed. * In IconLoadResult.onIconLoaded, we remove the check for isIconLoaded since its not needed. This was also causing a race condition since isIconLoaded is not set to true until after we tell onIconLoaded to run. * In BaseDragLayer, we have a delay before checking if the view is open and then closing the floating view if true. This caused issues since we reycle the view. Now we check if the view is open before running the delay to call close. Bug: 136044361 Change-Id: I7442a589a62c3cdf90b70d146e0ecf3e4300ddf7 (cherry picked from commit 826cdcd32fa91afe932c8c07be1a4e92a6f73301) (cherry picked from commit bc2782647803d2a8942311f917d66a91bdc24d8d) --- .../android/quickstep/WindowTransformSwipeHandler.java | 3 ++- src/com/android/launcher3/views/BaseDragLayer.java | 10 ++++------ src/com/android/launcher3/views/FloatingIconView.java | 10 +++++----- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java index f1d1141bcd..ac7ba3fc3d 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java @@ -505,7 +505,8 @@ public class WindowTransformSwipeHandler initAnimFactory.run(); } } - AbstractFloatingView.closeAllOpenViews(activity, mWasLauncherAlreadyVisible); + AbstractFloatingView.closeAllOpenViewsExcept(activity, mWasLauncherAlreadyVisible, + AbstractFloatingView.TYPE_LISTENER); if (mWasLauncherAlreadyVisible) { mStateCallback.setState(STATE_LAUNCHER_DRAWN); diff --git a/src/com/android/launcher3/views/BaseDragLayer.java b/src/com/android/launcher3/views/BaseDragLayer.java index c1ba780503..15f2724708 100644 --- a/src/com/android/launcher3/views/BaseDragLayer.java +++ b/src/com/android/launcher3/views/BaseDragLayer.java @@ -221,12 +221,10 @@ public abstract class BaseDragLayer if (child instanceof AbstractFloatingView) { // Handles the case where the view is removed without being properly closed. // This can happen if something goes wrong during a state change/transition. - postDelayed(() -> { - AbstractFloatingView floatingView = (AbstractFloatingView) child; - if (floatingView.isOpen()) { - floatingView.close(false); - } - }, SINGLE_FRAME_MS); + AbstractFloatingView floatingView = (AbstractFloatingView) child; + if (floatingView.isOpen()) { + postDelayed(() -> floatingView.close(false), SINGLE_FRAME_MS); + } } } diff --git a/src/com/android/launcher3/views/FloatingIconView.java b/src/com/android/launcher3/views/FloatingIconView.java index b6c4fedac9..ab4b576bf9 100644 --- a/src/com/android/launcher3/views/FloatingIconView.java +++ b/src/com/android/launcher3/views/FloatingIconView.java @@ -574,17 +574,17 @@ public class FloatingIconView extends View implements if (cancellationSignal.isCanceled()) { return; } - if (mIconLoadResult.isIconLoaded) { - setIcon(originalView, mIconLoadResult.drawable, mIconLoadResult.badge, - mIconLoadResult.iconOffset); - } + + setIcon(originalView, mIconLoadResult.drawable, mIconLoadResult.badge, + mIconLoadResult.iconOffset); + // Delay swapping views until the icon is loaded to prevent a flash. setVisibility(VISIBLE); originalView.setVisibility(INVISIBLE); }; + mLoadIconSignal = cancellationSignal; } } - mLoadIconSignal = cancellationSignal; } private void setBackgroundDrawableBounds(float scale) { From 497f4379084d19c2cbf7c02aef662675d0a51975 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Tue, 9 Jul 2019 11:33:50 -0700 Subject: [PATCH 4/6] Copy resume callbacks list prior to making callbacks - Starting a deferred activity can trigger a new callback to be added to the list while we are iterating it Bug: 136613192 Change-Id: I6690ab0695bb73f11bf343fb41e9fc86b4afec1b Merged-In: I6690ab0695bb73f11bf343fb41e9fc86b4afec1b (cherry picked from commit 940b0ac0157945a40d8b3b44d976da53aaeff81f) (cherry picked from commit a8971c1462f276b2b4d6daab6b18941b9dc9a94a) --- src/com/android/launcher3/Launcher.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index d9af4da8e8..bc3aa7ef40 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -952,10 +952,14 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns, mHandler.removeCallbacks(mHandleDeferredResume); Utilities.postAsyncCallback(mHandler, mHandleDeferredResume); - for (OnResumeCallback cb : mOnResumeCallbacks) { - cb.onLauncherResume(); + if (!mOnResumeCallbacks.isEmpty()) { + final ArrayList resumeCallbacks = new ArrayList<>(mOnResumeCallbacks); + mOnResumeCallbacks.clear(); + for (int i = resumeCallbacks.size() - 1; i >= 0; i--) { + resumeCallbacks.get(i).onLauncherResume(); + } + resumeCallbacks.clear(); } - mOnResumeCallbacks.clear(); if (mLauncherCallbacks != null) { mLauncherCallbacks.onResume(); From 55ab9851a4af963d45344dc936eea62f540169c0 Mon Sep 17 00:00:00 2001 From: Jon Miranda Date: Tue, 23 Jul 2019 15:22:30 -0700 Subject: [PATCH 5/6] Fix bug where rounded corners were being set despite being disabled. Bug: 138117089 Change-Id: Icb852e2e07d80c45ad3406ef432b89720887fccf (cherry picked from commit e734efba8dc58ea145dc0a620f18cbe2032f70ce) --- .../android/launcher3/QuickstepAppTransitionManagerImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java b/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java index 44324cb2e4..b60a017dd8 100644 --- a/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java +++ b/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java @@ -32,6 +32,7 @@ import static com.android.launcher3.dragndrop.DragLayer.ALPHA_INDEX_TRANSITIONS; import static com.android.launcher3.views.FloatingIconView.SHAPE_PROGRESS_DURATION; import static com.android.quickstep.TaskUtils.taskIsATargetWithMode; import static com.android.systemui.shared.system.QuickStepContract.getWindowCornerRadius; +import static com.android.systemui.shared.system.QuickStepContract.supportsRoundedCornersOnWindows; import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_CLOSING; import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_OPENING; @@ -495,6 +496,8 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans endCrop = windowTargetBounds.height(); } + final float initialWindowRadius = supportsRoundedCornersOnWindows(mLauncher.getResources()) + ? startCrop / 2f : 0f; final float windowRadius = mDeviceProfile.isMultiWindowMode ? 0 : getWindowCornerRadius(mLauncher.getResources()); appAnimator.addUpdateListener(new MultiValueUpdateListener() { @@ -506,7 +509,7 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans alphaDuration, LINEAR); FloatProp mCroppedSize = new FloatProp(startCrop, endCrop, 0, CROP_DURATION, EXAGGERATED_EASE); - FloatProp mWindowRadius = new FloatProp(startCrop / 2f, windowRadius, 0, + FloatProp mWindowRadius = new FloatProp(initialWindowRadius, windowRadius, 0, RADIUS_DURATION, EXAGGERATED_EASE); @Override From a50cf9772a57e0058ba36e742beb37da11b27a41 Mon Sep 17 00:00:00 2001 From: Tony Date: Wed, 31 Jul 2019 18:53:40 -0700 Subject: [PATCH 6/6] Don't end launcher components anim early even if it does nothing The janky animation that ends on the home screen with an invisible task on top is caused by the following scenario (for example): - Quick switch from task A to task B - After landing on B, but before we get the callback that it was successfully launched, switch back to A (or you could go to C) Now we are animating back to A, but we are still waiting to hear whether B was successfully launched. If we hear that the launch was indeed successful, we dutifully clean up after ourselves by returning launcher to its default state. Unfortunately, that clobbers the current animation that is scrolling back to A, and we end up in the bad state where we are showing the default launcher state even though we just launched task B and were about to launch task A. Normally we avoid cleaning up the state animation if the user is still controlling it. The reason we weren't doing that here is because we ended the launcher animation early even though the window animation was still running. Instead, we should keep the launcher animation running for the full duration, so that it prevents a cleanup from occurring in the middle. Bug: 138620399 Change-Id: I959e62a52638a5b974ef9b406555078c928b91f1 (cherry picked from commit 03c548901fb77d0a47bb46036d559968b65b2293) (cherry picked from commit c5555c459bd28033257bced610c861e5ff84aec4) --- .../quickstep/WindowTransformSwipeHandler.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java index ac7ba3fc3d..476bb8f935 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java @@ -1133,17 +1133,16 @@ public class WindowTransformSwipeHandler } if (start == end || duration <= 0) { mLauncherTransitionController.dispatchSetInterpolator(t -> end); - mLauncherTransitionController.getAnimationPlayer().end(); } else { mLauncherTransitionController.dispatchSetInterpolator(adjustedInterpolator); mAnimationFactory.adjustActivityControllerInterpolators(); - mLauncherTransitionController.getAnimationPlayer().setDuration(duration); - - if (QUICKSTEP_SPRINGS.get()) { - mLauncherTransitionController.dispatchOnStartWithVelocity(end, velocityPxPerMs.y); - } - mLauncherTransitionController.getAnimationPlayer().start(); } + mLauncherTransitionController.getAnimationPlayer().setDuration(Math.max(0, duration)); + + if (QUICKSTEP_SPRINGS.get()) { + mLauncherTransitionController.dispatchOnStartWithVelocity(end, velocityPxPerMs.y); + } + mLauncherTransitionController.getAnimationPlayer().start(); mHasLauncherTransitionControllerStarted = true; }