summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2014-08-20 00:20:17 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-08-19 22:53:25 +0000
commitb19fe38840226050db0658e0244790ec5eb9d577 (patch)
tree64f85a88652d591ba456e5871cd31ad13d5c0adc /graphics
parent486ed3da0a86e697ab018d25188fc5ccd60b4d35 (diff)
parenta5e1301bf5b501350b94d0308989c876c766e245 (diff)
downloadframeworks_base-b19fe38840226050db0658e0244790ec5eb9d577.zip
frameworks_base-b19fe38840226050db0658e0244790ec5eb9d577.tar.gz
frameworks_base-b19fe38840226050db0658e0244790ec5eb9d577.tar.bz2
Merge "Update toggle switch asset to include content area" into lmp-dev
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/graphics/drawable/NinePatchDrawable.java26
1 files changed, 0 insertions, 26 deletions
diff --git a/graphics/java/android/graphics/drawable/NinePatchDrawable.java b/graphics/java/android/graphics/drawable/NinePatchDrawable.java
index 0aa1b0d..c185a9e 100644
--- a/graphics/java/android/graphics/drawable/NinePatchDrawable.java
+++ b/graphics/java/android/graphics/drawable/NinePatchDrawable.java
@@ -446,19 +446,8 @@ public class NinePatchDrawable extends Drawable {
": <nine-patch> requires a valid 9-patch source image");
}
- // Hey, now might be a good time to actually load optical bounds!
bitmap.getOpticalInsets(opticalInsets);
- // Sanity check for valid padding when we have optical insets.
- if (padding.left < opticalInsets.left) {
- padding.left = opticalInsets.left;
- padding.right = opticalInsets.right;
- }
- if (padding.top < opticalInsets.top) {
- padding.top = opticalInsets.top;
- padding.bottom = opticalInsets.bottom;
- }
-
state.mNinePatch = new NinePatch(bitmap, bitmap.getNinePatchChunk());
state.mPadding = padding;
state.mOpticalInsets = Insets.of(opticalInsets);
@@ -626,21 +615,6 @@ public class NinePatchDrawable extends Drawable {
mOpticalInsets = Insets.of(opticalInsets);
mDither = dither;
mAutoMirrored = autoMirror;
-
- // Sanity check for valid padding when we have optical insets.
- if (opticalInsets != null && !opticalInsets.isEmpty()) {
- if (mPadding == null) {
- mPadding = new Rect();
- }
- if (mPadding.left < opticalInsets.left) {
- mPadding.left = opticalInsets.left;
- mPadding.right = opticalInsets.right;
- }
- if (mPadding.top < opticalInsets.top) {
- mPadding.top = opticalInsets.top;
- mPadding.bottom = opticalInsets.bottom;
- }
- }
}
// Copy constructor