From b53a68bbd96c3ffa22914c72315d50e6999dcb28 Mon Sep 17 00:00:00 2001 From: Adam Powell Date: Mon, 20 Jun 2011 16:26:31 -0700 Subject: [PATCH] Fix bug 4738084 - Padding calculation regression Make sure user padding values aren't clobbered during construction. Change-Id: I90d1610e0bf50ccb10f058fb2b6c6d8ff34eec3b --- core/java/android/view/View.java | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 46df88b8e6976..440359162266e 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -2183,12 +2183,6 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit @ViewDebug.ExportedProperty(category = "padding") int mUserPaddingLeft; - /** - * Cache the paddingTop set by the user to append to the scrollbar's size. - */ - @ViewDebug.ExportedProperty(category = "padding") - int mUserPaddingTop; - /** * Cache if the user padding is relative. * @@ -2890,12 +2884,8 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit // Cache user padding as we cannot fully resolve padding here (we dont have yet the resolved // layout direction). Those cached values will be used later during padding resolution. - mUserPaddingLeft = leftPadding; - mUserPaddingRight = rightPadding; mUserPaddingStart = startPadding; mUserPaddingEnd = endPadding; - mUserPaddingTop = topPadding; - mUserPaddingBottom = bottomPadding; if (viewFlagMasks != 0) { setFlags(viewFlagValues, viewFlagMasks); @@ -8882,7 +8872,6 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit } } - mPaddingTop = (mUserPaddingTop >= 0) ? mUserPaddingTop : mPaddingTop; mUserPaddingBottom = (mUserPaddingBottom >= 0) ? mUserPaddingBottom : mPaddingBottom; recomputePadding();