summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDiego Perez <diegoperez@google.com>2015-06-15 08:34:56 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-06-15 08:35:00 +0000
commit5e50e00c663a5d0b11d1f41509e1fb4e56d166f1 (patch)
tree7685132c51fb13779d4bfbff689647908d19a98c /tools
parentead59b0d479c3a911be87261b523255e8e51f76a (diff)
parente5be1d7a397db08a4dd75c66bdbbc6e2b61baaa8 (diff)
downloadframeworks_base-5e50e00c663a5d0b11d1f41509e1fb4e56d166f1.zip
frameworks_base-5e50e00c663a5d0b11d1f41509e1fb4e56d166f1.tar.gz
frameworks_base-5e50e00c663a5d0b11d1f41509e1fb4e56d166f1.tar.bz2
Merge "Fix for shadows on theme editor" into lmp-mr1-dev
Diffstat (limited to 'tools')
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/LinearGradient_Delegate.java4
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java4
2 files changed, 6 insertions, 2 deletions
diff --git a/tools/layoutlib/bridge/src/android/graphics/LinearGradient_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/LinearGradient_Delegate.java
index 703719c..cbc30c3 100644
--- a/tools/layoutlib/bridge/src/android/graphics/LinearGradient_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/LinearGradient_Delegate.java
@@ -23,6 +23,8 @@ import com.android.tools.layoutlib.annotations.LayoutlibDelegate;
import android.graphics.Shader.TileMode;
+import java.awt.image.ColorModel;
+
/**
* Delegate implementing the native methods of android.graphics.LinearGradient
*
@@ -158,7 +160,7 @@ public final class LinearGradient_Delegate extends Gradient_Delegate {
java.awt.image.ColorModel colorModel) {
mCanvasMatrix = canvasMatrix;
mLocalMatrix = localMatrix;
- mColorModel = colorModel;
+ mColorModel = colorModel.hasAlpha() ? colorModel : ColorModel.getRGBdefault();
}
@Override
diff --git a/tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java
index 6edb140..750580b 100644
--- a/tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java
@@ -23,6 +23,8 @@ import com.android.tools.layoutlib.annotations.LayoutlibDelegate;
import android.graphics.Shader.TileMode;
+import java.awt.image.ColorModel;
+
/**
* Delegate implementing the native methods of android.graphics.RadialGradient
*
@@ -146,7 +148,7 @@ public class RadialGradient_Delegate extends Gradient_Delegate {
java.awt.image.ColorModel colorModel) {
mCanvasMatrix = canvasMatrix;
mLocalMatrix = localMatrix;
- mColorModel = colorModel;
+ mColorModel = colorModel.hasAlpha() ? colorModel : ColorModel.getRGBdefault();
}
@Override