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

Commit 2d113bda authored by Chris Li's avatar Chris Li
Browse files

Improve Bubble debug log

1. Change warning log to error as the exception is something to fix
   in general.
2. Log the handler name that is actually animating inside the mixed
   transition handler.

Bug: 411271022
Flag: EXEMPT log only
Test: log only
Change-Id: Ifed71ec343737909b95f8c5059327d888da90a11
parent 9dca151a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -279,7 +279,7 @@ public class BubbleExpandedView extends LinearLayout {
                    // If there's a runtime exception here then there's something
                    // wrong with the intent, we can't really recover / try to populate
                    // the bubble again so we'll just remove it.
                    Log.w(TAG, "Exception while displaying bubble: " + getBubbleKey()
                    Log.e(TAG, "Exception while displaying bubble: " + getBubbleKey()
                            + "; removing bubble", e);
                    mManager.removeBubble(getBubbleKey(), Bubbles.DISMISS_INVALID_INTENT);
                }
+1 −1
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ public class BubbleTaskViewListener implements TaskView.Listener {
                // If there's a runtime exception here then there's something
                // wrong with the intent, we can't really recover / try to populate
                // the bubble again so we'll just remove it.
                Log.w(TAG, "Exception while displaying bubble: " + getBubbleKey()
                Log.e(TAG, "Exception while displaying bubble: " + getBubbleKey()
                        + "; removing bubble", e);
                mExpandedViewManager.removeBubble(
                        getBubbleKey(), Bubbles.DISMISS_INVALID_INTENT);
+15 −7
Original line number Diff line number Diff line
@@ -329,11 +329,13 @@ class DefaultMixedTransition extends DefaultMixedHandler.MixedTransition {
            @NonNull SurfaceControl.Transaction finishTransaction,
            @NonNull Transitions.TransitionFinishCallback finishCallback,
            @NonNull BubbleTransitions bubbleTransitions) {
        final Transitions.TransitionHandler handler = bubbleTransitions.getRunningEnterTransition(
                transition);
        ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS, " Animating a mixed transition for "
                + "entering Bubbles while an app is in the foreground");
                + "entering Bubbles while an app is in the foreground by %s", handler);
        // TODO(b/408328557): Migrate to checking transition token
        bubbleTransitions.getRunningEnterTransition(transition).startAnimation(
                transition, info, startTransaction, finishTransaction, finishCallback);
        handler.startAnimation(transition, info, startTransaction, finishTransaction,
                finishCallback);
        return true;
    }

@@ -346,11 +348,13 @@ class DefaultMixedTransition extends DefaultMixedHandler.MixedTransition {
            @NonNull Transitions.TransitionFinishCallback finishCallback,
            @NonNull StageCoordinator splitHandler,
            @NonNull BubbleTransitions bubbleTransitions) {
        final Transitions.TransitionHandler handler = bubbleTransitions.getRunningEnterTransition(
                transition);
        ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS, " Animating a mixed transition for "
                + "entering Bubbles while Split-Screen is foreground.");
                + "entering Bubbles while Split-Screen is foreground by %s", handler);
        // TODO(b/408328557): Migrate to checking transition token
        bubbleTransitions.getRunningEnterTransition(transition).startAnimation(
                transition, info, startTransaction, finishTransaction, finishCallback);
        handler.startAnimation(transition, info, startTransaction, finishTransaction,
                finishCallback);
        return true;
    }

@@ -386,7 +390,11 @@ class DefaultMixedTransition extends DefaultMixedHandler.MixedTransition {
                + "entering Bubbles from another bubbled task");
        boolean started = bubbleTransitions.startBubbleToBubbleLaunch(transition,
                bubblingTask.getTaskInfo(), handler -> {
                    bubbleTransitions.getRunningEnterTransition(transition).startAnimation(
                    final Transitions.TransitionHandler h = bubbleTransitions
                            .getRunningEnterTransition(transition);
                    ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS, " Animation played by %s",
                            h);
                    h.startAnimation(
                            transition, info, startTransaction, finishTransaction, finishCallback);
                });
        if (!started) {