Merge "Add demo-mode command to hide notification icons."
diff --git a/core/java/android/content/ClipDescription.java b/core/java/android/content/ClipDescription.java
index 5cb6e77..be35f08 100644
--- a/core/java/android/content/ClipDescription.java
+++ b/core/java/android/content/ClipDescription.java
@@ -87,7 +87,7 @@
     /**
      * Helper to compare two MIME types, where one may be a pattern.
      * @param concreteType A fully-specified MIME type.
-     * @param desiredType A desired MIME type that may be a pattern such as *\/*.
+     * @param desiredType A desired MIME type that may be a pattern such as */*.
      * @return Returns true if the two MIME types match.
      */
     public static boolean compareMimeTypes(String concreteType, String desiredType) {
diff --git a/core/java/android/content/ContentProvider.java b/core/java/android/content/ContentProvider.java
index ddde3fb..9d0ab3a 100644
--- a/core/java/android/content/ContentProvider.java
+++ b/core/java/android/content/ContentProvider.java
@@ -1328,7 +1328,7 @@
      *
      * @param uri The data in the content provider being queried.
      * @param mimeTypeFilter The type of data the client desires.  May be
-     * a pattern, such as *\/* to retrieve all possible data types.
+     * a pattern, such as */* to retrieve all possible data types.
      * @return Returns {@code null} if there are no possible data streams for the
      * given mimeTypeFilter.  Otherwise returns an array of all available
      * concrete MIME types.
@@ -1366,7 +1366,7 @@
      *
      * @param uri The data in the content provider being queried.
      * @param mimeTypeFilter The type of data the client desires.  May be
-     * a pattern, such as *\/*, if the caller does not have specific type
+     * a pattern, such as */*, if the caller does not have specific type
      * requirements; in this case the content provider will pick its best
      * type matching the pattern.
      * @param opts Additional options from the client.  The definitions of
@@ -1427,7 +1427,7 @@
      *
      * @param uri The data in the content provider being queried.
      * @param mimeTypeFilter The type of data the client desires.  May be
-     * a pattern, such as *\/*, if the caller does not have specific type
+     * a pattern, such as */*, if the caller does not have specific type
      * requirements; in this case the content provider will pick its best
      * type matching the pattern.
      * @param opts Additional options from the client.  The definitions of
diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java
index 018e4c5..3fc933d 100644
--- a/core/java/android/content/ContentResolver.java
+++ b/core/java/android/content/ContentResolver.java
@@ -344,7 +344,7 @@
      * @param url A Uri identifying content (either a list or specific type),
      * using the content:// scheme.
      * @param mimeTypeFilter The desired MIME type.  This may be a pattern,
-     * such as *\/*, to query for all available MIME types that match the
+     * such as */*, to query for all available MIME types that match the
      * pattern.
      * @return Returns an array of MIME type strings for all available
      * data streams that match the given mimeTypeFilter.  If there are none,
@@ -812,7 +812,7 @@
      *
      * <p>Note that if this function is called for read-only input (mode is "r")
      * on a content: URI, it will instead call {@link #openTypedAssetFileDescriptor}
-     * for you with a MIME type of "*\/*".  This allows such callers to benefit
+     * for you with a MIME type of "*&#47;*".  This allows such callers to benefit
      * from any built-in data conversion that a provider implements.
      *
      * @param uri The desired URI to open.
@@ -865,7 +865,7 @@
      *
      * <p>Note that if this function is called for read-only input (mode is "r")
      * on a content: URI, it will instead call {@link #openTypedAssetFileDescriptor}
-     * for you with a MIME type of "*\/*".  This allows such callers to benefit
+     * for you with a MIME type of "*&#47;*".  This allows such callers to benefit
      * from any built-in data conversion that a provider implements.
      *
      * @param uri The desired URI to open.
@@ -990,7 +990,7 @@
      *
      * @param uri The desired URI to open.
      * @param mimeType The desired MIME type of the returned data.  This can
-     * be a pattern such as *\/*, which will allow the content provider to
+     * be a pattern such as *&#47;*, which will allow the content provider to
      * select a type, though there is no way for you to determine what type
      * it is returning.
      * @param opts Additional provider-dependent options.
@@ -1023,7 +1023,7 @@
      *
      * @param uri The desired URI to open.
      * @param mimeType The desired MIME type of the returned data.  This can
-     * be a pattern such as *\/*, which will allow the content provider to
+     * be a pattern such as *&#47;*, which will allow the content provider to
      * select a type, though there is no way for you to determine what type
      * it is returning.
      * @param opts Additional provider-dependent options.
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index ba7db76..9f3b682 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -847,7 +847,7 @@
      * {@link #FLAG_GRANT_WRITE_URI_PERMISSION}, then these flags will also be
      * set in the returned chooser intent, with its ClipData set appropriately:
      * either a direct reflection of {@link #getClipData()} if that is non-null,
-     * or a new ClipData build from {@link #getData()}.
+     * or a new ClipData built from {@link #getData()}.
      *
      * @param target The Intent that the user will be selecting an activity
      * to perform.
@@ -5440,7 +5440,7 @@
      * directly used by Intent.  Applications should generally rely on the
      * MIME type of the Intent itself, not what it may find in the ClipData.
      * A common practice is to construct a ClipData for use with an Intent
-     * with a MIME type of "*\/*".
+     * with a MIME type of "*&#47;*".
      *
      * @param clip The new clip to set.  May be null to clear the current clip.
      */
diff --git a/core/java/android/os/AsyncTask.java b/core/java/android/os/AsyncTask.java
index d4a3006..26e09b6 100644
--- a/core/java/android/os/AsyncTask.java
+++ b/core/java/android/os/AsyncTask.java
@@ -610,7 +610,7 @@
      * still running. Each call to this method will trigger the execution of
      * {@link #onProgressUpdate} on the UI thread.
      *
-     * {@link #onProgressUpdate} will note be called if the task has been
+     * {@link #onProgressUpdate} will not be called if the task has been
      * canceled.
      *
      * @param values The progress values to update the UI with.
diff --git a/core/java/android/widget/PopupWindow.java b/core/java/android/widget/PopupWindow.java
index e77a810..6e71a5c 100644
--- a/core/java/android/widget/PopupWindow.java
+++ b/core/java/android/widget/PopupWindow.java
@@ -1329,7 +1329,7 @@
     
     /**
      * Updates the state of the popup window, if it is currently being displayed,
-     * from the currently set state.  This include:
+     * from the currently set state.  This includes:
      * {@link #setClippingEnabled(boolean)}, {@link #setFocusable(boolean)},
      * {@link #setIgnoreCheekPress()}, {@link #setInputMethodMode(int)},
      * {@link #setTouchable(boolean)}, and {@link #setAnimationStyle(int)}.
diff --git a/core/res/res/values/themes_device_defaults.xml b/core/res/res/values/themes_device_defaults.xml
index 7936482..8dac95c 100644
--- a/core/res/res/values/themes_device_defaults.xml
+++ b/core/res/res/values/themes_device_defaults.xml
@@ -38,10 +38,10 @@
          to a device’s native theme with all device customizations intact.</p>
          <p>For example, when you set your app's {@code targetSdkVersion} to 20 or higher, this
          theme is applied to your application by default. As such, your app might appear with the
-         {@link #Theme_Quantum.Light Quantum.Light} styles on one device, but with a different set of styles on
+         {@link #Theme_Quantum_Light Quantum.Light} styles on one device, but with a different set of styles on
          another device. This is great if you want your app to fit with the device's native look and
          feel. If, however, you prefer to keep your UI style the same across all devices, you should
-         apply a specific theme such as {@link #Theme_Quantum.Light Quantum.Light} or one of your own design.
+         apply a specific theme such as {@link #Theme_Quantum_Light Quantum.Light} or one of your own design.
          For more information, read <a
          href="http://android-developers.blogspot.com/20XX/XX/quantum-everywhere.html">Quantum.Light
          Everywhere</a>.</p>
diff --git a/docs/html/google/play/billing/billing_integrate.jd b/docs/html/google/play/billing/billing_integrate.jd
index 949752a..dba43cd 100644
--- a/docs/html/google/play/billing/billing_integrate.jd
+++ b/docs/html/google/play/billing/billing_integrate.jd
@@ -174,7 +174,7 @@
 <h3 id="QueryDetails">Querying for Items Available for Purchase</h3>
 <p>In your application, you can query the item details from Google Play using the In-app Billing Version 3 API. To pass a request to the In-app Billing service, first create a {@link android.os.Bundle}  that contains a String {@link java.util.ArrayList} of product IDs with key "ITEM_ID_LIST", where each string is a product ID for an purchasable item.</p>
 <pre>
-ArrayList<String> skuList = new ArrayList<String>();
+ArrayList&lt;String&gt; skuList = new ArrayList&lt;String&gt; ();
 skuList.add("premiumUpgrade");
 skuList.add("gas");
 Bundle querySkus = new Bundle();
@@ -196,7 +196,7 @@
 <pre>
 int response = skuDetails.getInt("RESPONSE_CODE");
 if (response == 0) {
-   ArrayList<String> responseList 
+   ArrayList&lt;String&gt; responseList
       = skuDetails.getStringArrayList("DETAILS_LIST");
    
    for (String thisResponse : responseList) {
@@ -282,11 +282,11 @@
 <pre>
 int response = ownedItems.getInt("RESPONSE_CODE");
 if (response == 0) {
-   ArrayList<String> ownedSkus = 
+   ArrayList&lt;String&gt; ownedSkus =
       ownedItems.getStringArrayList("INAPP_PURCHASE_ITEM_LIST");
-   ArrayList<String> purchaseDataList = 
+   ArrayList&lt;String&gt;  purchaseDataList =
       ownedItems.getStringArrayList("INAPP_PURCHASE_DATA_LIST");
-   ArrayList<String> signatureList = 
+   ArrayList&lt;String&gt;  signatureList =
       ownedItems.getStringArrayList("INAPP_DATA_SIGNATURE");
    String continuationToken = 
       ownedItems.getString("INAPP_CONTINUATION_TOKEN");
diff --git a/docs/html/guide/topics/manifest/application-element.jd b/docs/html/guide/topics/manifest/application-element.jd
index 6bfa3dc..46500aa 100644
--- a/docs/html/guide/topics/manifest/application-element.jd
+++ b/docs/html/guide/topics/manifest/application-element.jd
@@ -40,6 +40,7 @@
 <dt>can contain:</dt>
 <dd><code><a href="{@docRoot}guide/topics/manifest/activity-element.html">&lt;activity&gt;</a></code>
 <br/><code><a href="{@docRoot}guide/topics/manifest/activity-alias-element.html">&lt;activity-alias&gt;</a></code>
+<br/><code><a href="{@docRoot}guide/topics/manifest/meta-data-element.html">&lt;meta-data&gt;</a></code>
 <br/><code><a href="{@docRoot}guide/topics/manifest/service-element.html">&lt;service&gt;</a></code>
 <br/><code><a href="{@docRoot}guide/topics/manifest/receiver-element.html">&lt;receiver&gt;</a></code>
 <br/><code><a href="{@docRoot}guide/topics/manifest/provider-element.html">&lt;provider&gt;</a></code>
diff --git a/docs/html/guide/topics/manifest/meta-data-element.jd b/docs/html/guide/topics/manifest/meta-data-element.jd
index 56a214c..ee80c84 100644
--- a/docs/html/guide/topics/manifest/meta-data-element.jd
+++ b/docs/html/guide/topics/manifest/meta-data-element.jd
@@ -12,8 +12,10 @@
 <dt>contained in:</dt>
 <dd><code><a href="{@docRoot}guide/topics/manifest/activity-element.html">&lt;activity&gt;</a></code>
 <br/><code><a href="{@docRoot}guide/topics/manifest/activity-alias-element.html">&lt;activity-alias&gt;</a></code>
-<br/><code><a href="{@docRoot}guide/topics/manifest/service-element.html">&lt;service&gt;</a></code>
+<br/><code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code>
+<br/><code><a href="{@docRoot}guide/topics/manifest/provider-element.html">&lt;provider&gt;</a></code>
 <br/><code><a href="{@docRoot}guide/topics/manifest/receiver-element.html">&lt;receiver&gt;</a></code></dd>
+<br/><code><a href="{@docRoot}guide/topics/manifest/service-element.html">&lt;service&gt;</a></code>
 
 <dt>description:</dt>
 <dd>A name-value pair for an item of additional, arbitrary data that can 
diff --git a/docs/html/guide/topics/ui/dialogs.jd b/docs/html/guide/topics/ui/dialogs.jd
index 4754d11..0c6ec84 100644
--- a/docs/html/guide/topics/ui/dialogs.jd
+++ b/docs/html/guide/topics/ui/dialogs.jd
@@ -281,7 +281,7 @@
 &#64;Override
 public Dialog onCreateDialog(Bundle savedInstanceState) {
     AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
-    builder.setTitle(R.string.pick_color);
+    builder.setTitle(R.string.pick_color)
            .setItems(R.array.colors_array, new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int which) {
                // The 'which' argument contains the index position
diff --git a/docs/html/legal.jd b/docs/html/legal.jd
index 1698af0f..aaa3c39 100644
--- a/docs/html/legal.jd
+++ b/docs/html/legal.jd
@@ -88,16 +88,12 @@
 href="http://www.android.com/us/developer-content-policy.html#showlanguages">Developer Program
 Policies</a></p></dd>
 
-  <dt>Google Maps API</dt>
-    <dd>The Android Maps APIs are a collection of services (including, but not limited to, the
-MapView and MapActivity classes) that allow you to include
-maps, geocoding, geolocation, and other content from Google and its content providers in your
-Android
-apps. If you want to develop an Android app that displays Google Maps data, you must agree
-to the terms of service, register, and get an API Key. Registration is free.    
+  <dt>Google Maps Android API</dt>
+    <dd>The Google Maps Android API is a collection of services that allow you
+      to include maps, geocoding, geolocation, and other content from Google and its content providers in your Android apps. If you want to develop an Android app that makes use of this API you must agree to the terms of service and obtain an API Key.
       <p><a
-href="https://developers.google.com/maps/documentation/android/maps-api-signup"
->Google Maps Android API Key Signup</a>, <a href="http://m.google.com/legalnotices">Mobile Legal
+href="https://developers.google.com/maps/documentation/android/start"
+>Google Maps Android API Getting Started</a>, <a href="http://m.google.com/legalnotices">Mobile Legal
 Notices</a></p>
     </dd>
 
diff --git a/docs/html/tools/help/uiautomator/UiSelector.jd b/docs/html/tools/help/uiautomator/UiSelector.jd
index c9a1eed..6d5b4e4 100644
--- a/docs/html/tools/help/uiautomator/UiSelector.jd
+++ b/docs/html/tools/help/uiautomator/UiSelector.jd
@@ -472,7 +472,7 @@
         <span class="sympad"><a href="#resourceIdMatches(java.lang.String)">resourceIdMatches</a></span>(String regex)</nobr>
 
         <div class="jd-descrdiv">Set the search criteria to match the resource ID
- of the widget, using a regular expression.http://blog.bettersoftwaretesting.com/</div>
+ of the widget, using a regular expression.</div>
 
   </td></tr>
 
diff --git a/docs/html/training/in-app-billing/preparing-iab-app.jd b/docs/html/training/in-app-billing/preparing-iab-app.jd
index 4698cf7..47fcbbd 100644
--- a/docs/html/training/in-app-billing/preparing-iab-app.jd
+++ b/docs/html/training/in-app-billing/preparing-iab-app.jd
@@ -30,7 +30,7 @@
 </div>
 </div>
 
-<p>Before you can start using the In-app Billing service, you'll need to add the library that contains the In-app Billing Version 3 API to your Android project. You also need to setting the permissions for your application to communicate with Google Play. In addition, you'll need to establish a connection between your application and  Google Play. You should also verify that the In-app Billing API version that you are using in your application is supported by Google Play.</p>
+<p>Before you can start using the In-app Billing service, you'll need to add the library that contains the In-app Billing Version 3 API to your Android project. You also need to set the permissions for your application to communicate with Google Play. In addition, you'll need to establish a connection between your application and  Google Play. You should also verify that the In-app Billing API version that you are using in your application is supported by Google Play.</p>
 
 <h2 id="GetSample">Download the Sample Application</h2>
 <p>In this training class, you will use a reference implementation for the In-app Billing Version 3 API called the {@code TrivialDrive} sample application. The sample includes convenience classes to quickly set up the In-app Billing service, marshal and unmarshal data types, and handle In-app Billing requests from the main thread of your application.</p>
diff --git a/libs/hwui/DisplayList.cpp b/libs/hwui/DisplayList.cpp
index 6b28efe..4e811ec 100644
--- a/libs/hwui/DisplayList.cpp
+++ b/libs/hwui/DisplayList.cpp
@@ -17,6 +17,7 @@
 #define ATRACE_TAG ATRACE_TAG_VIEW
 
 #include <SkCanvas.h>
+#include <algorithm>
 
 #include <utils/Trace.h>
 
@@ -504,7 +505,7 @@
 
 void DisplayList::computeOrderingImpl(
         DrawDisplayListOp* opState,
-        KeyedVector<float, Vector<DrawDisplayListOp*> >* compositedChildrenOf3dRoot,
+        Vector<ZDrawDisplayListOpPair>* compositedChildrenOf3dRoot,
         const mat4* transformFrom3dRoot) {
 
     // TODO: should avoid this calculation in most cases
@@ -512,19 +513,15 @@
     opState->mTransformFrom3dRoot.multiply(opState->mTransformFromParent);
 
     if (mTranslationZ != 0.0f) { // TODO: other signals, such as custom 4x4 matrix
-        // composited layer, insert into current 3d root and flag for out of order draw
+        // composited layer, flag for out of order draw...
         opState->mSkipInOrderDraw = true;
 
+        // ... and insert into current 3d root, keyed with pivot z for later sorting
         Vector3 pivot(mPivotX, mPivotY, 0.0f);
         mat4 totalTransform(opState->mTransformFrom3dRoot);
         applyViewPropertyTransforms(totalTransform);
         totalTransform.mapPoint3d(pivot);
-        const float key = pivot.z;
-
-        if (compositedChildrenOf3dRoot->indexOfKey(key) < 0) {
-            compositedChildrenOf3dRoot->add(key, Vector<DrawDisplayListOp*>());
-        }
-        compositedChildrenOf3dRoot->editValueFor(key).push(opState);
+        compositedChildrenOf3dRoot->add(ZDrawDisplayListOpPair(pivot.z, opState));
     } else {
         // standard in order draw
         opState->mSkipInOrderDraw = false;
@@ -599,8 +596,8 @@
 void DisplayList::iterate3dChildren(ChildrenSelectMode mode, OpenGLRenderer& renderer,
         T& handler, const int level) {
     if (m3dNodes.size() == 0 ||
-            (mode == kNegativeZChildren && m3dNodes.keyAt(0) > 0.0f) ||
-            (mode == kPositiveZChildren && m3dNodes.keyAt(m3dNodes.size() - 1) < 0.0f)) {
+            (mode == kNegativeZChildren && m3dNodes[0].key > 0.0f) ||
+            (mode == kPositiveZChildren && m3dNodes[m3dNodes.size() - 1].key < 0.0f)) {
         // nothing to draw
         return;
     }
@@ -612,34 +609,32 @@
     int rootRestoreTo = renderer.save(SkCanvas::kMatrix_SaveFlag | SkCanvas::kClip_SaveFlag);
 
     for (size_t i = 0; i < m3dNodes.size(); i++) {
-        const float zValue = m3dNodes.keyAt(i);
+        const float zValue = m3dNodes[i].key;
+        DrawDisplayListOp* op = m3dNodes[i].value;
 
         if (mode == kPositiveZChildren && zValue < 0.0f) continue;
         if (mode == kNegativeZChildren && zValue > 0.0f) break;
 
-        const Vector<DrawDisplayListOp*>& nodesAtZ = m3dNodes[i];
-        for (size_t j = 0; j < nodesAtZ.size(); j++) {
-            DrawDisplayListOp* op = nodesAtZ[j];
-            if (mode == kPositiveZChildren) {
-                /* draw shadow on renderer with parent matrix applied, passing in the child's total matrix
-                 *
-                 * TODO:
-                 * -determine and pass background shape (and possibly drawable alpha)
-                 * -view must opt-in to shadows
-                 * -consider shadows for other content
-                 */
-                mat4 shadowMatrix(op->mTransformFrom3dRoot);
-                op->mDisplayList->applyViewPropertyTransforms(shadowMatrix);
-                DisplayListOp* shadowOp  = new (alloc) DrawShadowOp(shadowMatrix, op->mDisplayList->mAlpha,
-                        op->mDisplayList->getWidth(), op->mDisplayList->getHeight());
-                handler(shadowOp, PROPERTY_SAVECOUNT, mClipToBounds);
-            }
-
-            renderer.concatMatrix(op->mTransformFrom3dRoot);
-            op->mSkipInOrderDraw = false; // this is horrible, I'm so sorry everyone
-            handler(op, renderer.getSaveCount() - 1, mClipToBounds);
-            op->mSkipInOrderDraw = true;
+        if (mode == kPositiveZChildren && zValue > 0.0f) {
+            /* draw shadow with parent matrix applied, passing in the child's total matrix
+             *
+             * TODO:
+             * -determine and pass background shape (and possibly drawable alpha)
+             * -view must opt-in to shadows
+             * -consider shadows for other content
+             */
+            mat4 shadowMatrix(op->mTransformFrom3dRoot);
+            op->mDisplayList->applyViewPropertyTransforms(shadowMatrix);
+            DisplayListOp* shadowOp  = new (alloc) DrawShadowOp(shadowMatrix,
+                    op->mDisplayList->mAlpha,
+                    op->mDisplayList->getWidth(), op->mDisplayList->getHeight());
+            handler(shadowOp, PROPERTY_SAVECOUNT, mClipToBounds);
         }
+
+        renderer.concatMatrix(op->mTransformFrom3dRoot);
+        op->mSkipInOrderDraw = false; // this is horrible, I'm so sorry everyone
+        handler(op, renderer.getSaveCount() - 1, mClipToBounds);
+        op->mSkipInOrderDraw = true;
     }
     handler(new (alloc) RestoreToCountOp(rootRestoreTo), PROPERTY_SAVECOUNT, mClipToBounds);
 }
@@ -683,6 +678,9 @@
 
     bool quickRejected = mClipToBounds && renderer.quickRejectConservative(0, 0, mWidth, mHeight);
     if (!quickRejected) {
+        // Z sort 3d children (stable-ness makes z compare fall back to standard drawing order)
+        std::stable_sort(m3dNodes.begin(), m3dNodes.end());
+
         // for 3d root, draw children with negative z values
         iterate3dChildren(kNegativeZChildren, renderer, handler, level);
 
diff --git a/libs/hwui/DisplayList.h b/libs/hwui/DisplayList.h
index 204a131..d3113a3 100644
--- a/libs/hwui/DisplayList.h
+++ b/libs/hwui/DisplayList.h
@@ -90,7 +90,8 @@
 class DeferStateStruct : public PlaybackStateStruct {
 public:
     DeferStateStruct(DeferredDisplayList& deferredList, OpenGLRenderer& renderer, int replayFlags)
-            : PlaybackStateStruct(renderer, replayFlags, &(deferredList.mAllocator)), mDeferredList(deferredList) {}
+            : PlaybackStateStruct(renderer, replayFlags, &(deferredList.mAllocator)),
+            mDeferredList(deferredList) {}
 
     DeferredDisplayList& mDeferredList;
 };
@@ -143,7 +144,6 @@
         kReplayFlag_ClipChildren = 0x1
     };
 
-
     ANDROID_API size_t getSize();
     ANDROID_API static void destroyDisplayListDeferred(DisplayList* displayList);
     ANDROID_API static void outputLogBuffer(int fd);
@@ -501,6 +501,8 @@
     }
 
 private:
+    typedef key_value_pair_t<float, DrawDisplayListOp*> ZDrawDisplayListOpPair;
+
     enum ChildrenSelectMode {
         kNegativeZChildren,
         kPositiveZChildren
@@ -520,7 +522,7 @@
     void applyViewPropertyTransforms(mat4& matrix);
 
     void computeOrderingImpl(DrawDisplayListOp* opState,
-            KeyedVector<float, Vector<DrawDisplayListOp*> >* compositedChildrenOf3dRoot,
+            Vector<ZDrawDisplayListOpPair>* compositedChildrenOf3dRoot,
             const mat4* transformFromRoot);
 
     template <class T>
@@ -607,7 +609,7 @@
      */
 
     // for 3d roots, contains a z sorted list of all children items
-    KeyedVector<float, Vector<DrawDisplayListOp*> > m3dNodes; // TODO: good data structure
+    Vector<ZDrawDisplayListOpPair> m3dNodes;
 }; // class DisplayList
 
 }; // namespace uirenderer
diff --git a/media/jni/android_media_MediaPlayer.cpp b/media/jni/android_media_MediaPlayer.cpp
index 4be9cd6..5e3fb1a 100644
--- a/media/jni/android_media_MediaPlayer.cpp
+++ b/media/jni/android_media_MediaPlayer.cpp
@@ -826,16 +826,19 @@
         jstring exclusionListObj = (jstring)env->CallObjectMethod(
                 proxyProps, fields.proxyConfigGetExclusionList);
 
-        const char *exclusionList =
-            env->GetStringUTFChars(exclusionListObj, NULL);
-
         if (host != NULL && exclusionListObj != NULL) {
-            thisplayer->updateProxyConfig(host, port, exclusionList);
-        }
+            const char *exclusionList = env->GetStringUTFChars(exclusionListObj, NULL);
 
-        if (exclusionList != NULL) {
-            env->ReleaseStringUTFChars(exclusionListObj, exclusionList);
-            exclusionList = NULL;
+            if (exclusionList != NULL) {
+                thisplayer->updateProxyConfig(host, port, exclusionList);
+
+                env->ReleaseStringUTFChars(exclusionListObj, exclusionList);
+                exclusionList = NULL;
+            } else {
+                thisplayer->updateProxyConfig(host, port, "");
+            }
+        } else if (host != NULL) {
+            thisplayer->updateProxyConfig(host, port, "");
         }
 
         if (host != NULL) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java
index cb17ac6..eb63a54 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java
@@ -37,6 +37,8 @@
     private static final boolean DEBUG = false;
     private static final boolean DEBUG_COLORS = false;
 
+    public static final boolean HIGH_END = ActivityManager.isHighEndGfx();
+
     public static final int MODE_OPAQUE = 0;
     public static final int MODE_SEMI_TRANSPARENT = 1;
     public static final int MODE_TRANSLUCENT = 2;
@@ -48,7 +50,6 @@
 
     private final String mTag;
     private final View mView;
-    private final boolean mSupportsTransitions = ActivityManager.isHighEndGfx();
     private final BarBackgroundDrawable mBarBackground;
 
     private int mMode;
@@ -57,7 +58,7 @@
         mTag = "BarTransitions." + view.getClass().getSimpleName();
         mView = view;
         mBarBackground = new BarBackgroundDrawable(mView.getContext(), gradientResourceId);
-        if (mSupportsTransitions) {
+        if (HIGH_END) {
             mView.setBackground(mBarBackground);
         }
     }
@@ -67,18 +68,22 @@
     }
 
     public void transitionTo(int mode, boolean animate) {
+        // low-end devices do not support translucent modes, fallback to opaque
+        if (!HIGH_END && (mode == MODE_SEMI_TRANSPARENT || mode == MODE_TRANSLUCENT)) {
+            mode = MODE_OPAQUE;
+        }
         if (mMode == mode) return;
         int oldMode = mMode;
         mMode = mode;
         if (DEBUG) Log.d(mTag, String.format("%s -> %s animate=%s",
                 modeToString(oldMode), modeToString(mode),  animate));
-        if (mSupportsTransitions) {
-            onTransition(oldMode, mMode, animate);
-        }
+        onTransition(oldMode, mMode, animate);
     }
 
     protected void onTransition(int oldMode, int newMode, boolean animate) {
-        applyModeBackground(oldMode, newMode, animate);
+        if (HIGH_END) {
+            applyModeBackground(oldMode, newMode, animate);
+        }
     }
 
     protected void applyModeBackground(int oldMode, int newMode, boolean animate) {