Merge "Issue proper parameters to root() calls for RS."
diff --git a/cmds/dumpstate/dumpstate.c b/cmds/dumpstate/dumpstate.c
index c2beb74..836cf15 100644
--- a/cmds/dumpstate/dumpstate.c
+++ b/cmds/dumpstate/dumpstate.c
@@ -79,6 +79,7 @@
     dump_file("VMALLOC INFO", "/proc/vmallocinfo");
     dump_file("SLAB INFO", "/proc/slabinfo");
     dump_file("ZONEINFO", "/proc/zoneinfo");
+    dump_file("PAGETYPEINFO", "/proc/pagetypeinfo");
 
     if (screenshot_path[0]) {
         LOGI("taking screenshot\n");
diff --git a/core/java/android/content/pm/ResolveInfo.java b/core/java/android/content/pm/ResolveInfo.java
index 74e756b..bcd599b 100644
--- a/core/java/android/content/pm/ResolveInfo.java
+++ b/core/java/android/content/pm/ResolveInfo.java
@@ -113,7 +113,12 @@
      * containing the resolved component.
      */
     public String resolvePackageName;
-    
+
+    /**
+     * @hide Target comes from system process?
+     */
+    public boolean system;
+
     /**
      * Retrieve the current textual label associated with this resolution.  This
      * will call back on the given PackageManager to load the label from
@@ -261,6 +266,7 @@
         TextUtils.writeToParcel(nonLocalizedLabel, dest, parcelableFlags);
         dest.writeInt(icon);
         dest.writeString(resolvePackageName);
+        dest.writeInt(system ? 1 : 0);
     }
 
     public static final Creator<ResolveInfo> CREATOR
@@ -300,6 +306,7 @@
                 = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(source);
         icon = source.readInt();
         resolvePackageName = source.readString();
+        system = source.readInt() != 0;
     }
     
     public static class DisplayNameComparator
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java
index d3dbb8d..879c441 100644
--- a/core/java/android/hardware/Camera.java
+++ b/core/java/android/hardware/Camera.java
@@ -2406,13 +2406,16 @@
         }
 
         /**
-         * Sets the white balance.
+         * Sets the white balance. Changing the setting will release the
+         * auto-white balance lock.
          *
          * @param value new white balance.
          * @see #getWhiteBalance()
+         * @see #setAutoWhiteBalanceLock()
          */
         public void setWhiteBalance(String value) {
             set(KEY_WHITE_BALANCE, value);
+            set(KEY_AUTO_WHITEBALANCE_LOCK, FALSE);
         }
 
         /**
@@ -2823,6 +2826,9 @@
          * set the lock to false. However, the lock can be re-enabled before
          * preview is re-started to keep the same white balance parameters.</p>
          *
+         * <p> Changing the white balance mode with {@link #setWhiteBalance}
+         * will release the auto-white balance lock if it is set.</p>
+         *
          * <p>Exposure compensation, in conjunction with re-enabling the AE and
          * AWB locks after each still capture, can be used to capture an
          * exposure-bracketed burst of images, for example. Auto-white balance
@@ -2845,6 +2851,7 @@
          *        auto-white balance routine is free to run normally.
          *
          * @see #getAutoWhiteBalanceLock()
+         * @see #setWhiteBalance(String)
          */
         public void setAutoWhiteBalanceLock(boolean toggle) {
             set(KEY_AUTO_WHITEBALANCE_LOCK, toggle ? TRUE : FALSE);
diff --git a/core/java/android/view/VolumePanel.java b/core/java/android/view/VolumePanel.java
index cb85e5f..e1aa9a4 100644
--- a/core/java/android/view/VolumePanel.java
+++ b/core/java/android/view/VolumePanel.java
@@ -101,6 +101,8 @@
     /** Dialog's content view */
     private final View mView;
 
+    /** The visible portion of the volume overlay */
+    private final ViewGroup mPanel;
     /** Contains the sliders and their touchable icons */
     private final ViewGroup mSliderGroup;
     /** The button that expands the dialog to show all sliders */
@@ -173,10 +175,23 @@
         View view = mView = inflater.inflate(R.layout.volume_adjust, null);
         mView.setOnTouchListener(new View.OnTouchListener() {
             public boolean onTouch(View v, MotionEvent event) {
+                // Dismiss the dialog if the user touches outside the visible area. This is not
+                // handled by the usual dialog dismissing code because there is a region above
+                // the panel (marginTop) that is still within the dialog.
+                if (event.getAction() == MotionEvent.ACTION_DOWN) {
+                    int x = (int) event.getX();
+                    int y = (int) event.getY();
+                    if (x < mPanel.getLeft() || x > mPanel.getRight() || y < mPanel.getTop()
+                            || y > mPanel.getBottom()) {
+                        forceTimeout();
+                        return true;
+                    }
+                }
                 resetTimeout();
                 return true;
             }
         });
+        mPanel = (ViewGroup) mView.findViewById(R.id.visible_panel);
         mSliderGroup = (ViewGroup) mView.findViewById(R.id.slider_group);
         mMoreButton = (ImageView) mView.findViewById(R.id.expand_button);
         mDivider = (ImageView) mView.findViewById(R.id.expand_button_divider);
@@ -639,6 +654,11 @@
         sendMessageDelayed(obtainMessage(MSG_TIMEOUT), TIMEOUT_DELAY);
     }
 
+    private void forceTimeout() {
+        removeMessages(MSG_TIMEOUT);
+        sendMessage(obtainMessage(MSG_TIMEOUT));
+    }
+
     public void onProgressChanged(SeekBar seekBar, int progress,
             boolean fromUser) {
         final Object tag = seekBar.getTag();
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java
index 642aa22..77f6776 100644
--- a/core/java/android/webkit/WebSettings.java
+++ b/core/java/android/webkit/WebSettings.java
@@ -1807,7 +1807,9 @@
      * @hide
      */
     public void setProperty(String key, String value) {
-        mWebView.nativeSetProperty(key, value);
+        if (mWebView.nativeSetProperty(key, value)) {
+            mWebView.contentInvalidateAll();
+        }
     }
 
     /**
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 17dfbe05..5d776fd 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -9278,6 +9278,6 @@
      */
     private native boolean  nativeScrollLayer(int layer, int newX, int newY);
     private native int      nativeGetBackgroundColor();
-    native void     nativeSetProperty(String key, String value);
+    native boolean  nativeSetProperty(String key, String value);
     native String   nativeGetProperty(String key);
 }
diff --git a/core/java/android/widget/ActivityChooserView.java b/core/java/android/widget/ActivityChooserView.java
index 45d73af..6a84626 100644
--- a/core/java/android/widget/ActivityChooserView.java
+++ b/core/java/android/widget/ActivityChooserView.java
@@ -156,7 +156,7 @@
      * @param attrs A collection of attributes.
      */
     public ActivityChooserView(Context context, AttributeSet attrs) {
-        this(context, attrs, R.attr.actionButtonStyle);
+        this(context, attrs, 0);
     }
 
     /**
diff --git a/core/java/com/android/internal/app/ActionBarImpl.java b/core/java/com/android/internal/app/ActionBarImpl.java
index 31360e1..cfecca5 100644
--- a/core/java/com/android/internal/app/ActionBarImpl.java
+++ b/core/java/com/android/internal/app/ActionBarImpl.java
@@ -111,6 +111,9 @@
                 mContentView.setTranslationY(0);
                 mContainerView.setTranslationY(0);
             }
+            if (mSplitView != null && mContextDisplayMode == CONTEXT_DISPLAY_SPLIT) {
+                mSplitView.setVisibility(View.GONE);
+            }
             mContainerView.setVisibility(View.GONE);
             mContainerView.setTransitioning(false);
             mCurrentShowAnim = null;
@@ -540,6 +543,7 @@
             }
             if (mSplitView != null && mContextDisplayMode == CONTEXT_DISPLAY_SPLIT) {
                 mSplitView.setAlpha(0);
+                mSplitView.setVisibility(View.VISIBLE);
                 b.with(ObjectAnimator.ofFloat(mSplitView, "alpha", 1));
             }
             anim.addListener(mShowListener);
diff --git a/core/java/com/android/internal/view/menu/ActionMenuPresenter.java b/core/java/com/android/internal/view/menu/ActionMenuPresenter.java
index 5c42579..df4243a 100644
--- a/core/java/com/android/internal/view/menu/ActionMenuPresenter.java
+++ b/core/java/com/android/internal/view/menu/ActionMenuPresenter.java
@@ -19,6 +19,7 @@
 import com.android.internal.view.menu.ActionMenuView.ActionMenuChildView;
 
 import android.content.Context;
+import android.content.res.Configuration;
 import android.content.res.Resources;
 import android.os.Parcel;
 import android.os.Parcelable;
@@ -109,6 +110,16 @@
         mScrapActionButtonView = null;
     }
 
+    public void onConfigurationChanged(Configuration newConfig) {
+        if (!mMaxItemsSet) {
+            mMaxItems = mContext.getResources().getInteger(
+                    com.android.internal.R.integer.max_action_buttons);
+            if (mMenu != null) {
+                mMenu.onItemsChanged(true);
+            }
+        }
+    }
+
     public void setWidthLimit(int width, boolean strict) {
         mWidthLimit = width;
         mStrictWidthLimit = strict;
@@ -391,7 +402,6 @@
                 final boolean inGroup = seenGroups.get(groupId);
                 boolean isAction = (maxActions > 0 || inGroup) && widthLimit > 0 &&
                         (!mStrictWidthLimit || cellsRemaining > 0);
-                maxActions--;
 
                 if (isAction) {
                     View v = getItemView(item, mScrapActionButtonView, parent);
@@ -430,11 +440,15 @@
                     for (int j = 0; j < i; j++) {
                         MenuItemImpl areYouMyGroupie = visibleItems.get(j);
                         if (areYouMyGroupie.getGroupId() == groupId) {
+                            // Give back the action slot
+                            if (areYouMyGroupie.isActionButton()) maxActions++;
                             areYouMyGroupie.setIsActionButton(false);
                         }
                     }
                 }
 
+                if (isAction) maxActions--;
+
                 item.setIsActionButton(isAction);
             }
         }
diff --git a/core/java/com/android/internal/view/menu/MenuBuilder.java b/core/java/com/android/internal/view/menu/MenuBuilder.java
index 5e70e4c..5622b44 100644
--- a/core/java/com/android/internal/view/menu/MenuBuilder.java
+++ b/core/java/com/android/internal/view/menu/MenuBuilder.java
@@ -567,7 +567,7 @@
             }
         }
 
-        if (changedAtLeastOneItem) onItemsChanged(false);
+        if (changedAtLeastOneItem) onItemsChanged(true);
     }
 
     public void setGroupEnabled(int group, boolean enabled) {
@@ -929,6 +929,7 @@
      * 
      * @param structureChanged true if the menu structure changed,
      *                         false if only item properties changed.
+     *                         (Visibility is a structural property since it affects layout.)
      */
     void onItemsChanged(boolean structureChanged) {
         if (!mPreventDispatchingItemsChanged) {
@@ -971,7 +972,7 @@
     void onItemVisibleChanged(MenuItemImpl item) {
         // Notify of items being changed
         mIsVisibleItemsStale = true;
-        onItemsChanged(false);
+        onItemsChanged(true);
     }
     
     /**
@@ -981,7 +982,7 @@
     void onItemActionRequestChanged(MenuItemImpl item) {
         // Notify of items being changed
         mIsActionItemsStale = true;
-        onItemsChanged(false);
+        onItemsChanged(true);
     }
     
     ArrayList<MenuItemImpl> getVisibleItems() {
diff --git a/core/java/com/android/internal/view/menu/MenuItemImpl.java b/core/java/com/android/internal/view/menu/MenuItemImpl.java
index 8b53bb8..04147ab 100644
--- a/core/java/com/android/internal/view/menu/MenuItemImpl.java
+++ b/core/java/com/android/internal/view/menu/MenuItemImpl.java
@@ -585,7 +585,7 @@
     public MenuItem setActionProvider(ActionProvider actionProvider) {
         mActionView = null;
         mActionProvider = actionProvider;
-        mMenu.onItemsChanged(false);
+        mMenu.onItemsChanged(true); // Measurement can be changed
         return this;
     }
 
diff --git a/core/java/com/android/internal/widget/ActionBarContextView.java b/core/java/com/android/internal/widget/ActionBarContextView.java
index 5645a6f..45d38ae 100644
--- a/core/java/com/android/internal/widget/ActionBarContextView.java
+++ b/core/java/com/android/internal/widget/ActionBarContextView.java
@@ -25,6 +25,7 @@
 import android.animation.AnimatorSet;
 import android.animation.ObjectAnimator;
 import android.content.Context;
+import android.content.res.Configuration;
 import android.content.res.TypedArray;
 import android.graphics.drawable.Drawable;
 import android.text.TextUtils;
@@ -92,6 +93,14 @@
         a.recycle();
     }
 
+    @Override
+    public void onConfigurationChanged(Configuration newConfig) {
+        super.onConfigurationChanged(newConfig);
+        if (mActionMenuPresenter != null) {
+            mActionMenuPresenter.onConfigurationChanged(newConfig);
+        }
+    }
+
     public void setHeight(int height) {
         mContentHeight = height;
     }
diff --git a/core/java/com/android/internal/widget/ActionBarView.java b/core/java/com/android/internal/widget/ActionBarView.java
index 792766b..28181ba 100644
--- a/core/java/com/android/internal/widget/ActionBarView.java
+++ b/core/java/com/android/internal/widget/ActionBarView.java
@@ -34,14 +34,12 @@
 import android.content.pm.PackageManager;
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.res.Configuration;
-import android.content.res.Resources;
 import android.content.res.TypedArray;
 import android.graphics.drawable.Drawable;
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.text.TextUtils;
 import android.util.AttributeSet;
-import android.util.DisplayMetrics;
 import android.util.Log;
 import android.view.CollapsibleActionView;
 import android.view.Gravity;
@@ -52,7 +50,6 @@
 import android.view.ViewGroup;
 import android.view.ViewParent;
 import android.view.Window;
-import android.view.ViewGroup.LayoutParams;
 import android.widget.AdapterView;
 import android.widget.FrameLayout;
 import android.widget.ImageView;
@@ -88,7 +85,7 @@
     private int mContentHeight;
 
     private int mNavigationMode;
-    private int mDisplayOptions = ActionBar.DISPLAY_SHOW_HOME | ActionBar.DISPLAY_HOME_AS_UP;
+    private int mDisplayOptions = -1;
     private CharSequence mTitle;
     private CharSequence mSubtitle;
     private Drawable mIcon;
@@ -262,6 +259,9 @@
                 com.android.internal.R.attr.actionBarStyle, 0);
         setContentHeight(a.getLayoutDimension(R.styleable.ActionBar_height, 0));
         a.recycle();
+        if (mActionMenuPresenter != null) {
+            mActionMenuPresenter.onConfigurationChanged(newConfig);
+        }
     }
 
     @Override
@@ -514,7 +514,7 @@
     }
 
     public void setDisplayOptions(int options) {
-        final int flagsChanged = options ^ mDisplayOptions;
+        final int flagsChanged = mDisplayOptions == -1 ? -1 : options ^ mDisplayOptions;
         mDisplayOptions = options;
 
         if ((flagsChanged & DISPLAY_RELAYOUT_MASK) != 0) {
@@ -737,8 +737,9 @@
         }
 
         addView(mTitleLayout);
-        if (mExpandedActionView != null) {
-            // Don't show while in expanded mode
+        if (mExpandedActionView != null ||
+                (TextUtils.isEmpty(mTitle) && TextUtils.isEmpty(mSubtitle))) {
+            // Don't show while in expanded mode or with empty text
             mTitleLayout.setVisibility(GONE);
         }
     }
diff --git a/core/jni/android_util_Binder.cpp b/core/jni/android_util_Binder.cpp
index b432d65..b8f2d6f 100644
--- a/core/jni/android_util_Binder.cpp
+++ b/core/jni/android_util_Binder.cpp
@@ -385,7 +385,8 @@
 {
 public:
     JavaDeathRecipient(JNIEnv* env, jobject object, const sp<DeathRecipientList>& list)
-        : mVM(jnienv_to_javavm(env)), mObject(env->NewGlobalRef(object)), mList(list)
+        : mVM(jnienv_to_javavm(env)), mObject(env->NewGlobalRef(object)),
+          mObjectWeak(NULL), mList(list)
     {
         // These objects manage their own lifetimes so are responsible for final bookkeeping.
         // The list holds a strong reference to this object.
@@ -398,16 +399,23 @@
 
     void binderDied(const wp<IBinder>& who)
     {
-        JNIEnv* env = javavm_to_jnienv(mVM);
-
         LOGDEATH("Receiving binderDied() on JavaDeathRecipient %p\n", this);
+        if (mObject != NULL) {
+            JNIEnv* env = javavm_to_jnienv(mVM);
 
-        env->CallStaticVoidMethod(gBinderProxyOffsets.mClass,
-            gBinderProxyOffsets.mSendDeathNotice, mObject);
-        jthrowable excep = env->ExceptionOccurred();
-        if (excep) {
-            report_exception(env, excep,
-                "*** Uncaught exception returned from death notification!");
+            env->CallStaticVoidMethod(gBinderProxyOffsets.mClass,
+                    gBinderProxyOffsets.mSendDeathNotice, mObject);
+            jthrowable excep = env->ExceptionOccurred();
+            if (excep) {
+                report_exception(env, excep,
+                        "*** Uncaught exception returned from death notification!");
+            }
+
+            // Demote from strong ref to weak after binderDied() has been delivered,
+            // to allow the DeathRecipient and BinderProxy to be GC'd if no longer needed.
+            mObjectWeak = env->NewWeakGlobalRef(mObject);
+            env->DeleteGlobalRef(mObject);
+            mObject = NULL;
         }
     }
 
@@ -423,8 +431,17 @@
     }
 
     bool matches(jobject obj) {
+        bool result;
         JNIEnv* env = javavm_to_jnienv(mVM);
-        return env->IsSameObject(obj, mObject);
+
+        if (mObject != NULL) {
+            result = env->IsSameObject(obj, mObject);
+        } else {
+            jobject me = env->NewLocalRef(mObjectWeak);
+            result = env->IsSameObject(obj, me);
+            env->DeleteLocalRef(me);
+        }
+        return result;
     }
 
 protected:
@@ -433,12 +450,17 @@
         //LOGI("Removing death ref: recipient=%p\n", mObject);
         android_atomic_dec(&gNumDeathRefs);
         JNIEnv* env = javavm_to_jnienv(mVM);
-        env->DeleteGlobalRef(mObject);
+        if (mObject != NULL) {
+            env->DeleteGlobalRef(mObject);
+        } else {
+            env->DeleteWeakGlobalRef(mObjectWeak);
+        }
     }
 
 private:
-    JavaVM* const   mVM;
-    jobject const   mObject;
+    JavaVM* const mVM;
+    jobject mObject;
+    jweak mObjectWeak; // will be a weak ref to the same VM-side DeathRecipient after binderDied()
     wp<DeathRecipientList> mList;
 };
 
@@ -512,7 +534,7 @@
     if (val->checkSubclass(&gBinderOffsets)) {
         // One of our own!
         jobject object = static_cast<JavaBBinder*>(val.get())->object();
-        //printf("objectForBinder %p: it's our own %p!\n", val.get(), object);
+        LOGDEATH("objectForBinder %p: it's our own %p!\n", val.get(), object);
         return object;
     }
 
@@ -528,7 +550,7 @@
             LOGV("objectForBinder %p: found existing %p!\n", val.get(), res);
             return res;
         }
-        LOGV("Proxy object %p of IBinder %p no longer in working set!!!", object, val.get());
+        LOGDEATH("Proxy object %p of IBinder %p no longer in working set!!!", object, val.get());
         android_atomic_dec(&gNumProxyRefs);
         val->detachObject(&gBinderProxyOffsets);
         env->DeleteGlobalRef(object);
diff --git a/core/res/res/drawable-hdpi/overscroll_glow.png b/core/res/res/drawable-hdpi/overscroll_glow.png
index 5963c00..8f0c2cb 100644
--- a/core/res/res/drawable-hdpi/overscroll_glow.png
+++ b/core/res/res/drawable-hdpi/overscroll_glow.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/overscroll_glow.png b/core/res/res/drawable-mdpi/overscroll_glow.png
index e63e465..8389ef4 100644
--- a/core/res/res/drawable-mdpi/overscroll_glow.png
+++ b/core/res/res/drawable-mdpi/overscroll_glow.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/overscroll_glow.png b/core/res/res/drawable-xhdpi/overscroll_glow.png
index 227565e..75c3eb4 100644
--- a/core/res/res/drawable-xhdpi/overscroll_glow.png
+++ b/core/res/res/drawable-xhdpi/overscroll_glow.png
Binary files differ
diff --git a/core/res/res/layout/activity_chooser_view.xml b/core/res/res/layout/activity_chooser_view.xml
index 5d82a97..82e1f83 100644
--- a/core/res/res/layout/activity_chooser_view.xml
+++ b/core/res/res/layout/activity_chooser_view.xml
@@ -22,7 +22,8 @@
     android:layout_height="wrap_content"
     android:layout_gravity="center"
     android:gravity="center"
-    style="?android:attr/actionButtonStyle">
+    style="?android:attr/actionButtonStyle"
+    android:padding="0dip">
 
     <FrameLayout
         android:id="@+id/default_activity_button"
@@ -31,7 +32,7 @@
         android:layout_gravity="center"
         android:focusable="true"
         android:addStatesFromChildren="true"
-        android:background="?android:attr/selectableItemBackground">
+        android:background="?android:attr/actionBarItemBackground">
 
         <ImageView android:id="@+id/image"
             android:layout_width="32dip"
@@ -53,7 +54,7 @@
         android:layout_gravity="center"
         android:focusable="true"
         android:addStatesFromChildren="true"
-        android:background="?android:attr/selectableItemBackground">
+        android:background="?android:attr/actionBarItemBackground">
 
         <ImageView android:id="@+id/image"
             android:layout_width="32dip"
diff --git a/core/res/res/layout/volume_adjust.xml b/core/res/res/layout/volume_adjust.xml
index 7303003..ea4e1f9 100644
--- a/core/res/res/layout/volume_adjust.xml
+++ b/core/res/res/layout/volume_adjust.xml
@@ -18,6 +18,7 @@
     android:layout_width="480dp"
     android:layout_height="wrap_content">
     <LinearLayout
+        android:id="@+id/visible_panel"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_marginTop="80dp"
diff --git a/core/res/res/values-port/dimens.xml b/core/res/res/values-w360dp/dimens.xml
similarity index 94%
copy from core/res/res/values-port/dimens.xml
copy to core/res/res/values-w360dp/dimens.xml
index bf0a342..0f5d656 100644
--- a/core/res/res/values-port/dimens.xml
+++ b/core/res/res/values-w360dp/dimens.xml
@@ -20,5 +20,5 @@
     <!-- The maximum number of action buttons that should be permitted within
          an action bar/action mode. This will be used to determine how many
          showAsAction="ifRoom" items can fit. "always" items can override this. -->
-    <integer name="max_action_buttons">2</integer>
+    <integer name="max_action_buttons">3</integer>
 </resources>
diff --git a/core/res/res/values-port/dimens.xml b/core/res/res/values-w500dp/dimens.xml
similarity index 94%
rename from core/res/res/values-port/dimens.xml
rename to core/res/res/values-w500dp/dimens.xml
index bf0a342..68841ca 100644
--- a/core/res/res/values-port/dimens.xml
+++ b/core/res/res/values-w500dp/dimens.xml
@@ -20,5 +20,5 @@
     <!-- The maximum number of action buttons that should be permitted within
          an action bar/action mode. This will be used to determine how many
          showAsAction="ifRoom" items can fit. "always" items can override this. -->
-    <integer name="max_action_buttons">2</integer>
+    <integer name="max_action_buttons">4</integer>
 </resources>
diff --git a/core/res/res/values-port/dimens.xml b/core/res/res/values-w600dp/dimens.xml
similarity index 94%
copy from core/res/res/values-port/dimens.xml
copy to core/res/res/values-w600dp/dimens.xml
index bf0a342..83c45b5 100644
--- a/core/res/res/values-port/dimens.xml
+++ b/core/res/res/values-w600dp/dimens.xml
@@ -20,5 +20,5 @@
     <!-- The maximum number of action buttons that should be permitted within
          an action bar/action mode. This will be used to determine how many
          showAsAction="ifRoom" items can fit. "always" items can override this. -->
-    <integer name="max_action_buttons">2</integer>
+    <integer name="max_action_buttons">5</integer>
 </resources>
diff --git a/core/res/res/values/arrays.xml b/core/res/res/values/arrays.xml
index fe5ace8..04e510b 100644
--- a/core/res/res/values/arrays.xml
+++ b/core/res/res/values/arrays.xml
@@ -236,11 +236,8 @@
        <item>@drawable/spinner_dropdown_background_up</item>
        <item>@drawable/spinner_focused_holo_dark</item>
        <item>@drawable/spinner_focused_holo_light</item>
-       <item>@drawable/spinner_normal</item>
-       <item>@drawable/spinner_press</item>
        <item>@drawable/spinner_pressed_holo_dark</item>
        <item>@drawable/spinner_pressed_holo_light</item>
-       <item>@drawable/spinner_select</item>
        <item>@drawable/cab_background_bottom_holo_dark</item>
        <item>@drawable/cab_background_top_holo_light</item>
        <item>@drawable/cab_background_bottom_holo_light</item>
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index 83e86939..c522c1e 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -28,7 +28,7 @@
     <!-- The maximum number of action buttons that should be permitted within
          an action bar/action mode. This will be used to determine how many
          showAsAction="ifRoom" items can fit. "always" items can override this. -->
-    <integer name="max_action_buttons">3</integer>
+    <integer name="max_action_buttons">2</integer>
     <dimen name="toast_y_offset">64dip</dimen>
     <!-- Height of the status bar -->
     <dimen name="status_bar_height">25dip</dimen>
diff --git a/docs/html/guide/topics/graphics/opengl.jd b/docs/html/guide/topics/graphics/opengl.jd
index 2edc63d..b750858 100644
--- a/docs/html/guide/topics/graphics/opengl.jd
+++ b/docs/html/guide/topics/graphics/opengl.jd
@@ -14,7 +14,7 @@
         </ol>
       <li><a href="#manifest">Declaring OpenGL Requirements</a></li>
       </li>
-      <li><a href="#coordinate-mapping">Coordinate Mapping for Drawn Objects</a>  
+      <li><a href="#coordinate-mapping">Mapping Coordinates for Drawn Objects</a>  
         <ol>
           <li><a href="#proj-es1">Projection and camera in ES 1.0</a></li>
           <li><a href="#proj-es1">Projection and camera in ES 2.0</a></li>
@@ -197,9 +197,9 @@
   installed on devices that do not support OpenGL ES 2.0.</p>
   </li>
   <li><strong>Texture compression requirements</strong> - If your application uses texture
-compression formats that are not supported by all devices, you must declare them in your manifest
-file using <a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">
-{@code &lt;supports-gl-texture&gt;}</a>. For more information about available texture compression
+compression formats, you must declare the formats your application supports in your manifest file
+using <a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code
+&lt;supports-gl-texture&gt;}</a>. For more information about available texture compression
 formats, see <a href="#textures">Texture compression support</a>. 
 
 <p>Declaring texture compression requirements in your manifest hides your application from users
@@ -212,7 +212,7 @@
 </ul>
 
 
-<h2 id="coordinate-mapping">Coordinate Mapping for Drawn Objects</h2>
+<h2 id="coordinate-mapping">Mapping Coordinates for Drawn Objects</h2>
 
 <p>One of the basic problems in displaying graphics on Android devices is that their screens can
 vary in size and shape. OpenGL assumes a square, uniform coordinate system and, by default, happily
@@ -241,9 +241,11 @@
 <ol>
 <li><strong>Projection matrix</strong> - Create a projection matrix using the geometry of the
 device screen in order to recalculate object coordinates so they are drawn with correct proportions.
-The following example code demonstrates how to modify the {@code onSurfaceChanged()} method of a
-{@link android.opengl.GLSurfaceView.Renderer} implementation to create a projection matrix based on
-the screen's aspect ratio and apply it to the OpenGL rendering environment.
+The following example code demonstrates how to modify the {@link
+android.opengl.GLSurfaceView.Renderer#onSurfaceChanged(javax.microedition.khronos.opengles.GL10,
+int, int) onSurfaceChanged()} method of a {@link android.opengl.GLSurfaceView.Renderer}
+implementation to create a projection matrix based on the screen's aspect ratio and apply it to the
+OpenGL rendering environment.
 
 <pre>
   public void onSurfaceChanged(GL10 gl, int width, int height) {
@@ -260,11 +262,13 @@
 
 <li><strong>Camera transformation matrix</strong> - Once you have adjusted the coordinate system
 using a projection matrix, you must also apply a camera view. The following example code shows how
-to modify the {@code onDrawFrame()} method of a {@link android.opengl.GLSurfaceView.Renderer}
-implementation to apply a model view and use the {@link
-android.opengl.GLU#gluLookAt(javax.microedition.khronos.opengles.GL10, float, float, float, float,
-float, float, float, float, float) GLU.gluLookAt()} utility to create a viewing tranformation which
-simulates a camera position.
+to modify the {@link        
+android.opengl.GLSurfaceView.Renderer#onDrawFrame(javax.microedition.khronos.opengles.GL10)
+onDrawFrame()} method of a {@link android.opengl.GLSurfaceView.Renderer}
+implementation to apply a model view and use the
+{@link android.opengl.GLU#gluLookAt(javax.microedition.khronos.opengles.GL10, float, float, float,
+float, float, float, float, float, float) GLU.gluLookAt()} utility to create a viewing tranformation
+which simulates a camera position.
 
 <pre>
     public void onDrawFrame(GL10 gl) {
@@ -320,8 +324,10 @@
 </li>
 <li><strong>Access the shader matrix</strong> - After creating a hook in your vertex shaders to
 apply projection and camera view, you can then access that variable to apply projection and
-camera viewing matrices. The following code shows how to modify the {@code onSurfaceCreated()}
-method of a {@link android.opengl.GLSurfaceView.Renderer} implementation to access the matrix
+camera viewing matrices. The following code shows how to modify the {@link
+android.opengl.GLSurfaceView.Renderer#onSurfaceCreated(javax.microedition.khronos.opengles.GL10,
+javax.microedition.khronos.egl.EGLConfig) onSurfaceCreated()} method of a {@link
+android.opengl.GLSurfaceView.Renderer} implementation to access the matrix
 variable defined in the vertex shader above.
 
 <pre>
@@ -334,9 +340,13 @@
 </li>
 <li><strong>Create projection and camera viewing matrices</strong> - Generate the projection and
 viewing matrices to be applied the graphic objects. The following example code shows how to modify
-the {@code onSurfaceCreated()} and {@code onSurfaceChanged()} methods of a {@link
-android.opengl.GLSurfaceView.Renderer} implementation to create camera view matrix and a projection
-matrix based on the screen aspect ratio of the device.
+the {@link    
+android.opengl.GLSurfaceView.Renderer#onSurfaceCreated(javax.microedition.khronos.opengles.GL10,
+javax.microedition.khronos.egl.EGLConfig) onSurfaceCreated()} and {@link
+android.opengl.GLSurfaceView.Renderer#onSurfaceChanged(javax.microedition.khronos.opengles.GL10,
+int, int) onSurfaceChanged()} methods of a {@link android.opengl.GLSurfaceView.Renderer}
+implementation to create camera view matrix and a projection matrix based on the screen aspect ratio
+of the device.
 
 <pre>
     public void onSurfaceCreated(GL10 unused, EGLConfig config) {
@@ -358,9 +368,11 @@
 
 <li><strong>Apply projection and camera viewing matrices</strong> - To apply the projection and
 camera view transformations, multiply the matrices together and then set them into the vertex
-shader. The following example code shows how modify the {@code onDrawFrame()} method of a {@link
-android.opengl.GLSurfaceView.Renderer} implementation to combine the projection matrix and camera
-view created in the code above and then apply it to the graphic objects to be rendered by OpenGL.
+shader. The following example code shows how modify the {@link
+android.opengl.GLSurfaceView.Renderer#onDrawFrame(javax.microedition.khronos.opengles.GL10)
+onDrawFrame()} method of a {@link android.opengl.GLSurfaceView.Renderer} implementation to combine
+the projection matrix and camera view created in the code above and then apply it to the graphic
+objects to be rendered by OpenGL.
   
 <pre>
     public void onDrawFrame(GL10 unused) {
diff --git a/docs/html/resources/tutorials/opengl/opengl-es10.jd b/docs/html/resources/tutorials/opengl/opengl-es10.jd
index 40304fd..3570766 100644
--- a/docs/html/resources/tutorials/opengl/opengl-es10.jd
+++ b/docs/html/resources/tutorials/opengl/opengl-es10.jd
@@ -342,8 +342,8 @@
 system onto your typically non-square screen. To solve this problem, you can apply an OpenGL
 projection mode and camera view (eye point) to transform the coordinates of your graphic objects
 so they have the correct proportions on any display. For more information about OpenGL coordinate
-mapping, see <a href="{@docRoot}guide/topics/graphics/opengl.html#coordinate-mapping">Coordinate
-Mapping for Drawn Objects</a>.</p>
+mapping, see <a href="{@docRoot}guide/topics/graphics/opengl.html#coordinate-mapping">Mapping
+Coordinates for Drawn Objects</a>.</p>
 
 <p>To apply projection and camera view transformations to your triangle:
 </p>
diff --git a/docs/html/resources/tutorials/opengl/opengl-es20.jd b/docs/html/resources/tutorials/opengl/opengl-es20.jd
index 439f7d5..889dd50 100644
--- a/docs/html/resources/tutorials/opengl/opengl-es20.jd
+++ b/docs/html/resources/tutorials/opengl/opengl-es20.jd
@@ -422,8 +422,8 @@
 system onto your typically non-square screen. To solve this problem, you can apply an OpenGL
 projection mode and camera view (eye point) to transform the coordinates of your graphic objects
 so they have the correct proportions on any display. For more information about OpenGL coordinate
-mapping, see <a href="{@docRoot}guide/topics/graphics/opengl.html#coordinate-mapping">Coordinate
-Mapping for Drawn Objects</a>.</p>
+mapping, see <a href="{@docRoot}guide/topics/graphics/opengl.html#coordinate-mapping">Mapping
+Coordinates for Drawn Objects</a>.</p>
 
 <p>To apply projection and camera view transformations to your triangle:
 </p>
diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp
index a366d49..4359d95 100644
--- a/libs/rs/rsAllocation.cpp
+++ b/libs/rs/rsAllocation.cpp
@@ -58,19 +58,7 @@
 }
 
 Allocation::~Allocation() {
-    if (mHal.state.hasReferences &&
-        (mHal.state.hasFaces || mHal.state.hasMipmaps)) {
-        LOGE("Cube/mip allocation with references unsupported, memory not cleaned up!");
-    }
-
-    uint32_t elemCount = mHal.state.dimensionX;
-    if (mHal.state.dimensionY > 1) {
-        elemCount *= mHal.state.dimensionY;
-    }
-    if (mHal.state.dimensionZ > 1) {
-        elemCount *= mHal.state.dimensionZ;
-    }
-    decRefs(getPtr(), elemCount, 0);
+    freeChildrenUnlocked();
     mRSC->mHal.funcs.allocation.destroy(mRSC, this);
 }
 
@@ -299,6 +287,19 @@
     }
 }
 
+void Allocation::freeChildrenUnlocked () {
+    decRefs(getPtr(), mHal.state.type->getSizeBytes() / mHal.state.type->getElementSizeBytes(), 0);
+}
+
+bool Allocation::freeChildren() {
+    if (mHal.state.hasReferences) {
+        incSysRef();
+        freeChildrenUnlocked();
+        return decSysRef();
+    }
+    return false;
+}
+
 void Allocation::copyRange1D(Context *rsc, const Allocation *src, int32_t srcOff, int32_t destOff, int32_t len) {
 }
 
diff --git a/libs/rs/rsAllocation.h b/libs/rs/rsAllocation.h
index f2589c0..67fc3b5 100644
--- a/libs/rs/rsAllocation.h
+++ b/libs/rs/rsAllocation.h
@@ -116,6 +116,7 @@
 
     void incRefs(const void *ptr, size_t ct, size_t startOff = 0) const;
     void decRefs(const void *ptr, size_t ct, size_t startOff = 0) const;
+    virtual bool freeChildren();
 
     void sendDirty(const Context *rsc) const;
     bool getHasGraphicsMipmaps() const {
@@ -127,6 +128,7 @@
     Vector<const Program *> mToDirtyList;
 
 private:
+    void freeChildrenUnlocked();
     Allocation(Context *rsc, const Type *, uint32_t usages, RsAllocationMipmapControl mc);
 };
 
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index 8996ad1..e3a9cf8 100644
--- a/libs/rs/rsContext.cpp
+++ b/libs/rs/rsContext.cpp
@@ -312,6 +312,7 @@
          mStateSampler.deinit(this);
          mFBOCache.deinit(this);
     }
+    ObjectBase::freeAllChildren(this);
     //LOGV("destroyWorkerThreadResources 2");
     mExit = true;
 }
diff --git a/libs/rs/rsObjectBase.cpp b/libs/rs/rsObjectBase.cpp
index f428f94..f5ced26 100644
--- a/libs/rs/rsObjectBase.cpp
+++ b/libs/rs/rsObjectBase.cpp
@@ -81,6 +81,10 @@
 void ObjectBase::preDestroy() const {
 }
 
+bool ObjectBase::freeChildren() {
+    return false;
+}
+
 bool ObjectBase::checkDelete(const ObjectBase *ref) {
     if (!ref) {
         return false;
@@ -217,6 +221,28 @@
     }
 }
 
+void ObjectBase::freeAllChildren(Context *rsc) {
+    if (rsc->props.mLogObjects) {
+        LOGV("Forcing release of all child objects.");
+    }
+
+    // This operation can be slow, only to be called during context cleanup.
+    ObjectBase * o = (ObjectBase *)rsc->mObjHead;
+    while (o) {
+        if (o->freeChildren()) {
+            // deleted ref to self and possibly others, restart from head.
+            o = (ObjectBase *)rsc->mObjHead;
+        } else {
+            o = (ObjectBase *)o->mNext;
+        }
+    }
+
+    if (rsc->props.mLogObjects) {
+        LOGV("Objects remaining.");
+        dumpAll(rsc);
+    }
+}
+
 void ObjectBase::dumpAll(Context *rsc) {
     asyncLock();
 
diff --git a/libs/rs/rsObjectBase.h b/libs/rs/rsObjectBase.h
index c7cfb0e..d9f5f3b 100644
--- a/libs/rs/rsObjectBase.h
+++ b/libs/rs/rsObjectBase.h
@@ -50,8 +50,10 @@
     void setName(const char *, uint32_t len);
 
     Context * getContext() const {return mRSC;}
+    virtual bool freeChildren();
 
     static void zeroAllUserRef(Context *rsc);
+    static void freeAllChildren(Context *rsc);
     static void dumpAll(Context *rsc);
 
     virtual void dumpLOGV(const char *prefix) const;
diff --git a/libs/rs/rsProgram.cpp b/libs/rs/rsProgram.cpp
index 33eb422e..4178aa5 100644
--- a/libs/rs/rsProgram.cpp
+++ b/libs/rs/rsProgram.cpp
@@ -70,15 +70,8 @@
 }
 
 Program::~Program() {
+    freeChildren();
 
-    for (uint32_t ct=0; ct < mHal.state.constantsCount; ct++) {
-        bindAllocation(NULL, NULL, ct);
-    }
-
-    for (uint32_t ct=0; ct < mHal.state.texturesCount; ct++) {
-        bindTexture(NULL, ct, NULL);
-        bindSampler(NULL, ct, NULL);
-    }
     delete[] mHal.state.textures;
     delete[] mHal.state.samplers;
     delete[] mHal.state.textureTargets;
@@ -90,6 +83,18 @@
     mHal.state.texturesCount = 0;
 }
 
+bool Program::freeChildren() {
+    for (uint32_t ct=0; ct < mHal.state.constantsCount; ct++) {
+        bindAllocation(NULL, NULL, ct);
+    }
+
+    for (uint32_t ct=0; ct < mHal.state.texturesCount; ct++) {
+        bindTexture(NULL, ct, NULL);
+        bindSampler(NULL, ct, NULL);
+    }
+    return false;
+}
+
 void Program::initMemberVars() {
     mDirty = true;
 
diff --git a/libs/rs/rsProgram.h b/libs/rs/rsProgram.h
index 948ba3e..3237a72 100644
--- a/libs/rs/rsProgram.h
+++ b/libs/rs/rsProgram.h
@@ -34,6 +34,7 @@
     Program(Context *, const char * shaderText, uint32_t shaderLength,
                        const uint32_t * params, uint32_t paramLength);
     virtual ~Program();
+    virtual bool freeChildren();
 
     void bindAllocation(Context *, Allocation *, uint32_t slot);
 
diff --git a/media/jni/mediaeditor/VideoEditorMain.cpp b/media/jni/mediaeditor/VideoEditorMain.cpp
index 5dda8d3..6ee15b4 100755
--- a/media/jni/mediaeditor/VideoEditorMain.cpp
+++ b/media/jni/mediaeditor/VideoEditorMain.cpp
@@ -1797,7 +1797,7 @@
         }
 
         fid = pEnv->GetFieldID(audioSettingClazz,"bRemoveOriginal","Z");
-        pContext->mAudioSettings->bRemoveOriginal = pEnv->GetIntField(audioSettingObject,fid);
+        pContext->mAudioSettings->bRemoveOriginal = pEnv->GetBooleanField(audioSettingObject,fid);
         M4OSA_TRACE1_1("bRemoveOriginal = %d",pContext->mAudioSettings->bRemoveOriginal);
 
         fid = pEnv->GetFieldID(audioSettingClazz,"channels","I");
@@ -1816,7 +1816,7 @@
 
         fid = pEnv->GetFieldID(audioSettingClazz,"startMs","J");
         pContext->mAudioSettings->uiAddCts
-            = pEnv->GetIntField(audioSettingObject,fid);
+            = pEnv->GetLongField(audioSettingObject,fid);
         M4OSA_TRACE1_1("uiAddCts = %d",pContext->mAudioSettings->uiAddCts);
 
         fid = pEnv->GetFieldID(audioSettingClazz,"volume","I");
@@ -1826,17 +1826,17 @@
 
         fid = pEnv->GetFieldID(audioSettingClazz,"loop","Z");
         pContext->mAudioSettings->bLoop
-            = pEnv->GetIntField(audioSettingObject,fid);
+            = pEnv->GetBooleanField(audioSettingObject,fid);
         M4OSA_TRACE1_1("bLoop = %d",pContext->mAudioSettings->bLoop);
 
         fid = pEnv->GetFieldID(audioSettingClazz,"beginCutTime","J");
         pContext->mAudioSettings->beginCutMs
-            = pEnv->GetIntField(audioSettingObject,fid);
+            = pEnv->GetLongField(audioSettingObject,fid);
         M4OSA_TRACE1_1("begin cut time = %d",pContext->mAudioSettings->beginCutMs);
 
         fid = pEnv->GetFieldID(audioSettingClazz,"endCutTime","J");
         pContext->mAudioSettings->endCutMs
-            = pEnv->GetIntField(audioSettingObject,fid);
+            = pEnv->GetLongField(audioSettingObject,fid);
         M4OSA_TRACE1_1("end cut time = %d",pContext->mAudioSettings->endCutMs);
 
         fid = pEnv->GetFieldID(audioSettingClazz,"fileType","I");
@@ -3421,6 +3421,7 @@
     M4OSA_ERR result = M4NO_ERROR;
     ManualEditContext* pContext = M4OSA_NULL;
     bool needToBeLoaded = true;
+    const char *pPCMFilePath, *pStringOutAudioGraphFile;
 
     VIDEOEDIT_LOG_API(ANDROID_LOG_INFO, "VIDEO_EDITOR",
         "videoEditor_generateAudioWaveFormSync() ");
@@ -3435,20 +3436,20 @@
     VIDEOEDIT_LOG_API(ANDROID_LOG_INFO, "VIDEO_EDITOR",
         "videoEditor_generateAudioWaveFormSync Retrieving pStringOutAudioGraphFile");
 
-    const char *pPCMFilePath = pEnv->GetStringUTFChars(pcmfilePath, NULL);
+    pPCMFilePath = pEnv->GetStringUTFChars(pcmfilePath, NULL);
     if (pPCMFilePath == M4OSA_NULL) {
-        if (pEnv != NULL) {
-            jniThrowException(pEnv, "java/lang/RuntimeException",
-                "Input string PCMFilePath is null");
-        }
+        jniThrowException(pEnv, "java/lang/RuntimeException",
+            "Input string PCMFilePath is null");
+        result = M4ERR_PARAMETER;
+        goto out;
     }
 
-    const char *pStringOutAudioGraphFile = pEnv->GetStringUTFChars(outGraphfilePath, NULL);
+    pStringOutAudioGraphFile = pEnv->GetStringUTFChars(outGraphfilePath, NULL);
     if (pStringOutAudioGraphFile == M4OSA_NULL) {
-        if (pEnv != NULL) {
-            jniThrowException(pEnv, "java/lang/RuntimeException",
-                "Input string outGraphfilePath is null");
-        }
+        jniThrowException(pEnv, "java/lang/RuntimeException",
+            "Input string outGraphfilePath is null");
+        result = M4ERR_PARAMETER;
+        goto out2;
     }
 
     VIDEOEDIT_LOG_API(ANDROID_LOG_INFO, "VIDEO_EDITOR",
@@ -3463,14 +3464,14 @@
         (M4OSA_UInt32)frameDuration,
         pContext);
 
-    if (pStringOutAudioGraphFile != NULL) {
-        pEnv->ReleaseStringUTFChars(outGraphfilePath, pStringOutAudioGraphFile);
-    }
+    pEnv->ReleaseStringUTFChars(outGraphfilePath, pStringOutAudioGraphFile);
 
+out2:
     if (pPCMFilePath != NULL) {
         pEnv->ReleaseStringUTFChars(pcmfilePath, pPCMFilePath);
     }
 
+out:
     VIDEOEDIT_LOG_FUNCTION(ANDROID_LOG_INFO, "VIDEO_EDITOR",
         "videoEditor_generateAudioWaveFormSync pContext->bSkipState ");
 
diff --git a/media/libstagefright/codecs/on2/dec/SoftVPX.cpp b/media/libstagefright/codecs/on2/dec/SoftVPX.cpp
index 7e83163..61a02ac 100644
--- a/media/libstagefright/codecs/on2/dec/SoftVPX.cpp
+++ b/media/libstagefright/codecs/on2/dec/SoftVPX.cpp
@@ -66,7 +66,7 @@
     def.eDir = OMX_DirInput;
     def.nBufferCountMin = kNumBuffers;
     def.nBufferCountActual = def.nBufferCountMin;
-    def.nBufferSize = 8192;
+    def.nBufferSize = 256 * 1024;
     def.bEnabled = OMX_TRUE;
     def.bPopulated = OMX_FALSE;
     def.eDomain = OMX_PortDomainVideo;
diff --git a/opengl/libagl/state.cpp b/opengl/libagl/state.cpp
index 8b4136a..90e9612 100644
--- a/opengl/libagl/state.cpp
+++ b/opengl/libagl/state.cpp
@@ -191,6 +191,9 @@
         // these need to fall through into the rasterizer
         c->rasterizer.procs.enableDisable(c, cap, enabled);
         break;
+    case GL_TEXTURE_EXTERNAL_OES:
+        c->rasterizer.procs.enableDisable(c, GL_TEXTURE_2D, enabled);
+        break;
 
     case GL_MULTISAMPLE:
     case GL_SAMPLE_ALPHA_TO_COVERAGE:
diff --git a/opengl/libagl/texture.cpp b/opengl/libagl/texture.cpp
index 8eb17c4..88e8651 100644
--- a/opengl/libagl/texture.cpp
+++ b/opengl/libagl/texture.cpp
@@ -633,7 +633,7 @@
 static void texParameterx(
         GLenum target, GLenum pname, GLfixed param, ogles_context_t* c)
 {
-    if (target != GL_TEXTURE_2D) {
+    if (target != GL_TEXTURE_2D && target != GL_TEXTURE_EXTERNAL_OES) {
         ogles_error(c, GL_INVALID_ENUM);
         return;
     }
@@ -866,7 +866,7 @@
 void glBindTexture(GLenum target, GLuint texture)
 {
     ogles_context_t* c = ogles_context_t::get();
-    if (target != GL_TEXTURE_2D) {
+    if (target != GL_TEXTURE_2D && target != GL_TEXTURE_EXTERNAL_OES) {
         ogles_error(c, GL_INVALID_ENUM);
         return;
     }
@@ -1012,7 +1012,7 @@
         GLenum target, GLenum pname, const GLint* params)
 {
     ogles_context_t* c = ogles_context_t::get();
-    if (target != GGL_TEXTURE_2D) {
+    if (target != GL_TEXTURE_2D && target != GL_TEXTURE_EXTERNAL_OES) {
         ogles_error(c, GL_INVALID_ENUM);
         return;
     }
@@ -1605,7 +1605,7 @@
 void glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image)
 {
     ogles_context_t* c = ogles_context_t::get();
-    if (target != GL_TEXTURE_2D) {
+    if (target != GL_TEXTURE_2D && target != GL_TEXTURE_EXTERNAL_OES) {
         ogles_error(c, GL_INVALID_ENUM);
         return;
     }
diff --git a/packages/SystemUI/res/drawable-hdpi/compat_mode_help_top_divider.9.png b/packages/SystemUI/res/drawable-hdpi/compat_mode_help_top_divider.9.png
deleted file mode 100644
index 03a5639..0000000
--- a/packages/SystemUI/res/drawable-hdpi/compat_mode_help_top_divider.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_notification_open.png b/packages/SystemUI/res/drawable-hdpi/ic_notification_open.png
index 165fa80..d697c2f 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_notification_open.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_notification_open.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_airplane_off.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_airplane_off.png
deleted file mode 100644
index a557164..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_airplane_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_apps_default.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_apps_default.png
deleted file mode 100644
index 48cab60..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_apps_default.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_apps_default_land.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_apps_default_land.png
deleted file mode 100644
index 000af5e..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_apps_default_land.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_back_ime_default_land.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_back_ime_default_land.png
deleted file mode 100644
index e77dfafb..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_back_ime_default_land.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_brightness_low.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_brightness_low.png
deleted file mode 100644
index b91be07..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_brightness_low.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_gps_on.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_gps_on.png
deleted file mode 100644
index 31e747e..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_gps_on.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_ime_default_land.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_ime_default_land.png
deleted file mode 100644
index 8883601..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_ime_default_land.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_notification_dnd.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_notification_dnd.png
deleted file mode 100644
index 13b969c..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_notification_dnd.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_notification_dnd_off.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_notification_dnd_off.png
deleted file mode 100644
index 25e7e6f..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_notification_dnd_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_rotate_off_lanscape.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_rotate_off_lanscape.png
deleted file mode 100644
index da512e4..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_rotate_off_lanscape.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_rotate_off_portrait.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_rotate_off_portrait.png
deleted file mode 100644
index f2a7c6d..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_rotate_off_portrait.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_settings.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_settings.png
deleted file mode 100644
index 18fe5be..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_settings.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_shadow.9.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_shadow.9.png
deleted file mode 100644
index ab581a1..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_shadow.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_sound_off.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_sound_off.png
deleted file mode 100644
index 0246cd4..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_sound_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_sound_on.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_sound_on.png
deleted file mode 100644
index bec75e5..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_sound_on.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/recent_overlay.png b/packages/SystemUI/res/drawable-hdpi/recent_overlay.png
deleted file mode 100644
index ce48e0b..0000000
--- a/packages/SystemUI/res/drawable-hdpi/recent_overlay.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/recent_rez_border.png b/packages/SystemUI/res/drawable-hdpi/recent_rez_border.png
deleted file mode 100644
index f10a487..0000000
--- a/packages/SystemUI/res/drawable-hdpi/recent_rez_border.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/shade_handlebar.9.png b/packages/SystemUI/res/drawable-hdpi/shade_handlebar.9.png
deleted file mode 100644
index 0c12103..0000000
--- a/packages/SystemUI/res/drawable-hdpi/shade_handlebar.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/shade_header_background.9.png b/packages/SystemUI/res/drawable-hdpi/shade_header_background.9.png
deleted file mode 100644
index 8fbe78e..0000000
--- a/packages/SystemUI/res/drawable-hdpi/shade_header_background.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_battery_unknown.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_battery_unknown.png
deleted file mode 100644
index e6c9e805..0000000
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_battery_unknown.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_1x.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_1x.png
deleted file mode 100644
index b2e725c..0000000
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_1x.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_3g.png
deleted file mode 100644
index b2e725c..0000000
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_3g.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_4g.png
deleted file mode 100644
index b2e725c..0000000
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_4g.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_e.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_e.png
deleted file mode 100644
index b2e725c..0000000
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_e.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_g.png
deleted file mode 100644
index b2e725c..0000000
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_g.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_h.png
deleted file mode 100644
index b2e725c..0000000
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_h.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_1x.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_1x.png
deleted file mode 100644
index b2e725c..0000000
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_1x.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_3g.png
deleted file mode 100644
index b2e725c..0000000
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_3g.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_4g.png
deleted file mode 100644
index b2e725c..0000000
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_4g.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_e.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_e.png
deleted file mode 100644
index b2e725c..0000000
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_e.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_g.png
deleted file mode 100644
index b2e725c..0000000
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_g.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_h.png
deleted file mode 100644
index b2e725c..0000000
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_h.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_1x.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_1x.png
deleted file mode 100644
index b2e725c..0000000
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_1x.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_3g.png
deleted file mode 100644
index b2e725c..0000000
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_3g.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_4g.png
deleted file mode 100644
index b2e725c..0000000
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_4g.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_e.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_e.png
deleted file mode 100644
index b2e725c..0000000
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_e.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_g.png
deleted file mode 100644
index b2e725c..0000000
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_g.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_h.png
deleted file mode 100644
index b2e725c..0000000
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_h.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/statusbar_background.9.png b/packages/SystemUI/res/drawable-hdpi/statusbar_background.9.png
deleted file mode 100644
index 6eaf6c9..0000000
--- a/packages/SystemUI/res/drawable-hdpi/statusbar_background.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/title_bar_portrait.9.png b/packages/SystemUI/res/drawable-hdpi/title_bar_portrait.9.png
deleted file mode 100644
index da1b637..0000000
--- a/packages/SystemUI/res/drawable-hdpi/title_bar_portrait.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_notification_open.png b/packages/SystemUI/res/drawable-mdpi/ic_notification_open.png
index ba0ca70..839c134 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_notification_open.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_notification_open.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_airplane_off.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_airplane_off.png
deleted file mode 100644
index 6d8b923..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_airplane_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_apps_default.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_apps_default.png
deleted file mode 100644
index 2ed5df4..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_apps_default.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_apps_default_land.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_apps_default_land.png
deleted file mode 100644
index c877f72..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_apps_default_land.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_back_ime_default_land.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_back_ime_default_land.png
deleted file mode 100644
index 14d437e..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_back_ime_default_land.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_brightness_low.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_brightness_low.png
deleted file mode 100644
index 91e1429..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_brightness_low.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_gps_on.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_gps_on.png
deleted file mode 100644
index 08d60d1..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_gps_on.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_ime_default_land.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_ime_default_land.png
deleted file mode 100644
index e5711eb..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_ime_default_land.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_notification_dnd.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_notification_dnd.png
deleted file mode 100644
index c046f58..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_notification_dnd.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_notification_dnd_off.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_notification_dnd_off.png
deleted file mode 100644
index 6b72be2..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_notification_dnd_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_lanscape.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_lanscape.png
deleted file mode 100644
index 540af65..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_lanscape.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_portrait.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_portrait.png
deleted file mode 100644
index 268a9bf..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_portrait.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_settings.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_settings.png
deleted file mode 100644
index 06e09e7..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_settings.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_shadow.9.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_shadow.9.png
deleted file mode 100644
index 897d216..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_shadow.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_sound_off.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_sound_off.png
deleted file mode 100644
index a11dabb..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_sound_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_sound_on.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_sound_on.png
deleted file mode 100644
index 16215bd..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_sound_on.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/recent_overlay.png b/packages/SystemUI/res/drawable-mdpi/recent_overlay.png
deleted file mode 100644
index 33eabb2..0000000
--- a/packages/SystemUI/res/drawable-mdpi/recent_overlay.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/recent_rez_border.png b/packages/SystemUI/res/drawable-mdpi/recent_rez_border.png
deleted file mode 100644
index 5da42a3..0000000
--- a/packages/SystemUI/res/drawable-mdpi/recent_rez_border.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/shade_handlebar.9.png b/packages/SystemUI/res/drawable-mdpi/shade_handlebar.9.png
deleted file mode 100644
index d9598ae..0000000
--- a/packages/SystemUI/res/drawable-mdpi/shade_handlebar.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/shade_header_background.9.png b/packages/SystemUI/res/drawable-mdpi/shade_header_background.9.png
deleted file mode 100644
index 761ef05..0000000
--- a/packages/SystemUI/res/drawable-mdpi/shade_header_background.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_battery_unknown.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_battery_unknown.png
deleted file mode 100644
index d4dca3e..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_battery_unknown.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_1x.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_1x.png
deleted file mode 100644
index eecdefb..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_1x.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_3g.png
deleted file mode 100644
index eecdefb..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_3g.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_4g.png
deleted file mode 100644
index eecdefb..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_4g.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_e.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_e.png
deleted file mode 100644
index eecdefb..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_e.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_g.png
deleted file mode 100644
index eecdefb..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_g.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_h.png
deleted file mode 100644
index eecdefb..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_h.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_1x.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_1x.png
deleted file mode 100644
index eecdefb..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_1x.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_3g.png
deleted file mode 100644
index eecdefb..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_3g.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_4g.png
deleted file mode 100644
index eecdefb..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_4g.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_e.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_e.png
deleted file mode 100644
index eecdefb..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_e.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_g.png
deleted file mode 100644
index eecdefb..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_g.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_h.png
deleted file mode 100644
index eecdefb..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_h.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_1x.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_1x.png
deleted file mode 100644
index eecdefb..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_1x.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_3g.png
deleted file mode 100644
index eecdefb..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_3g.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_4g.png
deleted file mode 100644
index eecdefb..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_4g.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_e.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_e.png
deleted file mode 100644
index eecdefb..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_e.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_g.png
deleted file mode 100644
index eecdefb..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_g.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_h.png
deleted file mode 100644
index eecdefb..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_h.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/statusbar_background.9.png b/packages/SystemUI/res/drawable-mdpi/statusbar_background.9.png
deleted file mode 100644
index 6f19bf4..0000000
--- a/packages/SystemUI/res/drawable-mdpi/statusbar_background.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/title_bar_portrait.9.png b/packages/SystemUI/res/drawable-mdpi/title_bar_portrait.9.png
deleted file mode 100644
index 9de8324..0000000
--- a/packages/SystemUI/res/drawable-mdpi/title_bar_portrait.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-nodpi/bg_scrim_notification.png b/packages/SystemUI/res/drawable-nodpi/bg_scrim_notification.png
deleted file mode 100644
index 4d5135e..0000000
--- a/packages/SystemUI/res/drawable-nodpi/bg_scrim_notification.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-nodpi/compat_mode_help_bg.png b/packages/SystemUI/res/drawable-nodpi/compat_mode_help_bg.png
index 59a70ff..87d8c41 100644
--- a/packages/SystemUI/res/drawable-nodpi/compat_mode_help_bg.png
+++ b/packages/SystemUI/res/drawable-nodpi/compat_mode_help_bg.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-nodpi/notify_glow_back.png b/packages/SystemUI/res/drawable-nodpi/notify_glow_back.png
deleted file mode 100644
index 269049e..0000000
--- a/packages/SystemUI/res/drawable-nodpi/notify_glow_back.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-nodpi/notify_item_glow_left.png b/packages/SystemUI/res/drawable-nodpi/notify_item_glow_left.png
deleted file mode 100644
index 0e8c25c..0000000
--- a/packages/SystemUI/res/drawable-nodpi/notify_item_glow_left.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-nodpi/notify_item_glow_top.png b/packages/SystemUI/res/drawable-nodpi/notify_item_glow_top.png
deleted file mode 100644
index 536357a..0000000
--- a/packages/SystemUI/res/drawable-nodpi/notify_item_glow_top.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-nodpi/panel_notification.png b/packages/SystemUI/res/drawable-nodpi/panel_notification.png
deleted file mode 100644
index 275e492..0000000
--- a/packages/SystemUI/res/drawable-nodpi/panel_notification.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_battery_unknown.png b/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_battery_unknown.png
deleted file mode 100644
index 004aee3..0000000
--- a/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_battery_unknown.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_battery_unknown.png b/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_battery_unknown.png
deleted file mode 100644
index d71738d..0000000
--- a/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_battery_unknown.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_battery_unknown.png b/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_battery_unknown.png
deleted file mode 100644
index 4394f92..0000000
--- a/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_battery_unknown.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_notification_open.png b/packages/SystemUI/res/drawable-xhdpi/ic_notification_open.png
new file mode 100644
index 0000000..4f8c987
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_notification_open.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_airplane_off.png b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_airplane_off.png
deleted file mode 100644
index ed968c8..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_airplane_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_apps_default.png b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_apps_default.png
deleted file mode 100644
index 5641b2b..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_apps_default.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_apps_default_land.png b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_apps_default_land.png
deleted file mode 100644
index 1ea83fc..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_apps_default_land.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_back_ime_default_land.png b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_back_ime_default_land.png
deleted file mode 100644
index dc08550..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_back_ime_default_land.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_brightness_low.png b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_brightness_low.png
deleted file mode 100644
index 03885fa..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_brightness_low.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_gps_on.png b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_gps_on.png
deleted file mode 100644
index 92e86c6..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_gps_on.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_ime_default_land.png b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_ime_default_land.png
deleted file mode 100644
index 94acf9a..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_ime_default_land.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_notification_dnd.png b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_notification_dnd.png
deleted file mode 100644
index 4fc936b..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_notification_dnd.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_notification_dnd_off.png b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_notification_dnd_off.png
deleted file mode 100644
index 27357ea..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_notification_dnd_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_rotate_off_lanscape.png b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_rotate_off_lanscape.png
deleted file mode 100644
index 53c7094..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_rotate_off_lanscape.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_rotate_off_portrait.png b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_rotate_off_portrait.png
deleted file mode 100644
index a882b94..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_rotate_off_portrait.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_settings.png b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_settings.png
deleted file mode 100644
index fdcf409..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_settings.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_shadow.9.png b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_shadow.9.png
deleted file mode 100644
index 792bac4..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_shadow.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_sound_off.png b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_sound_off.png
deleted file mode 100644
index 31b4663..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_sound_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_sound_on.png b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_sound_on.png
deleted file mode 100644
index 45b5bf3..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_sound_on.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_battery_unknown.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_battery_unknown.png
deleted file mode 100644
index ffac512..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_battery_unknown.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_in_1x.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_in_1x.png
deleted file mode 100644
index 48038f0..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_in_1x.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_in_3g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_in_3g.png
deleted file mode 100644
index 48038f0..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_in_3g.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_in_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_in_4g.png
deleted file mode 100644
index 48038f0..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_in_4g.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_in_e.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_in_e.png
deleted file mode 100644
index 48038f0..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_in_e.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_in_g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_in_g.png
deleted file mode 100644
index 48038f0..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_in_g.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_in_h.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_in_h.png
deleted file mode 100644
index 48038f0..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_in_h.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_inandout_1x.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_inandout_1x.png
deleted file mode 100644
index 48038f0..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_inandout_1x.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_inandout_3g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_inandout_3g.png
deleted file mode 100644
index 48038f0..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_inandout_3g.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_inandout_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_inandout_4g.png
deleted file mode 100644
index 48038f0..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_inandout_4g.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_inandout_e.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_inandout_e.png
deleted file mode 100644
index 48038f0..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_inandout_e.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_inandout_g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_inandout_g.png
deleted file mode 100644
index 48038f0..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_inandout_g.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_inandout_h.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_inandout_h.png
deleted file mode 100644
index 48038f0..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_inandout_h.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_out_1x.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_out_1x.png
deleted file mode 100644
index 48038f0..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_out_1x.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_out_3g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_out_3g.png
deleted file mode 100644
index 48038f0..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_out_3g.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_out_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_out_4g.png
deleted file mode 100644
index 48038f0..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_out_4g.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_out_e.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_out_e.png
deleted file mode 100644
index 48038f0..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_out_e.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_out_g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_out_g.png
deleted file mode 100644
index 48038f0..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_out_g.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_out_h.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_out_h.png
deleted file mode 100644
index 48038f0..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_out_h.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable/compat_mode_help_bg.png b/packages/SystemUI/res/drawable/compat_mode_help_bg.png
deleted file mode 100644
index 87d8c41..0000000
--- a/packages/SystemUI/res/drawable/compat_mode_help_bg.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/layout/navigation_bar.xml b/packages/SystemUI/res/layout/navigation_bar.xml
index 6c4c9c1..fbca299 100644
--- a/packages/SystemUI/res/layout/navigation_bar.xml
+++ b/packages/SystemUI/res/layout/navigation_bar.xml
@@ -23,12 +23,12 @@
     xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"
     android:layout_height="match_parent"
     android:layout_width="match_parent"
+    android:background="#FF000000"
     >
 
     <FrameLayout android:id="@+id/rot0"
         android:layout_height="match_parent"
         android:layout_width="match_parent"
-        android:background="#FF000000"
         >
 
         <LinearLayout
@@ -98,6 +98,51 @@
                 />
         </LinearLayout>
 
+        <!-- lights out layout to match exactly -->
+        <LinearLayout
+            android:layout_height="match_parent"
+            android:layout_width="match_parent"
+            android:orientation="horizontal"
+            android:id="@+id/lights_out"
+            android:visibility="gone"
+            >
+            <ImageView
+                android:layout_width="80dp"
+                android:layout_height="match_parent"
+                android:layout_marginLeft="40dp"
+                android:src="@drawable/ic_sysbar_lights_out_dot_small"
+                android:scaleType="center"
+                android:layout_weight="0"
+                />
+            <View 
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_weight="1"
+                android:visibility="invisible"
+                />
+            <ImageView
+                android:layout_width="80dp"
+                android:layout_height="match_parent"
+                android:src="@drawable/ic_sysbar_lights_out_dot_large"
+                android:scaleType="center"
+                android:layout_weight="0"
+                />
+            <View 
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_weight="1"
+                android:visibility="invisible"
+                />
+            <ImageView
+                android:layout_width="80dp"
+                android:layout_marginRight="40dp"
+                android:layout_height="match_parent"
+                android:src="@drawable/ic_sysbar_lights_out_dot_small"
+                android:scaleType="center"
+                android:layout_weight="0"
+                />
+        </LinearLayout>
+
         <View android:id="@+id/deadzone"
             android:layout_height="@dimen/navigation_bar_deadzone_size"
             android:layout_width="match_parent"
@@ -109,7 +154,6 @@
     <FrameLayout android:id="@+id/rot90"
         android:layout_height="match_parent"
         android:layout_width="match_parent"
-        android:background="#FF000000"
         android:visibility="gone"
         android:paddingTop="24dp"
         >
@@ -131,6 +175,8 @@
                 systemui:keyCode="82"
                 android:layout_weight="0"
                 android:visibility="invisible"
+                android:contentDescription="@string/accessibility_menu"
+                systemui:glowBackground="@drawable/ic_sysbar_highlight_land"
                 />
             <com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/recent_apps"
                 android:layout_height="80dp"
@@ -171,15 +217,56 @@
                 android:contentDescription="@string/accessibility_back"
                 systemui:glowBackground="@drawable/ic_sysbar_highlight_land"
                 />
-            <com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/menu"
+            <View
                 android:layout_height="40dp"
                 android:layout_width="match_parent"
-                android:src="@drawable/ic_sysbar_menu_land"
-                systemui:keyCode="82"
                 android:layout_weight="0"
                 android:visibility="invisible"
-                android:contentDescription="@string/accessibility_menu"
-                systemui:glowBackground="@drawable/ic_sysbar_highlight_land"
+                />
+        </LinearLayout>
+
+        <!-- lights out layout to match exactly -->
+        <LinearLayout 
+            android:layout_height="match_parent"
+            android:layout_width="match_parent"
+            android:orientation="vertical"
+            android:id="@+id/lights_out"
+            android:visibility="gone"
+            >
+            <ImageView
+                android:layout_height="80dp"
+                android:layout_marginTop="40dp"
+                android:layout_width="match_parent"
+                android:src="@drawable/ic_sysbar_lights_out_dot_small"
+                android:scaleType="center"
+                android:layout_weight="0"
+                />
+            <View 
+                android:layout_height="match_parent"
+                android:layout_width="match_parent"
+                android:layout_weight="1"
+                android:visibility="invisible"
+                />
+            <ImageView
+                android:layout_height="80dp"
+                android:layout_width="match_parent"
+                android:src="@drawable/ic_sysbar_lights_out_dot_large"
+                android:scaleType="center"
+                android:layout_weight="0"
+                />
+            <View 
+                android:layout_height="match_parent"
+                android:layout_width="match_parent"
+                android:layout_weight="1"
+                android:visibility="invisible"
+                />
+            <ImageView
+                android:layout_height="80dp"
+                android:layout_marginBottom="40dp"
+                android:layout_width="match_parent"
+                android:src="@drawable/ic_sysbar_lights_out_dot_small"
+                android:scaleType="center"
+                android:layout_weight="0"
                 />
         </LinearLayout>
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
index 5f1ae58..e6c0b96 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
@@ -25,6 +25,7 @@
 import android.os.ServiceManager;
 import android.util.AttributeSet;
 import android.util.Slog;
+import android.view.animation.AccelerateInterpolator;
 import android.view.Display;
 import android.view.KeyEvent;
 import android.view.MotionEvent;
@@ -47,6 +48,8 @@
 
     final static boolean NAVBAR_ALWAYS_AT_RIGHT = true;
 
+    final static boolean ANIMATE_HIDE_TRANSITION = false; // turned off because it introduces unsightly delay when videos goes to full screen
+
     protected IStatusBarService mBarService;
     final Display mDisplay;
     View mCurrentView = null;
@@ -56,7 +59,7 @@
     int mBarSize;
     boolean mVertical;
 
-    boolean mHidden;
+    boolean mHidden, mLowProfile;
     boolean mEnabled = true;
 
     public View getRecentsButton() {
@@ -87,6 +90,65 @@
         mCurrentView.setVisibility(enable ? View.VISIBLE : View.INVISIBLE);
     }
 
+    View.OnTouchListener mLightsOutListener = new View.OnTouchListener() {
+        @Override
+        public boolean onTouch(View v, MotionEvent ev) {
+            if (ev.getAction() == MotionEvent.ACTION_DOWN) {
+                // even though setting the systemUI visibility below will turn these views
+                // on, we need them to come up faster so that they can catch this motion
+                // event
+                setLowProfile(false, false);
+
+                try {
+                    mBarService.setSystemUiVisibility(0);
+                } catch (android.os.RemoteException ex) {
+                }
+            }
+            return false;
+        }
+    };
+
+    public void setLowProfile(final boolean lightsOut) {
+        setLowProfile(lightsOut, true);
+    }
+
+    public void setLowProfile(final boolean lightsOut, final boolean animate) {
+        if (lightsOut == mLowProfile) return;
+
+        mLowProfile = lightsOut;
+
+        if (DEBUG) Slog.d(TAG, "setting lights " + (lightsOut?"out":"on"));
+
+        final View navButtons = mCurrentView.findViewById(R.id.nav_buttons);
+        final View lowLights = mCurrentView.findViewById(R.id.lights_out);
+
+        if (!animate) {
+            lowLights.setVisibility(View.GONE);
+            navButtons.setAlpha(1f);
+        } else {
+            navButtons.animate()
+                .alpha(lightsOut ? 0f : 1f)
+                .setDuration(lightsOut ? 600 : 200)
+                .start();
+
+            lowLights.setOnTouchListener(mLightsOutListener);
+            lowLights.setAlpha(0f);
+            lowLights.setVisibility(View.VISIBLE);
+            lowLights.animate()
+                .alpha(lightsOut ? 1f : 0f)
+                .setStartDelay(lightsOut ? 500 : 0)
+                .setDuration(lightsOut ? 1000 : 300)
+                .setInterpolator(new AccelerateInterpolator(2.0f))
+                .setListener(lightsOut ? null : new AnimatorListenerAdapter() {
+                    @Override
+                    public void onAnimationEnd(Animator _a) {
+                        lowLights.setVisibility(View.GONE);
+                    }
+                })
+                .start();
+        }
+    }
+
     public void setHidden(final boolean hide) {
         if (hide == mHidden) return;
 
@@ -94,6 +156,14 @@
         Slog.d(TAG,
             (hide ? "HIDING" : "SHOWING") + " navigation bar");
 
+        // bring up the lights no matter what
+        setLowProfile(false);
+
+        if (!ANIMATE_HIDE_TRANSITION) {
+            setVisibility(hide ? View.GONE : View.VISIBLE);
+            return;
+        }
+
         float oldAlpha = mCurrentView.getAlpha();
         if (DEBUG) {
             Slog.d(TAG, "animating alpha: " + oldAlpha + " -> "
@@ -147,8 +217,10 @@
 
     @Override
     public boolean onTouchEvent(MotionEvent ev) {
-        // immediately bring up the lights
-        setHidden(false);
+        try {
+            mBarService.setSystemUiVisibility(0);
+        } catch (android.os.RemoteException ex) {
+        }
         return false; // pass it on
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index 68f6dcf..7a563c7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -284,6 +284,8 @@
                 mNavigationBarView = 
                     (NavigationBarView) View.inflate(context, R.layout.navigation_bar, null);
 
+                mNavigationBarView.setEnabled((mDisabled & StatusBarManager.DISABLE_NAVIGATION) == 0);
+
                 sb.setOnSystemUiVisibilityChangeListener(
                     new View.OnSystemUiVisibilityChangeListener() {
                         @Override
@@ -1072,7 +1074,9 @@
                 mHandler.sendEmptyMessage(MSG_CLOSE_RECENTS_PANEL);
             }
 
-            mNavigationBarView.setEnabled((state & StatusBarManager.DISABLE_NAVIGATION) == 0);
+            if (mNavigationBarView != null) {
+                mNavigationBarView.setEnabled((state & StatusBarManager.DISABLE_NAVIGATION) == 0);
+            }
         }
 
         if ((diff & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
@@ -1490,11 +1494,18 @@
 
     @Override // CommandQueue
     public void setSystemUiVisibility(int vis) {
-        if (vis != mSystemUiVisibility) {
+        final int old = mSystemUiVisibility;
+        final int diff = vis ^ old;
+
+        if (diff != 0) {
             mSystemUiVisibility = vis;
 
-            if (0 != (vis & View.SYSTEM_UI_FLAG_LOW_PROFILE)) {
-                animateCollapse();
+            if (0 != (diff & View.SYSTEM_UI_FLAG_LOW_PROFILE)) {
+                final boolean lightsOut = (0 != (vis & View.SYSTEM_UI_FLAG_LOW_PROFILE));
+                if (lightsOut) {
+                    animateCollapse();
+                }
+                mNavigationBarView.setLowProfile(lightsOut);
             }
 
             notifyUiVisibilityChanged();
diff --git a/policy/src/com/android/internal/policy/impl/LockScreen.java b/policy/src/com/android/internal/policy/impl/LockScreen.java
index 9d360ac..4f6df36 100644
--- a/policy/src/com/android/internal/policy/impl/LockScreen.java
+++ b/policy/src/com/android/internal/policy/impl/LockScreen.java
@@ -23,7 +23,6 @@
 import com.android.internal.widget.multiwaveview.MultiWaveView;
 
 import android.app.ActivityManager;
-import android.content.ActivityNotFoundException;
 import android.content.Context;
 import android.content.Intent;
 import android.content.res.Configuration;
@@ -46,6 +45,7 @@
  */
 class LockScreen extends LinearLayout implements KeyguardScreen {
 
+    private static final int ON_RESUME_PING_DELAY = 500; // delay first ping until the screen is on
     private static final boolean DBG = false;
     private static final String TAG = "LockScreen";
     private static final String ENABLE_MENU_KEY_FILE = "/data/local/enable_menu_key";
@@ -441,10 +441,16 @@
         mUnlockWidgetMethods.reset(false);
     }
 
+    private final Runnable mOnResumePing = new Runnable() {
+        public void run() {
+            mUnlockWidgetMethods.ping();
+        }
+    };
+
     /** {@inheritDoc} */
     public void onResume() {
         mStatusViewManager.onResume();
-        mUnlockWidgetMethods.ping();
+        postDelayed(mOnResumePing, ON_RESUME_PING_DELAY);
     }
 
     /** {@inheritDoc} */
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
index c580f08..c929bbc 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -587,6 +587,13 @@
             }
         } else if (!st.isInListMode()) {
             width = MATCH_PARENT;
+        } else if (st.createdPanelView != null) {
+            // If we already had a panel view, carry width=MATCH_PARENT through
+            // as we did above when it was created.
+            ViewGroup.LayoutParams lp = st.createdPanelView.getLayoutParams();
+            if (lp != null && lp.width == ViewGroup.LayoutParams.MATCH_PARENT) {
+                width = MATCH_PARENT;
+            }
         }
 
         st.isOpen = true;
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index cba04df..66c44b62 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -12018,6 +12018,7 @@
             while (mParallelBroadcasts.size() > 0) {
                 r = mParallelBroadcasts.remove(0);
                 r.dispatchTime = SystemClock.uptimeMillis();
+                r.dispatchClockTime = System.currentTimeMillis();
                 final int N = r.receivers.size();
                 if (DEBUG_BROADCAST_LIGHT) Slog.v(TAG, "Processing parallel broadcast "
                         + r);
@@ -12156,7 +12157,7 @@
             r.receiverTime = SystemClock.uptimeMillis();
             if (recIdx == 0) {
                 r.dispatchTime = r.receiverTime;
-
+                r.dispatchClockTime = System.currentTimeMillis();
                 if (DEBUG_BROADCAST_LIGHT) Slog.v(TAG, "Processing ordered broadcast "
                         + r);
             }
@@ -12217,7 +12218,7 @@
                 }
                 skip = true;
             }
