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: Id03ac87cd0acaf5d88a1911ceca21e10dca4eb5b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -48,9 +48,10 @@ public class StackScrollAlgorithm {
|
|||||||
|
|
||||||
public static final float START_FRACTION = 0.5f;
|
public static final float START_FRACTION = 0.5f;
|
||||||
|
|
||||||
private static final String LOG_TAG = "StackScrollAlgorithm";
|
private static final String TAG = "StackScrollAlgorithm";
|
||||||
private final ViewGroup mHostView;
|
private static final Boolean DEBUG = false;
|
||||||
|
|
||||||
|
private final ViewGroup mHostView;
|
||||||
private int mPaddingBetweenElements;
|
private int mPaddingBetweenElements;
|
||||||
private int mGapHeight;
|
private int mGapHeight;
|
||||||
private int mGapHeightOnLockscreen;
|
private int mGapHeightOnLockscreen;
|
||||||
@@ -125,6 +126,37 @@ public class StackScrollAlgorithm {
|
|||||||
return getExpansionFractionWithoutShelf(mTempAlgorithmState, ambientState);
|
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() {
|
private void resetChildViewStates() {
|
||||||
int numChildren = mHostView.getChildCount();
|
int numChildren = mHostView.getChildCount();
|
||||||
for (int i = 0; i < numChildren; i++) {
|
for (int i = 0; i < numChildren; i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user