diff --git a/api/current.txt b/api/current.txt
index a98fcfb..9aea28a 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -21794,7 +21794,7 @@
   }
 
   public class BaseObj {
-    method public void destroy();
+    method public synchronized void destroy();
     method public java.lang.String getName();
     method public void setName(java.lang.String);
   }
@@ -22518,6 +22518,9 @@
   }
 
   public class Type extends android.renderscript.BaseObj {
+    method public static android.renderscript.Type createX(android.renderscript.RenderScript, android.renderscript.Element, int);
+    method public static android.renderscript.Type createXY(android.renderscript.RenderScript, android.renderscript.Element, int, int);
+    method public static android.renderscript.Type createXYZ(android.renderscript.RenderScript, android.renderscript.Element, int, int, int);
     method public int getCount();
     method public android.renderscript.Element getElement();
     method public int getX();
@@ -42720,11 +42723,11 @@
   }
 
   public class ConcurrentHashMap extends java.util.AbstractMap implements java.util.concurrent.ConcurrentMap java.io.Serializable {
-    ctor public ConcurrentHashMap();
-    ctor public ConcurrentHashMap(int);
-    ctor public ConcurrentHashMap(java.util.Map<? extends K, ? extends V>);
-    ctor public ConcurrentHashMap(int, float);
     ctor public ConcurrentHashMap(int, float, int);
+    ctor public ConcurrentHashMap(int, float);
+    ctor public ConcurrentHashMap(int);
+    ctor public ConcurrentHashMap();
+    ctor public ConcurrentHashMap(java.util.Map<? extends K, ? extends V>);
     method public boolean contains(java.lang.Object);
     method public java.util.Enumeration<V> elements();
     method public java.util.Set<java.util.Map.Entry<K, V>> entrySet();
@@ -44164,12 +44167,12 @@
   public final class Matcher implements java.util.regex.MatchResult {
     method public java.util.regex.Matcher appendReplacement(java.lang.StringBuffer, java.lang.String);
     method public java.lang.StringBuffer appendTail(java.lang.StringBuffer);
-    method public int end();
     method public int end(int);
+    method public int end();
     method public boolean find(int);
     method public boolean find();
-    method public java.lang.String group();
     method public java.lang.String group(int);
+    method public java.lang.String group();
     method public int groupCount();
     method public boolean hasAnchoringBounds();
     method public boolean hasTransparentBounds();
@@ -44186,8 +44189,8 @@
     method public boolean requireEnd();
     method public java.util.regex.Matcher reset();
     method public java.util.regex.Matcher reset(java.lang.CharSequence);
-    method public int start();
     method public int start(int) throws java.lang.IllegalStateException;
+    method public int start();
     method public java.util.regex.MatchResult toMatchResult();
     method public java.util.regex.Matcher useAnchoringBounds(boolean);
     method public java.util.regex.Matcher usePattern(java.util.regex.Pattern);
@@ -50928,7 +50931,7 @@
     method public java.lang.String getString(java.lang.String) throws org.json.JSONException;
     method public boolean has(java.lang.String);
     method public boolean isNull(java.lang.String);
-    method public java.util.Iterator<java.lang.String> keys();
+    method public java.util.Iterator keys();
     method public int length();
     method public org.json.JSONArray names();
     method public static java.lang.String numberToString(java.lang.Number) throws org.json.JSONException;
diff --git a/libs/hwui/TextureCache.cpp b/libs/hwui/TextureCache.cpp
index ad235a9..54a206b 100644
--- a/libs/hwui/TextureCache.cpp
+++ b/libs/hwui/TextureCache.cpp
@@ -184,7 +184,7 @@
     Mutex::Autolock _l(mLock);
     size_t count = mGarbage.size();
     for (size_t i = 0; i < count; i++) {
-        SkBitmap* bitmap = mGarbage.itemAt(i);
+        const SkBitmap* bitmap = mGarbage.itemAt(i);
         mCache.remove(bitmap);
         delete bitmap;
     }
diff --git a/rs/java/android/renderscript/Type.java b/rs/java/android/renderscript/Type.java
index ce7f571..1b5f1a2 100644
--- a/rs/java/android/renderscript/Type.java
+++ b/rs/java/android/renderscript/Type.java
@@ -216,7 +216,6 @@
     }
 
     /**
-     * @hide
      * Utility function for creating basic 1D types. The type is
      * created without mipmaps enabled.
      *
@@ -240,7 +239,6 @@
     }
 
     /**
-     * @hide
      * Utility function for creating basic 2D types. The type is
      * created without mipmaps or cubemaps.
      *
@@ -266,7 +264,6 @@
     }
 
     /**
-     * @hide
      * Utility function for creating basic 3D types. The type is
      * created without mipmaps.
      *
diff --git a/rs/jni/android_renderscript_RenderScript.cpp b/rs/jni/android_renderscript_RenderScript.cpp
index 9b89eb9..352bd49 100644
--- a/rs/jni/android_renderscript_RenderScript.cpp
+++ b/rs/jni/android_renderscript_RenderScript.cpp
@@ -392,7 +392,7 @@
     jint len = 0;
     if (data) {
         len = _env->GetArrayLength(data);
-        ptr = _env->GetIntArrayElements(data, NULL);
+        jint *ptr = _env->GetIntArrayElements(data, NULL);
     }
     LOG_API("nContextSendMessage, con(%p), id(%i), len(%i)", (RsContext)con, id, len);
     rsContextSendMessage((RsContext)con, id, (const uint8_t *)ptr, len * sizeof(int));
diff --git a/services/java/com/android/server/am/ActivityStackSupervisor.java b/services/java/com/android/server/am/ActivityStackSupervisor.java
old mode 100755
new mode 100644
index 93de0a6..483b4a0
--- a/services/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/java/com/android/server/am/ActivityStackSupervisor.java
@@ -1425,7 +1425,6 @@
             r.resultTo = null;
         }
 
-        boolean switchStackFromBg = false;
         boolean addingToTask = false;
         boolean movedHome = false;
         TaskRecord reuseTask = null;
@@ -1487,11 +1486,6 @@
                             }
                             options = null;
                         }
-                    } else {
-                        switchStackFromBg = lastStack != targetStack;
-                        if (DEBUG_TASKS) Slog.d(TAG, "Caller " + sourceRecord
-                                    + " is not top task, it may not move " + r
-                                    + " to front, switchStack=" + switchStackFromBg);
                     }
                     // If the caller has requested that the target task be
                     // reset, then do so.
@@ -1599,10 +1593,6 @@
                         // don't use that intent!)  And for paranoia, make
                         // sure we have correctly resumed the top activity.
                         if (doResume) {
-                            if (switchStackFromBg) {
-                                moveHomeStack(lastStack.isHomeStack());
-                                targetStack = lastStack;
-                            }
                             targetStack.resumeTopActivityLocked(null, options);
                         } else {
                             ActivityOptions.abort(options);
