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
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java
index 07c344d..693bd8d 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java
@@ -279,7 +279,7 @@
// 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);
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleTaskViewListener.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleTaskViewListener.java
index 312efd2..58588b0 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleTaskViewListener.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleTaskViewListener.java
@@ -173,7 +173,7 @@
// 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);
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedTransition.java b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedTransition.java
index 5ea713c..64eff8c 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedTransition.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedTransition.java
@@ -329,11 +329,13 @@
@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 @@
@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 @@
+ "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) {