From 83387a484c515e5234bd60f741578a6ac894bff5 Mon Sep 17 00:00:00 2001 From: Olivier Goutet Date: Thu, 5 Nov 2009 14:48:03 +0100 Subject: [PATCH 1/3] Correction of an error in the setRotate method of the ColorMatrix class. The matrix rotation params around the 2nd axis was not set correctly: Initial matrix for axis 2 (green): cos 0 sin 0 0 0 1 0 0 0 -sin 0 0 0 0 0 0 cos 1 0 After correction: cos 0 -sin 0 0 0 1 0 0 0 sin 0 cos 0 0 0 0 0 1 0 --- graphics/java/android/graphics/ColorMatrix.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/graphics/java/android/graphics/ColorMatrix.java b/graphics/java/android/graphics/ColorMatrix.java index 2478712ebb578..c22cda1cbf511 100644 --- a/graphics/java/android/graphics/ColorMatrix.java +++ b/graphics/java/android/graphics/ColorMatrix.java @@ -110,22 +110,31 @@ public class ColorMatrix { a[18] = aScale; } + /** + * Set the rotation on a color axis by the specified values. + * axis=0 correspond to a rotation around the RED color + * axis=1 correspond to a rotation around the GREEN color + * axis=2 correspond to a rotation around the BLUE color + */ public void setRotate(int axis, float degrees) { reset(); float radians = degrees * (float)Math.PI / 180; float cosine = FloatMath.cos(radians); float sine = FloatMath.sin(radians); switch (axis) { + // Rotation around the red color case 0: mArray[6] = mArray[12] = cosine; mArray[7] = sine; mArray[11] = -sine; break; + // Rotation around the green color case 1: - mArray[0] = mArray[17] = cosine; - mArray[2] = sine; - mArray[15] = -sine; + mArray[0] = mArray[12] = cosine; + mArray[2] = -sine; + mArray[10] = sine; break; + // Rotation around the blue color case 2: mArray[0] = mArray[6] = cosine; mArray[1] = sine; From f2db9fb0f877057a9ef56908d54f3c95fc3fd552 Mon Sep 17 00:00:00 2001 From: Alexey Tarasov Date: Tue, 1 Sep 2009 02:37:07 +1100 Subject: [PATCH 2/3] Typo fix in javadoc @throw -> @throws @Deprecated -> @deprecated --- core/java/android/view/animation/Animation.java | 2 +- core/java/android/webkit/UrlInterceptHandler.java | 2 +- core/java/android/webkit/UrlInterceptRegistry.java | 2 +- core/java/android/webkit/gears/UrlInterceptHandlerGears.java | 2 +- services/java/com/android/server/LocationManagerService.java | 2 +- telephony/java/android/telephony/PhoneStateListener.java | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/java/android/view/animation/Animation.java b/core/java/android/view/animation/Animation.java index a6627609e3be9..2f5e601f31ebb 100644 --- a/core/java/android/view/animation/Animation.java +++ b/core/java/android/view/animation/Animation.java @@ -319,7 +319,7 @@ public abstract class Animation implements Cloneable { * * @param durationMillis Duration in milliseconds * - * @throw java.lang.IllegalArgumentException if the duration is < 0 + * @throws java.lang.IllegalArgumentException if the duration is < 0 * * @attr ref android.R.styleable#Animation_duration */ diff --git a/core/java/android/webkit/UrlInterceptHandler.java b/core/java/android/webkit/UrlInterceptHandler.java index 9216413c4a753..766ed7e712069 100644 --- a/core/java/android/webkit/UrlInterceptHandler.java +++ b/core/java/android/webkit/UrlInterceptHandler.java @@ -30,7 +30,7 @@ public interface UrlInterceptHandler { * @param url URL string. * @param headers The headers associated with the request. May be null. * @return The CacheResult containing the surrogate response. - * @Deprecated Use PluginData getPluginData(String url, + * @deprecated Use PluginData getPluginData(String url, * Map headers); instead */ @Deprecated diff --git a/core/java/android/webkit/UrlInterceptRegistry.java b/core/java/android/webkit/UrlInterceptRegistry.java index 6051f290dffe1..31005bb2341e5 100644 --- a/core/java/android/webkit/UrlInterceptRegistry.java +++ b/core/java/android/webkit/UrlInterceptRegistry.java @@ -89,7 +89,7 @@ public final class UrlInterceptRegistry { * UrlInterceptHandler interested, or null if none are. * * @return A CacheResult containing surrogate content. - * @Deprecated Use PluginData getPluginData( String url, + * @deprecated Use PluginData getPluginData( String url, * Map headers) instead. */ @Deprecated diff --git a/core/java/android/webkit/gears/UrlInterceptHandlerGears.java b/core/java/android/webkit/gears/UrlInterceptHandlerGears.java index 43104bf293e36..887afc2d8c1c3 100644 --- a/core/java/android/webkit/gears/UrlInterceptHandlerGears.java +++ b/core/java/android/webkit/gears/UrlInterceptHandlerGears.java @@ -331,7 +331,7 @@ public class UrlInterceptHandlerGears implements UrlInterceptHandler { * @param url URL string. * @param headers The headers associated with the request. May be null. * @return The CacheResult containing the surrogate response. - * @Deprecated Use PluginData getPluginData(String url, + * @deprecated Use PluginData getPluginData(String url, * Map headers); instead */ @Deprecated diff --git a/services/java/com/android/server/LocationManagerService.java b/services/java/com/android/server/LocationManagerService.java index 4a4d5abb33710..99e6125a0d7fb 100644 --- a/services/java/com/android/server/LocationManagerService.java +++ b/services/java/com/android/server/LocationManagerService.java @@ -1402,7 +1402,7 @@ public class LocationManagerService extends ILocationManager.Stub implements Run /** * @return null if the provider does not exits - * @throw SecurityException if the provider is not allowed to be + * @throws SecurityException if the provider is not allowed to be * accessed by the caller */ public Bundle getProviderInfo(String provider) { diff --git a/telephony/java/android/telephony/PhoneStateListener.java b/telephony/java/android/telephony/PhoneStateListener.java index e113680b4e69e..7d83ea865597d 100644 --- a/telephony/java/android/telephony/PhoneStateListener.java +++ b/telephony/java/android/telephony/PhoneStateListener.java @@ -154,7 +154,7 @@ public class PhoneStateListener { * @see ServiceState#STATE_IN_SERVICE * @see ServiceState#STATE_OUT_OF_SERVICE * @see ServiceState#STATE_POWER_OFF - * @deprecated, @see #onSignalStrengthsChanged + * @deprecated , @see #onSignalStrengthsChanged */ public void onSignalStrengthChanged(int asu) { // default implementation empty From df682c84434ae3560a975d50a2d16d814835e052 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Queru Date: Mon, 9 Nov 2009 17:33:17 -0800 Subject: [PATCH 3/3] Fix build --- telephony/java/android/telephony/PhoneStateListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telephony/java/android/telephony/PhoneStateListener.java b/telephony/java/android/telephony/PhoneStateListener.java index 7d83ea865597d..e113680b4e69e 100644 --- a/telephony/java/android/telephony/PhoneStateListener.java +++ b/telephony/java/android/telephony/PhoneStateListener.java @@ -154,7 +154,7 @@ public class PhoneStateListener { * @see ServiceState#STATE_IN_SERVICE * @see ServiceState#STATE_OUT_OF_SERVICE * @see ServiceState#STATE_POWER_OFF - * @deprecated , @see #onSignalStrengthsChanged + * @deprecated, @see #onSignalStrengthsChanged */ public void onSignalStrengthChanged(int asu) { // default implementation empty