Loading core/java/android/widget/TextView.java +10 −3 Original line number Diff line number Diff line Loading @@ -115,7 +115,6 @@ import android.view.ContextMenu; import android.view.DragEvent; import android.view.Gravity; import android.view.HapticFeedbackConstants; import android.view.InputDevice; import android.view.KeyCharacterMap; import android.view.KeyEvent; import android.view.MotionEvent; Loading Loading @@ -394,6 +393,14 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener mOverride = false; } /** * @return {@code true} if this object contains metadata that needs to * be retained, {@code false} otherwise */ public boolean hasMetadata() { return mDrawablePadding != 0 || mHasTintMode || mHasTint; } /** * Updates the list of displayed drawables to account for the current * layout direction. Loading Loading @@ -2174,7 +2181,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (!drawables) { // Clearing drawables... can we free the data structure? if (dr != null) { if (dr.mDrawablePadding == 0) { if (!dr.hasMetadata()) { mDrawables = null; } else { // We need to retain the last set padding, so just clear Loading Loading @@ -2377,7 +2384,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (!drawables) { // Clearing drawables... can we free the data structure? if (dr != null) { if (dr.mDrawablePadding == 0) { if (!dr.hasMetadata()) { mDrawables = null; } else { // We need to retain the last set padding, so just clear Loading Loading
core/java/android/widget/TextView.java +10 −3 Original line number Diff line number Diff line Loading @@ -115,7 +115,6 @@ import android.view.ContextMenu; import android.view.DragEvent; import android.view.Gravity; import android.view.HapticFeedbackConstants; import android.view.InputDevice; import android.view.KeyCharacterMap; import android.view.KeyEvent; import android.view.MotionEvent; Loading Loading @@ -394,6 +393,14 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener mOverride = false; } /** * @return {@code true} if this object contains metadata that needs to * be retained, {@code false} otherwise */ public boolean hasMetadata() { return mDrawablePadding != 0 || mHasTintMode || mHasTint; } /** * Updates the list of displayed drawables to account for the current * layout direction. Loading Loading @@ -2174,7 +2181,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (!drawables) { // Clearing drawables... can we free the data structure? if (dr != null) { if (dr.mDrawablePadding == 0) { if (!dr.hasMetadata()) { mDrawables = null; } else { // We need to retain the last set padding, so just clear Loading Loading @@ -2377,7 +2384,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (!drawables) { // Clearing drawables... can we free the data structure? if (dr != null) { if (dr.mDrawablePadding == 0) { if (!dr.hasMetadata()) { mDrawables = null; } else { // We need to retain the last set padding, so just clear Loading