-            if (r.callingUid != Process.SYSTEM_UID &&
+            if (info.activityInfo.applicationInfo.uid != Process.SYSTEM_UID &&
                 r.requiredPermission != null) {
                 try {
                     perm = AppGlobals.getPackageManager().
diff --git a/services/java/com/android/server/am/BroadcastRecord.java b/services/java/com/android/server/am/BroadcastRecord.java
index c95053e..bcb0134 100644
--- a/services/java/com/android/server/am/BroadcastRecord.java
+++ b/services/java/com/android/server/am/BroadcastRecord.java
@@ -29,6 +29,7 @@
 import android.util.TimeUtils;
 
 import java.io.PrintWriter;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -47,6 +48,7 @@
     final List receivers;   // contains BroadcastFilter and ResolveInfo
     IIntentReceiver resultTo; // who receives final result if non-null
     long dispatchTime;      // when dispatch started on this set of receivers
+    long dispatchClockTime; // the clock time the dispatch started
     long receiverTime;      // when current receiver started for timeouts.
     long finishTime;        // when we finished the broadcast.
     int resultCode;         // current result code value.
@@ -91,6 +93,8 @@
         if (requiredPermission != null) {
             pw.print(prefix); pw.print("requiredPermission="); pw.println(requiredPermission);
         }
+        pw.print(prefix); pw.print("dispatchClockTime=");
+                pw.println(new Date(dispatchClockTime));
         pw.print(prefix); pw.print("dispatchTime=");
                 TimeUtils.formatDuration(dispatchTime, now, pw);
         if (finishTime != 0) {
diff --git a/services/java/com/android/server/pm/PackageManagerService.java b/services/java/com/android/server/pm/PackageManagerService.java
index abb62de..dbb8164 100644
--- a/services/java/com/android/server/pm/PackageManagerService.java
+++ b/services/java/com/android/server/pm/PackageManagerService.java
@@ -4340,6 +4340,7 @@
             res.labelRes = info.labelRes;
             res.nonLocalizedLabel = info.nonLocalizedLabel;
             res.icon = info.icon;
+            res.system = isSystemApp(res.activityInfo.applicationInfo);
             return res;
         }
 
@@ -4512,6 +4513,7 @@
             res.labelRes = info.labelRes;
             res.nonLocalizedLabel = info.nonLocalizedLabel;
             res.icon = info.icon;
+            res.system = isSystemApp(res.serviceInfo.applicationInfo);
             return res;
         }
 
@@ -4569,7 +4571,13 @@
             v1 = r1.match;
             v2 = r2.match;
             //System.out.println("Comparing: m1=" + m1 + " m2=" + m2);
-            return (v1 > v2) ? -1 : ((v1 < v2) ? 1 : 0);
+            if (v1 != v2) {
+                return (v1 > v2) ? -1 : 1;
+            }
+            if (r1.system != r2.system) {
+                return r1.system ? -1 : 1;
+            }
+            return 0;
         }
     };
 
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 64eaecc..19c7ddd 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -196,13 +196,12 @@
      * 1) buffer orientation/flip/mirror
      * 2) state transformation (window manager)
      * 3) layer orientation (screen orientation)
