Merge "Add logs to aid slow notification measuring investigation" into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
db45ef8514
@@ -18,6 +18,7 @@ package com.android.internal.widget;
|
||||
|
||||
import android.annotation.Nullable;
|
||||
import android.content.Context;
|
||||
import android.os.Trace;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
@@ -54,6 +55,7 @@ public class RemeasuringLinearLayout extends LinearLayout {
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
Trace.beginSection("RemeasuringLinearLayout#onMeasure");
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
int count = getChildCount();
|
||||
int height = 0;
|
||||
@@ -86,5 +88,6 @@ public class RemeasuringLinearLayout extends LinearLayout {
|
||||
}
|
||||
mMatchParentViews.clear();
|
||||
setMeasuredDimension(getMeasuredWidth(), height);
|
||||
Trace.endSection();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package com.android.keyguard;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Trace;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -112,4 +113,11 @@ public class KeyguardStatusView extends GridLayout {
|
||||
mKeyguardSlice.dump(pw, args);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
Trace.beginSection("KeyguardStatusView#onMeasure");
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
Trace.endSection();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.android.systemui.shade;
|
||||
|
||||
import static android.os.Trace.TRACE_TAG_ALWAYS;
|
||||
import static android.view.WindowInsets.Type.systemBars;
|
||||
|
||||
import static com.android.systemui.statusbar.phone.CentralSurfaces.DEBUG;
|
||||
@@ -33,6 +34,7 @@ import android.graphics.Rect;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Trace;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.ActionMode;
|
||||
import android.view.DisplayCutout;
|
||||
@@ -299,6 +301,19 @@ public class NotificationShadeWindowView extends FrameLayout {
|
||||
return mode;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
Trace.beginSection("NotificationShadeWindowView#onMeasure");
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
Trace.endSection();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void requestLayout() {
|
||||
Trace.instant(TRACE_TAG_ALWAYS, "NotificationShadeWindowView#requestLayout");
|
||||
super.requestLayout();
|
||||
}
|
||||
|
||||
private class ActionModeCallback2Wrapper extends ActionMode.Callback2 {
|
||||
private final ActionMode.Callback mWrapped;
|
||||
|
||||
|
||||
@@ -135,6 +135,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
|
||||
|
||||
private static final String TAG = "ExpandableNotifRow";
|
||||
private static final boolean DEBUG = Compile.IS_DEBUG && Log.isLoggable(TAG, Log.DEBUG);
|
||||
private static final boolean DEBUG_ONMEASURE =
|
||||
Compile.IS_DEBUG && Log.isLoggable(TAG, Log.VERBOSE);
|
||||
private static final int DEFAULT_DIVIDER_ALPHA = 0x29;
|
||||
private static final int COLORED_DIVIDER_ALPHA = 0x7B;
|
||||
private static final int MENU_VIEW_INDEX = 0;
|
||||
@@ -1724,6 +1726,11 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
Trace.beginSection(appendTraceStyleTag("ExpNotRow#onMeasure"));
|
||||
if (DEBUG_ONMEASURE) {
|
||||
Log.d(TAG, "onMeasure("
|
||||
+ "widthMeasureSpec=" + MeasureSpec.toString(widthMeasureSpec) + ", "
|
||||
+ "heightMeasureSpec=" + MeasureSpec.toString(heightMeasureSpec) + ")");
|
||||
}
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
Trace.endSection();
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import android.graphics.Canvas;
|
||||
import android.graphics.Path;
|
||||
import android.graphics.Path.Direction;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Trace;
|
||||
import android.service.notification.StatusBarNotification;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
@@ -219,6 +220,7 @@ public class NotificationChildrenContainer extends ViewGroup
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
Trace.beginSection("NotificationChildrenContainer#onMeasure");
|
||||
int heightMode = MeasureSpec.getMode(heightMeasureSpec);
|
||||
boolean hasFixedHeight = heightMode == MeasureSpec.EXACTLY;
|
||||
boolean isHeightLimited = heightMode == MeasureSpec.AT_MOST;
|
||||
@@ -267,6 +269,7 @@ public class NotificationChildrenContainer extends ViewGroup
|
||||
}
|
||||
|
||||
setMeasuredDimension(width, height);
|
||||
Trace.endSection();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
package com.android.systemui.statusbar.notification.stack;
|
||||
|
||||
import static android.os.Trace.TRACE_TAG_ALWAYS;
|
||||
|
||||
import static com.android.internal.jank.InteractionJankMonitor.CUJ_NOTIFICATION_SHADE_SCROLL_FLING;
|
||||
import static com.android.internal.jank.InteractionJankMonitor.CUJ_SHADE_CLEAR_ALL;
|
||||
import static com.android.systemui.statusbar.notification.stack.NotificationPriorityBucketKt.BUCKET_SILENT;
|
||||
@@ -44,6 +46,7 @@ import android.graphics.Paint;
|
||||
import android.graphics.Path;
|
||||
import android.graphics.Rect;
|
||||
import android.os.Bundle;
|
||||
import android.os.Trace;
|
||||
import android.provider.Settings;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.IndentingPrintWriter;
|
||||
@@ -1074,6 +1077,12 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
|
||||
@Override
|
||||
@ShadeViewRefactor(RefactorComponent.SHADE_VIEW)
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
Trace.beginSection("NotificationStackScrollLayout#onMeasure");
|
||||
if (SPEW) {
|
||||
Log.d(TAG, "onMeasure("
|
||||
+ "widthMeasureSpec=" + MeasureSpec.toString(widthMeasureSpec) + ", "
|
||||
+ "heightMeasureSpec=" + MeasureSpec.toString(heightMeasureSpec) + ")");
|
||||
}
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
|
||||
int width = MeasureSpec.getSize(widthMeasureSpec);
|
||||
@@ -1090,6 +1099,13 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
|
||||
for (int i = 0; i < size; i++) {
|
||||
measureChild(getChildAt(i), childWidthSpec, childHeightSpec);
|
||||
}
|
||||
Trace.endSection();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void requestLayout() {
|
||||
Trace.instant(TRACE_TAG_ALWAYS, "NotificationStackScrollLayout#requestLayout");
|
||||
super.requestLayout();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,6 +26,7 @@ import android.content.res.Resources;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Trace;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Pair;
|
||||
import android.util.TypedValue;
|
||||
@@ -527,4 +528,11 @@ public class KeyguardStatusBarView extends RelativeLayout {
|
||||
mClipRect.set(0, mTopClipping, getWidth(), getHeight());
|
||||
setClipBounds(mClipRect);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
Trace.beginSection("KeyguardStatusBarView#onMeasure");
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
Trace.endSection();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user