Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c0bbf4e4 authored by Mady Mellor's avatar Mady Mellor
Browse files

Add more info to dumpsys for floating

- Adding info from the expanded animation controller
- Also adding clip bounds

Test: adb shell dumpsys activity service com.android.systemui | grep -A 100 BubbleController
Flag: EXEMPT trivial logs addition
Bug: 420487074
Change-Id: I4fc5c983e3ab0b8cc0dc697a3f542806d66812d4
parent bd776711
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1223,5 +1223,8 @@ public class BubbleExpandedView extends LinearLayout {
        }
        pw.print(prefix); pw.print("  v-alpha: "); pw.println(getAlpha());
        pw.print(prefix); pw.print("  v-viewVis: "); pw.println(getVisibility());
        pw.print(prefix); pw.print("  isClipping: "); pw.println(mIsClipping);
        pw.print(prefix); pw.print("  clipRect: "); pw.println(
                new Rect(mLeftClip, mTopClip, mRightClip, mBottomClip));
    }
}
+1 −0
Original line number Diff line number Diff line
@@ -360,6 +360,7 @@ public class BubbleStackView extends FrameLayout
        pw.print("  expandedViewTemporarilyHidden: "); pw.println(mExpandedViewTemporarilyHidden);
        mStackAnimationController.dump(pw);
        mExpandedAnimationController.dump(pw);
        mExpandedViewAnimationController.dump(pw);

        if (mExpandedBubble != null) {
            pw.println("Expanded bubble state:");
+8 −0
Original line number Diff line number Diff line
@@ -15,10 +15,13 @@
 */
package com.android.wm.shell.bubbles.animation;

import android.annotation.NonNull;
import android.graphics.PointF;

import com.android.wm.shell.bubbles.BubbleExpandedView;

import java.io.PrintWriter;

/**
 * Animation controller for bubble expanded view collapsing
 */
@@ -91,4 +94,9 @@ public interface ExpandedViewAnimationController {
     * Reset the view to fully expanded state
     */
    void reset();

    /**
     * Description of current animation controller state
     */
    void dump(@NonNull PrintWriter pw);
}
+29 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.annotation.NonNull;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.PointF;
@@ -46,6 +47,7 @@ import com.android.wm.shell.bubbles.BubbleExpandedView;
import com.android.wm.shell.bubbles.BubblePositioner;
import com.android.wm.shell.shared.animation.Interpolators;

import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;

@@ -428,4 +430,31 @@ public class ExpandedViewAnimationControllerImpl implements ExpandedViewAnimatio
            mExpandedView.performHapticFeedback(HapticFeedbackConstants.DRAG_CROSSING);
        }
    }

    /** Description of current animation controller state. */
    @Override
    public void dump(@NonNull PrintWriter pw) {
        pw.println("ExpandedViewAnimationController:");
        pw.print("  expandedView: "); pw.println(mExpandedView);
        pw.print("  collapsedAmount: "); pw.println(mCollapsedAmount);
        pw.print("  notifiedAboutThreshold: "); pw.println(mNotifiedAboutThreshold);
        if (mCollapseAnimation != null) {
            pw.print("  collapseAnimation running: ");
            pw.println(mCollapseAnimation.isRunning());
        } else {
            pw.println("  collapseAnimation=null");
        }
        if (mBackToExpandedAnimation != null) {
            pw.print("  backToExpandedAnimation running: ");
            pw.println(mBackToExpandedAnimation.isRunning());
        } else {
            pw.println("  backToExpandedAnimation=null");
        }
        if (mBottomClipAnim != null) {
            pw.print("  bottomClipAnim running: ");
            pw.println(mBottomClipAnim.isRunning());
        } else {
            pw.println("  bottomClipAnim=null");
        }
    }
}