Merge "Disconnect from AP when teardown requested." into jb-mr2-dev
diff --git a/api/current.txt b/api/current.txt
index 2f79c9b..a5f56f1 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -17089,6 +17089,9 @@
     field public static final java.lang.String DISALLOW_SHARE_LOCATION = "no_share_location";
     field public static final java.lang.String DISALLOW_UNINSTALL_APPS = "no_uninstall_apps";
     field public static final java.lang.String DISALLOW_USB_FILE_TRANSFER = "no_usb_file_transfer";
+    field public static final java.lang.String DISALLOW_CONFIG_CREDENTIALS = "no_config_credentials";
+    field public static final java.lang.String DISALLOW_REMOVE_USER = "no_remove_user";
+
   }
 
   public abstract class Vibrator {
@@ -20001,6 +20004,35 @@
     method public void reset();
     method public void reset(int);
     method public void skip(int);
+    method public boolean subBoolean();
+    method public android.renderscript.Byte2 subByte2();
+    method public android.renderscript.Byte3 subByte3();
+    method public android.renderscript.Byte4 subByte4();
+    method public android.renderscript.Double2 subDouble2();
+    method public android.renderscript.Double3 subDouble3();
+    method public android.renderscript.Double4 subDouble4();
+    method public float subF32();
+    method public double subF64();
+    method public android.renderscript.Float2 subFloat2();
+    method public android.renderscript.Float3 subFloat3();
+    method public android.renderscript.Float4 subFloat4();
+    method public short subI16();
+    method public int subI32();
+    method public long subI64();
+    method public byte subI8();
+    method public android.renderscript.Int2 subInt2();
+    method public android.renderscript.Int3 subInt3();
+    method public android.renderscript.Int4 subInt4();
+    method public android.renderscript.Long2 subLong2();
+    method public android.renderscript.Long3 subLong3();
+    method public android.renderscript.Long4 subLong4();
+    method public android.renderscript.Matrix2f subMatrix2f();
+    method public android.renderscript.Matrix3f subMatrix3f();
+    method public android.renderscript.Matrix4f subMatrix4f();
+    method public android.renderscript.Short2 subShort2();
+    method public android.renderscript.Short3 subShort3();
+    method public android.renderscript.Short4 subShort4();
+    method public void subalign(int);
   }
 
   public class Float2 {
@@ -20245,6 +20277,12 @@
     method protected android.renderscript.Script.KernelID createKernelID(int, int, android.renderscript.Element, android.renderscript.Element);
     method protected void forEach(int, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.FieldPacker);
     method protected void forEach(int, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.FieldPacker, android.renderscript.Script.LaunchOptions);
+    method public boolean getVarB(int);
+    method public double getVarD(int);
+    method public float getVarF(int);
+    method public int getVarI(int);
+    method public long getVarJ(int);
+    method public void getVarV(int, android.renderscript.FieldPacker);
     method protected void invoke(int);
     method protected void invoke(int, android.renderscript.FieldPacker);
     method public void setTimeZone(java.lang.String);
@@ -27600,7 +27638,7 @@
     method public void onReceivedTouchIconUrl(android.webkit.WebView, java.lang.String, boolean);
     method public void onRequestFocus(android.webkit.WebView);
     method public void onShowCustomView(android.view.View, android.webkit.WebChromeClient.CustomViewCallback);
-    method public void onShowCustomView(android.view.View, int, android.webkit.WebChromeClient.CustomViewCallback);
+    method public deprecated void onShowCustomView(android.view.View, int, android.webkit.WebChromeClient.CustomViewCallback);
   }
 
   public static abstract interface WebChromeClient.CustomViewCallback {
diff --git a/core/java/android/animation/ValueAnimator.java b/core/java/android/animation/ValueAnimator.java
index ea605b9..e91e92b 100644
--- a/core/java/android/animation/ValueAnimator.java
+++ b/core/java/android/animation/ValueAnimator.java
@@ -16,10 +16,8 @@
 
 package android.animation;
 
-import android.os.Handler;
 import android.os.Looper;
-import android.os.Message;
-import android.os.SystemProperties;
+import android.os.Trace;
 import android.util.AndroidRuntimeException;
 import android.view.Choreographer;
 import android.view.animation.AccelerateDecelerateInterpolator;
@@ -48,6 +46,7 @@
  * Animation</a> developer guide.</p>
  * </div>
  */
+@SuppressWarnings("unchecked")
 public class ValueAnimator extends Animator {
 
     /**
@@ -340,7 +339,7 @@
             return;
         }
         if (mValues == null || mValues.length == 0) {
-            setValues(new PropertyValuesHolder[]{PropertyValuesHolder.ofInt("", values)});
+            setValues(PropertyValuesHolder.ofInt("", values));
         } else {
             PropertyValuesHolder valuesHolder = mValues[0];
             valuesHolder.setIntValues(values);
@@ -368,7 +367,7 @@
             return;
         }
         if (mValues == null || mValues.length == 0) {
-            setValues(new PropertyValuesHolder[]{PropertyValuesHolder.ofFloat("", values)});
+            setValues(PropertyValuesHolder.ofFloat("", values));
         } else {
             PropertyValuesHolder valuesHolder = mValues[0];
             valuesHolder.setFloatValues(values);
@@ -400,8 +399,7 @@
             return;
         }
         if (mValues == null || mValues.length == 0) {
-            setValues(new PropertyValuesHolder[]{PropertyValuesHolder.ofObject("",
-                    (TypeEvaluator)null, values)});
+            setValues(PropertyValuesHolder.ofObject("", null, values));
         } else {
             PropertyValuesHolder valuesHolder = mValues[0];
             valuesHolder.setObjectValues(values);
@@ -423,7 +421,7 @@
         mValues = values;
         mValuesMap = new HashMap<String, PropertyValuesHolder>(numValues);
         for (int i = 0; i < numValues; ++i) {
-            PropertyValuesHolder valuesHolder = (PropertyValuesHolder) values[i];
+            PropertyValuesHolder valuesHolder = values[i];
             mValuesMap.put(valuesHolder.getPropertyName(), valuesHolder);
         }
         // New property/values/target should cause re-initialization prior to starting
@@ -537,6 +535,7 @@
      *
      * @hide
      */
+    @SuppressWarnings("unchecked")
     protected static class AnimationHandler implements Runnable {
         // The per-thread list of all active animations
         /** @hide */
@@ -1024,6 +1023,8 @@
         mStarted = false;
         mStartListenersCalled = false;
         mPlayingBackwards = false;
+        Trace.asyncTraceEnd(Trace.TRACE_TAG_VIEW, "animator",
+                System.identityHashCode(this));
     }
 
     /**
@@ -1031,6 +1032,8 @@
      * called on the UI thread.
      */
     private void startAnimation(AnimationHandler handler) {
+        Trace.asyncTraceBegin(Trace.TRACE_TAG_VIEW, "animator",
+                System.identityHashCode(this));
         initAnimation();
         handler.mAnimations.add(this);
         if (mStartDelay > 0 && mListeners != null) {
@@ -1095,7 +1098,7 @@
                         }
                     }
                     if (mRepeatMode == REVERSE) {
-                        mPlayingBackwards = mPlayingBackwards ? false : true;
+                        mPlayingBackwards = !mPlayingBackwards;
                     }
                     mCurrentIteration += (int)fraction;
                     fraction = fraction % 1f;
@@ -1252,7 +1255,7 @@
         }
     }
 
