Merge "Import revised translations."
diff --git a/api/current.txt b/api/current.txt
index 0c3a0c4..ebf3893 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -16245,12 +16245,14 @@
 
   public class Byte2 {
     ctor public Byte2();
+    ctor public Byte2(byte, byte);
     field public byte x;
     field public byte y;
   }
 
   public class Byte3 {
     ctor public Byte3();
+    ctor public Byte3(byte, byte, byte);
     field public byte x;
     field public byte y;
     field public byte z;
@@ -16258,12 +16260,37 @@
 
   public class Byte4 {
     ctor public Byte4();
+    ctor public Byte4(byte, byte, byte, byte);
     field public byte w;
     field public byte x;
     field public byte y;
     field public byte z;
   }
 
+  public class Double2 {
+    ctor public Double2();
+    ctor public Double2(double, double);
+    field public double x;
+    field public double y;
+  }
+
+  public class Double3 {
+    ctor public Double3();
+    ctor public Double3(double, double, double);
+    field public double x;
+    field public double y;
+    field public double z;
+  }
+
+  public class Double4 {
+    ctor public Double4();
+    ctor public Double4(double, double, double, double);
+    field public double w;
+    field public double x;
+    field public double y;
+    field public double z;
+  }
+
   public class Element extends android.renderscript.BaseObj {
     method public static android.renderscript.Element ALLOCATION(android.renderscript.RenderScript);
     method public static android.renderscript.Element A_8(android.renderscript.RenderScript);
@@ -16427,12 +16454,14 @@
 
   public class Int2 {
     ctor public Int2();
+    ctor public Int2(int, int);
     field public int x;
     field public int y;
   }
 
   public class Int3 {
     ctor public Int3();
+    ctor public Int3(int, int, int);
     field public int x;
     field public int y;
     field public int z;
@@ -16440,6 +16469,7 @@
 
   public class Int4 {
     ctor public Int4();
+    ctor public Int4(int, int, int, int);
     field public int w;
     field public int x;
     field public int y;
@@ -16448,12 +16478,14 @@
 
   public class Long2 {
     ctor public Long2();
+    ctor public Long2(long, long);
     field public long x;
     field public long y;
   }
 
   public class Long3 {
     ctor public Long3();
+    ctor public Long3(long, long, long);
     field public long x;
     field public long y;
     field public long z;
@@ -16461,6 +16493,7 @@
 
   public class Long4 {
     ctor public Long4();
+    ctor public Long4(long, long, long, long);
     field public long w;
     field public long x;
     field public long y;
@@ -16857,12 +16890,14 @@
 
   public class Short2 {
     ctor public Short2();
+    ctor public Short2(short, short);
     field public short x;
     field public short y;
   }
 
   public class Short3 {
     ctor public Short3();
+    ctor public Short3(short, short, short);
     field public short x;
     field public short y;
     field public short z;
@@ -16870,6 +16905,7 @@
 
   public class Short4 {
     ctor public Short4();
+    ctor public Short4(short, short, short, short);
     field public short w;
     field public short x;
     field public short y;
diff --git a/core/java/android/content/res/AssetManager.java b/core/java/android/content/res/AssetManager.java
index c8c5733..be67e96 100644
--- a/core/java/android/content/res/AssetManager.java
+++ b/core/java/android/content/res/AssetManager.java
@@ -234,6 +234,7 @@
             StringBlock[] blocks = mStringBlocks;
             if (blocks == null) {
                 ensureStringBlocks();
+                blocks = mStringBlocks;
             }
             outValue.string = blocks[block].get(outValue.data);
             return true;
diff --git a/docs/html/sdk/oem-usb.jd b/docs/html/sdk/oem-usb.jd
index 7d7edfe..c94668f5 100644
--- a/docs/html/sdk/oem-usb.jd
+++ b/docs/html/sdk/oem-usb.jd
@@ -64,7 +64,7 @@
 support tab to select your products/device.  Different regions will have different links.</td>
 </tr>
 <tr><td>Huawei</td>	<td><a
-href="http://www.huaweidevice.com/worldwide/downloadCenter.do?method=list&flay=software&directoryId=20&treeId=0">http://www.huaweidevice.com/worldwide/downloadCenter.do?method=list&flay=software&directoryId=20&treeId=0</a></td>
+href="http://www.huaweidevice.com/worldwide/downloadCenter.do?method=list&flay=software&directoryId=20&treeId=0">http://www.huaweidevice.com/worldwide/downloadCenter.do?method=list&amp;flay=software&amp;directoryId=20&amp;treeId=0</a></td>
 </tr><tr><td>KT Tech</td>	<td><a
 href="http://www.kttech.co.kr/cscenter/download05.asp">http://www.kttech.co.kr/cscenter/download05.asp</a> for EV-S100(Take)</td>
 </tr>
@@ -72,7 +72,7 @@
     <td>
       Kyocera
     </td>
-    <td><a href="http://www.kyocera-wireless.com/">http://www.kyocera-wireless.com/</a>
+    <td><a href="http://www.kyocera-wireless.com/support/phone_drivers.htm">http://www.kyocera-wireless.com/support/phone_drivers.htm</a>
     </td>
   </tr>
   <tr><td>LGE</td>	<td><a
@@ -88,7 +88,7 @@
 </tr><tr><td>SK Telesys</td>	<td><a
 href="http://www.sk-w.com/service/wDownload/wDownload.jsp">http://www.sk-w.com/service/wDownload/wDownload.jsp</a></td></tr><tr>
 <td>Sony Ericsson</td>	<td><a
-href="http://developer.sonyericsson.com/wportal/devworld/search-downloads/android">http://developer.sonyericsson.com/wportal/devworld/search-downloads/android</a></td></tr><tr>
+href="http://developer.sonyericsson.com/wportal/devworld/search-downloads/driver?cc=gb&lc=en">http://developer.sonyericsson.com/wportal/devworld/search-downloads/driver?cc=gb&amp;lc=en</a></td></tr><tr>
 <td>ZTE</td>	<td><a
 href="http://support.zte.com.cn/support/news/NewsDetail.aspx?newsId=1000442">http://support.zte.com.cn/support/news/NewsDetail.aspx?newsId=1000442</a></td></tr>
 </table>
diff --git a/graphics/java/android/renderscript/Byte2.java b/graphics/java/android/renderscript/Byte2.java
index 7ec6cb0..7df5f2e 100644
--- a/graphics/java/android/renderscript/Byte2.java
+++ b/graphics/java/android/renderscript/Byte2.java
@@ -28,6 +28,11 @@
     public Byte2() {
     }
 
+    public Byte2(byte initX, byte initY) {
+        x = initX;
+        y = initY;
+    }
+
     public byte x;
     public byte y;
 }
diff --git a/graphics/java/android/renderscript/Byte3.java b/graphics/java/android/renderscript/Byte3.java
index 7bcd4b4..02a01c1 100644
--- a/graphics/java/android/renderscript/Byte3.java
+++ b/graphics/java/android/renderscript/Byte3.java
@@ -28,6 +28,12 @@
     public Byte3() {
     }
 
+    public Byte3(byte initX, byte initY, byte initZ) {
+        x = initX;
+        y = initY;
+        z = initZ;
+    }
+
     public byte x;
     public byte y;
     public byte z;
diff --git a/graphics/java/android/renderscript/Byte4.java b/graphics/java/android/renderscript/Byte4.java
index c6e7f63..a55a696 100644
--- a/graphics/java/android/renderscript/Byte4.java
+++ b/graphics/java/android/renderscript/Byte4.java
@@ -28,6 +28,13 @@
     public Byte4() {
     }
 
+    public Byte4(byte initX, byte initY, byte initZ, byte initW) {
+        x = initX;
+        y = initY;
+        z = initZ;
+        w = initW;
+    }
+
     public byte x;
     public byte y;
     public byte z;
diff --git a/graphics/java/android/renderscript/Double2.java b/graphics/java/android/renderscript/Double2.java
new file mode 100644
index 0000000..9f4f328
--- /dev/null
+++ b/graphics/java/android/renderscript/Double2.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.renderscript;
+
+import java.lang.Math;
+import android.util.Log;
+
+
+/**
+ * Class for exposing the native Renderscript double2 type back
+ * to the Android system.
+ *
+ **/
+public class Double2 {
+    public Double2() {
+    }
+
+    public Double2(double initX, double initY) {
+        x = initX;
+        y = initY;
+    }
+
+    public double x;
+    public double y;
+}
+
+
+
+
diff --git a/graphics/java/android/renderscript/Double3.java b/graphics/java/android/renderscript/Double3.java
new file mode 100644
index 0000000..eb55142
--- /dev/null
+++ b/graphics/java/android/renderscript/Double3.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.renderscript;
+
+import java.lang.Math;
+import android.util.Log;
+
+
+/**
+ * Class for exposing the native Renderscript double3 type back
+ * to the Android system.
+ *
+ **/
+public class Double3 {
+    public Double3() {
+    }
+
+    public Double3(double initX, double initY, double initZ) {
+        x = initX;
+        y = initY;
+        z = initZ;
+    }
+
+    public double x;
+    public double y;
+    public double z;
+}
+
+
+
+
diff --git a/graphics/java/android/renderscript/Double4.java b/graphics/java/android/renderscript/Double4.java
new file mode 100644
index 0000000..4755a76
--- /dev/null
+++ b/graphics/java/android/renderscript/Double4.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.renderscript;
+
+import java.lang.Math;
+import android.util.Log;
+
+
+/**
+ * Class for exposing the native Renderscript double4 type back
+ * to the Android system.
+ *
+ **/
+public class Double4 {
+    public Double4() {
+    }
+
+    public Double4(double initX, double initY, double initZ, double initW) {
+        x = initX;
+        y = initY;
+        z = initZ;
+        w = initW;
+    }
+
+    public double x;
+    public double y;
+    public double z;
+    public double w;
+}
+
+
+
diff --git a/graphics/java/android/renderscript/Int2.java b/graphics/java/android/renderscript/Int2.java
index 7aaa4e8..434af21 100644
--- a/graphics/java/android/renderscript/Int2.java
+++ b/graphics/java/android/renderscript/Int2.java
@@ -28,6 +28,11 @@
     public Int2() {
     }
 
+    public Int2(int initX, int initY) {
+        x = initX;
+        y = initY;
+    }
+
     public int x;
     public int y;
 }
diff --git a/graphics/java/android/renderscript/Int3.java b/graphics/java/android/renderscript/Int3.java
index e5c1cdf..333ccf8 100644
--- a/graphics/java/android/renderscript/Int3.java
+++ b/graphics/java/android/renderscript/Int3.java
@@ -28,6 +28,12 @@
     public Int3() {
     }
 
+    public Int3(int initX, int initY, int initZ) {
+        x = initX;
+        y = initY;
+        z = initZ;
+    }
+
     public int x;
     public int y;
     public int z;
diff --git a/graphics/java/android/renderscript/Int4.java b/graphics/java/android/renderscript/Int4.java
index 5289a89..8734c95 100644
--- a/graphics/java/android/renderscript/Int4.java
+++ b/graphics/java/android/renderscript/Int4.java
@@ -28,6 +28,13 @@
     public Int4() {
     }
 
+    public Int4(int initX, int initY, int initZ, int initW) {
+        x = initX;
+        y = initY;
+        z = initZ;
+        w = initW;
+    }
+
     public int x;
     public int y;
     public int z;
diff --git a/graphics/java/android/renderscript/Long2.java b/graphics/java/android/renderscript/Long2.java
index 8590b96..95ea18c 100644
--- a/graphics/java/android/renderscript/Long2.java
+++ b/graphics/java/android/renderscript/Long2.java
@@ -27,6 +27,11 @@
     public Long2() {
     }
 
+    public Long2(long initX, long initY) {
+        x = initX;
+        y = initY;
+    }
+
     public long x;
     public long y;
 }
diff --git a/graphics/java/android/renderscript/Long3.java b/graphics/java/android/renderscript/Long3.java
index 6ae837a..96ee885 100644
--- a/graphics/java/android/renderscript/Long3.java
+++ b/graphics/java/android/renderscript/Long3.java
@@ -27,6 +27,12 @@
     public Long3() {
     }
 
+    public Long3(long initX, long initY, long initZ) {
+        x = initX;
+        y = initY;
+        z = initZ;
+    }
+
     public long x;
     public long y;
     public long z;
diff --git a/graphics/java/android/renderscript/Long4.java b/graphics/java/android/renderscript/Long4.java
index 04c12f2..50e664c 100644
--- a/graphics/java/android/renderscript/Long4.java
+++ b/graphics/java/android/renderscript/Long4.java
@@ -27,6 +27,13 @@
     public Long4() {
     }
 
+    public Long4(long initX, long initY, long initZ, long initW) {
+        x = initX;
+        y = initY;
+        z = initZ;
+        w = initW;
+    }
+
     public long x;
     public long y;
     public long z;
diff --git a/graphics/java/android/renderscript/Short2.java b/graphics/java/android/renderscript/Short2.java
index 7094edd..617f1f5 100644
--- a/graphics/java/android/renderscript/Short2.java
+++ b/graphics/java/android/renderscript/Short2.java
@@ -28,6 +28,11 @@
     public Short2() {
     }
 
+    public Short2(short initX, short initY) {
+        x = initX;
+        y = initY;
+    }
+
     public short x;
     public short y;
 }
diff --git a/graphics/java/android/renderscript/Short3.java b/graphics/java/android/renderscript/Short3.java
index f34500c..b9ca49b 100644
--- a/graphics/java/android/renderscript/Short3.java
+++ b/graphics/java/android/renderscript/Short3.java
@@ -28,6 +28,12 @@
     public Short3() {
     }
 
+    public Short3(short initX, short initY, short initZ) {
+        x = initX;
+        y = initY;
+        z = initZ;
+    }
+
     public short x;
     public short y;
     public short z;
diff --git a/graphics/java/android/renderscript/Short4.java b/graphics/java/android/renderscript/Short4.java
index 5698fee..d5f2db5 100644
--- a/graphics/java/android/renderscript/Short4.java
+++ b/graphics/java/android/renderscript/Short4.java
@@ -28,6 +28,13 @@
     public Short4() {
     }
 
+    public Short4(short initX, short initY, short initZ, short initW) {
+        x = initX;
+        y = initY;
+        z = initZ;
+        w = initW;
+    }
+
     public short x;
     public short y;
     public short z;
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 75f5a5f..dd0cca22 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -1407,7 +1407,7 @@
     if (!isAA) {
         setupDrawVertices(vertices);
     } else {
-        void *alphaCoords = ((void*) aaVertices) + gVertexAlphaOffset;
+        AlphaVertex* alphaCoords = aaVertices + gVertexAlphaOffset;
         // innerProportion is the ratio of the inner (non-AA) port of the line to the total
         // AA stroke width (the base stroke width expanded by a half pixel on either side).
         // This value is used in the fragment shader to determine how to fill fragments.
@@ -1418,7 +1418,9 @@
     int generatedVerticesCount = 0;
     AlphaVertex *prevAAVertex = NULL;
     Vertex *prevVertex = NULL;
-    float inverseScaleX, inverseScaleY;
+    float inverseScaleX = 1.0f;
+    float inverseScaleY = 1.0f;
+
     if (isHairline) {
         // The quad that we use for AA hairlines needs to account for scaling because the line
         // should always be one pixel wide regardless of scale.
@@ -1438,6 +1440,7 @@
             inverseScaleY = (scaleY != 0) ? (inverseScaleY / scaleY) : 0;
         }
     }
+
     for (int i = 0; i < count; i += 4) {
         // a = start point, b = end point
         vec2 a(points[i], points[i + 1]);
@@ -1767,23 +1770,32 @@
                 count, mShadowRadius);
         const AutoTexture autoCleanup(shadow);
 
-        const float sx = x - shadow->left + mShadowDx;
-        const float sy = y - shadow->top + mShadowDy;
+        const float sx = oldX - shadow->left + mShadowDx;
+        const float sy = oldY - shadow->top + mShadowDy;
 
         const int shadowAlpha = ((mShadowColor >> 24) & 0xFF);
+        int shadowColor = mShadowColor;
+        if (mShader) {
+            shadowColor = 0xffffffff;
+        }
 
         glActiveTexture(gTextureUnits[0]);
         setupDraw();
         setupDrawWithTexture(true);
-        setupDrawAlpha8Color(mShadowColor, shadowAlpha < 255 ? shadowAlpha : alpha);
+        setupDrawAlpha8Color(shadowColor, shadowAlpha < 255 ? shadowAlpha : alpha);
+        setupDrawColorFilter();
+        setupDrawShader();
         setupDrawBlending(true, mode);
         setupDrawProgram();
-        setupDrawModelView(sx, sy, sx + shadow->width, sy + shadow->height, pureTranslate);
+        setupDrawModelView(sx, sy, sx + shadow->width, sy + shadow->height);
         setupDrawTexture(shadow->id);
         setupDrawPureColorUniforms();
+        setupDrawColorFilterUniforms();
+        setupDrawShaderUniforms();
         setupDrawMesh(NULL, (GLvoid*) gMeshTextureOffset);
 
         glDrawArrays(GL_TRIANGLE_STRIP, 0, gMeshCount);
+
         finishDrawTexture();
     }
 
diff --git a/libs/hwui/ProgramCache.cpp b/libs/hwui/ProgramCache.cpp
index b873bb8..80b1917 100644
--- a/libs/hwui/ProgramCache.cpp
+++ b/libs/hwui/ProgramCache.cpp
@@ -179,6 +179,8 @@
 // General case
 const char* gFS_Main_FetchColor =
         "    fragColor = color;\n";
+const char* gFS_Main_ModulateColor =
+        "    fragColor *= color.a;\n";
 const char* gFS_Main_AccountForWidth =
         "    if (distance < boundaryWidth) {\n"
         "        fragColor *= (distance * inverseBoundaryWidth);\n"
@@ -581,6 +583,7 @@
                 shader.append(gFS_Main_FetchBitmapNpot);
             }
         }
+        bool applyModulate = false;
         // Case when we have two shaders set
         if (description.hasGradient && description.hasBitmap) {
             int op = description.hasAlpha8Texture ? MODULATE_OP_MODULATE_A8 : modulateOp;
@@ -590,15 +593,21 @@
                 shader.append(gFS_Main_BlendShadersGB);
             }
             shader.append(gFS_Main_BlendShaders_Modulate[op]);
+            applyModulate = true;
         } else {
             if (description.hasGradient) {
                 int op = description.hasAlpha8Texture ? MODULATE_OP_MODULATE_A8 : modulateOp;
                 shader.append(gFS_Main_GradientShader_Modulate[op]);
+                applyModulate = true;
             } else if (description.hasBitmap) {
                 int op = description.hasAlpha8Texture ? MODULATE_OP_MODULATE_A8 : modulateOp;
                 shader.append(gFS_Main_BitmapShader_Modulate[op]);
+                applyModulate = true;
             }
         }
