summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2014-09-11 17:45:43 -0700
committerChet Haase <chet@google.com>2014-09-11 17:45:43 -0700
commit22cf0b0cb856336d36961280b1e968a91d4488d5 (patch)
treee7ec22bd88a41960e62912556a1a4dffacee61e0 /graphics
parent327f7ebc01e5e6389327d094bcdb0ef87b34ea3e (diff)
downloadframeworks_base-22cf0b0cb856336d36961280b1e968a91d4488d5.zip
frameworks_base-22cf0b0cb856336d36961280b1e968a91d4488d5.tar.gz
frameworks_base-22cf0b0cb856336d36961280b1e968a91d4488d5.tar.bz2
Unfilled shapes should not report themselves as opaque
Issue #17470611 Stroked, unfilled GradientDrawable shouldn't cast a shadow Change-Id: Ied60e12c2d2567efec8dac1fe69c77b49ef25b8e
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/graphics/drawable/GradientDrawable.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/graphics/java/android/graphics/drawable/GradientDrawable.java b/graphics/java/android/graphics/drawable/GradientDrawable.java
index 2c8611e..e722690 100644
--- a/graphics/java/android/graphics/drawable/GradientDrawable.java
+++ b/graphics/java/android/graphics/drawable/GradientDrawable.java
@@ -1637,6 +1637,11 @@ public class GradientDrawable extends Drawable {
}
}
+ // An unfilled shape is not opaque over bounds or shape
+ if (mColors == null && mColorStateList == null) {
+ return;
+ }
+
// Colors are opaque, so opaqueOverShape=true,
mOpaqueOverShape = true;
// and opaqueOverBounds=true if shape fills bounds