From 7da996a5df3ea3fd2ffa312122bf6d07348f4d8c Mon Sep 17 00:00:00 2001 From: Josh Tsuji Date: Thu, 25 Jun 2020 11:45:26 -0400 Subject: [PATCH] Expand dumpsys coverage to all known factors in empty expanded view issues. This adds the following to the stack state: expandedContainerVis: 0 expandedContainerAlpha: 1.0 expandedContainerMatrix: Matrix{[1.0, 0.0, 0.0][0.0, 1.0, 0.0][0.0, 0.0, 1.0]} As well as a new 'expanded bubble state': Expanded bubble state: expandedBubbleKey: 0|com.facebook.orca|10000|ONE_TO_ONE:903330182:1183835847|10375 expandedViewVis: 0 expandedViewAlpha: 1.0 expandedViewTaskId: 27543 activityViewVis: 0 activityViewAlpha: 1.0 Test: dumpsys Bug: 159861400 Change-Id: I964803b77ad5a0b3780c219ac919d6bd4316c53f --- .../systemui/bubbles/BubbleExpandedView.java | 8 ++++ .../systemui/bubbles/BubbleStackView.java | 38 +++++++++++++++++-- 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java index b34312e2b473b..2bfe015c2787b 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java @@ -506,6 +506,14 @@ public class BubbleExpandedView extends LinearLayout { } } + @Nullable ActivityView getActivityView() { + return mActivityView; + } + + int getTaskId() { + return mTaskId; + } + /** * Called by {@link BubbleStackView} when the insets for the expanded state should be updated. * This should be done post-move and post-animation. diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java index 09e879926f26f..1f3d981b8c9f0 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java @@ -31,6 +31,7 @@ import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ValueAnimator; import android.annotation.SuppressLint; +import android.app.ActivityView; import android.content.ContentResolver; import android.content.Context; import android.content.Intent; @@ -293,11 +294,42 @@ public class BubbleStackView extends FrameLayout /** Description of current animation controller state. */ public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { pw.println("Stack view state:"); - pw.print(" gestureInProgress: "); pw.println(mIsGestureInProgress); - pw.print(" showingDismiss: "); pw.println(mShowingDismiss); - pw.print(" isExpansionAnimating: "); pw.println(mIsExpansionAnimating); + pw.print(" gestureInProgress: "); pw.println(mIsGestureInProgress); + pw.print(" showingDismiss: "); pw.println(mShowingDismiss); + pw.print(" isExpansionAnimating: "); pw.println(mIsExpansionAnimating); + pw.print(" expandedContainerVis: "); pw.println(mExpandedViewContainer.getVisibility()); + pw.print(" expandedContainerAlpha: "); pw.println(mExpandedViewContainer.getAlpha()); + pw.print(" expandedContainerMatrix: "); + pw.println(mExpandedViewContainer.getAnimationMatrix()); + mStackAnimationController.dump(fd, pw, args); mExpandedAnimationController.dump(fd, pw, args); + + if (mExpandedBubble != null) { + pw.println("Expanded bubble state:"); + pw.println(" expandedBubbleKey: " + mExpandedBubble.getKey()); + + final BubbleExpandedView expandedView = mExpandedBubble.getExpandedView(); + + if (expandedView != null) { + pw.println(" expandedViewVis: " + expandedView.getVisibility()); + pw.println(" expandedViewAlpha: " + expandedView.getAlpha()); + pw.println(" expandedViewTaskId: " + expandedView.getTaskId()); + + final ActivityView av = expandedView.getActivityView(); + + if (av != null) { + pw.println(" activityViewVis: " + av.getVisibility()); + pw.println(" activityViewAlpha: " + av.getAlpha()); + } else { + pw.println(" activityView is null"); + } + } else { + pw.println("Expanded bubble view state: expanded bubble view is null"); + } + } else { + pw.println("Expanded bubble state: expanded bubble is null"); + } } private BubbleController.BubbleExpandListener mExpandListener;