+        if (description.modulate && applyModulate) {
+            shader.append(gFS_Main_ModulateColor);
+        }
         // Apply the color op if needed
         shader.append(gFS_Main_ApplyColorOp[description.colorOp]);
         // Output the fragment
diff --git a/libs/rs/scriptc/rs_types.rsh b/libs/rs/scriptc/rs_types.rsh
index a010096..d9f4b4b 100644
--- a/libs/rs/scriptc/rs_types.rsh
+++ b/libs/rs/scriptc/rs_types.rsh
@@ -36,6 +36,10 @@
 typedef float float3 __attribute__((ext_vector_type(3)));
 typedef float float4 __attribute__((ext_vector_type(4)));
 
+typedef double double2 __attribute__((ext_vector_type(2)));
+typedef double double3 __attribute__((ext_vector_type(3)));
+typedef double double4 __attribute__((ext_vector_type(4)));
+
 typedef uchar uchar2 __attribute__((ext_vector_type(2)));
 typedef uchar uchar3 __attribute__((ext_vector_type(3)));
 typedef uchar uchar4 __attribute__((ext_vector_type(4)));
@@ -48,6 +52,10 @@
 typedef uint uint3 __attribute__((ext_vector_type(3)));
 typedef uint uint4 __attribute__((ext_vector_type(4)));
 
