diff options
author | Lyn Han <lynhan@google.com> | 2023-01-10 23:07:36 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-01-11 20:51:30 +0000 |
commit | 72f7918b1ba8971c28b346667593e9881e0953e6 (patch) | |
tree | 6f2a477af2b70b9925b9bc77d0e4cb2428aa947b | |
parent | 835d37a84b4d467729e18ce26c2527ac18e349b0 (diff) | |
download | base-72f7918b1ba8971c28b346667593e9881e0953e6.tar.gz |
Revert "Add dumpsys logs to debug lockscreen stack height"
This reverts commit a331639790fa2bd7b2669d20b3ecfd53970965e1.
Reason for revert: minimize logging for qpr2
Bug: 265067133
Change-Id: Ife9918c947ff521c7b6fb808a4c8d3ce27a02d67
(cherry picked from commit 8e50c40b0563b9dda8bf6a5d66fa2922526feb16)
Merged-In: Ife9918c947ff521c7b6fb808a4c8d3ce27a02d67
2 files changed, 7 insertions, 26 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java index ca1e397f930a..2f543254786f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java @@ -5193,7 +5193,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable println(pw, "intrinsicPadding", mIntrinsicPadding); println(pw, "topPadding", mTopPadding); println(pw, "bottomPadding", mBottomPadding); - mNotificationStackSizeCalculator.dump(pw, args); }); pw.println(); pw.println("Contents:"); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackSizeCalculator.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackSizeCalculator.kt index 25f99c69d454..ae854e2df91a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackSizeCalculator.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackSizeCalculator.kt @@ -30,7 +30,6 @@ import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow import com.android.systemui.statusbar.notification.row.ExpandableView import com.android.systemui.util.Compile import com.android.systemui.util.children -import java.io.PrintWriter import javax.inject.Inject import kotlin.math.max import kotlin.math.min @@ -54,8 +53,6 @@ constructor( @Main private val resources: Resources ) { - private lateinit var lastComputeHeightLog : String - /** * Maximum # notifications to show on Keyguard; extras will be collapsed in an overflow shelf. * If there are exactly 1 + mMaxKeyguardNotifications, and they fit in the available space @@ -117,9 +114,7 @@ constructor( shelfIntrinsicHeight: Float ): Int { log { "\n" } - - val stackHeightSequence = computeHeightPerNotificationLimit(stack, shelfIntrinsicHeight, - /* computeHeight= */ false) + val stackHeightSequence = computeHeightPerNotificationLimit(stack, shelfIntrinsicHeight) var maxNotifications = stackHeightSequence.lastIndexWhile { heightResult -> @@ -162,21 +157,18 @@ constructor( shelfIntrinsicHeight: Float ): Float { log { "\n" } - lastComputeHeightLog = "" val heightPerMaxNotifications = - computeHeightPerNotificationLimit(stack, shelfIntrinsicHeight, - /* computeHeight= */ true) + computeHeightPerNotificationLimit(stack, shelfIntrinsicHeight) val (notificationsHeight, shelfHeightWithSpaceBefore) = heightPerMaxNotifications.elementAtOrElse(maxNotifications) { heightPerMaxNotifications.last() // Height with all notifications visible. } - lastComputeHeightLog += "\ncomputeHeight(maxNotifications=$maxNotifications," + + log { + "computeHeight(maxNotifications=$maxNotifications," + "shelfIntrinsicHeight=$shelfIntrinsicHeight) -> " + "${notificationsHeight + shelfHeightWithSpaceBefore}" + " = ($notificationsHeight + $shelfHeightWithSpaceBefore)" - log { - lastComputeHeightLog } return notificationsHeight + shelfHeightWithSpaceBefore } @@ -192,8 +184,7 @@ constructor( private fun computeHeightPerNotificationLimit( stack: NotificationStackScrollLayout, - shelfHeight: Float, - computeHeight: Boolean + shelfHeight: Float ): Sequence<StackHeight> = sequence { log { "computeHeightPerNotificationLimit" } @@ -222,14 +213,9 @@ constructor( currentIndex = firstViewInShelfIndex) spaceBeforeShelf + shelfHeight } - - val currentLog = "computeHeight | i=$i notificationsHeight=$notifications " + - "shelfHeightWithSpaceBefore=$shelfWithSpaceBefore" - if (computeHeight) { - lastComputeHeightLog += "\n" + currentLog - } log { - currentLog + "i=$i notificationsHeight=$notifications " + + "shelfHeightWithSpaceBefore=$shelfWithSpaceBefore" } yield( StackHeight( @@ -274,10 +260,6 @@ constructor( return size } - fun dump(pw: PrintWriter, args: Array<out String>) { - pw.println("NotificationStackSizeCalculator lastComputeHeightLog = $lastComputeHeightLog") - } - private fun ExpandableView.isShowable(onLockscreen: Boolean): Boolean { if (visibility == GONE || hasNoContentHeight()) return false if (onLockscreen) { |