-     * mOrientation is already the composition of (2) and (3)
+     * mTransform is already the composition of (2) and (3)
      * (NOTE: the matrices are multiplied in reverse order)
      */
 
     const Transform bufferOrientation(mCurrentTransform);
-    const Transform layerOrientation(mOrientation);
-    const Transform tr(layerOrientation * bufferOrientation);
+    const Transform tr(mTransform * bufferOrientation);
 
     // this gives us only the "orientation" component of the transform
     const uint32_t finalTransform = tr.getOrientation();
diff --git a/services/surfaceflinger/LayerBase.cpp b/services/surfaceflinger/LayerBase.cpp
index 7bf73d9..4cc245a 100644
--- a/services/surfaceflinger/LayerBase.cpp
+++ b/services/surfaceflinger/LayerBase.cpp
@@ -257,6 +257,7 @@
 
     // cache a few things...
     mOrientation = tr.getOrientation();
+    mTransform = tr;
     mTransformedBounds = tr.makeBounds(w, h);
     mLeft = tr.tx();
     mTop  = tr.ty();
diff --git a/services/surfaceflinger/LayerBase.h b/services/surfaceflinger/LayerBase.h
index a3d3644..2cd3a94 100644
--- a/services/surfaceflinger/LayerBase.h
+++ b/services/surfaceflinger/LayerBase.h
@@ -247,6 +247,7 @@
 protected:
                 // cached during validateVisibility()
                 int32_t         mOrientation;