+typedef ulong ulong2 __attribute__((ext_vector_type(2)));
+typedef ulong ulong3 __attribute__((ext_vector_type(3)));
+typedef ulong ulong4 __attribute__((ext_vector_type(4)));
+
 typedef char char2 __attribute__((ext_vector_type(2)));
 typedef char char3 __attribute__((ext_vector_type(3)));
 typedef char char4 __attribute__((ext_vector_type(4)));
@@ -60,6 +68,9 @@
 typedef int int3 __attribute__((ext_vector_type(3)));
 typedef int int4 __attribute__((ext_vector_type(4)));
 
+typedef long long2 __attribute__((ext_vector_type(2)));
+typedef long long3 __attribute__((ext_vector_type(3)));
+typedef long long4 __attribute__((ext_vector_type(4)));
 
 typedef struct {
     float m[16];
diff --git a/libs/utils/RefBase.cpp b/libs/utils/RefBase.cpp
index bb6c125..2034486 100644
--- a/libs/utils/RefBase.cpp
+++ b/libs/utils/RefBase.cpp
@@ -524,7 +524,7 @@
 
 void RefBase::weakref_type::trackMe(bool enable, bool retain)
 {
-    static_cast<const weakref_impl*>(this)->trackMe(enable, retain);
+    static_cast<weakref_impl*>(this)->trackMe(enable, retain);
 }
 
 RefBase::weakref_type* RefBase::createWeak(const void* id) const
diff --git a/services/audioflinger/AudioPolicyManagerBase.cpp b/services/audioflinger/AudioPolicyManagerBase.cpp
index c0ac669..32d92dc 100644
--- a/services/audioflinger/AudioPolicyManagerBase.cpp
+++ b/services/audioflinger/AudioPolicyManagerBase.cpp
@@ -1911,6 +1911,13 @@
         device = outputDesc->device();
     }
 