-    private AnimationHandler getOrCreateAnimationHandler() {
+    private static AnimationHandler getOrCreateAnimationHandler() {
         AnimationHandler handler = sAnimationHandler.get();
         if (handler == null) {
             handler = new AnimationHandler();
diff --git a/core/java/android/os/Trace.java b/core/java/android/os/Trace.java
index 607def7..dde25d5 100644
--- a/core/java/android/os/Trace.java
+++ b/core/java/android/os/Trace.java
@@ -74,6 +74,8 @@
     private static native void nativeTraceCounter(long tag, String name, int value);
     private static native void nativeTraceBegin(long tag, String name);
     private static native void nativeTraceEnd(long tag);
+    private static native void nativeAsyncTraceBegin(long tag, String name, int cookie);
+    private static native void nativeAsyncTraceEnd(long tag, String name, int cookie);
     private static native void nativeSetAppTracingAllowed(boolean allowed);
 
     static {
@@ -195,6 +197,42 @@
     }
 
     /**
+     * Writes a trace message to indicate that a given section of code has
+     * begun. Must be followed by a call to {@link #asyncTraceEnd} using the same
+     * tag. Unlike {@link #traceBegin(long, String)} and {@link #traceEnd(long)},
+     * asynchronous events do not need to be nested. The name and cookie used to
+     * begin an event must be used to end it.
+     *
+     * @param traceTag The trace tag.
+     * @param methodName The method name to appear in the trace.
+     * @param cookie Unique identifier for distinguishing simultaneous events
+     *
+     * @hide
+     */
+    public static void asyncTraceBegin(long traceTag, String methodName, int cookie) {
+        if (isTagEnabled(traceTag)) {
+            nativeAsyncTraceBegin(traceTag, methodName, cookie);
+        }
+    }
+
+    /**
+     * Writes a trace message to indicate that the current method has ended.
+     * Must be called exactly once for each call to {@link #asyncTraceBegin(long, String, int)}
+     * using the same tag, name and cookie.
+     *
+     * @param traceTag The trace tag.
+     * @param methodName The method name to appear in the trace.
+     * @param cookie Unique identifier for distinguishing simultaneous events
+     *
+     * @hide
+     */
+    public static void asyncTraceEnd(long traceTag, String methodName, int cookie) {
+        if (isTagEnabled(traceTag)) {
+            nativeAsyncTraceEnd(traceTag, methodName, cookie);
+        }
+    }
+
+    /**
      * Writes a trace message to indicate that a given section of code has begun. This call must
      * be followed by a corresponding call to {@link #endSection()} on the same thread.
      *
diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java
index b9b8f08..e08c6ea 100644
--- a/core/java/android/os/UserManager.java
+++ b/core/java/android/os/UserManager.java
@@ -110,7 +110,6 @@
      */
     public static final String DISALLOW_CONFIG_BLUETOOTH = "no_config_bluetooth";
 
-
     /**
      * Key for user restrictions. Specifies if a user is disallowed from transferring files over
      * USB. The default value is <code>false</code>.
@@ -121,6 +120,26 @@
      */
     public static final String DISALLOW_USB_FILE_TRANSFER = "no_usb_file_transfer";
 
+    /**
+     * Key for user restrictions. Specifies if a user is disallowed from configuring user
+     * credentials. The default value is <code>false</code>.
+     * <p/>
+     * Type: Boolean
+     * @see #setUserRestrictions(Bundle)
+     * @see #getUserRestrictions()
+     */
+    public static final String DISALLOW_CONFIG_CREDENTIALS = "no_config_credentials";
+
+    /**
+     * Key for user restrictions. Specifies if a user is disallowed from removing users.
+     * The default value is <code>false</code>.
+     * <p/>
+     * Type: Boolean
+     * @see #setUserRestrictions(Bundle)
+     * @see #getUserRestrictions()
+     */
+    public static final String DISALLOW_REMOVE_USER = "no_remove_user";
+
     private static UserManager sInstance = null;
 
     public synchronized static UserManager get(Context context) {
diff --git a/core/java/android/webkit/WebChromeClient.java b/core/java/android/webkit/WebChromeClient.java
index e93db09..21b0578 100644
--- a/core/java/android/webkit/WebChromeClient.java
+++ b/core/java/android/webkit/WebChromeClient.java
@@ -69,7 +69,9 @@
 
     /**
      * Notify the host application that the current page would
-     * like to show a custom View.
+     * like to show a custom View.  This is used for Fullscreen
+     * video playback; see "HTML5 Video support" documentation on
+     * {@link WebView}.
      * @param view is the View object to be shown.
      * @param callback is the callback to be invoked if and when the view
      * is dismissed.
@@ -84,7 +86,10 @@
      * {@link ActivityInfo#screenOrientation ActivityInfo.screenOrientation}.
      * @param callback is the callback to be invoked if and when the view
      * is dismissed.
+     * @deprecated This method supports the obsolete plugin mechanism,
+     * and will not be invoked in future
      */
+    @Deprecated
     public void onShowCustomView(View view, int requestedOrientation,
             CustomViewCallback callback) {};
     
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 52b7a81..1246051 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -5921,6 +5921,11 @@
         }
 
         Layout.Alignment alignment = getLayoutAlignment();
+        final boolean testDirChange = mSingleLine && mLayout != null &&
+            (alignment == Layout.Alignment.ALIGN_NORMAL ||
+             alignment == Layout.Alignment.ALIGN_OPPOSITE);
+        int oldDir = 0;
+        if (testDirChange) oldDir = mLayout.getParagraphDirection(0);
         boolean shouldEllipsize = mEllipsize != null && getKeyListener() == null;
         final boolean switchEllipsize = mEllipsize == TruncateAt.MARQUEE &&
                 mMarqueeFadeMode != MARQUEE_FADE_NORMAL;
@@ -6009,7 +6014,7 @@
             }
         }
 
-        if (bringIntoView) {
+        if (bringIntoView || (testDirChange && oldDir != mLayout.getParagraphDirection(0))) {
             registerForPreDraw();
         }
 
diff --git a/core/jni/android_os_Trace.cpp b/core/jni/android_os_Trace.cpp
index 00ecd0a..1315291 100644
--- a/core/jni/android_os_Trace.cpp
+++ b/core/jni/android_os_Trace.cpp
@@ -27,6 +27,18 @@
 
 namespace android {
 
+static void sanitizeString(String8& utf8Chars) {
+    size_t size = utf8Chars.size();
+    char* str = utf8Chars.lockBuffer(size);
+    for (size_t i = 0; i < size; i++) {
+        char c = str[i];
+        if (c == '\0' || c == '\n' || c == '|') {
+            str[i] = ' ';
+        }
+    }
+    utf8Chars.unlockBuffer();
+}
+
 static jlong android_os_Trace_nativeGetEnabledTags(JNIEnv* env, jclass clazz) {
     return atrace_get_enabled_tags();
 }
@@ -41,17 +53,8 @@
         jlong tag, jstring nameStr) {
     const size_t MAX_SECTION_NAME_LEN = 127;
     ScopedStringChars jchars(env, nameStr);
-    String8 utf8Chars(reinterpret_cast<const char16_t*>(jchars.get()),
-            jchars.size());
-    size_t size = utf8Chars.size();
-    char* str = utf8Chars.lockBuffer(size);
-    for (size_t i = 0; i < size; i++) {
-        char c = str[i];
-        if (c == '\0' || c == '\n' || c == '|') {
-            str[i] = ' ';
-        }
-    }
-    utf8Chars.unlockBuffer();
+    String8 utf8Chars(reinterpret_cast<const char16_t*>(jchars.get()), jchars.size());
+    sanitizeString(utf8Chars);
     atrace_begin(tag, utf8Chars.string());
 }
 
@@ -60,6 +63,24 @@
     atrace_end(tag);
 }
 
+static void android_os_Trace_nativeAsyncTraceBegin(JNIEnv* env, jclass clazz,
+        jlong tag, jstring nameStr, jint cookie) {
+    const size_t MAX_SECTION_NAME_LEN = 127;
+    ScopedStringChars jchars(env, nameStr);
+    String8 utf8Chars(reinterpret_cast<const char16_t*>(jchars.get()), jchars.size());
+    sanitizeString(utf8Chars);
+    atrace_async_begin(tag, utf8Chars.string(), cookie);
+}
+
+static void android_os_Trace_nativeAsyncTraceEnd(JNIEnv* env, jclass clazz,
+        jlong tag, jstring nameStr, jint cookie) {
+    const size_t MAX_SECTION_NAME_LEN = 127;
+    ScopedStringChars jchars(env, nameStr);
+    String8 utf8Chars(reinterpret_cast<const char16_t*>(jchars.get()), jchars.size());
+    sanitizeString(utf8Chars);
+    atrace_async_end(tag, utf8Chars.string(), cookie);
+}
+
 static void android_os_Trace_nativeSetAppTracingAllowed(JNIEnv* env,
         jclass clazz, jboolean allowed) {
     atrace_set_debuggable(allowed);
@@ -79,6 +100,12 @@
     { "nativeTraceEnd",
             "(J)V",
             (void*)android_os_Trace_nativeTraceEnd },
+    { "nativeAsyncTraceBegin",
+            "(JLjava/lang/String;I)V",
+            (void*)android_os_Trace_nativeAsyncTraceBegin },
+    { "nativeAsyncTraceEnd",
+            "(JLjava/lang/String;I)V",
+            (void*)android_os_Trace_nativeAsyncTraceEnd },
     { "nativeSetAppTracingAllowed",
             "(Z)V",
             (void*)android_os_Trace_nativeSetAppTracingAllowed },
diff --git a/docs/html/_redirects.yaml b/docs/html/_redirects.yaml
index ab0d349..3e3b12d 100644
--- a/docs/html/_redirects.yaml
+++ b/docs/html/_redirects.yaml
@@ -24,6 +24,9 @@
 - from: /sdk/installing/next.html
   to: /training/basics/firstapp/index.html
 
+- from: /sdk/ndk/overview.html
+  to: /tools/sdk/ndk/index.html
+
 - from: /sdk/ndk/...
   to: /tools/sdk/ndk/...
 
diff --git a/docs/html/google/play/billing/v2/api.jd b/docs/html/google/play/billing/v2/api.jd
index 9d3a045..7e386a2 100644
--- a/docs/html/google/play/billing/v2/api.jd
+++ b/docs/html/google/play/billing/v2/api.jd
@@ -1,4 +1,5 @@
 page.title=In-app Billing Version 2
+excludeFromSuggestions=true
 @jd:body
 
 <div style="background-color:#fffdeb;width:100%;margin-bottom:1em;padding:.5em;">In-app Billing Version 2 is superseded. Please <a href="{@docRoot}google/play/billing/billing_overview.html#migration">migrate to Version 3</a> at your earliest convenience.</div>
diff --git a/docs/html/google/play/billing/v2/billing_integrate.jd b/docs/html/google/play/billing/v2/billing_integrate.jd
index defe265..1581315 100644
--- a/docs/html/google/play/billing/v2/billing_integrate.jd
+++ b/docs/html/google/play/billing/v2/billing_integrate.jd
@@ -1,4 +1,5 @@
 page.title=Implementing In-app Billing <span style="font-size:16px;">(IAB Version 2)</span>
+excludeFromSuggestions=true
 @jd:body
 
 <div style="background-color:#fffdeb;width:100%;margin-bottom:1em;padding:.5em;">In-app Billing Version 2 is superseded. Please <a href="{@docRoot}google/play/billing/billing_overview.html#migration">migrate to Version 3</a> at your earliest convenience.</div>
diff --git a/docs/html/google/play/billing/v2/billing_reference.jd b/docs/html/google/play/billing/v2/billing_reference.jd
index 84576bc..a946295 100644
--- a/docs/html/google/play/billing/v2/billing_reference.jd
+++ b/docs/html/google/play/billing/v2/billing_reference.jd
@@ -1,4 +1,5 @@
 page.title=In-app Billing Reference <span style="font-size:16px;">(IAB Version 2)</span>
+excludeFromSuggestions=true
 @jd:body
 
 <div style="background-color:#fffdeb;width:100%;margin-bottom:1em;padding:.5em;">In-app Billing Version 2 is superseded. Please <a href="{@docRoot}google/play/billing/billing_overview.html#migration">migrate to Version 3</a> at your earliest convenience.</div>
diff --git a/docs/html/google/play/billing/v2/billing_subscriptions.jd b/docs/html/google/play/billing/v2/billing_subscriptions.jd
index 5e3bd28..3bcf212 100644
--- a/docs/html/google/play/billing/v2/billing_subscriptions.jd
+++ b/docs/html/google/play/billing/v2/billing_subscriptions.jd
@@ -1,4 +1,5 @@
 page.title=Implementing Subscriptions  <span style="font-size:16px;">(IAB Version 2)</span>
+excludeFromSuggestions=true
 @jd:body
 
 <div style="background-color:#fffdeb;width:100%;margin-bottom:1em;padding:.5em;">In-app Billing Version 2 is superseded. Please <a href="{@docRoot}google/play/billing/billing_overview.html#migration">migrate to Version 3</a> at your earliest convenience.</div>
diff --git a/docs/html/sdk/1.0_r1/index.jd b/docs/html/sdk/1.0_r1/index.jd
index b380483..dea6620 100644
--- a/docs/html/sdk/1.0_r1/index.jd
+++ b/docs/html/sdk/1.0_r1/index.jd
@@ -1,5 +1,6 @@
 page.title=Android 1.0 SDK, release 1
 sdk.redirect=true
 sdk.redirect.path=index.html
+excludeFromSuggestions=true
 
 @jd:body
diff --git a/docs/html/sdk/1.0_r1/upgrading.jd b/docs/html/sdk/1.0_r1/upgrading.jd
index d6d5dc4..d6a7ed5 100644
--- a/docs/html/sdk/1.0_r1/upgrading.jd
+++ b/docs/html/sdk/1.0_r1/upgrading.jd
@@ -1,5 +1,6 @@
 page.title=Upgrading the SDK
 sdk.version=1.0_r1
+excludeFromSuggestions=true
 @jd:body
 
 <p>For the current SDK release, see the links under <strong>Current SDK Release</strong> in the side navigation.</p>
diff --git a/docs/html/sdk/1.0_r2/index.jd b/docs/html/sdk/1.0_r2/index.jd
index c29c148..8556e3c 100644
--- a/docs/html/sdk/1.0_r2/index.jd
+++ b/docs/html/sdk/1.0_r2/index.jd
@@ -1,5 +1,6 @@
 page.title=Android 1.0 SDK, release 2
 sdk.redirect=true
 sdk.redirect.path=index.html
+excludeFromSuggestions=true
 
 @jd:body
diff --git a/docs/html/sdk/1.0_r2/upgrading.jd b/docs/html/sdk/1.0_r2/upgrading.jd
index 409e30e..243950d 100644
--- a/docs/html/sdk/1.0_r2/upgrading.jd
+++ b/docs/html/sdk/1.0_r2/upgrading.jd
@@ -1,5 +1,6 @@
 page.title=Upgrading the SDK
 sdk.version=1.0_r2
+excludeFromSuggestions=true
 @jd:body
 
 <p>For the current SDK release, see the links under <strong>Current SDK Release</strong> in the side navigation.</p>
diff --git a/docs/html/sdk/1.1_r1/index.jd b/docs/html/sdk/1.1_r1/index.jd
index 63fe51d..44231ee 100644
--- a/docs/html/sdk/1.1_r1/index.jd
+++ b/docs/html/sdk/1.1_r1/index.jd
@@ -1,5 +1,6 @@
 page.title=Android 1.1 SDK, Release 1
 sdk.redirect=true
 sdk.redirect.path=index.html
+excludeFromSuggestions=true
 
 @jd:body
diff --git a/docs/html/sdk/1.1_r1/upgrading.jd b/docs/html/sdk/1.1_r1/upgrading.jd
index bc71149..840ae6b 100644
--- a/docs/html/sdk/1.1_r1/upgrading.jd
+++ b/docs/html/sdk/1.1_r1/upgrading.jd
@@ -1,5 +1,6 @@
 page.title=Upgrading the SDK
 sdk.version=1.1_r1
+excludeFromSuggestions=true
 @jd:body
 
 <!--
diff --git a/docs/html/sdk/1.5_r1/index.jd b/docs/html/sdk/1.5_r1/index.jd
index 60dfc14..7232f57 100644
--- a/docs/html/sdk/1.5_r1/index.jd
+++ b/docs/html/sdk/1.5_r1/index.jd
@@ -1,5 +1,6 @@
 page.title=Android 1.5 SDK, Release 1
 sdk.redirect=true
 sdk.redirect.path=index.html
+excludeFromSuggestions=true
 
 @jd:body
diff --git a/docs/html/sdk/1.5_r1/upgrading.jd b/docs/html/sdk/1.5_r1/upgrading.jd
index 0a12d62..0377069 100644
--- a/docs/html/sdk/1.5_r1/upgrading.jd
+++ b/docs/html/sdk/1.5_r1/upgrading.jd
@@ -1,5 +1,6 @@
 page.title=Upgrading the SDK
 sdk.version=1.5_r1
+excludeFromSuggestions=true
 @jd:body
 
 
diff --git a/docs/html/sdk/1.5_r2/index.jd b/docs/html/sdk/1.5_r2/index.jd
index 4fb99b6..fac4f13 100644
--- a/docs/html/sdk/1.5_r2/index.jd
+++ b/docs/html/sdk/1.5_r2/index.jd
@@ -1,5 +1,6 @@
 page.title=Android 1.5 SDK, Release 2
 sdk.redirect=true
 sdk.redirect.path=index.html
+excludeFromSuggestions=true
 
 @jd:body
diff --git a/docs/html/sdk/1.5_r2/upgrading.jd b/docs/html/sdk/1.5_r2/upgrading.jd
index bb5fc60..31b2358 100644
--- a/docs/html/sdk/1.5_r2/upgrading.jd
+++ b/docs/html/sdk/1.5_r2/upgrading.jd
@@ -1,5 +1,6 @@
 page.title=Upgrading the SDK
 sdk.version=1.5_r2
+excludeFromSuggestions=true
 @jd:body
 
 
diff --git a/docs/html/sdk/1.5_r3/index.jd b/docs/html/sdk/1.5_r3/index.jd
index eb10f5e..e8cfaa1 100644
--- a/docs/html/sdk/1.5_r3/index.jd
+++ b/docs/html/sdk/1.5_r3/index.jd
@@ -1,5 +1,6 @@
 page.title=Android 1.5 SDK, Release 3
 sdk.redirect=true
 sdk.redirect.path=index.html
+excludeFromSuggestions=true
 
 @jd:body
diff --git a/docs/html/sdk/1.5_r3/upgrading.jd b/docs/html/sdk/1.5_r3/upgrading.jd
index 18c1314..62b9a78 100644
--- a/docs/html/sdk/1.5_r3/upgrading.jd
+++ b/docs/html/sdk/1.5_r3/upgrading.jd
@@ -1,6 +1,7 @@
 page.title=Upgrading the SDK
 sdk.version=1.5
 sdk.rel.id=3
+excludeFromSuggestions=true
 
 @jd:body
 
diff --git a/docs/html/sdk/1.6_r1/index.jd b/docs/html/sdk/1.6_r1/index.jd
index e7f9112..671d1cd 100644
--- a/docs/html/sdk/1.6_r1/index.jd
+++ b/docs/html/sdk/1.6_r1/index.jd
@@ -1,5 +1,6 @@
 page.title=Android 1.6 SDK, Release 1
 sdk.redirect=true
 sdk.redirect.path=index.html
+excludeFromSuggestions=true
 
 @jd:body
diff --git a/docs/html/sdk/1.6_r1/upgrading.jd b/docs/html/sdk/1.6_r1/upgrading.jd
index 49535c9..e6dded0 100644
--- a/docs/html/sdk/1.6_r1/upgrading.jd
+++ b/docs/html/sdk/1.6_r1/upgrading.jd
@@ -1,5 +1,6 @@
 page.title=Upgrading the SDK
 sdk.version=1.6
+excludeFromSuggestions=true
 @jd:body
 
 
diff --git a/docs/html/tools/sdk/OLD_RELEASENOTES.jd b/docs/html/tools/sdk/OLD_RELEASENOTES.jd
index 6865db2..b7fd12f 100644
--- a/docs/html/tools/sdk/OLD_RELEASENOTES.jd
+++ b/docs/html/tools/sdk/OLD_RELEASENOTES.jd
@@ -1,4 +1,5 @@
 page.title=Release Notes for Older SDK Versions
+excludeFromSuggestions=true
 @jd:body
 
 <div class="special">
diff --git a/docs/html/tools/sdk/RELEASENOTES.jd b/docs/html/tools/sdk/RELEASENOTES.jd
index c7ece42..cbcbb12 100644
--- a/docs/html/tools/sdk/RELEASENOTES.jd
+++ b/docs/html/tools/sdk/RELEASENOTES.jd
@@ -1,4 +1,5 @@
 page.title=SDK Release Notes
+excludeFromSuggestions=true
 @jd:body
 
 <p>This document provides version-specific information about Android SDK
diff --git a/docs/html/tools/sdk/addons.jd b/docs/html/tools/sdk/addons.jd
deleted file mode 100644
index 8c5e1ed..0000000
--- a/docs/html/tools/sdk/addons.jd
+++ /dev/null
@@ -1,9 +0,0 @@
-page.title=SDK Add-Ons
-
-@jd:body
-
-
-
-<p>A page that lists SDK addons and links to release notes. Links to dashboards etc.</p>
-
-
diff --git a/docs/html/tools/sdk/adt-notes.jd b/docs/html/tools/sdk/adt-notes.jd
deleted file mode 100644
index 291b543..0000000
--- a/docs/html/tools/sdk/adt-notes.jd
+++ /dev/null
@@ -1,5 +0,0 @@
-page.title=ADT Plugin for Eclipse
-sdk.redirect=true
-sdk.redirect.path=eclipse-adt.html
-
-@jd:body
diff --git a/docs/html/tools/sdk/adt_download.html b/docs/html/tools/sdk/adt_download.html
deleted file mode 100644
index 5ba2ef5..0000000
--- a/docs/html/tools/sdk/adt_download.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
-<head>
-<meta http-equiv="refresh" content="0;url=http://developer.android.com/sdk/eclipse-adt.html">
-<title>Redirecting...</title>
-</head>
-<body>
-<p>You should be redirected. Please <a
-href="http://developer.android.com/sdk/eclipse-adt.html">click here</a>.</p>
-</body>
-</html>
\ No newline at end of file
diff --git a/docs/html/tools/sdk/libraries.jd b/docs/html/tools/sdk/libraries.jd
deleted file mode 100644
index 9e47c4a..0000000
--- a/docs/html/tools/sdk/libraries.jd
+++ /dev/null
@@ -1,9 +0,0 @@
-page.title=Libraries
-
-@jd:body
-
-
-
-<p>A page that lists libraries and links to release notes. Links to dashboards etc.</p>
-
-
diff --git a/docs/html/tools/sdk/ndk/1.5_r1/index.jd b/docs/html/tools/sdk/ndk/1.5_r1/index.jd
index 4c70a8a..2f6764b 100644
--- a/docs/html/tools/sdk/ndk/1.5_r1/index.jd
+++ b/docs/html/tools/sdk/ndk/1.5_r1/index.jd
@@ -1,6 +1,7 @@
 page.title=Android 1.5 NDK, Release 1
 sdk.redirect=true
 sdk.redirect.path=ndk/index.html
+excludeFromSuggestions=true
 
 @jd:body
 
diff --git a/docs/html/tools/sdk/ndk/1.6_r1/index.jd b/docs/html/tools/sdk/ndk/1.6_r1/index.jd
index 090dcdc..1dc5b6f 100644
--- a/docs/html/tools/sdk/ndk/1.6_r1/index.jd
+++ b/docs/html/tools/sdk/ndk/1.6_r1/index.jd
@@ -1,5 +1,6 @@
 page.title=Android 1.6 NDK, Release 1
 sdk.redirect=true
 sdk.redirect.path=ndk/index.html
+excludeFromSuggestions=true
 
 @jd:body
diff --git a/docs/html/tools/sdk/ndk/overview.jd b/docs/html/tools/sdk/ndk/overview.jd
deleted file mode 100644
index 98ef1fc..0000000
--- a/docs/html/tools/sdk/ndk/overview.jd
+++ /dev/null
@@ -1,588 +0,0 @@
-page.title=What is the NDK?
-@jd:body
-
- <div id="qv-wrapper">
-    <div id="qv">
-      <h2>In this document</h2>
-
-      <ol>
-        <li><a href="#choosing">When to Develop in Native Code</a></li>
-        <li>
-          <a href="#contents">Contents of the NDK</a>
-          <ol>
-            <li><a href="#tools">Development tools</a></li>
-
-            <li><a href="#docs">Documentation</a></li>
-
-            <li><a href="#samples">Sample applications</a></li>
-          </ol>
-        </li>
-        <li><a href="#reqs">System and Software Requirements</a></li>
-      </ol>
-    </div>
-  </div>
-
-  <p>The Android NDK is a toolset that lets you embed components that make use of native code in
-  your Android applications.</p>
-
-  <p>Android applications run in the Dalvik virtual machine. The NDK allows you to implement parts
-  of your applications using native-code languages such as C and C++. This can provide benefits to
-  certain classes of applications, in the form of reuse of existing code and in some cases
-  increased speed.</p>
-
-  <p>The NDK provides:</p>
-
-  <ul>
-    <li>A set of tools and build files used to generate native code libraries from C and C++
-    sources</li>
-
-    <li>A way to embed the corresponding native libraries into an application package file
-    (<code>.apk</code>) that can be deployed on Android devices</li>
-
-    <li>A set of native system headers and libraries that will be supported in all future versions
-    of the Android platform, starting from Android 1.5. Applications that use native activities
-    must be run on Android 2.3 or later.</li>
-
-    <li>Documentation, samples, and tutorials</li>
-  </ul>
-
-  <p>The latest release of the NDK supports the following instruction sets:</p>
-
-  <ul>
-    <li>ARMv5TE, including Thumb-1 instructions (see {@code docs/CPU-ARCH-ABIS.html} for more
-information)</li>
-
-    <li>ARMv7-A, including Thumb-2 and VFPv3-D16 instructions, with optional support for
-    NEON/VFPv3-D32 instructions (see {@code docs/CPU-ARM-NEON.html} for more information)</li>
-
-    <li>x86 instructions (see {@code docs/CPU-X86.html} for more information)</li>
-
-    <li>MIPS instructions (see {@code docs/CPU-MIPS.html} for more information)</li>
-  </ul>
-
-  <p>ARMv5TE machine code will run on all ARM-based Android devices. ARMv7-A will run only on
-  devices such as the Verizon Droid or Google Nexus One that have a compatible CPU. The main
-  difference between the two instruction sets is that ARMv7-A supports hardware FPU, Thumb-2, and
-  NEON instructions. You can target either or both of the instruction sets &mdash; ARMv5TE is the
-  default, but switching to ARMv7-A is as easy as adding a single line to the application's
-  <code>Application.mk</code> file, without needing to change anything else in the file. You can also build for
-  both architectures at the same time and have everything stored in the final <code>.apk</code>.
-  Complete information is provided in the CPU-ARCH-ABIS.HTML in the NDK package.</p>
-
-  <p>The NDK provides stable headers for libc (the C library), libm (the Math library), OpenGL ES
-  (3D graphics library), the JNI interface, and other libraries, as listed in the <a href=
-  "#tools">Development Tools</a> section.</p>
-
-  <h2 id="choosing">When to Develop in Native Code</h2>
-
-  <p>The NDK will not benefit most applications. As a developer, you need to balance its benefits
-  against its drawbacks; notably, using native code does not result in an automatic performance
-  increase, but always increases application complexity. In general, you should only use native
-  code if it is essential to your application, not just because you prefer to program in C/C++.</p>
-
-  <p>Typical good candidates for the NDK are self-contained, CPU-intensive operations that don't
-  allocate much memory, such as signal processing, physics simulation, and so on. Simply re-coding
-  a method to run in C usually does not result in a large performance increase. When examining
-  whether or not you should develop in native code, think about your requirements and see if the
-  Android framework APIs provide the functionality that you need. The NDK can, however, can be an
-  effective way to reuse a large corpus of existing C/C++ code.</p>
-
-  <p>The Android framework provides two ways to use native code:</p>
-
-  <ul>
-    <li>Write your application using the Android framework and use JNI to access the APIs provided
-    by the Android NDK. This technique allows you to take advantage of the convenience of the
-    Android framework, but still allows you to write native code when necessary. If you use this
-    approach, your application must target specific, minimum Android platform levels, see <a
-    href="#platform-compat">Android platform compatibility</a> for more information.</li>
-
-    <li>
-      <p>Write a native activity, which allows you to implement the lifecycle callbacks in native
-      code. The Android SDK provides the {@link android.app.NativeActivity} class, which is a
-      convenience class that notifies your
-      native code of any activity lifecycle callbacks (<code>onCreate()</code>, <code>onPause()</code>,
-      <code>onResume()</code>, etc). You can implement the callbacks in your native code to handle
-      these events when they occur. Applications that use native activities must be run on Android
-      2.3 (API Level 9) or later.</p>
-
-      <p>You cannot access features such as Services and Content Providers natively, so if you want
-      to use them or any other framework API, you can still write JNI code to do so.</p>
-    </li>
-  </ul>
-
-  <h2 id="contents">Contents of the NDK</h2>The NDK contains the APIs, documentation, and sample
-  applications that help you write your native code.
-
-  <h3 id="tools">Development tools</h3>
-
-  <p>The NDK includes a set of cross-toolchains (compilers, linkers, etc..) that can generate
-  native ARM binaries on Linux, OS X, and Windows (with Cygwin) platforms.</p>
-
-  <p>It provides a set of system headers for stable native APIs that are guaranteed to be supported
-  in all later releases of the platform:</p>
-
-  <ul>
-    <li>libc (C library) headers</li>
-
-    <li>libm (math library) headers</li>
-
-    <li>JNI interface headers</li>
-
-    <li>libz (Zlib compression) headers</li>
-
-    <li>liblog (Android logging) header</li>
-
-    <li>OpenGL ES 1.1 and OpenGL ES 2.0 (3D graphics libraries) headers</li>
-
-    <li>libjnigraphics (Pixel buffer access) header (for Android 2.2 and above).</li>
-
-    <li>A Minimal set of headers for C++ support</li>
-    
-    <li>OpenSL ES native audio libraries</li>
-    
-    <li>Android native application APIS</li>
-  </ul>
-
-  <p>The NDK also provides a build system that lets you work efficiently with your sources, without
-  having to handle the toolchain/platform/CPU/ABI details. You create very short build files to
-  describe which sources to compile and which Android application will use them &mdash; the build
-  system compiles the sources and places the shared libraries directly in your application
-  project.</p>
-
-  <p class="caution"><strong>Important:</strong> With the exception of the libraries listed above,
-  native system libraries in the Android platform are <em>not</em> stable and may change in future
-  platform versions. Your applications should <em>only</em> make use of the stable native system
-  libraries provided in this NDK.</p>
-
-  <h3 id="docs">Documentation</h3>
-
-  <p>The NDK package includes a set of documentation that describes the capabilities of the NDK and
-  how to use it to create shared libraries for your Android applications. In this release, the
-  documentation is provided only in the downloadable NDK package. You can find the documentation in
-  the <code>&lt;ndk&gt;/docs/</code> directory. Included are these files (partial listing):</p>
-
-  <ul>
-    <li>
-    INSTALL.HTML &mdash; describes how to install the NDK and configure it for your host
-    system</li>
-
-    <li>OVERVIEW.HTML &mdash; provides an overview of the NDK capabilities and usage</li>
-    
-    <li>ANDROID-MK.HTML &mdash; describes the use of the Android.mk file, which defines the native
-    sources you want to compile</li>
-    
-    <li>APPLICATION-MK.HTML &mdash; describes the use of the Application.mk file, which describes
-    the native sources required by your Android application</li>    
-    <li>CPLUSPLUS-SUPPORT.HTML &mdash; describes the C++ support provided in the Android NDK</li>    
-    <li>CPU-ARCH-ABIS.HTML &mdash; a description of supported CPU architectures and how to target
-    them.</li>
-
-    <li>CPU-FEATURES.HTML &mdash; a description of the <code>cpufeatures</code> static library that
-    lets your application code detect the target device's CPU family and the optional features at
-    runtime.</li>
-
-    <li>CHANGES.HTML &mdash; a complete list of changes to the NDK across all releases.</li>
-
-    <li>DEVELOPMENT.HTML &mdash; describes how to modify the NDK and generate release packages for it</li>
-    
-    <li>HOWTO.HTML &mdash; information about common tasks associated with NDK development</li>
-    
-    <li>IMPORT-MODULE.HTML &mdash; describes how to share and reuse modules</li>
-    
-    <li>LICENSES.HTML  &mdash; information about the various open source licenses that govern the Android NDK</li>
- 
-    <li>NATIVE-ACTIVITY.HTML &mdash; describes how to implement native activities</li>
-    
-    <li>NDK-BUILD.HTML &mdash; describes the usage of the ndk-build script</li>
-
-    <li>NDK-GDB.HTML &mdash; describes how to use the native code debugger</li>
-
-    <li>PREBUILTS.HTML &mdash; information about how shared and static prebuilt libraries work </li>
-
-    <li>STANDALONE-TOOLCHAIN.HTML &mdash; describes how to use Android NDK toolchain as a standalone
-    compiler (still in beta).</li>
-    
-    <li>SYSTEM-ISSUES.HTML &mdash; known issues in the Android system images that you should be
-    aware of, if you are developing using the NDK.</li>
-
-    <li>STABLE-APIS.HTML &mdash; a complete list of the stable APIs exposed by headers in the
-    NDK.</li>
-    
-  </ul>
-
-  <p>Additionally, the package includes detailed information about the "bionic" C library provided
-  with the Android platform that you should be aware of, if you are developing using the NDK. You
-  can find the documentation in the <code>&lt;ndk&gt;/docs/system/libc/</code> directory:</p>
-
-  <ul>
-    <li>OVERVIEW.HTML &mdash; provides an overview of the "bionic" C library and the features it
-    offers.</li>
-  </ul>
-
-  <h3 id="samples">Sample applications</h3>
-
-<p>The NDK includes sample applications that illustrate how to use native code in your Android
-  applications:</p>
-
-  <ul>
-    <li><code>hello-jni</code> &mdash; a simple application that loads a string from a native
-    method implemented in a shared library and then displays it in the application UI.</li>
-
-    <li><code>two-libs</code> &mdash; a simple application that loads a shared library dynamically
-    and calls a native method provided by the library. In this case, the method is implemented in a
-    static library imported by the shared library.</li>
-
-    <li><code>san-angeles</code> &mdash; a simple application that renders 3D graphics through the
-    native OpenGL ES APIs, while managing activity lifecycle with a {@link
-    android.opengl.GLSurfaceView} object.</li>
-
-    <li><code>hello-gl2</code> &mdash; a simple application that renders a triangle using OpenGL ES
-    2.0 vertex and fragment shaders.</li>
-
-    <li><code>hello-neon</code> &mdash; a simple application that shows how to use the
-    <code>cpufeatures</code> library to check CPU capabilities at runtime, then use NEON intrinsics
-    if supported by the CPU. Specifically, the application implements two versions of a tiny
-    benchmark for a FIR filter loop, a C version and a NEON-optimized version for devices that
-    support it.</li>
-
-    <li><code>bitmap-plasma</code> &mdash; a simple application that demonstrates how to access the
-    pixel buffers of Android {@link android.graphics.Bitmap} objects from native code, and uses
-    this to generate an old-school "plasma" effect.</li>
-
-    <li><code>native-activity</code> &mdash; a simple application that demonstrates how to use the
-    native-app-glue static library to create a native activity</li>
-
-    <li><code>native-plasma</code> &mdash; a version of bitmap-plasma implemented with a native
-    activity.</li>
-  </ul>
-
-  <p>For each sample, the NDK includes the corresponding C source code and the necessary Android.mk
-  and Application.mk files. There are located under <code>&lt;ndk&gt;/samples/&lt;name&gt;/</code>
-  and their source code can be found under <code>&lt;ndk&gt;/samples/&lt;name&gt;/jni/</code>.</p>
-
-  <p>You can build the shared libraries for the sample apps by going into
-  <code>&lt;ndk&gt;/samples/&lt;name&gt;/</code> then calling the <code>ndk-build</code> command.
-  The generated shared libraries will be located under
-  <code>&lt;ndk&gt;/samples/&lt;name&gt;/libs/armeabi/</code> for (ARMv5TE machine code) and/or
-  <code>&lt;ndk&gt;/samples/&lt;name&gt;/libs/armeabi-v7a/</code> for (ARMv7 machine code).</p>
-
-  <p>Next, build the sample Android applications that use the shared libraries:</p>
-
-  <ul>
-    <li>If you are developing in Eclipse with ADT, use the New Project Wizard to create a new
-    Android project for each sample, using the "Import from Existing Source" option and importing
-    the source from <code>&lt;ndk&gt;/samples/&lt;name&gt;/</code>. Then, set up an AVD,
-    if necessary, and build/run the application in the emulator.</li>
-
-    <li>If you are developing with Ant, use the <code>android</code> tool to create the build file
-    for each of the sample projects at <code>&lt;ndk&gt;/samples/&lt;name&gt;/</code>.
-    Then set up an AVD, if necessary, build your project in the usual way, and run it in the
-    emulator.</li>    
-    
-  </ul>
-  
-  <p>For more information about developing with the Android SDK tools and what
-  you need to do to create, build, and run your applications, see
-  the <a href="{@docRoot}tools/workflow/index.html">Overview</a>
-  section for developing on Android.</p>
-
-  <h4 id="hello-jni">Exploring the hello-jni Sample</h4>
-
-  <p>The hello-jni sample is a simple demonstration on how to use JNI from an Android application.
-  The HelloJni activity receives a string from a simple C function and displays it in a
-  TextView.</p>
-
-  <p>The main components of the sample include:</p>
-
-  <ul>
-    <li>The familiar basic structure of an Android application (an <code>AndroidManifest.xml</code>
-    file, a <code>src/</code> and <code>res</code> directories, and a main activity)</li>
-
-    <li>A <code>jni/</code> directory that includes the implemented source file for the native code
-    as well as the Android.mk file</li>
-
-    <li>A <code>tests/</code> directory that contains unit test code.</li>
-  </ul>
-
-  <ol>
-    <li>Create a new project in Eclipse from the existing sample source or use the
-    <code>android</code> tool to update the project so it generates a build.xml file that you can
-    use to build the sample.
-
-      <ul>
-        <li>In Eclipse:
-
-          <ol type="a">
-            <li>Click <strong>File &gt; New Android Project...</strong></li>
-
-            <li>Select the <strong>Create project from existing source</strong> radio button.</li>
-
-            <li>Select any API level above Android 1.5.</li>
-
-            <li>In the <strong>Location</strong> field, click <strong>Browse...</strong> and select
-            the <code>&lt;ndk-root&gt;/samples/hello-jni</code> directory.</li>
-
-            <li>Click <strong>Finish</strong>.</li>
-          </ol>
-        </li>
-
-        <li>On the command line:
-
-          <ol type="a">
-            <li>Change to the <code>&lt;ndk-root&gt;/samples/hello-jni</code> directory.</li>
-
-            <li>Run the following command to generate a build.xml file:
-              <pre class="no-pretty-print">android update project -p . -s</pre>
-            </li>
-          </ol>
-        </li>
-      </ul>
-    </li>
-
-    <li>Compile the native code using the <code>ndk-build</code> command.
-      <pre class="no-pretty-print">
-cd &lt;ndk-root&gt;/samples/hello-jni
-&lt;ndk_root&gt;/ndk-build
-</pre>
-    </li>
-
-    <li>Build and install the application as you would a normal Android application. If you are
-    using Eclipse, run the application to build and install it on a device. If you are using Ant,
-    run the following commands from the project directory:
-      <pre class="no-pretty-print">
-ant debug
-adb install bin/HelloJni-debug.apk
-</pre>
-    </li>
-  </ol>
-
-  <p>When you run the application on the device, the string <code>Hello JNI</code> should appear on
-  your device. You can explore the rest of the samples that are located in the
-  <code>&lt;ndk-root&gt;/samples</code> directory for more examples on how to use the JNI.</p>
-
-  <h4 id="native-activity">Exploring the native-activity Sample Application</h4>
-
-  <p>The native-activity sample provided with the Android NDK demonstrates how to use the
-  android_native_app_glue static library. This static library makes creating a native activity
-  easier by providing you with an implementation that handles your callbacks in another thread, so
-  you do not have to worry about them blocking your main UI thread. The main parts of the sample
-  are described below:</p>
-
-  <ul>
-    <li>The familiar basic structure of an Android application (an <code>AndroidManifest.xml</code>
-    file, a <code>src/</code> and <code>res</code> directories). The AndroidManifest.xml declares
-    that the application is native and specifies the .so file of the native activity. See {@link
-    android.app.NativeActivity} for the source or see the
-    <code>&lt;ndk_root&gt;/platforms/samples/native-activity/AndroidManifest.xml</code> file.</li>
-
-    <li>A <code>jni/</code> directory contains the native activity, main.c, which uses the
-    <code>android_native_app_glue.h</code> interface to implement the activity. The Android.mk that
-    describes the native module to the build system also exists here.</li>
-  </ul>
-
-  <p>To build this sample application:</p>
-
-  <ol>
-    <li>Create a new project in Eclipse from the existing sample source or use the
-    <code>android</code> tool to update the project so it generates a build.xml file that you can
-    use to build the sample.
-
-      <ul>
-        <li>In Eclipse:
-
-          <ol type="a">
-            <li>Click <strong>File &gt; New Android Project...</strong></li>
-
-            <li>Select the <strong>Create project from existing source</strong> radio button.</li>
-
-            <li>Select any API level above Android 2.3.</li>
-
-            <li>In the <strong>Location</strong> field, click <strong>Browse...</strong> and select
-            the <code>&lt;ndk-root&gt;/samples/native-activity</code> directory.</li>
-
-            <li>Click <strong>Finish</strong>.</li>
-          </ol>
-        </li>
-
-        <li>On the command line:
-
-          <ol type="a">
-            <li>Change to the <code>&lt;ndk-root&gt;/samples/native-activity</code> directory.</li>
-
-            <li>Run the following command to generate a build.xml file:
-              <pre class="no-pretty-print">
-android update project -p . -s
-</pre>
-            </li>
-          </ol>
-        </li>
-      </ul>
-    </li>
-
-    <li>Compile the native code using the <code>ndk-build</code> command.
-      <pre class="no-pretty-print">
-cd &lt;ndk-root&gt;/platforms/samples/android-9/samples/native-activity
-&lt;ndk_root&gt;/ndk-build
-</pre>
-    </li>
-
-    <li>Build and install the application as you would a normal Android application. If you are
-    using Eclipse, run the application to build and install it on a device. If you are using Ant,
-    run the following commands in the project directory, then run the application on the device:
-      <pre class="no-pretty-print">
-ant debug
-adb install bin/NativeActivity-debug.apk
-</pre>
-    </li>
-  </ol>
-
-
-  <h2 id="reqs">System and Software Requirements</h2>
-
-  <p>The sections below describe the system and software requirements for using the Android NDK, as
-  well as platform compatibility considerations that affect appplications using libraries produced
-  with the NDK.</p>
-
-  <h4>The Android SDK</h4>
-
-  <ul>
-    <li>A complete Android SDK installation (including all dependencies) is required.</li>
-
-    <li>Android 1.5 SDK or later version is required.</li>
-  </ul>
-
-  <h4>Supported operating systems</h4>
-
-  <ul>
-    <li>Windows XP (32-bit) or Vista (32- or 64-bit)</li>
-
-    <li>Mac OS X 10.4.8 or later (x86 only)</li>
-
-    <li>Linux (32 or 64-bit; Ubuntu 8.04, or other Linux distributions using GLibc 2.7 or
-later)</li>
-  </ul>
-
-  <h4>Required development tools</h4>
-
-  <ul>
-    <li>For all development platforms, GNU Make 3.81 or later is required. Earlier versions of GNU
-    Make might work but have not been tested.</li>
-
-    <li>A recent version of awk (either GNU Awk or Nawk) is also required.</li>
-
-    <li>For Windows, <a href="http://www.cygwin.com">Cygwin</a> 1.7 or higher is required. The NDK
-    will <em>not</em> work with Cygwin 1.5 installations.</li>
-  </ul>
-
-  <h4 id="platform-compat">Android platform compatibility</h4>
-
-  <ul>
-    <li>The native libraries created by the Android NDK can only be used on devices running
-      specific minimum Android platform versions. The minimum required platform version depends on
-      the CPU architecture of the devices you are targeting. The following table details which
-      Android platform versions are compatible with native code developed for specific CPU
-      architectures.
-
-    <table style="margin:1em;">
-      <tr>
-        <th>Native Code CPU Architecture Used</th>
-        <th>Compatible Android Platform(s)</th>
-      </tr>
-
-      <tr>
-        <td>ARM, ARM-NEON</td>
-        <td>Android 1.5 (API Level 3) and higher</td>
-      </tr>
-
-      <tr>
-        <td>x86</td>
-        <td>Android 2.3 (API Level 9) and higher</td>
-      </tr>
-
-      <tr>
-        <td>MIPS</td>
-        <td>Android 2.3 (API Level 9) and higher</td>
-      </tr>
-    </table>
-
-      <p>These requirements mean you can use native libraries produced with the NDK in
-      applications that are deployable to ARM-based devices running Android 1.5 or later. If you are
-      deploying native libraries to x86 and MIPS-based devices, your application must target Android
-      2.3 or later.</p>
-    </li>
-
-    <li>To ensure compatibility, an application using a native library produced with the NDK
-    <em>must</em> declare a <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html"><code>
-      &lt;uses-sdk&gt;</code></a> element in its manifest file, with an
-      <code>android:minSdkVersion</code> attribute value of "3" or higher. For example:
-
-<pre style="margin:1em;">
-&lt;manifest&gt;
-  &lt;uses-sdk android:minSdkVersion="3" /&gt;
-  ...
-&lt;/manifest&gt;
-</pre>
-    </li>
-
-    <li>If you use this NDK to create a native library that uses the OpenGL ES APIs, the
-    application containing the library can be deployed only to devices running the minimum platform
-    versions described in the table below. To ensure compatibility, make sure that your application
-    declares the proper <code>android:minSdkVersion</code> attribute value, as shown in the
-    following table.</li>
-
-    <li style="list-style: none; display: inline">
-      <table style="margin:1em;">
-        <tr>
-          <th>OpenGL ES Version Used</th>
-
-          <th>Compatible Android Platform(s)</th>
-
-          <th>Required uses-sdk Attribute</th>
-        </tr>
-
-        <tr>
-          <td>OpenGL ES 1.1</td>
-
-          <td>Android 1.6 (API Level 4) and higher</td>
-
-          <td><code>android:minSdkVersion="4"</code></td>
-        </tr>
-
-        <tr>
-          <td>OpenGL ES 2.0</td>
-
-          <td>Android 2.0 (API Level 5) and higher</td>
-
-          <td><code>android:minSdkVersion="5"</code></td>
-        </tr>
-      </table>
-
-      <p>For more information about API Level and its relationship to Android platform versions,
-      see <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">Android API Levels</a>.</p>
-    </li>
-
-    <li>Additionally, an application using the OpenGL ES APIs should declare a
-    <code>&lt;uses-feature&gt;</code> element in its manifest, with an
-    <code>android:glEsVersion</code> attribute that specifies the minimum OpenGl ES version
-    required by the application. This ensures that Google Play will show your application only
-    to users whose devices are capable of supporting your application. For example:
-      <pre style="margin:1em;">
-&lt;manifest&gt;
-<!-- Declare that the application uses the OpenGL ES 2.0 API and is designed
-     to run only on devices that support OpenGL ES 2.0 or higher. -->
-  &lt;uses-feature android:glEsVersion="0x00020000" /&gt;
-  ...
-&lt;/manifest&gt;
-</pre>
-
-      <p>For more information, see the <a href=
-      "{@docRoot}guide/topics/manifest/uses-feature-element.html"><code>&lt;uses-feature&gt;</code></a>
-      documentation.</p>
-    </li>
-
-    <li>If you use this NDK to create a native library that uses the API to access Android {@link
-    android.graphics.Bitmap} pixel buffers or utilizes native activities, the application
-    containing the library can be deployed only to devices running Android 2.2 (API level 8) or
-    higher. To ensure compatibility, make sure that your application declares <code>&lt;uses-sdk
-    android:minSdkVersion="8" /&gt;</code> attribute value in its manifest.</li>
-  </ul>
diff --git a/docs/html/tools/sdk/older_releases.jd b/docs/html/tools/sdk/older_releases.jd
index bb274b6..94baa92 100644
--- a/docs/html/tools/sdk/older_releases.jd
+++ b/docs/html/tools/sdk/older_releases.jd
@@ -1,4 +1,5 @@
 page.title=SDK Archives
+excludeFromSuggestions=true
 @jd:body
 
 <p>This page provides a full list of archived and obsolete SDK releases,
diff --git a/docs/html/tools/sdk/platforms.jd b/docs/html/tools/sdk/platforms.jd
deleted file mode 100644
index 27e89de..0000000
--- a/docs/html/tools/sdk/platforms.jd
+++ /dev/null
@@ -1,9 +0,0 @@
-page.title=Android Development Platforms
-
-@jd:body
-
-
-
-<p>A page that lists platforms and links to release notes. Links to dashboards etc.</p>
-
-
diff --git a/docs/html/tools/sdk/tools-notes.jd b/docs/html/tools/sdk/tools-notes.jd
index 7d12184..4d8aa34 100644
--- a/docs/html/tools/sdk/tools-notes.jd
+++ b/docs/html/tools/sdk/tools-notes.jd
@@ -1,4 +1,5 @@
 page.title=SDK Tools
+excludeFromSuggestions=true
 @jd:body
 
 <p>SDK Tools is a downloadable component for the Android SDK. It includes the
diff --git a/docs/html/tools/sdk/usb-drivers.jd b/docs/html/tools/sdk/usb-drivers.jd
deleted file mode 100644
index 27e89de..0000000
--- a/docs/html/tools/sdk/usb-drivers.jd
+++ /dev/null
@@ -1,9 +0,0 @@
-page.title=Android Development Platforms
-
-@jd:body
-
-
-
-<p>A page that lists platforms and links to release notes. Links to dashboards etc.</p>
-
-
diff --git a/graphics/java/android/renderscript/Allocation.java b/graphics/java/android/renderscript/Allocation.java
index acc6b99..ea29b7d 100644
--- a/graphics/java/android/renderscript/Allocation.java
+++ b/graphics/java/android/renderscript/Allocation.java
@@ -277,14 +277,14 @@
                 throw new RSIllegalArgumentException("Invalid usage combination.");
             }
         }
