Remove redundant logs from StackStateAnimator

Remove redundant logs from StackStateAnimator. The new logs in
StackStateLogger covers the old HUN logs.

Test: manual
Bug: 281628358

Change-Id: I6da9961754aa195d664dfb6e6de592c3b5539e26
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackStateAnimator.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackStateAnimator.java
index 5c2a7f0..e94258f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackStateAnimator.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackStateAnimator.java
@@ -429,14 +429,6 @@
                         changingView.setInRemovalAnimation(false);
                         changingView.removeFromTransientContainer();
                     };
-                    if (isHeadsUp) {
-                        mLogger.logHUNViewDisappearingWithRemoveEvent(key);
-                        postAnimation = () -> {
-                            changingView.setInRemovalAnimation(false);
-                            mLogger.disappearAnimationEnded(finalKey);
-                            changingView.removeFromTransientContainer();
-                        };
-                    }
                 } else {
                     startAnimation = ()-> {
                         changingView.setInRemovalAnimation(true);
@@ -516,7 +508,6 @@
                     Runnable postAnimation;
                     Runnable startAnimation;
                     if (loggable) {
-                        mLogger.logHUNViewDisappearing(key);
                         String finalKey1 = key;
                         final boolean finalIsHeadsUp = isHeadsUp;
                         final String type =
@@ -528,7 +519,6 @@
                             changingView.setInRemovalAnimation(true);
                         };
                         postAnimation = () -> {
-                            mLogger.disappearAnimationEnded(finalKey1);
                             mLogger.animationEnd(finalKey1, type, finalIsHeadsUp);
                             changingView.setInRemovalAnimation(false);
                             if (tmpEndRunnable != null) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackStateLogger.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackStateLogger.kt
index 18953f4..d635f89 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackStateLogger.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackStateLogger.kt
@@ -14,14 +14,6 @@
     @NotificationHeadsUpLog private val buffer: LogBuffer,
     @NotificationRenderLog private val notificationRenderBuffer: LogBuffer
 ) {
-    fun logHUNViewDisappearing(key: String) {
-        buffer.log(
-            TAG,
-            LogLevel.INFO,
-            { str1 = logKey(key) },
-            { "Heads up view disappearing $str1 " }
-        )
-    }
 
     fun logHUNViewAppearing(key: String) {
         buffer.log(
@@ -32,15 +24,6 @@
         )
     }
 
-    fun logHUNViewDisappearingWithRemoveEvent(key: String) {
-        buffer.log(
-            TAG,
-            LogLevel.ERROR,
-            { str1 = logKey(key) },
-            { "Heads up view disappearing $str1 for ANIMATION_TYPE_REMOVE" }
-        )
-    }
-
     fun logHUNViewAppearingWithAddEvent(key: String) {
         buffer.log(
             TAG,
@@ -50,15 +33,6 @@
         )
     }
 
-    fun disappearAnimationEnded(key: String) {
-        buffer.log(
-            TAG,
-            LogLevel.INFO,
-            { str1 = logKey(key) },
-            { "Heads up notification disappear animation ended $str1 " }
-        )
-    }
-
     fun appearAnimationEnded(key: String) {
         buffer.log(
             TAG,
@@ -68,23 +42,6 @@
         )
     }
 
-    fun groupChildRemovalEventProcessed(key: String) {
-        notificationRenderBuffer.log(
-            TAG,
-            LogLevel.DEBUG,
-            { str1 = logKey(key) },
-            { "Group Child Notification removal event processed $str1 for ANIMATION_TYPE_REMOVE" }
-        )
-    }
-    fun groupChildRemovalAnimationEnded(key: String) {
-        notificationRenderBuffer.log(
-            TAG,
-            LogLevel.INFO,
-            { str1 = logKey(key) },
-            { "Group child notification removal animation ended $str1 " }
-        )
-    }
-
     fun processAnimationEventsRemoval(key: String, visibility: Int, isHeadsUp: Boolean) {
         notificationRenderBuffer.log(
             TAG,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/logging/StackStateLoggerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/logging/StackStateLoggerTest.kt
deleted file mode 100644
index 47c5e5b..0000000
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/logging/StackStateLoggerTest.kt
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2023 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.systemui.statusbar.notification.logging
-
-import android.testing.AndroidTestingRunner
-import androidx.test.filters.SmallTest
-import com.android.systemui.SysuiTestCase
-import com.android.systemui.log.LogBuffer
-import com.android.systemui.log.LogcatEchoTracker
-import com.android.systemui.log.core.LogLevel
-import com.android.systemui.statusbar.notification.stack.StackStateLogger
-import com.google.common.truth.Truth
-import org.junit.Before
-import org.junit.Test
-import org.junit.runner.RunWith
-
-@RunWith(AndroidTestingRunner::class)
-@SmallTest
-class StackStateLoggerTest : SysuiTestCase() {
-    private val logBufferCounter = LogBufferCounter()
-    private lateinit var logger: StackStateLogger
-
-    @Before
-    fun setup() {
-        logger = StackStateLogger(logBufferCounter.logBuffer, logBufferCounter.logBuffer)
-    }
-
-    @Test
-    fun groupChildRemovalEvent() {
-        logger.groupChildRemovalEventProcessed(KEY)
-        verifyDidLog(1)
-        logger.groupChildRemovalAnimationEnded(KEY)
-        verifyDidLog(1)
-    }
-
-    class LogBufferCounter {
-        val recentLogs = mutableListOf<Pair<String, LogLevel>>()
-        val tracker =
-            object : LogcatEchoTracker {
-                override val logInBackgroundThread: Boolean = false
-                override fun isBufferLoggable(bufferName: String, level: LogLevel): Boolean = false
-                override fun isTagLoggable(tagName: String, level: LogLevel): Boolean {
-                    recentLogs.add(tagName to level)
-                    return true
-                }
-            }
-        val logBuffer =
-            LogBuffer(name = "test", maxSize = 1, logcatEchoTracker = tracker, systrace = false)
-
-        fun verifyDidLog(times: Int) {
-            Truth.assertThat(recentLogs).hasSize(times)
-            recentLogs.clear()
-        }
-    }
-
-    private fun verifyDidLog(times: Int) {
-        logBufferCounter.verifyDidLog(times)
-    }
-
-    companion object {
-        private val KEY = "PACKAGE_NAME"
-    }
-}