+    // if volume is not 0 (not muted), force media volume to max on digital output
+    if (stream == AudioSystem::MUSIC &&
+        index != mStreams[stream].mIndexMin &&
+        device == AudioSystem::DEVICE_OUT_AUX_DIGITAL) {
+        return 1.0;
+    }
+
     volume = volIndexToAmpl(device, streamDesc, index);
 
     // if a headset is connected, apply the following rules to ring tones and notifications
diff --git a/telephony/java/com/android/internal/telephony/cdma/RuimRecords.java b/telephony/java/com/android/internal/telephony/cdma/RuimRecords.java
old mode 100644
new mode 100755
index 87b0c60..3429099
--- a/telephony/java/com/android/internal/telephony/cdma/RuimRecords.java
+++ b/telephony/java/com/android/internal/telephony/cdma/RuimRecords.java
@@ -16,10 +16,13 @@
 
 package com.android.internal.telephony.cdma;
 
+import static com.android.internal.telephony.TelephonyProperties.PROPERTY_ICC_OPERATOR_ISO_COUNTRY;
+import static com.android.internal.telephony.TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC;
 import android.os.AsyncResult;
 import android.os.Handler;
 import android.os.Message;
 import android.os.Registrant;
+import android.os.SystemProperties;
 import android.util.Log;
 
 import com.android.internal.telephony.AdnRecord;
