From 1e767a6ecc038b2e45dd3d055b87863a17c6d250 Mon Sep 17 00:00:00 2001 From: Alex Chau Date: Fri, 9 Jul 2021 13:29:50 +0100 Subject: [PATCH] Refine logs for debugging TaplTestQuickStep.testOverviewActions on cf_foldables - The failure is not reproducible locally, thus requires adding logs and check ATP result - Removed some redundant logs - Changed to log at VERBOSE - Added extensive logging to all visibility/enable/alpha setter of ActionsView Bug: 193125090 Test: Manual Change-Id: I5b449a7f86ea4cef65e0e46de4b389deef9f53f3 --- .../uioverrides/RecentsViewStateController.java | 3 +++ .../NoButtonQuickSwitchTouchController.java | 3 +++ .../FallbackRecentsStateController.java | 4 ++++ .../quickstep/views/OverviewActionsView.java | 5 +++++ .../android/quickstep/views/RecentsView.java | 17 ++++------------- 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java b/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java index 6cad3ddc92..aa49e0858f 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java +++ b/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java @@ -30,6 +30,7 @@ import static com.android.quickstep.views.TaskView.FLAG_UPDATE_ALL; import android.annotation.TargetApi; import android.os.Build; import android.util.FloatProperty; +import android.util.Log; import androidx.annotation.NonNull; @@ -110,6 +111,8 @@ public final class RecentsViewStateController extends propertySetter.setFloat(mLauncher.getActionsView().getVisibilityAlpha(), MultiValueAlpha.VALUE, overviewButtonAlpha, config.getInterpolator( ANIM_OVERVIEW_ACTIONS_FADE, LINEAR)); + Log.v("b/193125090", + "RecentsViewStateController - setVisibilityAlpha: " + overviewButtonAlpha); float splitPlaceholderAlpha = state.areElementsVisible(mLauncher, SPLIT_PLACHOLDER_VIEW) ? 0.85f : 0; diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java index 40c3e02238..d488ddadb7 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java +++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java @@ -54,6 +54,7 @@ import android.animation.Animator.AnimatorListener; import android.animation.AnimatorListenerAdapter; import android.animation.ValueAnimator; import android.graphics.PointF; +import android.util.Log; import android.view.MotionEvent; import android.view.animation.Interpolator; @@ -227,6 +228,8 @@ public class NoButtonQuickSwitchTouchController implements TouchController, mRecentsView.setFullscreenProgress(fromState.getOverviewFullscreenProgress()); mLauncher.getActionsView().getVisibilityAlpha().setValue( (fromState.getVisibleElements(mLauncher) & OVERVIEW_ACTIONS) != 0 ? 1f : 0f); + Log.v("b/193125090", "NoButtonQuickSwitchTouchController - setVisibilityAlpha: " + + mLauncher.getActionsView().getVisibilityAlpha().getValue()); float[] scaleAndOffset = toState.getOverviewScaleAndOffset(mLauncher); // As we drag right, animate the following properties: diff --git a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java index 50b69dcff4..8f8ee68d98 100644 --- a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java +++ b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java @@ -32,6 +32,8 @@ import static com.android.quickstep.views.RecentsView.TASK_MODALNESS; import static com.android.quickstep.views.RecentsView.TASK_SECONDARY_TRANSLATION; import static com.android.quickstep.views.TaskView.FLAG_UPDATE_ALL; +import android.util.Log; + import com.android.launcher3.anim.PendingAnimation; import com.android.launcher3.anim.PropertySetter; import com.android.launcher3.statemanager.StateManager.StateHandler; @@ -82,6 +84,8 @@ public class FallbackRecentsStateController implements StateHandler extends FrameLayo } else { mHiddenFlags &= ~visibilityFlags; } + Log.v("b/193125090", + "updateHiddenFlags - visibilityFlags: " + visibilityFlags + ", enable: " + enable); boolean isHidden = mHiddenFlags != 0; mMultiValueAlpha.getProperty(INDEX_HIDDEN_FLAGS_ALPHA).setValue(isHidden ? 0 : 1); } @@ -181,6 +184,8 @@ public class OverviewActionsView extends FrameLayo mDisabledFlags &= ~disabledFlags; } // + Log.v("b/193125090", + "updateDisabledFlags - disabledFlags: " + disabledFlags + ", enable: " + enable); boolean isEnabled = (mDisabledFlags & ~DISABLED_ROTATED) == 0; LayoutUtils.setViewEnabled(this, isEnabled); } diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 897dfbec6d..ca4319354a 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -989,7 +989,6 @@ public abstract class RecentsView 0) { setSwipeDownShouldLaunchApp(true); @@ -1164,7 +1161,6 @@ public abstract class RecentsView 0) { mFocusedTaskId = getTaskViewAt(0).getTaskId(); - Log.d("b/193125090", "applyLoadPlan - mFocusedTaskId: " + mFocusedTaskId); } updateTaskSize(); @@ -1274,6 +1270,7 @@ public abstract class RecentsView 0) { setVisibility(VISIBLE); @@ -2756,7 +2748,6 @@ public abstract class RecentsView