diff options
author | Fabrice Di Meglio <fdimeglio@google.com> | 2013-11-07 19:17:59 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-11-07 19:18:00 +0000 |
commit | 435c0ee10af132937dc0a22c39380624e6efd5ab (patch) | |
tree | b1cf2fbb4a9f06cdc247edcfba96bff51aa5b6f0 /graphics | |
parent | e8c51298a43f607fea7418ced7cc783e6065fe87 (diff) | |
parent | f7a93ef3847258157d144dfefaa5757128cc807d (diff) | |
download | frameworks_base-435c0ee10af132937dc0a22c39380624e6efd5ab.zip frameworks_base-435c0ee10af132937dc0a22c39380624e6efd5ab.tar.gz frameworks_base-435c0ee10af132937dc0a22c39380624e6efd5ab.tar.bz2 |
Merge "Fix bug #11537133 Hideycling looks broken (KOT36), missing left padding" into klp-dev
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/java/android/graphics/drawable/DrawableContainer.java | 3 | ||||
-rw-r--r-- | graphics/java/android/graphics/drawable/NinePatchDrawable.java | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/graphics/java/android/graphics/drawable/DrawableContainer.java b/graphics/java/android/graphics/drawable/DrawableContainer.java index af8441a..aac7876 100644 --- a/graphics/java/android/graphics/drawable/DrawableContainer.java +++ b/graphics/java/android/graphics/drawable/DrawableContainer.java @@ -88,9 +88,10 @@ public class DrawableContainer extends Drawable implements Drawable.Callback { @Override public boolean getPadding(Rect padding) { final Rect r = mDrawableContainerState.getConstantPadding(); - boolean result = true; + boolean result; if (r != null) { padding.set(r); + result = (r.left | r.top | r.bottom | r.right) != 0; } else { if (mCurrDrawable != null) { result = mCurrDrawable.getPadding(padding); diff --git a/graphics/java/android/graphics/drawable/NinePatchDrawable.java b/graphics/java/android/graphics/drawable/NinePatchDrawable.java index ab34c0f..9c57a2c 100644 --- a/graphics/java/android/graphics/drawable/NinePatchDrawable.java +++ b/graphics/java/android/graphics/drawable/NinePatchDrawable.java @@ -244,7 +244,7 @@ public class NinePatchDrawable extends Drawable { } else { padding.set(mPadding); } - return true; + return (padding.left | padding.top | padding.right | padding.bottom) != 0; } /** |