@@ -59,6 +62,7 @@
 
     private static final int EVENT_RUIM_READY = 1;
     private static final int EVENT_RADIO_OFF_OR_NOT_AVAILABLE = 2;
+    private static final int EVENT_GET_IMSI_DONE = 3;
     private static final int EVENT_GET_DEVICE_IDENTITY_DONE = 4;
     private static final int EVENT_GET_ICCID_DONE = 5;
     private static final int EVENT_GET_CDMA_SUBSCRIPTION_DONE = 10;
@@ -114,6 +118,9 @@
 
         adnCache.reset();
 
+        phone.setSystemProperty(PROPERTY_ICC_OPERATOR_NUMERIC, null);
+        phone.setSystemProperty(PROPERTY_ICC_OPERATOR_ISO_COUNTRY, null);
+
         // recordsRequested is set to false indicating that the SIM
         // read requests made so far are not valid. This is set to
         // true only when fresh set of read requests are made.
@@ -201,6 +208,33 @@
             break;
 
             /* IO events */
+            case EVENT_GET_IMSI_DONE:
+                isRecordLoadResponse = true;
+
+                ar = (AsyncResult)msg.obj;
+                if (ar.exception != null) {
+                    Log.e(LOG_TAG, "Exception querying IMSI, Exception:" + ar.exception);
+                    break;
+                }
+
+                mImsi = (String) ar.result;
+
+                // IMSI (MCC+MNC+MSIN) is at least 6 digits, but not more
+                // than 15 (and usually 15).
+                if (mImsi != null && (mImsi.length() < 6 || mImsi.length() > 15)) {
+                    Log.e(LOG_TAG, "invalid IMSI " + mImsi);
+                    mImsi = null;
+                }
+
+                Log.d(LOG_TAG, "IMSI: " + mImsi.substring(0, 6) + "xxxxxxxxx");
+
+                String operatorNumeric = getRUIMOperatorNumeric();
+                if (operatorNumeric != null) {
+                    if(operatorNumeric.length() <= 6){
+                        MccTable.updateMccMncConfiguration(phone, operatorNumeric);
+                    }
+                }
+            break;
 
             case EVENT_GET_CDMA_SUBSCRIPTION_DONE:
                 ar = (AsyncResult)msg.obj;
