diff options
| author | 2022-05-11 22:57:21 +0000 | |
|---|---|---|
| committer | 2022-05-11 22:57:21 +0000 | |
| commit | 21dee3fd9a3e80edde29e2641d67e7ac74c719fa (patch) | |
| tree | 69348f3a314edfe2f535474131b450f54b0b73d1 | |
| parent | dc9df06be2d8eead60ee9c87dfff3a81af4cdc9f (diff) | |
| parent | 55f43e04cf7ffcf31db8d7a9688a1793db2d3328 (diff) | |
Merge "Add debug logging to StackScrollAlgorithm" into tm-dev am: 55f43e04cf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18132914
Change-Id: I93e15c6d45f8a292236385d014271499f4d0916b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java index 2b79986662f1..799fee5e865d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java @@ -49,9 +49,10 @@ public class StackScrollAlgorithm { public static final float START_FRACTION = 0.5f; - private static final String LOG_TAG = "StackScrollAlgorithm"; - private final ViewGroup mHostView; + private static final String TAG = "StackScrollAlgorithm"; + private static final Boolean DEBUG = false; + private final ViewGroup mHostView; private int mPaddingBetweenElements; private int mGapHeight; private int mGapHeightOnLockscreen; @@ -126,6 +127,37 @@ public class StackScrollAlgorithm { return getExpansionFractionWithoutShelf(mTempAlgorithmState, ambientState); } + private void log(String s) { + if (DEBUG) { + android.util.Log.i(TAG, s); + } + } + + public void logView(View view, String s) { + String viewString = ""; + if (view instanceof ExpandableNotificationRow) { + ExpandableNotificationRow row = ((ExpandableNotificationRow) view); + if (row.getEntry() == null) { + viewString = "ExpandableNotificationRow has null NotificationEntry"; + } else { + viewString = row.getEntry().getSbn().getId() + ""; + } + } else if (view == null) { + viewString = "View is null"; + } else if (view instanceof SectionHeaderView) { + viewString = "SectionHeaderView"; + } else if (view instanceof FooterView) { + viewString = "FooterView"; + } else if (view instanceof MediaContainerView) { + viewString = "MediaContainerView"; + } else if (view instanceof EmptyShadeView) { + viewString = "EmptyShadeView"; + } else { + viewString = view.toString(); + } + log(viewString + " " + s); + } + private void resetChildViewStates() { int numChildren = mHostView.getChildCount(); for (int i = 0; i < numChildren; i++) { |