+                Transform       mTransform;
                 GLfloat         mVertices[4][2];
                 Rect            mTransformedBounds;
                 int             mLeft;
diff --git a/telephony/java/com/android/internal/telephony/IccCard.java b/telephony/java/com/android/internal/telephony/IccCard.java
index 02617c8..bce9991 100644
--- a/telephony/java/com/android/internal/telephony/IccCard.java
+++ b/telephony/java/com/android/internal/telephony/IccCard.java
@@ -268,7 +268,6 @@
     }
 
     public void supplyNetworkDepersonalization (String pin, Message onComplete) {
-        if(mDbg) log("Network Despersonalization: " + pin);
         mPhone.mCM.supplyNetworkDepersonalization(pin,
                 mHandler.obtainMessage(EVENT_PINPUK_DONE, onComplete));
     }
@@ -359,7 +358,6 @@
       */
      public void changeIccLockPassword(String oldPassword, String newPassword,
              Message onComplete) {
-         if(mDbg) log("Change Pin1 old: " + oldPassword + " new: " + newPassword);
          mPhone.mCM.changeIccPin(oldPassword, newPassword,
                  mHandler.obtainMessage(EVENT_CHANGE_ICC_PASSWORD_DONE, onComplete));
 
@@ -378,7 +376,6 @@
       */
      public void changeIccFdnPassword(String oldPassword, String newPassword,
              Message onComplete) {
-         if(mDbg) log("Change Pin2 old: " + oldPassword + " new: " + newPassword);
          mPhone.mCM.changeIccPin2(oldPassword, newPassword,
                  mHandler.obtainMessage(EVENT_CHANGE_ICC_PASSWORD_DONE, onComplete));
 
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/FsUtils.java b/tests/DumpRenderTree/src/com/android/dumprendertree/FsUtils.java
index b7d2c26..5e2a9fd 100644
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/FsUtils.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/FsUtils.java
@@ -141,7 +141,7 @@
             } else if (!path.startsWith(HTTP_LOCAL_TESTS_PREFIX)
                     && !path.startsWith(HTTP_MEDIA_TESTS_PREFIX)
                     && !path.startsWith(HTTP_WML_TESTS_PREFIX)) {
-                url = "http://127.0.0.1:8000/" + path.substring(HTTP_TESTS_PREFIX.length());
+                url = "http://127.0.0.1:18000/" + path.substring(HTTP_TESTS_PREFIX.length());
             } else {
                 url = "file://" + path;
             }
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/forwarder/ForwardService.java b/tests/DumpRenderTree/src/com/android/dumprendertree/forwarder/ForwardService.java
index 25dd04fd..7a277d7 100644
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/forwarder/ForwardService.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/forwarder/ForwardService.java
@@ -26,7 +26,7 @@
 
 public class ForwardService {
 
-    private ForwardServer fs8000, fs8080, fs8443;
+    private ForwardServer fs18000, fs8080, fs8443;
 
     private static ForwardService inst;
 
@@ -40,7 +40,7 @@
     private ForwardService() {
         int addr = getForwardHostAddr();
         if (addr != -1) {
-            fs8000 = new ForwardServer(8000, addr, 8000);
+            fs18000 = new ForwardServer(18000, addr, 8000);
             fs8080 = new ForwardServer(8080, addr, 8080);
             fs8443 = new ForwardServer(8443, addr, 8443);
         }
@@ -55,8 +55,8 @@
 
     public void startForwardService() {
         try {
-            if (fs8000 != null)
-                fs8000.start();
+            if (fs18000 != null)
+                fs18000.start();
             if (fs8080 != null)
                 fs8080.start();
             if (fs8443 != null)
@@ -68,9 +68,9 @@
     }
 
     public void stopForwardService() {
-        if (fs8000 != null) {
-            fs8000.stop();
-            fs8000 = null;
+        if (fs18000 != null) {
+            fs18000.stop();
+            fs18000 = null;
         }
         if (fs8080 != null) {
             fs8080.stop();