From 45eb757ea7321aeb8b34803681ec2eb4532b6d55 Mon Sep 17 00:00:00 2001 From: Hyunyoung Song Date: Fri, 1 Jul 2016 18:04:07 -0700 Subject: [PATCH] Remove relayouts b/29945805 > Workspace relayout occurs when window flag is set to change the status bar. This should not cause AllAppsTransitionController to be initialized. > Setting/Unsetting background drawables on the hotseat also causes unnecessary layout. Fix this issue. Change-Id: I73a3bfd3eb4bc34cf6760ffbd9826e3fef867056 --- src/com/android/launcher3/Hotseat.java | 5 ++--- .../launcher3/allapps/AllAppsTransitionController.java | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/android/launcher3/Hotseat.java b/src/com/android/launcher3/Hotseat.java index b2f24bec54..b75d2c0da1 100644 --- a/src/com/android/launcher3/Hotseat.java +++ b/src/com/android/launcher3/Hotseat.java @@ -220,11 +220,10 @@ public class Hotseat extends FrameLayout } public void setBackgroundTransparent(boolean enable) { - // This causes re-layout. Should replace the logic with simply setting the background alpha if (enable) { - setBackground(null); + mBackground.setAlpha(0); } else { - setBackground(mBackground); + mBackground.setAlpha(255); } } diff --git a/src/com/android/launcher3/allapps/AllAppsTransitionController.java b/src/com/android/launcher3/allapps/AllAppsTransitionController.java index 3ae8cd8fad..87236aa918 100644 --- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java +++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java @@ -444,5 +444,6 @@ public class AllAppsTransitionController implements TouchController, VerticalPul if (!mLauncher.isAllAppsVisible()) { setProgress(mShiftRange); } + mHotseat.removeOnLayoutChangeListener(this); } }