-
-        // don't need to account for USAGE_SHARED Allocations
-        if ((usage & USAGE_SHARED) == 0) {
-            int numBytes = t.getCount() * t.getElement().getBytesSize();
-            rs.addAllocSizeForGC(numBytes);
-            mGCSize = numBytes;
+        if (t != null) {
+            // don't need to account for USAGE_SHARED Allocations
+            if ((usage & USAGE_SHARED) == 0) {
+                int numBytes = t.getCount() * t.getElement().getBytesSize();
+                rs.addAllocSizeForGC(numBytes);
+                mGCSize = numBytes;
+            }
         }
-
         mType = t;
         mUsage = usage;
 
@@ -355,6 +355,12 @@
             mType.updateFromNative();
             updateCacheInfo(mType);
         }
+        // don't need to account for USAGE_SHARED Allocations
+        if ((mUsage & USAGE_SHARED) == 0) {
+            int numBytes = mType.getCount() * mType.getElement().getBytesSize();
+            mRS.addAllocSizeForGC(numBytes);
+            mGCSize = numBytes;
+        }
     }
 
     /**
diff --git a/graphics/java/android/renderscript/FieldPacker.java b/graphics/java/android/renderscript/FieldPacker.java
index 0a7e882..decd0c7 100644
--- a/graphics/java/android/renderscript/FieldPacker.java
+++ b/graphics/java/android/renderscript/FieldPacker.java
@@ -16,6 +16,8 @@
 
 package android.renderscript;
 
+import android.util.Log;
+import java.util.BitSet;
 
 /**
  * Utility class for packing arguments and structures from Android system objects to
@@ -27,12 +29,14 @@
         mPos = 0;
         mLen = len;
         mData = new byte[len];
+        mAlignment = new BitSet();
     }
 
     public FieldPacker(byte[] data) {
         mPos = 0;
         mLen = data.length;
         mData = data;
+        mAlignment = new BitSet();
     }
 
     public void align(int v) {
@@ -41,10 +45,29 @@
         }
 
         while ((mPos & (v - 1)) != 0) {
+            mAlignment.flip(mPos);
             mData[mPos++] = 0;
         }
     }
 
+    public void subalign(int v) {
+        if ((v & (v - 1)) != 0) {
+            throw new RSIllegalArgumentException("argument must be a non-negative non-zero power of 2: " + v);
+        }
+
+        while ((mPos & (v - 1)) != 0) {
+            mPos--;
+        }
+
+        if (mPos > 0) {
+            while (mAlignment.get(mPos - 1) == true) {
+                mPos--;
+                mAlignment.flip(mPos);
+            }
+        }
+
+    }
+
     public void reset() {
         mPos = 0;
     }
@@ -67,12 +90,26 @@
         mData[mPos++] = v;
     }
 
+    public byte subI8() {
+        subalign(1);
+        return mData[--mPos];
+    }
+
     public void addI16(short v) {
         align(2);
         mData[mPos++] = (byte)(v & 0xff);
         mData[mPos++] = (byte)(v >> 8);
     }
 
+    public short subI16() {
+        subalign(2);
+        short v = 0;
+        v = (short)((mData[--mPos] & 0xff) << 8);
+        v = (short)(v | (short)(mData[--mPos] & 0xff));
+        return v;
+    }
+
+
     public void addI32(int v) {
         align(4);
         mData[mPos++] = (byte)(v & 0xff);
@@ -81,6 +118,17 @@
         mData[mPos++] = (byte)((v >> 24) & 0xff);
     }
 
+    public int subI32() {
+        subalign(4);
+        int v = 0;
+        v = ((mData[--mPos] & 0xff) << 24);
+        v = v | ((mData[--mPos] & 0xff) << 16);
+        v = v | ((mData[--mPos] & 0xff) << 8);
+        v = v | ((mData[--mPos] & 0xff));
+        return v;
+    }
+
+
     public void addI64(long v) {
         align(8);
         mData[mPos++] = (byte)(v & 0xff);
@@ -93,6 +141,29 @@
         mData[mPos++] = (byte)((v >> 56) & 0xff);
     }
 
+    public long subI64() {
+        subalign(8);
+        long v = 0;
+        byte x = 0;
+        x = ((mData[--mPos]));
+        v = (long)(v | (((long)x) & 0xff) << 56l);
+        x = ((mData[--mPos]));
+        v = (long)(v | (((long)x) & 0xff) << 48l);
+        x = ((mData[--mPos]));
+        v = (long)(v | (((long)x) & 0xff) << 40l);
+        x = ((mData[--mPos]));
+        v = (long)(v | (((long)x) & 0xff) << 32l);
+        x = ((mData[--mPos]));
+        v = (long)(v | (((long)x) & 0xff) << 24l);
+        x = ((mData[--mPos]));
+        v = (long)(v | (((long)x) & 0xff) << 16l);
+        x = ((mData[--mPos]));
+        v = (long)(v | (((long)x) & 0xff) << 8l);
+        x = ((mData[--mPos]));
+        v = (long)(v | (((long)x) & 0xff));
+        return v;
+    }
+
     public void addU8(short v) {
         if ((v < 0) || (v > 0xff)) {
             android.util.Log.e("rs", "FieldPacker.addU8( " + v + " )");
@@ -143,10 +214,18 @@
         addI32(Float.floatToRawIntBits(v));
     }
 
+    public float subF32() {
+        return Float.intBitsToFloat(subI32());
+    }
+
     public void addF64(double v) {
         addI64(Double.doubleToRawLongBits(v));
     }
 
+    public double subF64() {
+        return Double.longBitsToDouble(subI64());
+    }
+
     public void addObj(BaseObj obj) {
         if (obj != null) {
             addI32(obj.getID(null));
@@ -315,28 +394,195 @@
         addU64(v.w);
     }
 
+
+    public Float2 subFloat2() {
+        Float2 v = new Float2();
+        v.y = subF32();
+        v.x = subF32();
+        return v;
+    }
+    public Float3 subFloat3() {
+        Float3 v = new Float3();
+        v.z = subF32();
+        v.y = subF32();
+        v.x = subF32();
+        return v;
+    }
+    public Float4 subFloat4() {
+        Float4 v = new Float4();
+        v.w = subF32();
+        v.z = subF32();
+        v.y = subF32();
+        v.x = subF32();
+        return v;
+    }
+
+    public Double2 subDouble2() {
+        Double2 v = new Double2();
+        v.y = subF64();
+        v.x = subF64();
+        return v;
+    }
+    public Double3 subDouble3() {
+        Double3 v = new Double3();
+        v.z = subF64();
+        v.y = subF64();
+        v.x = subF64();
+        return v;
+    }
+    public Double4 subDouble4() {
+        Double4 v = new Double4();
+        v.w = subF64();
+        v.z = subF64();
+        v.y = subF64();
+        v.x = subF64();
+        return v;
+    }
+
+    public Byte2 subByte2() {
+        Byte2 v = new Byte2();
+        v.y = subI8();
+        v.x = subI8();
+        return v;
+    }
+    public Byte3 subByte3() {
+        Byte3 v = new Byte3();
+        v.z = subI8();
+        v.y = subI8();
+        v.x = subI8();
+        return v;
+    }
+    public Byte4 subByte4() {
+        Byte4 v = new Byte4();
+        v.w = subI8();
+        v.z = subI8();
+        v.y = subI8();
+        v.x = subI8();
+        return v;
+    }
+
+    public Short2 subShort2() {
+        Short2 v = new Short2();
+        v.y = subI16();
+        v.x = subI16();
+        return v;
+    }
+    public Short3 subShort3() {
+        Short3 v = new Short3();
+        v.z = subI16();
+        v.y = subI16();
+        v.x = subI16();
+        return v;
+    }
+    public Short4 subShort4() {
+        Short4 v = new Short4();
+        v.w = subI16();
+        v.z = subI16();
+        v.y = subI16();
+        v.x = subI16();
+        return v;
+    }
+
+    public Int2 subInt2() {
+        Int2 v = new Int2();
+        v.y = subI32();
+        v.x = subI32();
+        return v;
+    }
+    public Int3 subInt3() {
+        Int3 v = new Int3();
+        v.z = subI32();
+        v.y = subI32();
+        v.x = subI32();
+        return v;
+    }
+    public Int4 subInt4() {
+        Int4 v = new Int4();
+        v.w = subI32();
+        v.z = subI32();
+        v.y = subI32();
+        v.x = subI32();
+        return v;
+    }
+
+    public Long2 subLong2() {
+        Long2 v = new Long2();
+        v.y = subI64();
+        v.x = subI64();
+        return v;
+    }
+    public Long3 subLong3() {
+        Long3 v = new Long3();
+        v.z = subI64();
+        v.y = subI64();
+        v.x = subI64();
+        return v;
+    }
+    public Long4 subLong4() {
+        Long4 v = new Long4();
+        v.w = subI64();
+        v.z = subI64();
+        v.y = subI64();
+        v.x = subI64();
+        return v;
+    }
+
+
+
     public void addMatrix(Matrix4f v) {
         for (int i=0; i < v.mMat.length; i++) {
             addF32(v.mMat[i]);
         }
     }
 
+    public Matrix4f subMatrix4f() {
+        Matrix4f v = new Matrix4f();
+        for (int i = v.mMat.length - 1; i >= 0; i--) {
+            v.mMat[i] = subF32();
+        }
+        return v;
+    }
+
     public void addMatrix(Matrix3f v) {
         for (int i=0; i < v.mMat.length; i++) {
             addF32(v.mMat[i]);
         }
     }
 
+    public Matrix3f subMatrix3f() {
+        Matrix3f v = new Matrix3f();
+        for (int i = v.mMat.length - 1; i >= 0; i--) {
+            v.mMat[i] = subF32();
+        }
+        return v;
+    }
+
     public void addMatrix(Matrix2f v) {
         for (int i=0; i < v.mMat.length; i++) {
             addF32(v.mMat[i]);
         }
     }
 
+    public Matrix2f subMatrix2f() {
+        Matrix2f v = new Matrix2f();
+        for (int i = v.mMat.length - 1; i >= 0; i--) {
+            v.mMat[i] = subF32();
+        }
+        return v;
+    }
+
     public void addBoolean(boolean v) {
         addI8((byte)(v ? 1 : 0));
     }
 
+    public boolean subBoolean() {
+        byte v = subI8();
+        if (v == 1) {
+            return true;
+        }
+        return false;
+    }
+
     public final byte[] getData() {
         return mData;
     }
@@ -344,6 +590,7 @@
     private final byte mData[];
     private int mPos;
     private int mLen;
+    private BitSet mAlignment;
 
 }
 
diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java
index a49070e..7163151 100644
--- a/graphics/java/android/renderscript/RenderScript.java
+++ b/graphics/java/android/renderscript/RenderScript.java
@@ -582,31 +582,59 @@
         validate();
         rsnScriptInvokeV(mContext, id, slot, params);
     }
+
     native void rsnScriptSetVarI(int con, int id, int slot, int val);
     synchronized void nScriptSetVarI(int id, int slot, int val) {
         validate();
         rsnScriptSetVarI(mContext, id, slot, val);
     }
+    native int rsnScriptGetVarI(int con, int id, int slot);
+    synchronized int nScriptGetVarI(int id, int slot) {
+        validate();
+        return rsnScriptGetVarI(mContext, id, slot);
+    }
+
     native void rsnScriptSetVarJ(int con, int id, int slot, long val);
     synchronized void nScriptSetVarJ(int id, int slot, long val) {
         validate();
         rsnScriptSetVarJ(mContext, id, slot, val);
     }
+    native long rsnScriptGetVarJ(int con, int id, int slot);
+    synchronized long nScriptGetVarJ(int id, int slot) {
+        validate();
+        return rsnScriptGetVarJ(mContext, id, slot);
+    }
+
     native void rsnScriptSetVarF(int con, int id, int slot, float val);
     synchronized void nScriptSetVarF(int id, int slot, float val) {
         validate();
         rsnScriptSetVarF(mContext, id, slot, val);
     }
+    native float rsnScriptGetVarF(int con, int id, int slot);
+    synchronized float nScriptGetVarF(int id, int slot) {
+        validate();
+        return rsnScriptGetVarF(mContext, id, slot);
+    }
     native void rsnScriptSetVarD(int con, int id, int slot, double val);
     synchronized void nScriptSetVarD(int id, int slot, double val) {
         validate();
         rsnScriptSetVarD(mContext, id, slot, val);
     }
+    native double rsnScriptGetVarD(int con, int id, int slot);
+    synchronized double nScriptGetVarD(int id, int slot) {
+        validate();
+        return rsnScriptGetVarD(mContext, id, slot);
+    }
     native void rsnScriptSetVarV(int con, int id, int slot, byte[] val);
     synchronized void nScriptSetVarV(int id, int slot, byte[] val) {
         validate();
         rsnScriptSetVarV(mContext, id, slot, val);
     }
+    native void rsnScriptGetVarV(int con, int id, int slot, byte[] val);
+    synchronized void nScriptGetVarV(int id, int slot, byte[] val) {
+        validate();
+        rsnScriptGetVarV(mContext, id, slot, val);
+    }
     native void rsnScriptSetVarVE(int con, int id, int slot, byte[] val,
                                   int e, int[] dims);
     synchronized void nScriptSetVarVE(int id, int slot, byte[] val,
diff --git a/graphics/java/android/renderscript/Script.java b/graphics/java/android/renderscript/Script.java
index b405588..b4ba943 100644
--- a/graphics/java/android/renderscript/Script.java
+++ b/graphics/java/android/renderscript/Script.java
@@ -220,6 +220,9 @@
     public void setVar(int index, float v) {
         mRS.nScriptSetVarF(getID(mRS), index, v);
     }
+    public float getVarF(int index) {
+        return mRS.nScriptGetVarF(getID(mRS), index);
+    }
 
     /**
      * Only intended for use by generated reflected code.
@@ -230,6 +233,9 @@
     public void setVar(int index, double v) {
         mRS.nScriptSetVarD(getID(mRS), index, v);
     }
+    public double getVarD(int index) {
+        return mRS.nScriptGetVarD(getID(mRS), index);
+    }
 
     /**
      * Only intended for use by generated reflected code.
@@ -240,6 +246,10 @@
     public void setVar(int index, int v) {
         mRS.nScriptSetVarI(getID(mRS), index, v);
     }
+    public int getVarI(int index) {
+        return mRS.nScriptGetVarI(getID(mRS), index);
+    }
+
 
     /**
      * Only intended for use by generated reflected code.
@@ -250,6 +260,10 @@
     public void setVar(int index, long v) {
         mRS.nScriptSetVarJ(getID(mRS), index, v);
     }
+    public long getVarJ(int index) {
+        return mRS.nScriptGetVarJ(getID(mRS), index);
+    }
+
 
     /**
      * Only intended for use by generated reflected code.
@@ -260,6 +274,9 @@
     public void setVar(int index, boolean v) {
         mRS.nScriptSetVarI(getID(mRS), index, v ? 1 : 0);
     }
+    public boolean getVarB(int index) {
+        return mRS.nScriptGetVarI(getID(mRS), index) > 0 ? true : false;
+    }
 
     /**
      * Only intended for use by generated reflected code.
@@ -293,6 +310,10 @@
         mRS.nScriptSetVarVE(getID(mRS), index, v.getData(), e.getID(mRS), dims);
     }
 
+    public void getVarV(int index, FieldPacker v) {
+        mRS.nScriptGetVarV(getID(mRS), index, v.getData());
+    }
+
     public void setTimeZone(String timeZone) {
         mRS.validate();
         try {
diff --git a/graphics/jni/android_renderscript_RenderScript.cpp b/graphics/jni/android_renderscript_RenderScript.cpp
index 460a516..b9f8713 100644
--- a/graphics/jni/android_renderscript_RenderScript.cpp
+++ b/graphics/jni/android_renderscript_RenderScript.cpp
@@ -987,6 +987,15 @@
     rsScriptSetVarI(con, (RsScript)script, slot, val);
 }
 
+static jint
+nScriptGetVarI(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot)
+{
+    LOG_API("nScriptGetVarI, con(%p), s(%p), slot(%i)", con, (void *)script, slot);
+    int value = 0;
+    rsScriptGetVarV(con, (RsScript)script, slot, &value, sizeof(value));
+    return value;
+}
+
 static void
 nScriptSetVarObj(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot, jint val)
 {
@@ -1001,6 +1010,15 @@
     rsScriptSetVarJ(con, (RsScript)script, slot, val);
 }
 
+static jlong
+nScriptGetVarJ(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot)
+{
+    LOG_API("nScriptGetVarJ, con(%p), s(%p), slot(%i)", con, (void *)script, slot);
+    jlong value = 0;
+    rsScriptGetVarV(con, (RsScript)script, slot, &value, sizeof(value));
+    return value;
+}
+
 static void
 nScriptSetVarF(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot, float val)
 {
@@ -1008,6 +1026,15 @@
     rsScriptSetVarF(con, (RsScript)script, slot, val);
 }
 
+static jfloat
+nScriptGetVarF(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot)
+{
+    LOG_API("nScriptGetVarF, con(%p), s(%p), slot(%i)", con, (void *)script, slot);
+    jfloat value = 0;
+    rsScriptGetVarV(con, (RsScript)script, slot, &value, sizeof(value));
+    return value;
+}
+
 static void
 nScriptSetVarD(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot, double val)
 {
@@ -1015,6 +1042,15 @@
     rsScriptSetVarD(con, (RsScript)script, slot, val);
 }
 
+static jdouble
+nScriptGetVarD(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot)
+{
+    LOG_API("nScriptGetVarD, con(%p), s(%p), slot(%i)", con, (void *)script, slot);
+    jdouble value = 0;
+    rsScriptGetVarV(con, (RsScript)script, slot, &value, sizeof(value));
+    return value;
+}
+
 static void
 nScriptSetVarV(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot, jbyteArray data)
 {
@@ -1026,6 +1062,16 @@
 }
 
 static void
+nScriptGetVarV(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot, jbyteArray data)
+{
+    LOG_API("nScriptSetVarV, con(%p), s(%p), slot(%i)", con, (void *)script, slot);
+    jint len = _env->GetArrayLength(data);
+    jbyte *ptr = _env->GetByteArrayElements(data, NULL);
+    rsScriptGetVarV(con, (RsScript)script, slot, ptr, len);
+    _env->ReleaseByteArrayElements(data, ptr, JNI_ABORT);
+}
+
+static void
 nScriptSetVarVE(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot, jbyteArray data, jint elem, jintArray dims)
 {
     LOG_API("nScriptSetVarVE, con(%p), s(%p), slot(%i)", con, (void *)script, slot);
@@ -1600,10 +1646,15 @@
 {"rsnScriptForEachClipped",          "(IIIIIIIIIII)V",                        (void*)nScriptForEachClipped },
 {"rsnScriptForEachClipped",          "(IIIII[BIIIIII)V",                      (void*)nScriptForEachClippedV },
 {"rsnScriptSetVarI",                 "(IIII)V",                               (void*)nScriptSetVarI },
+{"rsnScriptGetVarI",                 "(III)I",                                (void*)nScriptGetVarI },
 {"rsnScriptSetVarJ",                 "(IIIJ)V",                               (void*)nScriptSetVarJ },
+{"rsnScriptGetVarJ",                 "(III)J",                                (void*)nScriptGetVarJ },
 {"rsnScriptSetVarF",                 "(IIIF)V",                               (void*)nScriptSetVarF },
+{"rsnScriptGetVarF",                 "(III)F",                                (void*)nScriptGetVarF },
 {"rsnScriptSetVarD",                 "(IIID)V",                               (void*)nScriptSetVarD },
+{"rsnScriptGetVarD",                 "(III)D",                                (void*)nScriptGetVarD },
 {"rsnScriptSetVarV",                 "(III[B)V",                              (void*)nScriptSetVarV },
+{"rsnScriptGetVarV",                 "(III[B)V",                              (void*)nScriptGetVarV },
 {"rsnScriptSetVarVE",                "(III[BI[I)V",                           (void*)nScriptSetVarVE },
 {"rsnScriptSetVarObj",               "(IIII)V",                               (void*)nScriptSetVarObj },
 
diff --git a/services/java/com/android/server/pm/UserManagerService.java b/services/java/com/android/server/pm/UserManagerService.java
index 3ef9370..df90a56 100644
--- a/services/java/com/android/server/pm/UserManagerService.java
+++ b/services/java/com/android/server/pm/UserManagerService.java
@@ -622,6 +622,8 @@
                         UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES);
                 writeBoolean(serializer, restrictions, UserManager.DISALLOW_CONFIG_BLUETOOTH);
                 writeBoolean(serializer, restrictions, UserManager.DISALLOW_USB_FILE_TRANSFER);
+                writeBoolean(serializer, restrictions, UserManager.DISALLOW_CONFIG_CREDENTIALS);
+                writeBoolean(serializer, restrictions, UserManager.DISALLOW_REMOVE_USER);
                 serializer.endTag(null, TAG_RESTRICTIONS);
             }
             serializer.endTag(null, TAG_USER);
@@ -742,6 +744,8 @@
                                 UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES);
                         readBoolean(parser, restrictions, UserManager.DISALLOW_CONFIG_BLUETOOTH);
                         readBoolean(parser, restrictions, UserManager.DISALLOW_USB_FILE_TRANSFER);
+                        readBoolean(parser, restrictions, UserManager.DISALLOW_CONFIG_CREDENTIALS);
+                        readBoolean(parser, restrictions, UserManager.DISALLOW_REMOVE_USER);
                     }
                 }
             }