@@ -9912,10 +9912,6 @@ private boolean skipInvalidate() {
99129912 * @param dirty the rectangle representing the bounds of the dirty region
99139913 */
99149914 public void invalidate(Rect dirty) {
9915- if (ViewDebug.TRACE_HIERARCHY) {
9916- ViewDebug.trace(this, ViewDebug.HierarchyTraceType.INVALIDATE);
9917- }
9918-
99199915 if (skipInvalidate()) {
99209916 return;
99219917 }
@@ -9959,10 +9955,6 @@ public void invalidate(Rect dirty) {
99599955 * @param b the bottom position of the dirty region
99609956 */
99619957 public void invalidate(int l, int t, int r, int b) {
9962- if (ViewDebug.TRACE_HIERARCHY) {
9963- ViewDebug.trace(this, ViewDebug.HierarchyTraceType.INVALIDATE);
9964- }
9965-
99669958 if (skipInvalidate()) {
99679959 return;
99689960 }
@@ -10015,10 +10007,6 @@ public void invalidate() {
1001510007 * View's contents or dimensions have not changed.
1001610008 */
1001710009 void invalidate(boolean invalidateCache) {
10018- if (ViewDebug.TRACE_HIERARCHY) {
10019- ViewDebug.trace(this, ViewDebug.HierarchyTraceType.INVALIDATE);
10020- }
10021-
1002210010 if (skipInvalidate()) {
1002310011 return;
1002410012 }
@@ -12391,10 +12379,6 @@ public void buildDrawingCache(boolean autoScale) {
1239112379 mDrawingCache == null : mUnscaledDrawingCache == null)) {
1239212380 mCachingFailed = false;
1239312381
12394- if (ViewDebug.TRACE_HIERARCHY) {
12395- ViewDebug.trace(this, ViewDebug.HierarchyTraceType.BUILD_CACHE);
12396- }
12397-
1239812382 int width = mRight - mLeft;
1239912383 int height = mBottom - mTop;
1240012384
@@ -12514,9 +12498,6 @@ public void buildDrawingCache(boolean autoScale) {
1251412498
1251512499 // Fast path for layouts with no backgrounds
1251612500 if ((mPrivateFlags & SKIP_DRAW) == SKIP_DRAW) {
12517- if (ViewDebug.TRACE_HIERARCHY) {
12518- ViewDebug.trace(this, ViewDebug.HierarchyTraceType.DRAW);
12519- }
1252012501 mPrivateFlags &= ~DIRTY_MASK;
1252112502 dispatchDraw(canvas);
1252212503 } else {
@@ -13130,9 +13111,6 @@ boolean draw(Canvas canvas, ViewGroup parent, long drawingTime) {
1313013111 if (!hasDisplayList) {
1313113112 // Fast path for layouts with no backgrounds
1313213113 if ((mPrivateFlags & SKIP_DRAW) == SKIP_DRAW) {
13133- if (ViewDebug.TRACE_HIERARCHY) {
13134- ViewDebug.trace(parent, ViewDebug.HierarchyTraceType.DRAW);
13135- }
1313613114 mPrivateFlags &= ~DIRTY_MASK;
1313713115 dispatchDraw(canvas);
1313813116 } else {
@@ -13205,10 +13183,6 @@ boolean draw(Canvas canvas, ViewGroup parent, long drawingTime) {
1320513183 * @param canvas The Canvas to which the View is rendered.
1320613184 */
1320713185 public void draw(Canvas canvas) {
13208- if (ViewDebug.TRACE_HIERARCHY) {
13209- ViewDebug.trace(this, ViewDebug.HierarchyTraceType.DRAW);
13210- }
13211-
1321213186 final int privateFlags = mPrivateFlags;
1321313187 final boolean dirtyOpaque = (privateFlags & DIRTY_MASK) == DIRTY_OPAQUE &&
1321413188 (mAttachInfo == null || !mAttachInfo.mIgnoreDirtyState);
@@ -13552,10 +13526,6 @@ public void layout(int l, int t, int r, int b) {
1355213526 int oldR = mRight;
1355313527 boolean changed = setFrame(l, t, r, b);
1355413528 if (changed || (mPrivateFlags & LAYOUT_REQUIRED) == LAYOUT_REQUIRED) {
13555- if (ViewDebug.TRACE_HIERARCHY) {
13556- ViewDebug.trace(this, ViewDebug.HierarchyTraceType.ON_LAYOUT);
13557- }
13558-
1355913529 onLayout(changed, l, t, r, b);
1356013530 mPrivateFlags &= ~LAYOUT_REQUIRED;
1356113531
@@ -14810,60 +14780,6 @@ private void setKeyedTag(int key, Object tag) {
1481014780 mKeyedTags.put(key, tag);
1481114781 }
1481214782
14813- /**
14814- * @param consistency The type of consistency. See ViewDebug for more information.
14815- *
14816- * @hide
14817- */
14818- protected boolean dispatchConsistencyCheck(int consistency) {
14819- return onConsistencyCheck(consistency);
14820- }
14821-
14822- /**
14823- * Method that subclasses should implement to check their consistency. The type of
14824- * consistency check is indicated by the bit field passed as a parameter.
14825- *
14826- * @param consistency The type of consistency. See ViewDebug for more information.
14827- *
14828- * @throws IllegalStateException if the view is in an inconsistent state.
14829- *
14830- * @hide
14831- */
14832- protected boolean onConsistencyCheck(int consistency) {
14833- boolean result = true;
14834-
14835- final boolean checkLayout = (consistency & ViewDebug.CONSISTENCY_LAYOUT) != 0;
14836- final boolean checkDrawing = (consistency & ViewDebug.CONSISTENCY_DRAWING) != 0;
14837-
14838- if (checkLayout) {
14839- if (getParent() == null) {
14840- result = false;
14841- android.util.Log.d(ViewDebug.CONSISTENCY_LOG_TAG,
14842- "View " + this + " does not have a parent.");
14843- }
14844-
14845- if (mAttachInfo == null) {
14846- result = false;
14847- android.util.Log.d(ViewDebug.CONSISTENCY_LOG_TAG,
14848- "View " + this + " is not attached to a window.");
14849- }
14850- }
14851-
14852- if (checkDrawing) {
14853- // Do not check the DIRTY/DRAWN flags because views can call invalidate()
14854- // from their draw() method
14855-
14856- if ((mPrivateFlags & DRAWN) != DRAWN &&
14857- (mPrivateFlags & DRAWING_CACHE_VALID) == DRAWING_CACHE_VALID) {
14858- result = false;
14859- android.util.Log.d(ViewDebug.CONSISTENCY_LOG_TAG,
14860- "View " + this + " was invalidated but its drawing cache is valid.");
14861- }
14862- }
14863-
14864- return result;
14865- }
14866-
1486714783 /**
1486814784 * Prints information about this view in the log output, with the tag
1486914785 * {@link #VIEW_LOG_TAG}.
@@ -14977,10 +14893,6 @@ public int getBaseline() {
1497714893 * tree.
1497814894 */
1497914895 public void requestLayout() {
14980- if (ViewDebug.TRACE_HIERARCHY) {
14981- ViewDebug.trace(this, ViewDebug.HierarchyTraceType.REQUEST_LAYOUT);
14982- }
14983-
1498414896 mPrivateFlags |= FORCE_LAYOUT;
1498514897 mPrivateFlags |= INVALIDATED;
1498614898
@@ -15031,10 +14943,6 @@ public final void measure(int widthMeasureSpec, int heightMeasureSpec) {
1503114943 // first clears the measured dimension flag
1503214944 mPrivateFlags &= ~MEASURED_DIMENSION_SET;
1503314945
15034- if (ViewDebug.TRACE_HIERARCHY) {
15035- ViewDebug.trace(this, ViewDebug.HierarchyTraceType.ON_MEASURE);
15036- }
15037-
1503814946 // measure ourselves, this should set the measured dimension flag back
1503914947 onMeasure(widthMeasureSpec, heightMeasureSpec);
1504014948
0 commit comments