summaryrefslogtreecommitdiffstats
path: root/tools/layoutlib
diff options
context:
space:
mode:
authorDiego Perez <diegoperez@google.com>2015-06-15 15:48:29 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-06-15 15:48:29 +0000
commit898be8bc76c873cf885d7bdf293b4f58563a1648 (patch)
treed020d24de6908d1d6aad467c1627ba462c1ac6b5 /tools/layoutlib
parentdc929e28acd32f7adebdc0d5afd3dc7eaa1a09fe (diff)
parentfa794eb0025dbec6c1b90135495081d42f06bdaf (diff)
downloadframeworks_base-898be8bc76c873cf885d7bdf293b4f58563a1648.zip
frameworks_base-898be8bc76c873cf885d7bdf293b4f58563a1648.tar.gz
frameworks_base-898be8bc76c873cf885d7bdf293b4f58563a1648.tar.bz2
am fa794eb0: am 2f710356: am 13c06d6c: am 1f33bdad: am 5e50e00c: Merge "Fix for shadows on theme editor" into lmp-mr1-dev
* commit 'fa794eb0025dbec6c1b90135495081d42f06bdaf': Fix for shadows on theme editor
Diffstat (limited to 'tools/layoutlib')
-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 04e423b..9881a38 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