@@ -291,6 +325,13 @@
 
         // Further records that can be inserted are Operator/OEM dependent
 
+        String operator = getRUIMOperatorNumeric();
+        SystemProperties.set(PROPERTY_ICC_OPERATOR_NUMERIC, operator);
+
+        if (mImsi != null) {
+            SystemProperties.set(PROPERTY_ICC_OPERATOR_ISO_COUNTRY,
+                    MccTable.countryCodeForMcc(Integer.parseInt(mImsi.substring(0,3))));
+        }
         recordsLoadedRegistrants.notifyRegistrants(
             new AsyncResult(null, null, null));
         ((CDMAPhone) phone).mRuimCard.broadcastIccStateChangedIntent(
@@ -317,6 +358,9 @@
 
         Log.v(LOG_TAG, "RuimRecords:fetchRuimRecords " + recordsToLoad);
 
+        phone.mCM.getIMSI(obtainMessage(EVENT_GET_IMSI_DONE));
+        recordsToLoad++;
+
         phone.getIccFileHandler().loadEFTransparent(EF_ICCID,
                 obtainMessage(EVENT_GET_ICCID_DONE));
         recordsToLoad++;
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/MoreShadersActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/MoreShadersActivity.java
index 182a474..02cb4b6 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/MoreShadersActivity.java
+++ b/tests/HwAccelerationTest/src/com/android/test/hwui/MoreShadersActivity.java
@@ -96,7 +96,8 @@
             mLargePaint.setAntiAlias(true);
             mLargePaint.setTextSize(36.0f);
             mLargePaint.setColor(0xff000000);
-            
+            mLargePaint.setShadowLayer(3.0f, 0.0f, 3.0f, 0x7f00ff00);
+
             mPaint = new Paint();
         }
 
