From 90d29d2837aa28edcc882238ab2ea93ae7467f1c Mon Sep 17 00:00:00 2001 From: Jeremy Sim Date: Tue, 19 Jul 2022 15:24:13 -0700 Subject: [PATCH 1/2] Remove unused TaskOutlineProvider from TaskView class This change removes the custom TaskOutlineProvider class defined in TaskView. It appears to be serving no purpose currently, and is causing an issue with shadows on split tiles. Fixes: 208650434 Test: Deployed change on local device. Observed no more shadows on split tiles, and all corners and outlines still seem to be functioning correctly. Change-Id: I7e56401ccabcd19e598726cca5cf721a22c0d982 --- .../com/android/quickstep/views/TaskView.java | 40 ------------------- 1 file changed, 40 deletions(-) diff --git a/quickstep/src/com/android/quickstep/views/TaskView.java b/quickstep/src/com/android/quickstep/views/TaskView.java index ded0ea620b..5602d8889c 100644 --- a/quickstep/src/com/android/quickstep/views/TaskView.java +++ b/quickstep/src/com/android/quickstep/views/TaskView.java @@ -43,7 +43,6 @@ import android.annotation.IdRes; import android.app.ActivityOptions; import android.content.Context; import android.content.Intent; -import android.graphics.Outline; import android.graphics.PointF; import android.graphics.Rect; import android.graphics.RectF; @@ -57,7 +56,6 @@ import android.view.MotionEvent; import android.view.TouchDelegate; import android.view.View; import android.view.ViewGroup; -import android.view.ViewOutlineProvider; import android.view.accessibility.AccessibilityNodeInfo; import android.view.animation.Interpolator; import android.widget.FrameLayout; @@ -325,8 +323,6 @@ public class TaskView extends FrameLayout implements Reusable { } }; - private final TaskOutlineProvider mOutlineProvider; - @Nullable protected Task mTask; protected TaskThumbnailView mSnapshotView; @@ -409,10 +405,6 @@ public class TaskView extends FrameLayout implements Reusable { mCurrentFullscreenParams = new FullscreenDrawParams(context); mDigitalWellBeingToast = new DigitalWellBeingToast(mActivity, this); - - mOutlineProvider = new TaskOutlineProvider(getContext(), mCurrentFullscreenParams, - mActivity.getDeviceProfile().overviewTaskThumbnailTopMarginPx); - setOutlineProvider(mOutlineProvider); } public void setTaskViewId(int id) { @@ -1266,33 +1258,6 @@ public class TaskView extends FrameLayout implements Reusable { mEndQuickswitchCuj = endQuickswitchCuj; } - private static final class TaskOutlineProvider extends ViewOutlineProvider { - - private int mMarginTop; - private FullscreenDrawParams mFullscreenParams; - - TaskOutlineProvider(Context context, FullscreenDrawParams fullscreenParams, int topMargin) { - mMarginTop = topMargin; - mFullscreenParams = fullscreenParams; - } - - public void updateParams(FullscreenDrawParams params, int topMargin) { - mFullscreenParams = params; - mMarginTop = topMargin; - } - - @Override - public void getOutline(View view, Outline outline) { - RectF insets = mFullscreenParams.mCurrentDrawnInsets; - float scale = mFullscreenParams.mScale; - outline.setRoundRect(0, - (int) (mMarginTop * scale), - (int) ((insets.left + view.getWidth() + insets.right) * scale), - (int) ((insets.top + view.getHeight() + insets.bottom) * scale), - mFullscreenParams.mCurrentDrawnCornerRadius); - } - } - private int getExpectedViewHeight(View view) { int expectedHeight; int h = view.getLayoutParams().height; @@ -1398,11 +1363,6 @@ public class TaskView extends FrameLayout implements Reusable { mSnapshotView.getTaskOverlay().setFullscreenProgress(progress); updateSnapshotRadius(); - - mOutlineProvider.updateParams( - mCurrentFullscreenParams, - mActivity.getDeviceProfile().overviewTaskThumbnailTopMarginPx); - invalidateOutline(); } protected void updateSnapshotRadius() { From eef16895a6fb7ec77bbccf4d004c668af3ee5047 Mon Sep 17 00:00:00 2001 From: hyunyoungs Date: Wed, 13 Jul 2022 00:23:04 -0700 Subject: [PATCH 2/2] Move hideKeyboard call to end of the all apps transition controller animation Bug: 236685775 Bug: 235951830 Test: manual Change-Id: Iae808a82eb4a10a554aef1cb5d87fc806efb0279 --- .../android/launcher3/allapps/AllAppsTransitionController.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/com/android/launcher3/allapps/AllAppsTransitionController.java b/src/com/android/launcher3/allapps/AllAppsTransitionController.java index e0f1b3d757..a86faabdd7 100644 --- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java +++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java @@ -44,7 +44,6 @@ import com.android.launcher3.statemanager.StateManager.StateHandler; import com.android.launcher3.states.StateAnimationConfig; import com.android.launcher3.util.MultiAdditivePropertyFactory; import com.android.launcher3.util.MultiValueAlpha; -import com.android.launcher3.util.UiThreadHelper; import com.android.launcher3.views.ScrimView; /** @@ -229,7 +228,6 @@ public class AllAppsTransitionController public void setStateWithAnimation(LauncherState toState, StateAnimationConfig config, PendingAnimation builder) { if (NORMAL.equals(toState) && mLauncher.isInState(ALL_APPS)) { - UiThreadHelper.hideKeyboardAsync(mLauncher, mLauncher.getAppsView().getWindowToken()); builder.addEndListener(success -> { // Reset pull back progress and alpha after switching states. ALL_APPS_PULL_BACK_TRANSLATION.set(this, 0f); @@ -311,6 +309,7 @@ public class AllAppsTransitionController if (FeatureFlags.ENABLE_DEVICE_SEARCH.get()) return; if (Float.compare(mProgress, 1f) == 0) { mAppsView.reset(false /* animate */); + mLauncher.getAppsView().getSearchUiManager().getEditText().hideKeyboard(); } } }