Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackStateAnimator.java +16 −3 Original line number Diff line number Diff line Loading @@ -344,9 +344,11 @@ public class StackStateAnimator { for (NotificationStackScrollLayout.AnimationEvent event : animationEvents) { final ExpandableView changingView = (ExpandableView) event.mChangingView; boolean loggable = false; boolean isHeadsUp = false; String key = null; if (changingView instanceof ExpandableNotificationRow && mLogger != null) { loggable = true; isHeadsUp = ((ExpandableNotificationRow) changingView).isHeadsUp(); key = ((ExpandableNotificationRow) changingView).getEntry().getKey(); } if (event.animationType == Loading @@ -358,6 +360,9 @@ public class StackStateAnimator { // The position for this child was never generated, let's continue. continue; } if (loggable && isHeadsUp) { mLogger.logHUNViewAppearingWithAddEvent(key); } viewState.applyToView(changingView); mNewAddChildren.add(changingView); Loading Loading @@ -399,9 +404,18 @@ public class StackStateAnimator { translationDirection = Math.max(Math.min(translationDirection, 1.0f),-1.0f); } Runnable postAnimation = changingView::removeFromTransientContainer; if (loggable && isHeadsUp) { mLogger.logHUNViewDisappearingWithRemoveEvent(key); String finalKey = key; postAnimation = () -> { mLogger.disappearAnimationEnded(finalKey); changingView.removeFromTransientContainer(); }; } changingView.performRemoveAnimation(ANIMATION_DURATION_APPEAR_DISAPPEAR, 0 /* delay */, translationDirection, false /* isHeadsUpAppear */, 0, changingView::removeFromTransientContainer, null); 0, postAnimation, null); } else if (event.animationType == NotificationStackScrollLayout.AnimationEvent.ANIMATION_TYPE_REMOVE_SWIPED_OUT) { if (mHostLayout.isFullySwipedOut(changingView)) { Loading Loading @@ -431,8 +445,7 @@ public class StackStateAnimator { // this only captures HEADS_UP_APPEAR animations, but HUNs can appear with normal // ADD animations, which would not be logged here. if (loggable) { mLogger.logHUNViewAppearing( ((ExpandableNotificationRow) changingView).getEntry().getKey()); mLogger.logHUNViewAppearing(key); } mTmpState.applyToView(changingView); Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackStateLogger.kt +16 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,22 @@ class StackStateLogger @Inject constructor( }) } fun logHUNViewDisappearingWithRemoveEvent(key: String) { buffer.log(TAG, LogLevel.ERROR, { str1 = key }, { "Heads up view disappearing $str1 for ANIMATION_TYPE_REMOVE" }) } fun logHUNViewAppearingWithAddEvent(key: String) { buffer.log(TAG, LogLevel.ERROR, { str1 = key }, { "Heads up view disappearing $str1 for ANIMATION_TYPE_ADD" }) } fun disappearAnimationEnded(key: String) { buffer.log(TAG, LogLevel.INFO, { str1 = key Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackStateAnimator.java +16 −3 Original line number Diff line number Diff line Loading @@ -344,9 +344,11 @@ public class StackStateAnimator { for (NotificationStackScrollLayout.AnimationEvent event : animationEvents) { final ExpandableView changingView = (ExpandableView) event.mChangingView; boolean loggable = false; boolean isHeadsUp = false; String key = null; if (changingView instanceof ExpandableNotificationRow && mLogger != null) { loggable = true; isHeadsUp = ((ExpandableNotificationRow) changingView).isHeadsUp(); key = ((ExpandableNotificationRow) changingView).getEntry().getKey(); } if (event.animationType == Loading @@ -358,6 +360,9 @@ public class StackStateAnimator { // The position for this child was never generated, let's continue. continue; } if (loggable && isHeadsUp) { mLogger.logHUNViewAppearingWithAddEvent(key); } viewState.applyToView(changingView); mNewAddChildren.add(changingView); Loading Loading @@ -399,9 +404,18 @@ public class StackStateAnimator { translationDirection = Math.max(Math.min(translationDirection, 1.0f),-1.0f); } Runnable postAnimation = changingView::removeFromTransientContainer; if (loggable && isHeadsUp) { mLogger.logHUNViewDisappearingWithRemoveEvent(key); String finalKey = key; postAnimation = () -> { mLogger.disappearAnimationEnded(finalKey); changingView.removeFromTransientContainer(); }; } changingView.performRemoveAnimation(ANIMATION_DURATION_APPEAR_DISAPPEAR, 0 /* delay */, translationDirection, false /* isHeadsUpAppear */, 0, changingView::removeFromTransientContainer, null); 0, postAnimation, null); } else if (event.animationType == NotificationStackScrollLayout.AnimationEvent.ANIMATION_TYPE_REMOVE_SWIPED_OUT) { if (mHostLayout.isFullySwipedOut(changingView)) { Loading Loading @@ -431,8 +445,7 @@ public class StackStateAnimator { // this only captures HEADS_UP_APPEAR animations, but HUNs can appear with normal // ADD animations, which would not be logged here. if (loggable) { mLogger.logHUNViewAppearing( ((ExpandableNotificationRow) changingView).getEntry().getKey()); mLogger.logHUNViewAppearing(key); } mTmpState.applyToView(changingView); Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackStateLogger.kt +16 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,22 @@ class StackStateLogger @Inject constructor( }) } fun logHUNViewDisappearingWithRemoveEvent(key: String) { buffer.log(TAG, LogLevel.ERROR, { str1 = key }, { "Heads up view disappearing $str1 for ANIMATION_TYPE_REMOVE" }) } fun logHUNViewAppearingWithAddEvent(key: String) { buffer.log(TAG, LogLevel.ERROR, { str1 = key }, { "Heads up view disappearing $str1 for ANIMATION_TYPE_ADD" }) } fun disappearAnimationEnded(key: String) { buffer.log(TAG, LogLevel.INFO, { str1 = key Loading