Fixing wrong visibility being set for RecentsView
Change-Id: I03890eabe80dd9339a3de9449772ab7fb36a6db1
diff --git a/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java b/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
index 5f94bca..9f7fef3 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
@@ -16,10 +16,8 @@
package com.android.launcher3.uioverrides;
import static com.android.launcher3.LauncherState.NORMAL;
-import static com.android.launcher3.anim.AlphaUpdateListener.updateVisibility;
import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_OVERVIEW_TRANSLATION;
import static com.android.launcher3.anim.Interpolators.LINEAR;
-import static com.android.launcher3.compat.AccessibilityManagerCompat.isAccessibilityEnabled;
import static com.android.quickstep.views.LauncherRecentsView.TRANSLATION_X_FACTOR;
import static com.android.quickstep.views.LauncherRecentsView.TRANSLATION_Y_FACTOR;
import static com.android.quickstep.views.RecentsView.CONTENT_ALPHA;
@@ -51,7 +49,6 @@
@Override
public void setState(LauncherState state) {
mRecentsView.setContentAlpha(state.overviewUi ? 1 : 0);
- updateVisibility(mRecentsView, isAccessibilityEnabled(mLauncher));
float[] translationFactor = state.getOverviewTranslationFactor(mLauncher);
mRecentsView.setTranslationXFactor(translationFactor[0]);
mRecentsView.setTranslationYFactor(translationFactor[1]);
diff --git a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
index 34c3e4f..55ed9a9 100644
--- a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
@@ -25,6 +25,7 @@
import android.util.AttributeSet;
import android.util.FloatProperty;
import android.view.View;
+import android.view.ViewDebug;
import android.widget.FrameLayout;
import com.android.launcher3.DeviceProfile;
@@ -66,8 +67,11 @@
}
};
+ @ViewDebug.ExportedProperty(category = "launcher")
private float mTranslationXFactor;
+ @ViewDebug.ExportedProperty(category = "launcher")
private float mTranslationYFactor;
+
private Rect mPagePadding = new Rect();
public LauncherRecentsView(Context context) {
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index 159ee1b..97f40bc 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -44,6 +44,7 @@
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
+import android.view.ViewDebug;
import com.android.launcher3.BaseActivity;
import com.android.launcher3.DeviceProfile;
@@ -132,6 +133,7 @@
private PendingAnimation mPendingAnimation;
+ @ViewDebug.ExportedProperty(category = "launcher")
private float mContentAlpha = 1;
// Keeps track of task views whose visual state should not be reset
@@ -750,6 +752,7 @@
if (mContentAlpha == alpha) {
return;
}
+
mContentAlpha = alpha;
for (int i = getChildCount() - 1; i >= 0; i--) {
getChildAt(i).setAlpha(alpha);