@@ -122,19 +123,19 @@
 
             mLargePaint.setShader(mHorGradient);
             canvas.drawText("OpenGL rendering", 0.0f, 20.0f, mLargePaint);
-            
+
             mLargePaint.setShader(mScaled2Shader);
             canvas.drawText("OpenGL rendering", 0.0f, 60.0f, mLargePaint);
-            
+
             mLargePaint.setShader(mCompose2Shader);
             mLargePaint.setColorFilter(mColorFilter);
             canvas.drawText("OpenGL rendering", 0.0f, 100.0f, mLargePaint);
             mLargePaint.setColorFilter(null);
-            
+
             canvas.translate(0.0f, 40.0f + mDrawHeight);
             mLargePaint.setShader(mVertGradient);
             canvas.drawText("OpenGL rendering", 0.0f, 20.0f, mLargePaint);
-            
+
             canvas.restore();
         }
     }
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/PathsActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/PathsActivity.java
index 5ddcd20..833b61c 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/PathsActivity.java
+++ b/tests/HwAccelerationTest/src/com/android/test/hwui/PathsActivity.java
@@ -75,7 +75,7 @@
 
             mLargePaint = new Paint();
             mLargePaint.setAntiAlias(true);
-            mLargePaint.setColor(0xff00ff00);
+            mLargePaint.setColor(0x7f00ff00);
             mLargePaint.setStrokeWidth(15.0f);
             mLargePaint.setStyle(Paint.Style.FILL);