am 112d1b94: Merge "Add BiCubic resize instrinsic"

* commit '112d1b94ee8456dba16842e6b964eb35aef95818':
  Add BiCubic resize instrinsic
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);