Merge "Do Not Merge. Don't connect to non keyboard HID devices." into honeycomb
diff --git a/api/11.xml b/api/11.xml
index 6ed9d22..d17325f 100644
--- a/api/11.xml
+++ b/api/11.xml
@@ -199955,6 +199955,25 @@
 >
 </field>
 </class>
+<class name="Base64DataException"
+ extends="java.io.IOException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Base64DataException"
+ type="android.util.Base64DataException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
 <class name="Base64InputStream"
  extends="java.io.FilterInputStream"
  abstract="false"
@@ -214823,6 +214842,19 @@
 <parameter name="selected" type="boolean">
 </parameter>
 </method>
+<method name="dispatchSystemUiVisibilityChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="visibility" type="int">
+</parameter>
+</method>
 <method name="dispatchTouchEvent"
  return="boolean"
  abstract="false"
@@ -215876,6 +215908,17 @@
  visibility="protected"
 >
 </method>
+<method name="getSystemUiVisibility"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
 <method name="getTag"
  return="java.lang.Object"
  abstract="false"
@@ -218126,6 +218169,19 @@
 <parameter name="l" type="android.view.View.OnLongClickListener">
 </parameter>
 </method>
+<method name="setOnSystemUiVisibilityChangeListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="l" type="android.view.View.OnSystemUiVisibilityChangeListener">
+</parameter>
+</method>
 <method name="setOnTouchListener"
  return="void"
  abstract="false"
@@ -218379,6 +218435,19 @@
 <parameter name="soundEffectsEnabled" type="boolean">
 </parameter>
 </method>
+<method name="setSystemUiVisibility"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="visibility" type="int">
+</parameter>
+</method>
 <method name="setTag"
  return="void"
  abstract="false"
@@ -219386,6 +219455,28 @@
  visibility="public"
 >
 </field>
+<field name="STATUS_BAR_HIDDEN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="STATUS_BAR_VISIBLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="VIEW_LOG_TAG"
  type="java.lang.String"
  transient="false"
@@ -219804,6 +219895,27 @@
 </parameter>
 </method>
 </interface>
+<interface name="View.OnSystemUiVisibilityChangeListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onSystemUiVisibilityChange"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="visibility" type="int">
+</parameter>
+</method>
+</interface>
 <interface name="View.OnTouchListener"
  abstract="true"
  static="true"
diff --git a/api/current.xml b/api/current.xml
index b3f03a6..0122b83 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -29889,6 +29889,17 @@
  visibility="public"
 >
 </method>
+<method name="isRemoving"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
 <method name="isResumed"
  return="boolean"
  abstract="false"
@@ -53797,6 +53808,17 @@
  visibility="public"
 >
 </field>
+<field name="EXTRA_LOCAL_ONLY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.extra.LOCAL_ONLY&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="EXTRA_PHONE_NUMBER"
  type="java.lang.String"
  transient="false"
@@ -199955,6 +199977,25 @@
 >
 </field>
 </class>
+<class name="Base64DataException"
+ extends="java.io.IOException"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Base64DataException"
+ type="android.util.Base64DataException"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="detailMessage" type="java.lang.String">
+</parameter>
+</constructor>
+</class>
 <class name="Base64InputStream"
  extends="java.io.FilterInputStream"
  abstract="false"
@@ -215899,8 +215940,6 @@
  deprecated="not deprecated"
  visibility="public"
 >
-<parameter name="visibility" type="int">
-</parameter>
 </method>
 <method name="getTag"
  return="java.lang.Object"
diff --git a/core/java/android/accounts/AccountManager.java b/core/java/android/accounts/AccountManager.java
index 6388dc5..5bdc79d 100644
--- a/core/java/android/accounts/AccountManager.java
+++ b/core/java/android/accounts/AccountManager.java
@@ -195,6 +195,13 @@
     public static final String KEY_CALLER_UID = "callerUid";
     public static final String KEY_CALLER_PID = "callerPid";
 
+    /**
+     * Boolean, if set and 'customTokens' the authenticator is responsible for
+     * notifications.
+     * @hide
+     */
+    public static final String KEY_NOTIFY_ON_FAILURE = "notifyOnAuthFailure";
+
     public static final String ACTION_AUTHENTICATOR_INTENT =
             "android.accounts.AccountAuthenticator";
     public static final String AUTHENTICATOR_META_DATA_NAME =
diff --git a/core/java/android/accounts/AccountManagerService.java b/core/java/android/accounts/AccountManagerService.java
index 2c99f14..fb16609 100644
--- a/core/java/android/accounts/AccountManagerService.java
+++ b/core/java/android/accounts/AccountManagerService.java
@@ -897,6 +897,9 @@
             // let authenticator know the identity of the caller
             loginOptions.putInt(AccountManager.KEY_CALLER_UID, callerUid);
             loginOptions.putInt(AccountManager.KEY_CALLER_PID, callerPid);
+            if (notifyOnAuthFailure) {
+                loginOptions.putBoolean(AccountManager.KEY_NOTIFY_ON_FAILURE, true);
+            }
         }
 
         long identityToken = clearCallingIdentity();
@@ -964,7 +967,7 @@
                         }
 
                         Intent intent = result.getParcelable(AccountManager.KEY_INTENT);
-                        if (intent != null && notifyOnAuthFailure) {
+                        if (intent != null && notifyOnAuthFailure && !customTokens) {
                             doNotification(
                                     account, result.getString(AccountManager.KEY_AUTH_FAILED_MESSAGE),
                                     intent);
diff --git a/core/java/android/accounts/GrantCredentialsPermissionActivity.java b/core/java/android/accounts/GrantCredentialsPermissionActivity.java
index 83e4fd9..89eee6d 100644
--- a/core/java/android/accounts/GrantCredentialsPermissionActivity.java
+++ b/core/java/android/accounts/GrantCredentialsPermissionActivity.java
@@ -51,9 +51,9 @@
     private final AccountManagerService accountManagerService = AccountManagerService.getSingleton();
 
     protected void onCreate(Bundle savedInstanceState) {
-        requestWindowFeature(Window.FEATURE_NO_TITLE);
         super.onCreate(savedInstanceState);
         setContentView(R.layout.grant_credentials_permission);
+        setTitle(R.string.grant_permissions_header_text);
 
         mInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
 
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 511ddc1..960b943 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -2385,7 +2385,9 @@
             performPauseActivity(token, finished, r.isPreHoneycomb());
 
             // Make sure any pending writes are now committed.
-            QueuedWork.waitToFinish();
+            if (r.isPreHoneycomb()) {
+                QueuedWork.waitToFinish();
+            }
             
             // Tell the activity manager we have paused.
             try {
@@ -2583,6 +2585,11 @@
 
         updateVisibility(r, show);
 
+        // Make sure any pending writes are now committed.
+        if (!r.isPreHoneycomb()) {
+            QueuedWork.waitToFinish();
+        }
+
         // Tell activity manager we have been stopped.
         try {
             ActivityManagerNative.getDefault().activityStopped(
@@ -2647,6 +2654,12 @@
                 }
                 r.stopped = true;
             }
+
+            // Make sure any pending writes are now committed.
+            if (!r.isPreHoneycomb()) {
+                QueuedWork.waitToFinish();
+            }
+
             // Tell activity manager we slept.
             try {
                 ActivityManagerNative.getDefault().activitySlept(r.token);
diff --git a/core/java/android/app/Dialog.java b/core/java/android/app/Dialog.java
index 7365670..f4fa567 100644
--- a/core/java/android/app/Dialog.java
+++ b/core/java/android/app/Dialog.java
@@ -85,6 +85,7 @@
      */
     protected boolean mCancelable = true;
 
+    private String mCancelAndDismissTaken;
     private Message mCancelMessage;
     private Message mDismissMessage;
     private Message mShowMessage;
@@ -1029,6 +1030,11 @@
      * @param listener The {@link DialogInterface.OnCancelListener} to use.
      */
     public void setOnCancelListener(final OnCancelListener listener) {
+        if (mCancelAndDismissTaken != null) {
+            throw new IllegalStateException(
+                    "OnCancelListener is already taken by "
+                    + mCancelAndDismissTaken + " and can not be replaced.");
+        }
         if (listener != null) {
             mCancelMessage = mListenersHandler.obtainMessage(CANCEL, listener);
         } else {
@@ -1050,6 +1056,11 @@
      * @param listener The {@link DialogInterface.OnDismissListener} to use.
      */
     public void setOnDismissListener(final OnDismissListener listener) {
+        if (mCancelAndDismissTaken != null) {
+            throw new IllegalStateException(
+                    "OnDismissListener is already taken by "
+                    + mCancelAndDismissTaken + " and can not be replaced.");
+        }
         if (listener != null) {
             mDismissMessage = mListenersHandler.obtainMessage(DISMISS, listener);
         } else {
@@ -1077,6 +1088,22 @@
         mDismissMessage = msg;
     }
 
+    /** @hide */
+    public boolean takeCancelAndDismissListeners(String msg, final OnCancelListener cancel,
+            final OnDismissListener dismiss) {
+        if (mCancelAndDismissTaken != null) {
+            mCancelAndDismissTaken = null;
+        } else if (mCancelMessage != null || mDismissMessage != null) {
+            return false;
+        }
+        
+        setOnCancelListener(cancel);
+        setOnDismissListener(dismiss);
+        mCancelAndDismissTaken = msg;
+        
+        return true;
+    }
+    
     /**
      * By default, this will use the owner Activity's suggested stream type.
      * 
diff --git a/core/java/android/app/DialogFragment.java b/core/java/android/app/DialogFragment.java
index 0bc89e7..50953d7 100644
--- a/core/java/android/app/DialogFragment.java
+++ b/core/java/android/app/DialogFragment.java
@@ -16,6 +16,7 @@
 
 package android.app;
 
+import android.content.Context;
 import android.content.DialogInterface;
 import android.os.Bundle;
 import android.view.LayoutInflater;
@@ -340,8 +341,54 @@
             mShowsDialog = savedInstanceState.getBoolean(SAVED_SHOWS_DIALOG, mShowsDialog);
             mBackStackId = savedInstanceState.getInt(SAVED_BACK_STACK_ID, -1);
         }
+        
     }
 
+    /** @hide */
+    @Override
+    public LayoutInflater getLayoutInflater(Bundle savedInstanceState) {
+        if (!mShowsDialog) {
+            return super.getLayoutInflater(savedInstanceState);
+        }
+
+        mDialog = onCreateDialog(savedInstanceState);
+        mDestroyed = false;
+        switch (mStyle) {
+            case STYLE_NO_INPUT:
+                mDialog.getWindow().addFlags(
+                        WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE |
+                        WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
+                // fall through...
+            case STYLE_NO_FRAME:
+            case STYLE_NO_TITLE:
+                mDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
+        }
+        return (LayoutInflater)mDialog.getContext().getSystemService(
+                Context.LAYOUT_INFLATER_SERVICE);
+    }
+    
+    /**
+     * Override to build your own custom Dialog container.  This is typically
+     * used to show an AlertDialog instead of a generic Dialog; when doing so,
+     * {@link #onCreateView(LayoutInflater, ViewGroup, Bundle)} does not need
+     * to be implemented since the AlertDialog takes care of its own content.
+     * 
+     * <p>This method will be called after {@link #onCreate(Bundle)} and
+     * before {@link #onCreateView(LayoutInflater, ViewGroup, Bundle)}.  The
+     * default implementation simply instantiates and returns a {@link Dialog}
+     * class.
+     * 
+     * <p><em>Note: DialogFragment own the {@link Dialog#setOnCancelListener
+     * Dialog.setOnCancelListener} and {@link Dialog#setOnDismissListener
+     * Dialog.setOnDismissListener} callbacks.  You must not set them yourself.</em>
+     * To find out about these events, override {@link #onCancel(DialogInterface)}
+     * and {@link #onDismiss(DialogInterface)}.</p>
+     * 
+     * @param savedInstanceState The last saved instance state of the Fragment,
+     * or null if this is a freshly created Fragment.
+     * 
+     * @return Return a new Dialog instance to be displayed by the Fragment.
+     */
     public Dialog onCreateDialog(Bundle savedInstanceState) {
         return new Dialog(getActivity(), getTheme());
     }
@@ -367,18 +414,6 @@
             return;
         }
 
-        mDialog = onCreateDialog(savedInstanceState);
-        mDestroyed = false;
-        switch (mStyle) {
-            case STYLE_NO_INPUT:
-                mDialog.getWindow().addFlags(
-                        WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE |
-                        WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
-                // fall through...
-            case STYLE_NO_FRAME:
-            case STYLE_NO_TITLE:
-                mDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
-        }
         View view = getView();
         if (view != null) {
             if (view.getParent() != null) {
@@ -388,8 +423,10 @@
         }
         mDialog.setOwnerActivity(getActivity());
         mDialog.setCancelable(mCancelable);
-        mDialog.setOnCancelListener(this);
-        mDialog.setOnDismissListener(this);
+        if (!mDialog.takeCancelAndDismissListeners("DialogFragment", this, this)) {
+            throw new IllegalStateException(
+                    "You can not set Dialog's OnCancelListener or OnDismissListener");
+        }
         if (savedInstanceState != null) {
             Bundle dialogState = savedInstanceState.getBundle(SAVED_DIALOG_STATE_TAG);
             if (dialogState != null) {
diff --git a/core/java/android/app/Fragment.java b/core/java/android/app/Fragment.java
index 3280b22..8982110f 100644
--- a/core/java/android/app/Fragment.java
+++ b/core/java/android/app/Fragment.java
@@ -357,6 +357,9 @@
     // True if the fragment is in the list of added fragments.
     boolean mAdded;
     
+    // If set this fragment is being removed from its activity.
+    boolean mRemoving;
+
     // True if the fragment is in the resumed state.
     boolean mResumed;
     
@@ -638,6 +641,9 @@
      * Return <code>getActivity().getResources()</code>.
      */
     final public Resources getResources() {
+        if (mActivity == null) {
+            throw new IllegalStateException("Fragment " + this + " not attached to Activity");
+        }
         return mActivity.getResources();
     }
     
@@ -689,7 +695,16 @@
      * Return true if the fragment is currently added to its activity.
      */
     final public boolean isAdded() {
-        return mActivity != null && mActivity.mFragments.mAdded.contains(this);
+        return mActivity != null && mAdded;
+    }
+
+    /**
+     * Return true if this fragment is currently being removed from its
+     * activity.  This is  <em>not</em> whether its activity is finishing, but
+     * rather whether it is in the process of being removed from its activity.
+     */
+    final public boolean isRemoving() {
+        return mRemoving;
     }
     
     /**
@@ -787,6 +802,9 @@
         if (mLoaderManager != null) {
             return mLoaderManager;
         }
+        if (mActivity == null) {
+            throw new IllegalStateException("Fragment " + this + " not attached to Activity");
+        }
         mCheckedForLoaderManager = true;
         mLoaderManager = mActivity.getLoaderManager(mIndex, mLoadersStarted, true);
         return mLoaderManager;
@@ -797,6 +815,9 @@
      * containing Activity.
      */
     public void startActivity(Intent intent) {
+        if (mActivity == null) {
+            throw new IllegalStateException("Fragment " + this + " not attached to Activity");
+        }
         mActivity.startActivityFromFragment(this, intent, -1);
     }
     
@@ -805,6 +826,9 @@
      * containing Activity.
      */
     public void startActivityForResult(Intent intent, int requestCode) {
+        if (mActivity == null) {
+            throw new IllegalStateException("Fragment " + this + " not attached to Activity");
+        }
         mActivity.startActivityFromFragment(this, intent, requestCode);
     }
     
@@ -826,6 +850,15 @@
     }
     
     /**
+     * @hide Hack so that DialogFragment can make its Dialog before creating
+     * its views, and the view construction can use the dialog's context for
+     * inflation.  Maybe this should become a public API. Note sure.
+     */
+    public LayoutInflater getLayoutInflater(Bundle savedInstanceState) {
+        return mActivity.getLayoutInflater();
+    }
+    
+    /**
      * Called when a fragment is being created as part of a view layout
      * inflation, typically from setting the content view of an activity.  This
      * will be called immediately after the fragment is created from a <fragment>
@@ -1217,6 +1250,7 @@
                 writer.print(" mWho="); writer.print(mWho);
                 writer.print(" mBackStackNesting="); writer.println(mBackStackNesting);
         writer.print(prefix); writer.print("mAdded="); writer.print(mAdded);
+                writer.print(" mRemoving="); writer.print(mRemoving);
                 writer.print(" mResumed="); writer.print(mResumed);
                 writer.print(" mFromLayout="); writer.print(mFromLayout);
                 writer.print(" mInLayout="); writer.println(mInLayout);
diff --git a/core/java/android/app/FragmentManager.java b/core/java/android/app/FragmentManager.java
index e729805..52b3108 100644
--- a/core/java/android/app/FragmentManager.java
+++ b/core/java/android/app/FragmentManager.java
@@ -28,6 +28,8 @@
 import android.os.Parcelable;
 import android.util.DebugUtils;
 import android.util.Log;
+import android.util.LogWriter;
+import android.util.Slog;
 import android.util.SparseArray;
 import android.view.Menu;
 import android.view.MenuInflater;
@@ -703,7 +705,7 @@
                         // For fragments that are part of the content view
                         // layout, we need to instantiate the view immediately
                         // and the inflater will take care of adding it.
-                        f.mView = f.onCreateView(mActivity.getLayoutInflater(),
+                        f.mView = f.onCreateView(f.getLayoutInflater(f.mSavedFragmentState),
                                 null, f.mSavedFragmentState);
                         if (f.mView != null) {
                             f.mView.setSaveFromParentEnabled(false);
@@ -725,7 +727,7 @@
                                 }
                             }
                             f.mContainer = container;
-                            f.mView = f.onCreateView(mActivity.getLayoutInflater(),
+                            f.mView = f.onCreateView(f.getLayoutInflater(f.mSavedFragmentState),
                                     container, f.mSavedFragmentState);
                             if (f.mView != null) {
                                 f.mView.setSaveFromParentEnabled(false);
@@ -968,6 +970,7 @@
         makeActive(fragment);
         if (DEBUG) Log.v(TAG, "add: " + fragment);
         fragment.mAdded = true;
+        fragment.mRemoving = false;
         if (fragment.mHasMenu) {
             mNeedMenuInvalidate = true;
         }
@@ -984,6 +987,7 @@
             mNeedMenuInvalidate = true;
         }
         fragment.mAdded = false;
+        fragment.mRemoving = true;
         moveToState(fragment, inactive ? Fragment.INITIALIZING : Fragment.CREATED,
                 transition, transitionStyle);
         if (inactive) {
@@ -1376,6 +1380,14 @@
                     }
 
                     if (f.mTarget != null) {
+                        if (f.mTarget.mIndex < 0) {
+                            String msg = "Failure saving state: " + f
+                                + " has target not in fragment manager: " + f.mTarget;
+                            Slog.e(TAG, msg);
+                            dump("  ", null, new PrintWriter(new LogWriter(
+                                    Log.ERROR, TAG, Log.LOG_ID_SYSTEM)), new String[] { });
+                            throw new IllegalStateException(msg);
+                        }
                         if (fs.mSavedFragmentState == null) {
                             fs.mSavedFragmentState = new Bundle();
                         }
diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java
index 60213f8..c406524 100644
--- a/core/java/android/app/LoadedApk.java
+++ b/core/java/android/app/LoadedApk.java
@@ -567,6 +567,7 @@
             } else {
                 rd.validate(context, handler);
             }
+            rd.mForgotten = false;
             return rd.getIIntentReceiver();
         }
     }
@@ -596,6 +597,7 @@
                         rd.setUnregisterLocation(ex);
                         holder.put(r, rd);
                     }
+                    rd.mForgotten = true;
                     return rd.getIIntentReceiver();
                 }
             }
@@ -666,6 +668,7 @@
         final boolean mRegistered;
         final IntentReceiverLeaked mLocation;
         RuntimeException mUnregisterLocation;
+        boolean mForgotten;
 
         final class Args extends BroadcastReceiver.PendingResult implements Runnable {
             private Intent mCurIntent;
@@ -696,7 +699,7 @@
                 final Intent intent = mCurIntent;
                 mCurIntent = null;
                 
-                if (receiver == null || !mRegistered) {
+                if (receiver == null || mForgotten) {
                     if (mRegistered && ordered) {
                         if (ActivityThread.DEBUG_BROADCAST) Slog.i(ActivityThread.TAG,
                                 "Finishing null broadcast to " + mReceiver);
diff --git a/core/java/android/content/AsyncTaskLoader.java b/core/java/android/content/AsyncTaskLoader.java
index 3d6182b..a7dd5fb 100644
--- a/core/java/android/content/AsyncTaskLoader.java
+++ b/core/java/android/content/AsyncTaskLoader.java
@@ -195,7 +195,7 @@
                 }
             }
             if (DEBUG) Slog.v(TAG, "Executing: " + mTask);
-            mTask.execute((Void[]) null);
+            mTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, (Void[]) null);
         }
     }
 
diff --git a/core/java/android/content/ContentProvider.java b/core/java/android/content/ContentProvider.java
index 5467a30..1764e11 100644
--- a/core/java/android/content/ContentProvider.java
+++ b/core/java/android/content/ContentProvider.java
@@ -899,7 +899,7 @@
                     return null;
                 }
             };
-            task.execute((Object[])null);
+            task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, (Object[])null);
 
             return fds[0];
         } catch (IOException e) {
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index ca5ff24..6e3663e 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -859,11 +859,19 @@
      * only pick from data that can be represented as a stream.  This is
      * accomplished by requiring the {@link #CATEGORY_OPENABLE} in the Intent.
      * <p>
+     * Callers can optionally specify {@link #EXTRA_LOCAL_ONLY} to request that
+     * the launched content chooser only return results representing data that
+     * is locally available on the device.  For example, if this extra is set
+     * to true then an image picker should not show any pictures that are available
+     * from a remote server but not already on the local device (thus requiring
+     * they be downloaded when opened).
+     * <p>
      * Input: {@link #getType} is the desired MIME type to retrieve.  Note
      * that no URI is supplied in the intent, as there are no constraints on
      * where the returned data originally comes from.  You may also include the
      * {@link #CATEGORY_OPENABLE} if you can only accept data that can be
-     * opened as a stream.
+     * opened as a stream.  You may use {@link #EXTRA_LOCAL_ONLY} to limit content
+     * selection to local data.
      * <p>
      * Output: The URI of the item that was picked.  This must be a content:
      * URI so that any receiver can access it.
@@ -2397,6 +2405,18 @@
     public static final String EXTRA_CLIENT_INTENT =
             "android.intent.extra.client_intent";
 
+    /**
+     * Used to indicate that a {@link #ACTION_GET_CONTENT} intent should only return
+     * data that is on the local device.  This is a boolean extra; the default
+     * is false.  If true, an implementation of ACTION_GET_CONTENT should only allow
+     * the user to select media that is already on the device, not requiring it
+     * be downloaded from a remote service when opened.  Another way to look
+     * at it is that such content should generally have a "_data" column to the
+     * path of the content on local external storage.
+     */
+    public static final String EXTRA_LOCAL_ONLY =
+        "android.intent.extra.LOCAL_ONLY";
+    
     // ---------------------------------------------------------------------
     // ---------------------------------------------------------------------
     // Intent flags (see mFlags variable).
diff --git a/core/java/android/inputmethodservice/IInputMethodSessionWrapper.java b/core/java/android/inputmethodservice/IInputMethodSessionWrapper.java
index 01fc010..df8cf9a 100644
--- a/core/java/android/inputmethodservice/IInputMethodSessionWrapper.java
+++ b/core/java/android/inputmethodservice/IInputMethodSessionWrapper.java
@@ -76,6 +76,8 @@
     }
 
     public void executeMessage(Message msg) {
+        if (mInputMethodSession == null) return;
+
         switch (msg.what) {
             case DO_FINISH_INPUT:
                 mInputMethodSession.finishInput();
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index f35a438..255eb6c 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -49,6 +49,7 @@
 import android.view.WindowManager;
 import android.view.animation.AnimationUtils;
 import android.view.inputmethod.CompletionInfo;
+import android.view.inputmethod.EditorInfo;
 import android.view.inputmethod.ExtractedText;
 import android.view.inputmethod.ExtractedTextRequest;
 import android.view.inputmethod.InputBinding;
@@ -56,7 +57,6 @@
 import android.view.inputmethod.InputMethod;
 import android.view.inputmethod.InputMethodManager;
 import android.view.inputmethod.InputMethodSubtype;
-import android.view.inputmethod.EditorInfo;
 import android.widget.Button;
 import android.widget.FrameLayout;
 import android.widget.LinearLayout;
@@ -1024,7 +1024,7 @@
      * there is no hard keyboard or the keyboard is hidden.  If you change what
      * this returns, you will need to call {@link #updateInputViewShown()}
      * yourself whenever the returned value may have changed to have it
-     * re-evalauted and applied.
+     * re-evaluated and applied.
      */
     public boolean onEvaluateInputViewShown() {
         Configuration config = getResources().getConfiguration();
diff --git a/core/java/android/inputmethodservice/SoftInputWindow.java b/core/java/android/inputmethodservice/SoftInputWindow.java
index 6a54846..343242e 100644
--- a/core/java/android/inputmethodservice/SoftInputWindow.java
+++ b/core/java/android/inputmethodservice/SoftInputWindow.java
@@ -19,11 +19,16 @@
 import android.app.Dialog;
 import android.content.Context;
 import android.content.pm.ActivityInfo;
+import android.graphics.Rect;
 import android.os.IBinder;
 import android.view.Gravity;
 import android.view.KeyEvent;
+import android.view.MotionEvent;
+import android.view.View;
 import android.view.WindowManager;
 
+import java.lang.Math;
+
 /**
  * A SoftInputWindow is a Dialog that is intended to be used for a top-level input
  * method window.  It will be displayed along the edge of the screen, moving
@@ -32,6 +37,7 @@
  */
 class SoftInputWindow extends Dialog {
     final KeyEvent.DispatcherState mDispatcherState;
+    private final Rect mBounds = new Rect();
     
     public void setToken(IBinder token) {
         WindowManager.LayoutParams lp = getWindow().getAttributes();
@@ -64,6 +70,13 @@
         mDispatcherState.reset();
     }
 
+    @Override
+    public boolean dispatchTouchEvent(MotionEvent ev) {
+        getWindow().getDecorView().getHitRect(mBounds);
+        final MotionEvent event = clipMotionEvent(ev, mBounds);
+        return super.dispatchTouchEvent(event);
+    }
+
     /**
      * Get the size of the DockWindow.
      * 
@@ -150,4 +163,48 @@
                 WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE |
                 WindowManager.LayoutParams.FLAG_DIM_BEHIND);
     }
+
+    private static MotionEvent clipMotionEvent(MotionEvent me, Rect bounds) {
+        final int pointerCount = me.getPointerCount();
+        boolean shouldClip = false;
+        for (int pointerIndex = 0; pointerIndex < pointerCount; pointerIndex++) {
+            final int x = (int)me.getX(pointerIndex);
+            final int y = (int)me.getY(pointerIndex);
+            if (!bounds.contains(x, y)) {
+                shouldClip = true;
+                break;
+            }
+        }
+        if (!shouldClip)
+            return me;
+
+        if (pointerCount == 1) {
+            final int x = (int)me.getX();
+            final int y = (int)me.getY();
+            me.setLocation(
+                    Math.max(bounds.left, Math.min(x, bounds.right - 1)),
+                    Math.max(bounds.top, Math.min(y, bounds.bottom - 1)));
+            return me;
+        }
+
+        final int[] pointerIds = new int[pointerCount];
+        final MotionEvent.PointerCoords[] pointerCoords =
+            new MotionEvent.PointerCoords[pointerCount];
+        for (int pointerIndex = 0; pointerIndex < pointerCount; pointerIndex++) {
+            pointerIds[pointerIndex] = me.getPointerId(pointerIndex);
+            final MotionEvent.PointerCoords coords = new MotionEvent.PointerCoords();
+            me.getPointerCoords(pointerIndex, coords);
+            pointerCoords[pointerIndex] = coords;
+            final int x = (int)coords.x;
+            final int y = (int)coords.y;
+            if (!bounds.contains(x, y)) {
+                coords.x = Math.max(bounds.left, Math.min(x, bounds.right - 1));
+                coords.y = Math.max(bounds.top, Math.min(y, bounds.bottom - 1));
+            }
+        }
+        return MotionEvent.obtain(
+                me.getDownTime(), me.getEventTime(), me.getAction(), pointerCount, pointerIds,
+                pointerCoords, me.getMetaState(), me.getXPrecision(), me.getYPrecision(),
+                me.getDeviceId(), me.getEdgeFlags(), me.getSource(), me.getFlags());
+    }
 }
diff --git a/core/java/android/net/http/SslCertificate.java b/core/java/android/net/http/SslCertificate.java
index 30f25a2..bba11b0 100644
--- a/core/java/android/net/http/SslCertificate.java
+++ b/core/java/android/net/http/SslCertificate.java
@@ -25,8 +25,8 @@
 
 import java.security.cert.X509Certificate;
 
-import org.bouncycastle.asn1.DERObjectIdentifier;
-import org.bouncycastle.asn1.x509.X509Name;
+import com.android.org.bouncycastle.asn1.DERObjectIdentifier;
+import com.android.org.bouncycastle.asn1.x509.X509Name;
 
 /**
  * SSL certificate info (certificate details) class
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 4f21265..257f275 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -1680,6 +1680,16 @@
         public static final String POINTER_LOCATION = "pointer_location";
 
         /**
+         * Log raw orientation data from {@link WindowOrientationListener} for use with the
+         * orientationplot.py tool.
+         * 0 = no
+         * 1 = yes
+         * @hide
+         */
+        public static final String WINDOW_ORIENTATION_LISTENER_LOG =
+                "window_orientation_listener_log";
+
+        /**
          * Whether to play a sound for low-battery alerts.
          * @hide
          */
diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java
index 52b0643..44887ed 100644
--- a/core/java/android/service/wallpaper/WallpaperService.java
+++ b/core/java/android/service/wallpaper/WallpaperService.java
@@ -546,7 +546,8 @@
                         sizeChanged = true;
                         mCurHeight = h;
                     }
-                    
+
+                    mSurfaceHolder.setSurfaceFrameSize(w, h);
                     mSurfaceHolder.mSurfaceLock.unlock();
 
                     if (!mSurfaceHolder.mSurface.isValid()) {
diff --git a/core/java/android/text/DynamicLayout.java b/core/java/android/text/DynamicLayout.java
index b6aa03a..403f20e 100644
--- a/core/java/android/text/DynamicLayout.java
+++ b/core/java/android/text/DynamicLayout.java
@@ -341,55 +341,47 @@
         }
     }
 
-    private void dump(boolean show) {
-        int n = getLineCount();
-
-        for (int i = 0; i < n; i++) {
-            System.out.print("line " + i + ": " + getLineStart(i) + " to " + getLineEnd(i) + " ");
-
-            if (show) {
-                System.out.print(getText().subSequence(getLineStart(i),
-                                                       getLineEnd(i)));
-            }
-
-            System.out.println("");
-        }
-
-        System.out.println("");
-    }
-
+    @Override
     public int getLineCount() {
         return mInts.size() - 1;
     }
 
+    @Override
     public int getLineTop(int line) {
         return mInts.getValue(line, TOP);
     }
 
+    @Override
     public int getLineDescent(int line) {
         return mInts.getValue(line, DESCENT);
     }
 
+    @Override
     public int getLineStart(int line) {
         return mInts.getValue(line, START) & START_MASK;
     }
 
+    @Override
     public boolean getLineContainsTab(int line) {
         return (mInts.getValue(line, TAB) & TAB_MASK) != 0;
     }
 
+    @Override
     public int getParagraphDirection(int line) {
         return mInts.getValue(line, DIR) >> DIR_SHIFT;
     }
 
+    @Override
     public final Directions getLineDirections(int line) {
         return mObjects.getValue(line, 0);
     }
 
+    @Override
     public int getTopPadding() {
         return mTopPadding;
     }
 
+    @Override
     public int getBottomPadding() {
         return mBottomPadding;
     }
@@ -403,11 +395,11 @@
     implements TextWatcher, SpanWatcher
     {
         public ChangeWatcher(DynamicLayout layout) {
-            mLayout = new WeakReference(layout);
+            mLayout = new WeakReference<DynamicLayout>(layout);
         }
 
         private void reflow(CharSequence s, int where, int before, int after) {
-            DynamicLayout ml = (DynamicLayout) mLayout.get();
+            DynamicLayout ml = mLayout.get();
 
             if (ml != null)
                 ml.reflow(s, where, before, after);
@@ -417,7 +409,6 @@
 
         public void beforeTextChanged(CharSequence s,
                                       int where, int before, int after) {
-            ;
         }
 
         public void onTextChanged(CharSequence s,
@@ -426,7 +417,6 @@
         }
 
         public void afterTextChanged(Editable s) {
-            ;
         }
 
         public void onSpanAdded(Spannable s, Object o, int start, int end) {
@@ -447,9 +437,10 @@
             }
         }
 
-        private WeakReference mLayout;
+        private WeakReference<DynamicLayout> mLayout;
     }
 
+    @Override
     public int getEllipsisStart(int line) {
         if (mEllipsizeAt == null) {
             return 0;
@@ -458,6 +449,7 @@
         return mInts.getValue(line, ELLIPSIS_START);
     }
 
+    @Override
     public int getEllipsisCount(int line) {
         if (mEllipsizeAt == null) {
             return 0;
@@ -494,7 +486,6 @@
     private static final int COLUMNS_ELLIPSIZE = 5;
 
     private static final int START_MASK = 0x1FFFFFFF;
-    private static final int DIR_MASK   = 0xC0000000;
     private static final int DIR_SHIFT  = 30;
     private static final int TAB_MASK   = 0x20000000;
 
diff --git a/core/java/android/text/TextLine.java b/core/java/android/text/TextLine.java
index a6fd2f1..90279d1 100644
--- a/core/java/android/text/TextLine.java
+++ b/core/java/android/text/TextLine.java
@@ -90,13 +90,11 @@
         tl.mText = null;
         tl.mPaint = null;
         tl.mDirections = null;
-        if (tl.mLen < 250) {
-            synchronized(cached) {
-                for (int i = 0; i < cached.length; ++i) {
-                    if (cached[i] == null) {
-                        cached[i] = tl;
-                        break;
-                    }
+        synchronized(cached) {
+            for (int i = 0; i < cached.length; ++i) {
+                if (cached[i] == null) {
+                    cached[i] = tl;
+                    break;
                 }
             }
         }
diff --git a/core/java/android/text/method/LinkMovementMethod.java b/core/java/android/text/method/LinkMovementMethod.java
index 9e73371..aff233d 100644
--- a/core/java/android/text/method/LinkMovementMethod.java
+++ b/core/java/android/text/method/LinkMovementMethod.java
@@ -42,9 +42,9 @@
             case KeyEvent.KEYCODE_DPAD_CENTER:
             case KeyEvent.KEYCODE_ENTER:
                 if (KeyEvent.metaStateHasNoModifiers(movementMetaState)) {
-                    if (event.getAction() == KeyEvent.ACTION_DOWN
-                            && event.getRepeatCount() == 0) {
-                        return action(CLICK, widget, buffer);
+                    if (event.getAction() == KeyEvent.ACTION_DOWN &&
+                            event.getRepeatCount() == 0 && action(CLICK, widget, buffer)) {
+                        return true;
                     }
                 }
                 break;
diff --git a/core/java/android/util/Base64DataException.java b/core/java/android/util/Base64DataException.java
new file mode 100644
index 0000000..de12ee1
--- /dev/null
+++ b/core/java/android/util/Base64DataException.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.util;
+
+import java.io.IOException;
+
+/**
+ * This exception is thrown by {@link Base64InputStream} or {@link Base64OutputStream}
+ * when an error is detected in the data being decoded.  This allows problems with the base64 data
+ * to be disambiguated from errors in the underlying streams (e.g. actual connection errors.)
+ */
+public class Base64DataException extends IOException {
+    public Base64DataException(String detailMessage) {
+        super(detailMessage);
+    }
+}
diff --git a/core/java/android/util/Base64InputStream.java b/core/java/android/util/Base64InputStream.java
index e9dac24..9eba5b5 100644
--- a/core/java/android/util/Base64InputStream.java
+++ b/core/java/android/util/Base64InputStream.java
@@ -145,7 +145,7 @@
             success = coder.process(inputBuffer, 0, bytesRead, false);
         }
         if (!success) {
-            throw new IOException("bad base-64");
+            throw new Base64DataException("bad base-64");
         }
         outputEnd = coder.op;
         outputStart = 0;
diff --git a/core/java/android/util/Base64OutputStream.java b/core/java/android/util/Base64OutputStream.java
index 30d632d..4535d1c 100644
--- a/core/java/android/util/Base64OutputStream.java
+++ b/core/java/android/util/Base64OutputStream.java
@@ -136,7 +136,7 @@
     private void internalWrite(byte[] b, int off, int len, boolean finish) throws IOException {
         coder.output = embiggen(coder.output, coder.maxOutputSize(len));
         if (!coder.process(b, off, len, finish)) {
-            throw new IOException("bad base-64");
+            throw new Base64DataException("bad base-64");
         }
         out.write(coder.output, 0, coder.op);
     }
diff --git a/core/java/android/util/LogWriter.java b/core/java/android/util/LogWriter.java
new file mode 100644
index 0000000..ce30631b
--- /dev/null
+++ b/core/java/android/util/LogWriter.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.util;
+
+import java.io.Writer;
+
+/** @hide */
+public class LogWriter extends Writer {
+    private final int mPriority;
+    private final String mTag;
+    private final int mBuffer;
+    private StringBuilder mBuilder = new StringBuilder(128);
+
+    /**
+     * Create a new Writer that sends to the log with the given priority
+     * and tag.
+     *
+     * @param priority The desired log priority:
+     * {@link android.util.Log#VERBOSE Log.VERBOSE},
+     * {@link android.util.Log#DEBUG Log.DEBUG},
+     * {@link android.util.Log#INFO Log.INFO},
+     * {@link android.util.Log#WARN Log.WARN}, or
+     * {@link android.util.Log#ERROR Log.ERROR}.
+     * @param tag A string tag to associate with each printed log statement.
+     */
+    public LogWriter(int priority, String tag) {
+        mPriority = priority;
+        mTag = tag;
+        mBuffer = Log.LOG_ID_MAIN;
+    }
+
+    /**
+     * @hide
+     * Same as above, but buffer is one of the LOG_ID_ constants from android.util.Log.
+     */
+    public LogWriter(int priority, String tag, int buffer) {
+        mPriority = priority;
+        mTag = tag;
+        mBuffer = buffer;
+    }
+
+    @Override public void close() {
+        flushBuilder();
+    }
+
+    @Override public void flush() {
+        flushBuilder();
+    }
+
+    @Override public void write(char[] buf, int offset, int count) {
+        for(int i = 0; i < count; i++) {
+            char c = buf[offset + i];
+            if ( c == '\n') {
+                flushBuilder();
+            }
+            else {
+                mBuilder.append(c);
+            }
+        }
+    }
+
+    private void flushBuilder() {
+        if (mBuilder.length() > 0) {
+            Log.println_native(mBuffer, mPriority, mTag, mBuilder.toString());
+            mBuilder.delete(0, mBuilder.length());
+        }
+    }
+}
diff --git a/core/java/android/view/GLES20Canvas.java b/core/java/android/view/GLES20Canvas.java
index dce1a6c..dac3135 100644
--- a/core/java/android/view/GLES20Canvas.java
+++ b/core/java/android/view/GLES20Canvas.java
@@ -192,21 +192,36 @@
         nSetViewport(mRenderer, width, height);
     }
     
-    private native void nSetViewport(int renderer, int width, int height);
+    private static native void nSetViewport(int renderer, int width, int height);
 
-    @Override
-    void onPreDraw() {
-        nPrepare(mRenderer, mOpaque);
+    /**
+     * @hide
+     */
+    public static boolean preserveBackBuffer() {
+        return nPreserveBackBuffer();
     }
 
-    private native void nPrepare(int renderer, boolean opaque);
+    private static native boolean nPreserveBackBuffer();    
+    
+    @Override
+    void onPreDraw(Rect dirty) {
+        if (dirty != null) {
+            nPrepareDirty(mRenderer, dirty.left, dirty.top, dirty.right, dirty.bottom, mOpaque);
+        } else {
+            nPrepare(mRenderer, mOpaque);
+        }
+    }
+
+    private static native void nPrepare(int renderer, boolean opaque);
+    private static native void nPrepareDirty(int renderer, int left, int top, int right, int bottom,
+            boolean opaque);
 
     @Override
     void onPostDraw() {
         nFinish(mRenderer);
     }
     
-    private native void nFinish(int renderer);
+    private static native void nFinish(int renderer);
 
     @Override
     public boolean acquireContext() {
@@ -217,14 +232,14 @@
         return mContextLocked;
     }
 
-    private native void nAcquireContext(int renderer);
+    private static native void nAcquireContext(int renderer);
 
     @Override
     public boolean callDrawGLFunction(int drawGLFunction) {
         return nCallDrawGLFunction(mRenderer, drawGLFunction);
     }
 
-    private native boolean nCallDrawGLFunction(int renderer, int drawGLFunction);
+    private static native boolean nCallDrawGLFunction(int renderer, int drawGLFunction);
 
     @Override
     public void releaseContext() {
@@ -234,7 +249,7 @@
         }
     }
 
-    private native void nReleaseContext(int renderer);
+    private static native void nReleaseContext(int renderer);
     
     ///////////////////////////////////////////////////////////////////////////
     // Display list
@@ -244,7 +259,7 @@
         return nGetDisplayList(mRenderer);
     }
 
-    private native int nGetDisplayList(int renderer);
+    private static native int nGetDisplayList(int renderer);
     
     static void destroyDisplayList(int displayList) {
         nDestroyDisplayList(displayList);
@@ -257,7 +272,7 @@
         return nDrawDisplayList(mRenderer, ((GLES20DisplayList) displayList).mNativeDisplayList);
     }
 
-    private native boolean nDrawDisplayList(int renderer, int displayList);
+    private static native boolean nDrawDisplayList(int renderer, int displayList);
 
     ///////////////////////////////////////////////////////////////////////////
     // Hardware layer
@@ -271,7 +286,7 @@
         if (hasColorFilter) nResetModifiers(mRenderer);
     }
 
-    private native void nDrawLayer(int renderer, int layer, float x, float y, int paint);
+    private static native void nDrawLayer(int renderer, int layer, float x, float y, int paint);
     
     void interrupt() {
         nInterrupt(mRenderer);
@@ -281,8 +296,8 @@
         nResume(mRenderer);
     }
 
-    private native void nInterrupt(int renderer);
-    private native void nResume(int renderer);
+    private static native void nInterrupt(int renderer);
+    private static native void nResume(int renderer);
 
     ///////////////////////////////////////////////////////////////////////////
     // Clipping
@@ -303,7 +318,7 @@
         return nClipRect(mRenderer, left, top, right, bottom, Region.Op.INTERSECT.nativeInt);
     }
     
-    private native boolean nClipRect(int renderer, float left, float top,
+    private static native boolean nClipRect(int renderer, float left, float top,
             float right, float bottom, int op);
 
     @Override
@@ -316,7 +331,8 @@
         return nClipRect(mRenderer, left, top, right, bottom, Region.Op.INTERSECT.nativeInt);
     }
     
-    private native boolean nClipRect(int renderer, int left, int top, int right, int bottom, int op);
+    private static native boolean nClipRect(int renderer, int left, int top, int right, int bottom,
+            int op);
 
     @Override
     public boolean clipRect(Rect rect) {
@@ -355,14 +371,14 @@
         return nGetClipBounds(mRenderer, bounds);
     }
 
-    private native boolean nGetClipBounds(int renderer, Rect bounds);
+    private static native boolean nGetClipBounds(int renderer, Rect bounds);
 
     @Override
     public boolean quickReject(float left, float top, float right, float bottom, EdgeType type) {
         return nQuickReject(mRenderer, left, top, right, bottom, type.nativeInt);
     }
     
-    private native boolean nQuickReject(int renderer, float left, float top,
+    private static native boolean nQuickReject(int renderer, float left, float top,
             float right, float bottom, int edge);
 
     @Override
@@ -384,56 +400,56 @@
         if (dx != 0.0f || dy != 0.0f) nTranslate(mRenderer, dx, dy);
     }
     
-    private native void nTranslate(int renderer, float dx, float dy);
+    private static native void nTranslate(int renderer, float dx, float dy);
 
     @Override
     public void skew(float sx, float sy) {
         nSkew(mRenderer, sx, sy);
     }
 
-    private native void nSkew(int renderer, float sx, float sy);
+    private static native void nSkew(int renderer, float sx, float sy);
 
     @Override
     public void rotate(float degrees) {
         nRotate(mRenderer, degrees);
     }
     
-    private native void nRotate(int renderer, float degrees);
+    private static native void nRotate(int renderer, float degrees);
 
     @Override
     public void scale(float sx, float sy) {
         nScale(mRenderer, sx, sy);
     }
     
-    private native void nScale(int renderer, float sx, float sy);
+    private static native void nScale(int renderer, float sx, float sy);
 
     @Override
     public void setMatrix(Matrix matrix) {
         nSetMatrix(mRenderer, matrix.native_instance);
     }
     
-    private native void nSetMatrix(int renderer, int matrix);
+    private static native void nSetMatrix(int renderer, int matrix);
 
     @Override
     public int getNativeMatrix() {
         return nGetMatrix(mRenderer);
     }
 
-    private native int nGetMatrix(int renderer);    
+    private static native int nGetMatrix(int renderer);    
 
     @Override
     public void getMatrix(Matrix matrix) {
         nGetMatrix(mRenderer, matrix.native_instance);
     }
     
-    private native void nGetMatrix(int renderer, int matrix);
+    private static native void nGetMatrix(int renderer, int matrix);
 
     @Override
     public void concat(Matrix matrix) {
         nConcatMatrix(mRenderer, matrix.native_instance);
     }
     
-    private native void nConcatMatrix(int renderer, int matrix);
+    private static native void nConcatMatrix(int renderer, int matrix);
     
     ///////////////////////////////////////////////////////////////////////////
     // State management
@@ -449,7 +465,7 @@
         return nSave(mRenderer, saveFlags);
     }
 
-    private native int nSave(int renderer, int flags);
+    private static native int nSave(int renderer, int flags);
     
     @Override
     public int saveLayer(RectF bounds, Paint paint, int saveFlags) {
@@ -469,8 +485,8 @@
         return save(saveFlags);
     }
 
-    private native int nSaveLayer(int renderer, float left, float top, float right, float bottom,
-            int paint, int saveFlags);
+    private static native int nSaveLayer(int renderer, float left, float top,
+            float right, float bottom, int paint, int saveFlags);
 
     @Override
     public int saveLayerAlpha(RectF bounds, int alpha, int saveFlags) {
@@ -487,7 +503,7 @@
         return save(saveFlags);
     }
 
-    private native int nSaveLayerAlpha(int renderer, float left, float top, float right,
+    private static native int nSaveLayerAlpha(int renderer, float left, float top, float right,
             float bottom, int alpha, int saveFlags);
     
     @Override
@@ -495,21 +511,21 @@
         nRestore(mRenderer);
     }
     
-    private native void nRestore(int renderer);
+    private static native void nRestore(int renderer);
 
     @Override
     public void restoreToCount(int saveCount) {
         nRestoreToCount(mRenderer, saveCount);
     }
 
-    private native void nRestoreToCount(int renderer, int saveCount);
+    private static native void nRestoreToCount(int renderer, int saveCount);
     
     @Override
     public int getSaveCount() {
         return nGetSaveCount(mRenderer);
     }
     
-    private native int nGetSaveCount(int renderer);
+    private static native int nGetSaveCount(int renderer);
 
     ///////////////////////////////////////////////////////////////////////////
     // Filtering
@@ -538,8 +554,9 @@
         if (hasModifier) nResetModifiers(mRenderer);
     }
 
-    private native void nDrawArc(int renderer, float left, float top, float right, float bottom,
-            float startAngle, float sweepAngle, boolean useCenter, int paint);
+    private static native void nDrawArc(int renderer, float left, float top,
+            float right, float bottom, float startAngle, float sweepAngle,
+            boolean useCenter, int paint);
 
     @Override
     public void drawARGB(int a, int r, int g, int b) {
@@ -556,7 +573,7 @@
         if (hasColorFilter) nResetModifiers(mRenderer);
     }
 
-    private native void nDrawPatch(int renderer, int bitmap, byte[] buffer, byte[] chunks,
+    private static native void nDrawPatch(int renderer, int bitmap, byte[] buffer, byte[] chunks,
             float left, float top, float right, float bottom, int paint);
 
     @Override
@@ -568,7 +585,7 @@
         if (hasColorFilter) nResetModifiers(mRenderer);
     }
 
-    private native void nDrawBitmap(
+    private static native void nDrawBitmap(
             int renderer, int bitmap, byte[] buffer, float left, float top, int paint);
 
     @Override
@@ -581,7 +598,8 @@
         if (hasColorFilter) nResetModifiers(mRenderer);
     }
 
-    private native void nDrawBitmap(int renderer, int bitmap, byte[] buff, int matrix, int paint);
+    private static native void nDrawBitmap(int renderer, int bitmap, byte[] buff,
+            int matrix, int paint);
 
     @Override
     public void drawBitmap(Bitmap bitmap, Rect src, Rect dst, Paint paint) {
@@ -616,7 +634,7 @@
         if (hasColorFilter) nResetModifiers(mRenderer);
     }
 
-    private native void nDrawBitmap(int renderer, int bitmap, byte[] buffer,
+    private static native void nDrawBitmap(int renderer, int bitmap, byte[] buffer,
             float srcLeft, float srcTop, float srcRight, float srcBottom,
             float left, float top, float right, float bottom, int paint);
 
@@ -665,7 +683,7 @@
         if (hasColorFilter) nResetModifiers(mRenderer);
     }
 
-    private native void nDrawBitmapMesh(int renderer, int bitmap, byte[] buffer,
+    private static native void nDrawBitmapMesh(int renderer, int bitmap, byte[] buffer,
             int meshWidth, int meshHeight, float[] verts, int vertOffset,
             int[] colors, int colorOffset, int paint);
 
@@ -676,7 +694,8 @@
         if (hasModifier) nResetModifiers(mRenderer);        
     }
 
-    private native void nDrawCircle(int renderer, float cx, float cy, float radius, int paint);
+    private static native void nDrawCircle(int renderer, float cx, float cy,
+            float radius, int paint);
 
     @Override
     public void drawColor(int color) {
@@ -688,7 +707,7 @@
         nDrawColor(mRenderer, color, mode.nativeInt);
     }
     
-    private native void nDrawColor(int renderer, int color, int mode);
+    private static native void nDrawColor(int renderer, int color, int mode);
 
     @Override
     public void drawLine(float startX, float startY, float stopX, float stopY, Paint paint) {
@@ -709,7 +728,8 @@
         if (hasModifier) nResetModifiers(mRenderer);
     }
 
-    private native void nDrawLines(int renderer, float[] points, int offset, int count, int paint);
+    private static native void nDrawLines(int renderer, float[] points,
+            int offset, int count, int paint);
 
     @Override
     public void drawLines(float[] pts, Paint paint) {
@@ -723,8 +743,8 @@
         if (hasModifier) nResetModifiers(mRenderer); 
     }
 
-    private native void nDrawOval(int renderer, float left, float top, float right, float bottom,
-            int paint);
+    private static native void nDrawOval(int renderer, float left, float top,
+            float right, float bottom, int paint);
 
     @Override
     public void drawPaint(Paint paint) {
@@ -746,8 +766,8 @@
         if (hasModifier) nResetModifiers(mRenderer);
     }
 
-    private native void nDrawPath(int renderer, int path, int paint);
-    private native void nDrawRects(int renderer, int region, int paint);
+    private static native void nDrawPath(int renderer, int path, int paint);
+    private static native void nDrawRects(int renderer, int region, int paint);
 
     @Override
     public void drawPicture(Picture picture) {
@@ -798,8 +818,8 @@
         if (hasModifier) nResetModifiers(mRenderer);
     }
 
-    private native void nDrawRect(int renderer, float left, float top, float right, float bottom,
-            int paint);
+    private static native void nDrawRect(int renderer, float left, float top,
+            float right, float bottom, int paint);
 
     @Override
     public void drawRect(Rect r, Paint paint) {
@@ -824,7 +844,7 @@
         if (hasModifier) nResetModifiers(mRenderer);        
     }
 
-    private native void nDrawRoundRect(int renderer, float left, float top,
+    private static native void nDrawRoundRect(int renderer, float left, float top,
             float right, float bottom, float rx, float y, int paint);
 
     @Override
@@ -841,8 +861,8 @@
         }
     }
     
-    private native void nDrawText(int renderer, char[] text, int index, int count, float x, float y,
-            int bidiFlags, int paint);
+    private static native void nDrawText(int renderer, char[] text, int index, int count,
+            float x, float y, int bidiFlags, int paint);
 
     @Override
     public void drawText(CharSequence text, int start, int end, float x, float y, Paint paint) {
@@ -858,7 +878,8 @@
             } else {
                 char[] buf = TemporaryBuffer.obtain(end - start);
                 TextUtils.getChars(text, start, end, buf, 0);
-                nDrawText(mRenderer, buf, 0, end - start, x, y, paint.mBidiFlags, paint.mNativePaint);
+                nDrawText(mRenderer, buf, 0, end - start, x, y,
+                        paint.mBidiFlags, paint.mNativePaint);
                 TemporaryBuffer.recycle(buf);
             }
         } finally {
@@ -880,8 +901,8 @@
         }
     }
 
-    private native void nDrawText(int renderer, String text, int start, int end, float x, float y,
-            int bidiFlags, int paint);
+    private static native void nDrawText(int renderer, String text, int start, int end,
+            float x, float y, int bidiFlags, int paint);
 
     @Override
     public void drawText(String text, float x, float y, Paint paint) {
@@ -924,7 +945,7 @@
         }
     }
 
-    private native void nDrawTextRun(int renderer, char[] text, int index, int count,
+    private static native void nDrawTextRun(int renderer, char[] text, int index, int count,
             int contextIndex, int contextCount, float x, float y, int dir, int nativePaint);
 
     @Override
@@ -958,7 +979,7 @@
         }
     }
 
-    private native void nDrawTextRun(int renderer, String text, int start, int end,
+    private static native void nDrawTextRun(int renderer, String text, int start, int end,
             int contextStart, int contextEnd, float x, float y, int flags, int nativePaint);
 
     @Override
@@ -1001,9 +1022,10 @@
         return false;        
     }
     
-    private native void nSetupShader(int renderer, int shader);
-    private native void nSetupColorFilter(int renderer, int colorFilter);
-    private native void nSetupShadow(int renderer, float radius, float dx, float dy, int color);
+    private static native void nSetupShader(int renderer, int shader);
+    private static native void nSetupColorFilter(int renderer, int colorFilter);
+    private static native void nSetupShadow(int renderer, float radius,
+            float dx, float dy, int color);
 
-    private native void nResetModifiers(int renderer);
+    private static native void nResetModifiers(int renderer);
 }
diff --git a/core/java/android/view/HardwareCanvas.java b/core/java/android/view/HardwareCanvas.java
index a4d36b7..e6fecc8 100644
--- a/core/java/android/view/HardwareCanvas.java
+++ b/core/java/android/view/HardwareCanvas.java
@@ -19,6 +19,7 @@
 import android.graphics.Bitmap;
 import android.graphics.Canvas;
 import android.graphics.Paint;
+import android.graphics.Rect;
 
 /**
  * Hardware accelerated canvas.
@@ -38,8 +39,10 @@
     
     /**
      * Invoked before any drawing operation is performed in this canvas.
+     * 
+     * @param dirty The dirty rectangle to update, can be null.
      */
-    abstract void onPreDraw();
+    abstract void onPreDraw(Rect dirty);
 
     /**
      * Invoked after all drawing operation have been performed.
diff --git a/core/java/android/view/HardwareRenderer.java b/core/java/android/view/HardwareRenderer.java
index c82184a..48f40c3 100644
--- a/core/java/android/view/HardwareRenderer.java
+++ b/core/java/android/view/HardwareRenderer.java
@@ -18,6 +18,8 @@
 package android.view;
 
 import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.Rect;
 import android.os.SystemClock;
 import android.util.EventLog;
 import android.util.Log;
@@ -39,6 +41,16 @@
     static final String LOG_TAG = "HardwareRenderer";
 
     /**
+     * Turn on to only refresh the parts of the screen that need updating.
+     */
+    public static final boolean RENDER_DIRTY_REGIONS = true;
+
+    /**
+     * Turn on to draw dirty regions every other frame.
+     */
+    private static final boolean DEBUG_DIRTY_REGION = false;
+    
+    /**
      * A process can set this flag to false to prevent the use of hardware
      * rendering.
      * 
@@ -108,11 +120,14 @@
 
     /**
      * Draws the specified view.
-     * 
+     *
      * @param view The view to draw.
      * @param attachInfo AttachInfo tied to the specified view.
+     * @param callbacks Callbacks invoked when drawing happens.
+     * @param dirty The dirty rectangle to update, can be null.
      */
-    abstract void draw(View view, View.AttachInfo attachInfo, HardwareDrawCallbacks callbacks);
+    abstract void draw(View view, View.AttachInfo attachInfo, HardwareDrawCallbacks callbacks,
+            Rect dirty);
 
     /**
      * Creates a new display list that can be used to record batches of
@@ -214,7 +229,13 @@
     @SuppressWarnings({"deprecation"})
     static abstract class GlRenderer extends HardwareRenderer {
         private static final int EGL_CONTEXT_CLIENT_VERSION = 0x3098;
+        private static final int EGL_SURFACE_TYPE = 0x3033;
+        private static final int EGL_SWAP_BEHAVIOR_PRESERVED_BIT = 0x0400;
 
+        private static final int SURFACE_STATE_ERROR = 0;
+        private static final int SURFACE_STATE_SUCCESS = 1;
+        private static final int SURFACE_STATE_UPDATED = 2;
+        
         static EGLContext sEglContext;
         static EGL10 sEgl;
         static EGLDisplay sEglDisplay;
@@ -226,6 +247,9 @@
         
         GL mGl;
         HardwareCanvas mCanvas;
+        int mFrameCount;
+        Paint mDebugPaint;
+
 
         final int mGlVersion;
         final boolean mTranslucent;
@@ -412,7 +436,7 @@
             if (mEglSurface == null || mEglSurface == EGL10.EGL_NO_SURFACE) {
                 int error = sEgl.eglGetError();
                 if (error == EGL10.EGL_BAD_NATIVE_WINDOW) {
-                    Log.e("EglHelper", "createWindowSurface returned EGL_BAD_NATIVE_WINDOW.");
+                    Log.e(LOG_TAG, "createWindowSurface returned EGL_BAD_NATIVE_WINDOW.");
                     return null;
                 }
                 throw new RuntimeException("createWindowSurface failed "
@@ -427,6 +451,12 @@
                 throw new RuntimeException("eglMakeCurrent failed "
                         + getEGLErrorString(sEgl.eglGetError()));
             }
+            
+            if (RENDER_DIRTY_REGIONS) {
+                if (!GLES20Canvas.preserveBackBuffer()) {
+                    Log.w(LOG_TAG, "Backbuffer cannot be preserved");
+                }
+            }
 
             return sEglContext.getGL();
         }
@@ -471,12 +501,12 @@
         void setup(int width, int height) {
             mCanvas.setViewport(width, height);
         }
-        
+
         boolean canDraw() {
             return mGl != null && mCanvas != null;
         }        
         
-        void onPreDraw() {
+        void onPreDraw(Rect dirty) {
         }
 
         void onPostDraw() {
@@ -492,8 +522,14 @@
         }
 
         @Override
-        void draw(View view, View.AttachInfo attachInfo, HardwareDrawCallbacks callbacks) {
+        void draw(View view, View.AttachInfo attachInfo, HardwareDrawCallbacks callbacks,
+                Rect dirty) {
             if (canDraw()) {
+                //noinspection PointlessBooleanExpression,ConstantConditions
+                if (!HardwareRenderer.RENDER_DIRTY_REGIONS) {
+                    dirty = null;
+                }
+
                 attachInfo.mDrawingTime = SystemClock.uptimeMillis();
                 attachInfo.mIgnoreDirtyState = true;
                 view.mPrivateFlags |= View.DRAWN;
@@ -503,11 +539,18 @@
                     startTime = SystemClock.elapsedRealtime();
                 }
 
-                if (checkCurrent()) {
-                    onPreDraw();
+                final int surfaceState = checkCurrent();
+                if (surfaceState != SURFACE_STATE_ERROR) {
+                    // We had to change the current surface and/or context, redraw everything
+                    if (surfaceState == SURFACE_STATE_UPDATED) {
+                        dirty = null;
+                    }
+
+                    onPreDraw(dirty);
     
                     HardwareCanvas canvas = mCanvas;
                     attachInfo.mHardwareCanvas = canvas;
+
                     int saveCount = canvas.save();
                     callbacks.onHardwarePreDraw(canvas);
 
@@ -515,6 +558,7 @@
                         view.mRecreateDisplayList =
                                 (view.mPrivateFlags & View.INVALIDATED) == View.INVALIDATED;
                         view.mPrivateFlags &= ~View.INVALIDATED;
+
                         DisplayList displayList = view.getDisplayList();
                         if (displayList != null) {
                             if (canvas.drawDisplayList(displayList)) {
@@ -524,6 +568,16 @@
                             // Shouldn't reach here
                             view.draw(canvas);
                         }
+
+                        if (DEBUG_DIRTY_REGION) {
+                            if (mDebugPaint == null) {
+                                mDebugPaint = new Paint();
+                                mDebugPaint.setColor(0x7fff0000);
+                            }
+                            if (dirty != null && (mFrameCount++ & 1) == 0) {
+                                canvas.drawRect(dirty, mDebugPaint);
+                            }
+                        }
                     } finally {
                         callbacks.onHardwarePostDraw(canvas);
                         canvas.restoreToCount(saveCount);
@@ -543,8 +597,8 @@
                 }
             }
         }
-
-        private boolean checkCurrent() {
+        
+        private int checkCurrent() {
             // TODO: Don't check the current context when we have one per UI thread
             // TODO: Use a threadlocal flag to know whether the surface has changed
             if (sEgl.eglGetCurrentContext() != sEglContext ||
@@ -553,10 +607,12 @@
                     fallback(true);
                     Log.e(LOG_TAG, "eglMakeCurrent failed " +
                             getEGLErrorString(sEgl.eglGetError()));
-                    return false;
+                    return SURFACE_STATE_ERROR;
+                } else {
+                    return SURFACE_STATE_UPDATED;
                 }
             }
-            return true;
+            return SURFACE_STATE_SUCCESS;
         }
 
         static abstract class EglConfigChooser {
@@ -629,6 +685,7 @@
 
             ComponentSizeChooser(int glVersion, int redSize, int greenSize, int blueSize,
                     int alphaSize, int depthSize, int stencilSize) {
+                //noinspection PointlessBitwiseExpression
                 super(glVersion, new int[] {
                         EGL10.EGL_RED_SIZE, redSize,
                         EGL10.EGL_GREEN_SIZE, greenSize,
@@ -636,6 +693,8 @@
                         EGL10.EGL_ALPHA_SIZE, alphaSize,
                         EGL10.EGL_DEPTH_SIZE, depthSize,
                         EGL10.EGL_STENCIL_SIZE, stencilSize,
+                        EGL_SURFACE_TYPE, EGL10.EGL_WINDOW_BIT |
+                                (RENDER_DIRTY_REGIONS ? EGL_SWAP_BEHAVIOR_PRESERVED_BIT : 0),
                         EGL10.EGL_NONE });
                 mValue = new int[1];
                 mRedSize = redSize;
@@ -656,7 +715,16 @@
                         int g = findConfigAttrib(egl, display, config, EGL10.EGL_GREEN_SIZE, 0);
                         int b = findConfigAttrib(egl, display, config, EGL10.EGL_BLUE_SIZE, 0);
                         int a = findConfigAttrib(egl, display, config, EGL10.EGL_ALPHA_SIZE, 0);
-                        if (r >= mRedSize && g >= mGreenSize && b >= mBlueSize && a >= mAlphaSize) {
+                        boolean backBuffer;
+                        if (RENDER_DIRTY_REGIONS) {
+                            int surfaceType = findConfigAttrib(egl, display, config,
+                                    EGL_SURFACE_TYPE, 0);
+                            backBuffer = (surfaceType & EGL_SWAP_BEHAVIOR_PRESERVED_BIT) != 0;
+                        } else {
+                            backBuffer = true;
+                        }
+                        if (r >= mRedSize && g >= mGreenSize && b >= mBlueSize && a >= mAlphaSize
+                                && backBuffer) {
                             return config;
                         }
                     }
@@ -696,8 +764,8 @@
         }                
 
         @Override
-        void onPreDraw() {
-            mGlCanvas.onPreDraw();
+        void onPreDraw(Rect dirty) {
+            mGlCanvas.onPreDraw(dirty);
         }
 
         @Override
diff --git a/core/java/android/view/MotionEvent.java b/core/java/android/view/MotionEvent.java
index db2cd50..b95de64 100644
--- a/core/java/android/view/MotionEvent.java
+++ b/core/java/android/view/MotionEvent.java
@@ -1569,7 +1569,7 @@
             + " device=" + mDeviceId
             + " source=0x" + Integer.toHexString(mSource)
             + (getPointerCount() > 1 ?
-                " pointerId2=" + getPointerId(1) + " x2=" + getX(2) + " y2=" + getY(2) : "")
+                " pointerId2=" + getPointerId(1) + " x2=" + getX(1) + " y2=" + getY(1) : "")
             + "}";
     }
 
diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java
index 6451d47..8a95664 100644
--- a/core/java/android/view/SurfaceView.java
+++ b/core/java/android/view/SurfaceView.java
@@ -158,6 +158,7 @@
     int mHeight = -1;
     int mFormat = -1;
     final Rect mSurfaceFrame = new Rect();
+    Rect mTmpDirty;
     int mLastSurfaceWidth = -1, mLastSurfaceHeight = -1;
     boolean mUpdateWindowNeeded;
     boolean mReportDrawNeeded;
@@ -739,9 +740,16 @@
 
             Canvas c = null;
             if (!mDrawingStopped && mWindow != null) {
-                Rect frame = dirty != null ? dirty : mSurfaceFrame;
+                if (dirty == null) {
+                    if (mTmpDirty == null) {
+                        mTmpDirty = new Rect();
+                    }
+                    mTmpDirty.set(mSurfaceFrame);
+                    dirty = mTmpDirty;
+                }
+
                 try {
-                    c = mSurface.lockCanvas(frame);
+                    c = mSurface.lockCanvas(dirty);
                 } catch (Exception e) {
                     Log.e(LOG_TAG, "Exception locking surface", e);
                 }
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 5c6dd29..65d2e11 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -6730,11 +6730,14 @@
             mPrivateFlags |= INVALIDATED;
             final ViewParent p = mParent;
             final AttachInfo ai = mAttachInfo;
-            if (p != null && ai != null && ai.mHardwareAccelerated) {
-                // fast-track for GL-enabled applications; just invalidate the whole hierarchy
-                // with a null dirty rect, which tells the ViewRoot to redraw everything
-                p.invalidateChild(this, null);
-                return;
+            //noinspection PointlessBooleanExpression,ConstantConditions
+            if (!HardwareRenderer.RENDER_DIRTY_REGIONS) {
+                if (p != null && ai != null && ai.mHardwareAccelerated) {
+                    // fast-track for GL-enabled applications; just invalidate the whole hierarchy
+                    // with a null dirty rect, which tells the ViewRoot to redraw everything
+                    p.invalidateChild(this, null);
+                    return;
+                }
             }
             if (p != null && ai != null) {
                 final int scrollX = mScrollX;
@@ -6770,11 +6773,14 @@
             mPrivateFlags |= INVALIDATED;
             final ViewParent p = mParent;
             final AttachInfo ai = mAttachInfo;
-            if (p != null && ai != null && ai.mHardwareAccelerated) {
-                // fast-track for GL-enabled applications; just invalidate the whole hierarchy
-                // with a null dirty rect, which tells the ViewRoot to redraw everything
-                p.invalidateChild(this, null);
-                return;
+            //noinspection PointlessBooleanExpression,ConstantConditions
+            if (!HardwareRenderer.RENDER_DIRTY_REGIONS) {
+                if (p != null && ai != null && ai.mHardwareAccelerated) {
+                    // fast-track for GL-enabled applications; just invalidate the whole hierarchy
+                    // with a null dirty rect, which tells the ViewRoot to redraw everything
+                    p.invalidateChild(this, null);
+                    return;
+                }
             }
             if (p != null && ai != null && l < r && t < b) {
                 final int scrollX = mScrollX;
@@ -6823,11 +6829,14 @@
             }
             final AttachInfo ai = mAttachInfo;
             final ViewParent p = mParent;
-            if (p != null && ai != null && ai.mHardwareAccelerated) {
-                // fast-track for GL-enabled applications; just invalidate the whole hierarchy
-                // with a null dirty rect, which tells the ViewRoot to redraw everything
-                p.invalidateChild(this, null);
-                return;
+            //noinspection PointlessBooleanExpression,ConstantConditions
+            if (!HardwareRenderer.RENDER_DIRTY_REGIONS) {
+                if (p != null && ai != null && ai.mHardwareAccelerated) {
+                    // fast-track for GL-enabled applications; just invalidate the whole hierarchy
+                    // with a null dirty rect, which tells the ViewRoot to redraw everything
+                    p.invalidateChild(this, null);
+                    return;
+                }
             }
 
             if (p != null && ai != null) {
@@ -8078,7 +8087,7 @@
      *
      * @return A HardwareLayer ready to render, or null if an error occurred.
      */
-    HardwareLayer getHardwareLayer(Canvas currentCanvas) {
+    HardwareLayer getHardwareLayer() {
         if (mAttachInfo == null || mAttachInfo.mHardwareRenderer == null) {
             return null;
         }
@@ -8098,10 +8107,13 @@
                 mHardwareLayer.resize(width, height);
             }
 
-            final HardwareCanvas canvas = mHardwareLayer.start(mAttachInfo.mHardwareCanvas);
+            Canvas currentCanvas = mAttachInfo.mHardwareCanvas;
+            final HardwareCanvas canvas = mHardwareLayer.start(currentCanvas);
+            mAttachInfo.mHardwareCanvas = canvas;
             try {
                 canvas.setViewport(width, height);
-                canvas.onPreDraw();
+                // TODO: We should pass the dirty rect
+                canvas.onPreDraw(null);
 
                 computeScroll();
                 canvas.translate(-mScrollX, -mScrollY);
@@ -8121,7 +8133,8 @@
                 canvas.restoreToCount(restoreCount);
             } finally {
                 canvas.onPostDraw();
-                mHardwareLayer.end(mAttachInfo.mHardwareCanvas);
+                mHardwareLayer.end(currentCanvas);
+                mAttachInfo.mHardwareCanvas = currentCanvas;
             }
         }
 
@@ -8190,7 +8203,7 @@
             ViewGroup parent = (ViewGroup) this;
             final int count = parent.getChildCount();
             for (int i = 0; i < count; i++) {
-                final View child = (View) parent.getChildAt(i);
+                final View child = parent.getChildAt(i);
                 child.outputDirtyFlags(indent + "  ", clear, clearMask);
             }
         }
@@ -8251,7 +8264,8 @@
                 int height = mBottom - mTop;
 
                 canvas.setViewport(width, height);
-                canvas.onPreDraw();
+                // The dirty rect should always be null for a display list
+                canvas.onPreDraw(null);
 
                 final int restoreCount = canvas.save();
 
@@ -10288,6 +10302,7 @@
         }
 
         mPrivateFlags |= FORCE_LAYOUT;
+        mPrivateFlags |= INVALIDATED;
 
         if (mParent != null && !mParent.isLayoutRequested()) {
             mParent.requestLayout();
@@ -10301,6 +10316,7 @@
      */
     public void forceLayout() {
         mPrivateFlags |= FORCE_LAYOUT;
+        mPrivateFlags |= INVALIDATED;
     }
 
     /**
@@ -10775,7 +10791,7 @@
     /**
      * Returns the status bar visibility that this view has requested.
      */
-    public int getSystemUiVisibility(int visibility) {
+    public int getSystemUiVisibility() {
         return mSystemUiVisibility;
     }
 
diff --git a/core/java/android/view/ViewConfiguration.java b/core/java/android/view/ViewConfiguration.java
index edad494..0444496 100644
--- a/core/java/android/view/ViewConfiguration.java
+++ b/core/java/android/view/ViewConfiguration.java
@@ -167,7 +167,7 @@
     /**
      * Max distance to overfling for edge effects
      */
-    private static final int OVERFLING_DISTANCE = 12;
+    private static final int OVERFLING_DISTANCE = 6;
 
     private final int mEdgeSlop;
     private final int mFadingEdgeLength;
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index c73cbe6..f198c46 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -2395,8 +2395,6 @@
                 canvas.scale(scale, scale);
             }
         }
-        
-        boolean layerSaved = false;
 
         if (transformToApply != null || alpha < 1.0f || !child.hasIdentityMatrix()) {
             if (transformToApply != null || !childHasIdentityMatrix) {
@@ -2477,7 +2475,7 @@
         if (hasNoCache) {
             boolean layerRendered = false;
             if (layerType == LAYER_TYPE_HARDWARE) {
-                final HardwareLayer layer = child.getHardwareLayer(canvas);
+                final HardwareLayer layer = child.getHardwareLayer();
                 if (layer != null && layer.isValid()) {
                     ((HardwareCanvas) canvas).drawHardwareLayer(layer, 0, 0, child.mLayerPaint);
                     layerRendered = true;
@@ -3357,7 +3355,9 @@
         addInArray(child, index);
 
         child.mParent = this;
-        child.mPrivateFlags = (child.mPrivateFlags & ~DIRTY_MASK & ~DRAWING_CACHE_VALID) | DRAWN;
+        child.mPrivateFlags = (child.mPrivateFlags & ~DIRTY_MASK & ~DRAWING_CACHE_VALID) |
+                DRAWN | INVALIDATED;
+        this.mPrivateFlags |= INVALIDATED;
 
         if (child.hasFocus()) {
             requestChildFocus(child, child.findFocus());
@@ -3527,10 +3527,20 @@
                             (int) (boundingRect.bottom + 0.5f));
                 }
 
+                if (child.mLayerType != LAYER_TYPE_NONE) {
+                    mPrivateFlags |= INVALIDATED;
+                    mPrivateFlags &= ~DRAWING_CACHE_VALID;
+                }                
                 do {
                     View view = null;
                     if (parent instanceof View) {
                         view = (View) parent;
+                        if (view.mLayerType != LAYER_TYPE_NONE &&
+                                view.getParent() instanceof View) {
+                            final View grandParent = (View) view.getParent();
+                            grandParent.mPrivateFlags |= INVALIDATED;
+                            grandParent.mPrivateFlags &= ~DRAWING_CACHE_VALID;
+                        }
                     }
 
                     if (drawAnimation) {
diff --git a/core/java/android/view/ViewRoot.java b/core/java/android/view/ViewRoot.java
index ba671c0..ca19da2 100644
--- a/core/java/android/view/ViewRoot.java
+++ b/core/java/android/view/ViewRoot.java
@@ -160,7 +160,9 @@
 
     int mWidth;
     int mHeight;
-    Rect mDirty; // will be a graphics.Region soon
+    Rect mDirty;
+    final Rect mCurrentDirty = new Rect();
+    final Rect mPreviousDirty = new Rect();
     boolean mIsAnimating;
 
     CompatibilityInfo.Translator mTranslator;
@@ -891,7 +893,7 @@
             }
         }
 
-        if (attachInfo.mRecomputeGlobalAttributes) {
+        if (attachInfo.mRecomputeGlobalAttributes && host.mAttachInfo != null) {
             //Log.i(TAG, "Computing view hierarchy attributes!");
             attachInfo.mRecomputeGlobalAttributes = false;
             boolean oldScreenOn = attachInfo.mKeepScreenOn;
@@ -1055,6 +1057,7 @@
                     disposeResizeBitmap();
                 } else if (surfaceGenerationId != mSurface.getGenerationId() &&
                         mSurfaceHolder == null && mAttachInfo.mHardwareRenderer != null) {
+                    fullRedrawNeeded = true;
                     mAttachInfo.mHardwareRenderer.updateSurface(mHolder);
                 }
             } catch (RemoteException e) {
@@ -1079,6 +1082,7 @@
                     //mSurfaceHolder.mSurface.copyFrom(mSurface);
                     mSurfaceHolder.mSurface = mSurface;
                 }
+                mSurfaceHolder.setSurfaceFrameSize(mWidth, mHeight);
                 mSurfaceHolder.mSurfaceLock.unlock();
                 if (mSurface.isValid()) {
                     if (!hadSurface) {
@@ -1488,10 +1492,15 @@
         if (mAttachInfo.mHardwareRenderer != null && mAttachInfo.mHardwareRenderer.isEnabled()) {
             if (!dirty.isEmpty() || mIsAnimating) {
                 mIsAnimating = false;
-                dirty.setEmpty();
                 mHardwareYOffset = yoff;
                 mResizeAlpha = resizeAlpha;
-                mAttachInfo.mHardwareRenderer.draw(mView, mAttachInfo, this);
+
+                mCurrentDirty.set(dirty);
+                mCurrentDirty.union(mPreviousDirty);
+                mPreviousDirty.set(dirty);
+                dirty.setEmpty();
+
+                mAttachInfo.mHardwareRenderer.draw(mView, mAttachInfo, this, mCurrentDirty);
             }
 
             if (animating) {
@@ -1986,6 +1995,7 @@
 
                     if (mAttachInfo.mHardwareRenderer != null &&
                             mSurface != null && mSurface.isValid()) {
+                        mFullRedrawNeeded = true;
                         mAttachInfo.mHardwareRenderer.initializeIfNeeded(mWidth, mHeight,
                                 mAttachInfo, mHolder);
                     }
diff --git a/core/java/android/view/WindowOrientationListener.java b/core/java/android/view/WindowOrientationListener.java
index 6095a64..62d3e6a 100755
--- a/core/java/android/view/WindowOrientationListener.java
+++ b/core/java/android/view/WindowOrientationListener.java
@@ -23,6 +23,7 @@
 import android.hardware.SensorManager;
 import android.util.Config;
 import android.util.Log;
+import android.util.Slog;
 
 /**
  * A special helper class used by the WindowManager
@@ -33,17 +34,27 @@
  * "App/Activity/Screen Orientation" to ensure that all orientation
  * modes still work correctly.
  *
+ * You can also visualize the behavior of the WindowOrientationListener by
+ * enabling the window orientation listener log using the Development Settings
+ * in the Dev Tools application (Development.apk)
+ * and running frameworks/base/tools/orientationplot/orientationplot.py.
+ *
+ * More information about how to tune this algorithm in
+ * frameworks/base/tools/orientationplot/README.txt.
+ *
  * @hide
  */
 public abstract class WindowOrientationListener {
     private static final String TAG = "WindowOrientationListener";
     private static final boolean DEBUG = false;
     private static final boolean localLOGV = DEBUG || Config.DEBUG;
+
     private SensorManager mSensorManager;
-    private boolean mEnabled = false;
+    private boolean mEnabled;
     private int mRate;
     private Sensor mSensor;
     private SensorEventListenerImpl mSensorEventListener;
+    boolean mLogEnabled;
 
     /**
      * Creates a new WindowOrientationListener.
@@ -51,7 +62,7 @@
      * @param context for the WindowOrientationListener.
      */
     public WindowOrientationListener(Context context) {
-        this(context, SensorManager.SENSOR_DELAY_NORMAL);
+        this(context, SensorManager.SENSOR_DELAY_UI);
     }
     
     /**
@@ -63,9 +74,7 @@
      * value of {@link android.hardware.SensorManager#SENSOR_DELAY_NORMAL 
      * SENSOR_DELAY_NORMAL} for simple screen orientation change detection.
      *
-     * This constructor is private since no one uses it and making it public would complicate
-     * things, since the lowpass filtering code depends on the actual sampling period, and there's
-     * no way to get the period from SensorManager based on the rate constant.
+     * This constructor is private since no one uses it.
      */
     private WindowOrientationListener(Context context, int rate) {
         mSensorManager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE);
@@ -108,12 +117,11 @@
         }
     }
 
-    public void setAllow180Rotation(boolean allowed) {
-        if (mSensorEventListener != null) {
-            mSensorEventListener.setAllow180Rotation(allowed);
-        }
-    }
-
+    /**
+     * Gets the current orientation.
+     * @param lastRotation
+     * @return
+     */
     public int getCurrentRotation(int lastRotation) {
         if (mEnabled) {
             return mSensorEventListener.getCurrentRotation(lastRotation);
@@ -122,364 +130,6 @@
     }
 
     /**
-     * This class filters the raw accelerometer data and tries to detect actual changes in
-     * orientation. This is a very ill-defined problem so there are a lot of tweakable parameters,
-     * but here's the outline:
-     *
-     *  - Convert the acceleromter vector from cartesian to spherical coordinates. Since we're
-     * dealing with rotation of the device, this is the sensible coordinate system to work in. The
-     * zenith direction is the Z-axis, i.e. the direction the screen is facing. The radial distance
-     * is referred to as the magnitude below. The elevation angle is referred to as the "tilt"
-     * below. The azimuth angle is referred to as the "orientation" below (and the azimuth axis is
-     * the Y-axis). See http://en.wikipedia.org/wiki/Spherical_coordinate_system for reference.
-     *
-     *  - Low-pass filter the tilt and orientation angles to avoid "twitchy" behavior.
-     *
-     *  - When the orientation angle reaches a certain threshold, transition to the corresponding
-     * orientation. These thresholds have some hysteresis built-in to avoid oscillation.
-     *
-     *  - Use the magnitude to judge the accuracy of the data. Under ideal conditions, the magnitude
-     * should equal to that of gravity. When it differs significantly, we know the device is under
-     * external acceleration and we can't trust the data.
-     *
-     *  - Use the tilt angle to judge the accuracy of orientation data. When the tilt angle is high
-     * in magnitude, we distrust the orientation data, because when the device is nearly flat, small
-     * physical movements produce large changes in orientation angle.
-     *
-     * Details are explained below.
-     */
-    static class SensorEventListenerImpl implements SensorEventListener {
-        // We work with all angles in degrees in this class.
-        private static final float RADIANS_TO_DEGREES = (float) (180 / Math.PI);
-
-        // Indices into SensorEvent.values
-        private static final int _DATA_X = 0;
-        private static final int _DATA_Y = 1;
-        private static final int _DATA_Z = 2;
-
-        // Internal aliases for the four orientation states.  ROTATION_0 = default portrait mode,
-        // ROTATION_90 = right side of device facing the sky, etc.
-        private static final int ROTATION_0 = 0;
-        private static final int ROTATION_90 = 1;
-        private static final int ROTATION_270 = 2;
-        private static final int ROTATION_180 = 3;
-
-        // Mapping our internal aliases into actual Surface rotation values
-        private static final int[] INTERNAL_TO_SURFACE_ROTATION = new int[] {
-            Surface.ROTATION_0, Surface.ROTATION_90, Surface.ROTATION_270,
-            Surface.ROTATION_180};
-
-        // Mapping Surface rotation values to internal aliases.
-        private static final int[] SURFACE_TO_INTERNAL_ROTATION = new int[] {
-            ROTATION_0, ROTATION_90, ROTATION_180, ROTATION_270};
-
-        // Threshold ranges of orientation angle to transition into other orientation states.
-        // The first list is for transitions from ROTATION_0, ROTATION_90, ROTATION_270,
-        // and then ROTATION_180.
-        // ROTATE_TO defines the orientation each threshold range transitions to, and must be kept
-        // in sync with this.
-        // We generally transition about the halfway point between two states with a swing of 30
-        // degrees for hysteresis.
-        private static final int[][][] THRESHOLDS = new int[][][] {
-                {{60, 180}, {180, 300}},
-                {{0, 30}, {195, 315}, {315, 360}},
-                {{0, 45}, {45, 165}, {330, 360}},
-
-                // Handle situation where we are currently doing 180 rotation
-                // but that is no longer allowed.
-                {{0, 45}, {45, 135}, {135, 225}, {225, 315}, {315, 360}},
-        };
-        // See THRESHOLDS
-        private static final int[][] ROTATE_TO = new int[][] {
-                {ROTATION_90, ROTATION_270},
-                {ROTATION_0, ROTATION_270, ROTATION_0},
-                {ROTATION_0, ROTATION_90, ROTATION_0},
-                {ROTATION_0, ROTATION_90, ROTATION_0, ROTATION_270, ROTATION_0},
-        };
-
-        // Thresholds that allow all 4 orientations.
-        private static final int[][][] THRESHOLDS_WITH_180 = new int[][][] {
-            {{60, 165}, {165, 195}, {195, 300}},
-            {{0, 30}, {165, 195}, {195, 315}, {315, 360}},
-            {{0, 45}, {45, 165}, {165, 195}, {330, 360}},
-            {{0, 45}, {45, 135}, {225, 315}, {315, 360}},
-        };
-        // See THRESHOLDS_WITH_180
-        private static final int[][] ROTATE_TO_WITH_180 = new int[][] {
-            {ROTATION_90, ROTATION_180, ROTATION_270},
-            {ROTATION_0, ROTATION_180, ROTATION_90, ROTATION_0},
-            {ROTATION_0, ROTATION_270, ROTATION_180, ROTATION_0},
-            {ROTATION_0, ROTATION_90, ROTATION_270, ROTATION_0},
-        };
-
-        // Maximum absolute tilt angle at which to consider orientation data.  Beyond this (i.e.
-        // when screen is facing the sky or ground), we completely ignore orientation data.
-        private static final int MAX_TILT = 75;
-
-        // Additional limits on tilt angle to transition to each new orientation.  We ignore all
-        // data with tilt beyond MAX_TILT, but we can set stricter limits on transitions to a
-        // particular orientation here.
-        private static final int[] MAX_TRANSITION_TILT = new int[] {MAX_TILT, 65, 65, 40};
-
-        // Between this tilt angle and MAX_TILT, we'll allow orientation changes, but we'll filter
-        // with a higher time constant, making us less sensitive to change.  This primarily helps
-        // prevent momentary orientation changes when placing a device on a table from the side (or
-        // picking one up).
-        private static final int PARTIAL_TILT = 50;
-
-        // Maximum allowable deviation of the magnitude of the sensor vector from that of gravity,
-        // in m/s^2.  Beyond this, we assume the phone is under external forces and we can't trust
-        // the sensor data.  However, under constantly vibrating conditions (think car mount), we
-        // still want to pick up changes, so rather than ignore the data, we filter it with a very
-        // high time constant.
-        private static final float MAX_DEVIATION_FROM_GRAVITY = 1.5f;
-
-        // Minimum acceleration considered, in m/s^2. Below this threshold sensor noise will have
-        // significant impact on the calculations and in case of the vector (0, 0, 0) there is no
-        // defined rotation or tilt at all. Low or zero readings can happen when space travelling
-        // or free falling, but more commonly when shaking or getting bad readings from the sensor.
-        // The accelerometer is turned off when not used and polling it too soon after it is
-        // turned on may result in (0, 0, 0).
-        private static final float MIN_ABS_ACCELERATION = 1.5f;
-
-        // Actual sampling period corresponding to SensorManager.SENSOR_DELAY_NORMAL.  There's no
-        // way to get this information from SensorManager.
-        // Note the actual period is generally 3-30ms larger than this depending on the device, but
-        // that's not enough to significantly skew our results.
-        private static final int SAMPLING_PERIOD_MS = 200;
-
-        // The following time constants are all used in low-pass filtering the accelerometer output.
-        // See http://en.wikipedia.org/wiki/Low-pass_filter#Discrete-time_realization for
-        // background.
-
-        // When device is near-vertical (screen approximately facing the horizon)
-        private static final int DEFAULT_TIME_CONSTANT_MS = 100;
-        // When device is partially tilted towards the sky or ground
-        private static final int TILTED_TIME_CONSTANT_MS = 500;
-        // When device is under external acceleration, i.e. not just gravity.  We heavily distrust
-        // such readings.
-        private static final int ACCELERATING_TIME_CONSTANT_MS = 2000;
-
-        private static final float DEFAULT_LOWPASS_ALPHA =
-            computeLowpassAlpha(DEFAULT_TIME_CONSTANT_MS);
-        private static final float TILTED_LOWPASS_ALPHA =
-            computeLowpassAlpha(TILTED_TIME_CONSTANT_MS);
-        private static final float ACCELERATING_LOWPASS_ALPHA =
-            computeLowpassAlpha(ACCELERATING_TIME_CONSTANT_MS);
-
-        private boolean mAllow180Rotation = false;
-
-        private WindowOrientationListener mOrientationListener;
-        private int mRotation = ROTATION_0; // Current orientation state
-        private float mTiltAngle = 0; // low-pass filtered
-        private float mOrientationAngle = 0; // low-pass filtered
-
-        /*
-         * Each "distrust" counter represents our current level of distrust in the data based on
-         * a certain signal.  For each data point that is deemed unreliable based on that signal,
-         * the counter increases; otherwise, the counter decreases.  Exact rules vary.
-         */
-        private int mAccelerationDistrust = 0; // based on magnitude != gravity
-        private int mTiltDistrust = 0; // based on tilt close to +/- 90 degrees
-
-        public SensorEventListenerImpl(WindowOrientationListener orientationListener) {
-            mOrientationListener = orientationListener;
-        }
-
-        private static float computeLowpassAlpha(int timeConstantMs) {
-            return (float) SAMPLING_PERIOD_MS / (timeConstantMs + SAMPLING_PERIOD_MS);
-        }
-
-        void setAllow180Rotation(boolean allowed) {
-            mAllow180Rotation = allowed;
-        }
-
-        int getCurrentRotation(int lastRotation) {
-            if (mTiltDistrust > 0) {
-                // we really don't know the current orientation, so trust what's currently displayed
-                mRotation = SURFACE_TO_INTERNAL_ROTATION[lastRotation];
-            }
-            return INTERNAL_TO_SURFACE_ROTATION[mRotation];
-        }
-
-        private void calculateNewRotation(float orientation, float tiltAngle) {
-            if (localLOGV) Log.i(TAG, orientation + ", " + tiltAngle + ", " + mRotation);
-            final boolean allow180Rotation = mAllow180Rotation;
-            int thresholdRanges[][] = allow180Rotation
-                    ? THRESHOLDS_WITH_180[mRotation] : THRESHOLDS[mRotation];
-            int row = -1;
-            for (int i = 0; i < thresholdRanges.length; i++) {
-                if (orientation >= thresholdRanges[i][0] && orientation < thresholdRanges[i][1]) {
-                    row = i;
-                    break;
-                }
-            }
-            if (row == -1) return; // no matching transition
-
-            int rotation = allow180Rotation
-                    ? ROTATE_TO_WITH_180[mRotation][row] : ROTATE_TO[mRotation][row];
-            if (tiltAngle > MAX_TRANSITION_TILT[rotation]) {
-                // tilted too far flat to go to this rotation
-                return;
-            }
-
-            if (localLOGV) Log.i(TAG, "orientation " + orientation + " gives new rotation = "
-                    + rotation);
-            mRotation = rotation;
-            mOrientationListener.onOrientationChanged(INTERNAL_TO_SURFACE_ROTATION[mRotation]);
-        }
-
-        private float lowpassFilter(float newValue, float oldValue, float alpha) {
-            return alpha * newValue + (1 - alpha) * oldValue;
-        }
-
-        private float vectorMagnitude(float x, float y, float z) {
-            return (float) Math.sqrt(x*x + y*y + z*z);
-        }
-
-        /**
-         * Angle between upVector and the x-y plane (the plane of the screen), in [-90, 90].
-         * +/- 90 degrees = screen facing the sky or ground.
-         */
-        private float tiltAngle(float z, float magnitude) {
-            return (float) Math.asin(z / magnitude) * RADIANS_TO_DEGREES;
-        }
-
-        public void onSensorChanged(SensorEvent event) {
-            // the vector given in the SensorEvent points straight up (towards the sky) under ideal
-            // conditions (the phone is not accelerating).  i'll call this upVector elsewhere.
-            float x = event.values[_DATA_X];
-            float y = event.values[_DATA_Y];
-            float z = event.values[_DATA_Z];
-            float magnitude = vectorMagnitude(x, y, z);
-            float deviation = Math.abs(magnitude - SensorManager.STANDARD_GRAVITY);
-
-            handleAccelerationDistrust(deviation);
-            if (magnitude < MIN_ABS_ACCELERATION) {
-                return; // Ignore tilt and orientation when (0, 0, 0) or low reading
-            }
-
-            // only filter tilt when we're accelerating
-            float alpha = 1;
-            if (mAccelerationDistrust > 0) {
-                alpha = ACCELERATING_LOWPASS_ALPHA;
-            }
-            float newTiltAngle = tiltAngle(z, magnitude);
-            mTiltAngle = lowpassFilter(newTiltAngle, mTiltAngle, alpha);
-
-            float absoluteTilt = Math.abs(mTiltAngle);
-            checkFullyTilted(absoluteTilt);
-            if (mTiltDistrust > 0) {
-                return; // when fully tilted, ignore orientation entirely
-            }
-
-            float newOrientationAngle = computeNewOrientation(x, y);
-            filterOrientation(absoluteTilt, newOrientationAngle);
-            calculateNewRotation(mOrientationAngle, absoluteTilt);
-        }
-
-        /**
-         * When accelerating, increment distrust; otherwise, decrement distrust.  The idea is that
-         * if a single jolt happens among otherwise good data, we should keep trusting the good
-         * data.  On the other hand, if a series of many bad readings comes in (as if the phone is
-         * being rapidly shaken), we should wait until things "settle down", i.e. we get a string
-         * of good readings.
-         *
-         * @param deviation absolute difference between the current magnitude and gravity
-         */
-        private void handleAccelerationDistrust(float deviation) {
-            if (deviation > MAX_DEVIATION_FROM_GRAVITY) {
-                if (mAccelerationDistrust < 5) {
-                    mAccelerationDistrust++;
-                }
-            } else if (mAccelerationDistrust > 0) {
-                mAccelerationDistrust--;
-            }
-        }
-
-        /**
-         * Check if the phone is tilted towards the sky or ground and handle that appropriately.
-         * When fully tilted, we automatically push the tilt up to a fixed value; otherwise we
-         * decrement it.  The idea is to distrust the first few readings after the phone gets
-         * un-tilted, no matter what, i.e. preventing an accidental transition when the phone is
-         * picked up from a table.
-         *
-         * We also reset the orientation angle to the center of the current screen orientation.
-         * Since there is no real orientation of the phone, we want to ignore the most recent sensor
-         * data and reset it to this value to avoid a premature transition when the phone starts to
-         * get un-tilted.
-         *
-         * @param absoluteTilt the absolute value of the current tilt angle
-         */
-        private void checkFullyTilted(float absoluteTilt) {
-            if (absoluteTilt > MAX_TILT) {
-                if (mRotation == ROTATION_0) {
-                    mOrientationAngle = 0;
-                } else if (mRotation == ROTATION_90) {
-                    mOrientationAngle = 90;
-                } else { // ROTATION_270
-                    mOrientationAngle = 270;
-                }
-
-                if (mTiltDistrust < 3) {
-                    mTiltDistrust = 3;
-                }
-            } else if (mTiltDistrust > 0) {
-                mTiltDistrust--;
-            }
-        }
-
-        /**
-         * Angle between the x-y projection of upVector and the +y-axis, increasing
-         * clockwise.
-         * 0 degrees = speaker end towards the sky
-         * 90 degrees = right edge of device towards the sky
-         */
-        private float computeNewOrientation(float x, float y) {
-            float orientationAngle = (float) -Math.atan2(-x, y) * RADIANS_TO_DEGREES;
-            // atan2 returns [-180, 180]; normalize to [0, 360]
-            if (orientationAngle < 0) {
-                orientationAngle += 360;
-            }
-            return orientationAngle;
-        }
-
-        /**
-         * Compute a new filtered orientation angle.
-         */
-        private void filterOrientation(float absoluteTilt, float orientationAngle) {
-            float alpha = DEFAULT_LOWPASS_ALPHA;
-            if (mAccelerationDistrust > 1) {
-                // when under more than a transient acceleration, distrust heavily
-                alpha = ACCELERATING_LOWPASS_ALPHA;
-            } else if (absoluteTilt > PARTIAL_TILT || mAccelerationDistrust == 1) {
-                // when tilted partway, or under transient acceleration, distrust lightly
-                alpha = TILTED_LOWPASS_ALPHA;
-            }
-
-            // since we're lowpass filtering a value with periodic boundary conditions, we need to
-            // adjust the new value to filter in the right direction...
-            float deltaOrientation = orientationAngle - mOrientationAngle;
-            if (deltaOrientation > 180) {
-                orientationAngle -= 360;
-            } else if (deltaOrientation < -180) {
-                orientationAngle += 360;
-            }
-            mOrientationAngle = lowpassFilter(orientationAngle, mOrientationAngle, alpha);
-            // ...and then adjust back to ensure we're in the range [0, 360]
-            if (mOrientationAngle > 360) {
-                mOrientationAngle -= 360;
-            } else if (mOrientationAngle < 0) {
-                mOrientationAngle += 360;
-            }
-        }
-
-        public void onAccuracyChanged(Sensor sensor, int accuracy) {
-
-        }
-    }
-
-    /*
      * Returns true if sensor is enabled and false otherwise
      */
     public boolean canDetectOrientation() {
@@ -492,5 +142,481 @@
      * @param rotation The new orientation of the device, one of the Surface.ROTATION_* constants.
      * @see Surface
      */
-    abstract public void onOrientationChanged(int rotation);
+    public abstract void onOrientationChanged(int rotation);
+
+    /**
+     * Enables or disables the window orientation listener logging for use with
+     * the orientationplot.py tool.
+     * Logging is usually enabled via Development Settings.  (See class comments.)
+     * @param enable True to enable logging.
+     */
+    public void setLogEnabled(boolean enable) {
+        mLogEnabled = enable;
+    }
+
+    /**
+     * This class filters the raw accelerometer data and tries to detect actual changes in
+     * orientation. This is a very ill-defined problem so there are a lot of tweakable parameters,
+     * but here's the outline:
+     *
+     *  - Low-pass filter the accelerometer vector in cartesian coordinates.  We do it in
+     *    cartesian space because the orientation calculations are sensitive to the
+     *    absolute magnitude of the acceleration.  In particular, there are singularities
+     *    in the calculation as the magnitude approaches 0.  By performing the low-pass
+     *    filtering early, we can eliminate high-frequency impulses systematically.
+     *
+     *  - Convert the acceleromter vector from cartesian to spherical coordinates.
+     *    Since we're dealing with rotation of the device, this is the sensible coordinate
+     *    system to work in.  The zenith direction is the Z-axis, the direction the screen
+     *    is facing.  The radial distance is referred to as the magnitude below.
+     *    The elevation angle is referred to as the "tilt" below.
+     *    The azimuth angle is referred to as the "orientation" below (and the azimuth axis is
+     *    the Y-axis).
+     *    See http://en.wikipedia.org/wiki/Spherical_coordinate_system for reference.
+     *
+     *  - If the tilt angle is too close to horizontal (near 90 or -90 degrees), do nothing.
+     *    The orientation angle is not meaningful when the device is nearly horizontal.
+     *    The tilt angle thresholds are set differently for each orientation and different
+     *    limits are applied when the device is facing down as opposed to when it is facing
+     *    forward or facing up.
+     *
+     *  - When the orientation angle reaches a certain threshold, consider transitioning
+     *    to the corresponding orientation.  These thresholds have some hysteresis built-in
+     *    to avoid oscillations between adjacent orientations.
+     *
+     *  - Use the magnitude to judge the confidence of the orientation.
+     *    Under ideal conditions, the magnitude should equal to that of gravity.  When it
+     *    differs significantly, we know the device is under external acceleration and
+     *    we can't trust the data.
+     *
+     *  - Use the tilt angle to judge the confidence of the orientation.
+     *    When the tilt angle is high in absolute value then the device is nearly flat
+     *    so small physical movements produce large changes in orientation angle.
+     *    This can be the case when the device is being picked up from a table.
+     *
+     *  - Use the orientation angle to judge the confidence of the orientation.
+     *    The close the orientation angle is to the canonical orientation angle, the better.
+     *
+     *  - Based on the aggregate confidence, we determine how long we want to wait for
+     *    the new orientation to settle.  This is accomplished by integrating the confidence
+     *    for each orientation over time.  When a threshold integration sum is reached
+     *    then we actually change orientations.
+     *
+     * Details are explained inline.
+     */
+    static final class SensorEventListenerImpl implements SensorEventListener {
+        // We work with all angles in degrees in this class.
+        private static final float RADIANS_TO_DEGREES = (float) (180 / Math.PI);
+
+        // Indices into SensorEvent.values for the accelerometer sensor.
+        private static final int ACCELEROMETER_DATA_X = 0;
+        private static final int ACCELEROMETER_DATA_Y = 1;
+        private static final int ACCELEROMETER_DATA_Z = 2;
+
+        // Rotation constants.
+        // These are the same as Surface rotation constants with the addition of a 5th
+        // unknown state when we are not confident about the proporsed orientation.
+        // One important property of these constants is that they are equal to the
+        // orientation angle itself divided by 90.  We use this fact to map
+        // back and forth between orientation angles and rotation values.
+        private static final int ROTATION_UNKNOWN = -1;
+        //private static final int ROTATION_0 = Surface.ROTATION_0; // 0
+        //private static final int ROTATION_90 = Surface.ROTATION_90; // 1
+        //private static final int ROTATION_180 = Surface.ROTATION_180; // 2
+        //private static final int ROTATION_270 = Surface.ROTATION_270; // 3
+
+        private final WindowOrientationListener mOrientationListener;
+
+        private int mRotation = ROTATION_UNKNOWN;
+
+        /* State for first order low-pass filtering of accelerometer data.
+         * See http://en.wikipedia.org/wiki/Low-pass_filter#Discrete-time_realization for
+         * signal processing background.
+         */
+
+        private long mLastTimestamp = Long.MAX_VALUE; // in nanoseconds
+        private float mLastFilteredX, mLastFilteredY, mLastFilteredZ;
+
+        // The maximum sample inter-arrival time in milliseconds.
+        // If the acceleration samples are further apart than this amount in time, we reset the
+        // state of the low-pass filter and orientation properties.  This helps to handle
+        // boundary conditions when the device is turned on, wakes from suspend or there is
+        // a significant gap in samples.
+        private static final float MAX_FILTER_DELTA_TIME_MS = 1000;
+
+        // The acceleration filter cutoff frequency.
+        // This is the frequency at which signals are attenuated by 3dB (half the passband power).
+        // Each successive octave beyond this frequency is attenuated by an additional 6dB.
+        //
+        // We choose the cutoff frequency such that impulses and vibrational noise
+        // (think car dock) is suppressed.  However, this filtering does not eliminate
+        // all possible sources of orientation ambiguity so we also rely on a dynamic
+        // settle time for establishing a new orientation.  Filtering adds latency
+        // inversely proportional to the cutoff frequency so we don't want to make
+        // it too small or we can lose hundreds of milliseconds of responsiveness.
+        private static final float FILTER_CUTOFF_FREQUENCY_HZ = 1f;
+        private static final float FILTER_TIME_CONSTANT_MS = (float)(500.0f
+                / (Math.PI * FILTER_CUTOFF_FREQUENCY_HZ)); // t = 1 / (2pi * Fc) * 1000ms
+
+        // The filter gain.
+        // We choose a value slightly less than unity to avoid numerical instabilities due
+        // to floating-point error accumulation.
+        private static final float FILTER_GAIN = 0.999f;
+
+        /* State for orientation detection. */
+
+        // Thresholds for minimum and maximum allowable deviation from gravity.
+        //
+        // If the device is undergoing external acceleration (being bumped, in a car
+        // that is turning around a corner or a plane taking off) then the magnitude
+        // may be substantially more or less than gravity.  This can skew our orientation
+        // detection by making us think that up is pointed in a different direction.
+        //
+        // Conversely, if the device is in freefall, then there will be no gravity to
+        // measure at all.  This is problematic because we cannot detect the orientation
+        // without gravity to tell us which way is up.  A magnitude near 0 produces
+        // singularities in the tilt and orientation calculations.
+        //
+        // In both cases, we postpone choosing an orientation.
+        private static final float MIN_ACCELERATION_MAGNITUDE =
+                SensorManager.STANDARD_GRAVITY * 0.5f;
+        private static final float MAX_ACCELERATION_MAGNITUDE =
+            SensorManager.STANDARD_GRAVITY * 1.5f;
+
+        // Maximum absolute tilt angle at which to consider orientation data.  Beyond this (i.e.
+        // when screen is facing the sky or ground), we completely ignore orientation data.
+        private static final int MAX_TILT = 75;
+
+        // The tilt angle range in degrees for each orientation.
+        // Beyond these tilt angles, we don't even consider transitioning into the
+        // specified orientation.  We place more stringent requirements on unnatural
+        // orientations than natural ones to make it less likely to accidentally transition
+        // into those states.
+        // The first value of each pair is negative so it applies a limit when the device is
+        // facing down (overhead reading in bed).
+        // The second value of each pair is positive so it applies a limit when the device is
+        // facing up (resting on a table).
+        // The ideal tilt angle is 0 (when the device is vertical) so the limits establish
+        // how close to vertical the device must be in order to change orientation.
+        private static final int[][] TILT_TOLERANCE = new int[][] {
+            /* ROTATION_0   */ { -20, 75 },
+            /* ROTATION_90  */ { -20, 70 },
+            /* ROTATION_180 */ { -20, 65 },
+            /* ROTATION_270 */ { -20, 70 }
+        };
+
+        // The gap angle in degrees between adjacent orientation angles for hysteresis.
+        // This creates a "dead zone" between the current orientation and a proposed
+        // adjacent orientation.  No orientation proposal is made when the orientation
+        // angle is within the gap between the current orientation and the adjacent
+        // orientation.
+        private static final int ADJACENT_ORIENTATION_ANGLE_GAP = 30;
+
+        // The confidence scale factors for angle, tilt and magnitude.
+        // When the distance between the actual value and the ideal value is the
+        // specified delta, orientation transitions will take twice as long as they would
+        // in the ideal case.  Increasing or decreasing the delta has an exponential effect
+        // on each factor's influence over the transition time.
+
+        // Transition takes 2x longer when angle is 30 degrees from ideal orientation angle.
+        private static final float ORIENTATION_ANGLE_CONFIDENCE_SCALE =
+                confidenceScaleFromDelta(30);
+
+        // Transition takes 2x longer when tilt is 45 degrees from vertical.
+        private static final float TILT_ANGLE_CONFIDENCE_SCALE = confidenceScaleFromDelta(45);
+
+        // Transition takes 2x longer when acceleration is 0.25 Gs.
+        private static final float MAGNITUDE_CONFIDENCE_SCALE = confidenceScaleFromDelta(
+                SensorManager.STANDARD_GRAVITY * 0.25f);
+
+        // The number of milliseconds for which a new orientation must be stable before
+        // we perform an orientation change under ideal conditions.  It will take
+        // proportionally longer than this to effect an orientation change when
+        // the proposed orientation confidence is low.
+        private static final float ORIENTATION_SETTLE_TIME_MS = 250;
+
+        // The confidence that we have abount effecting each orientation change.
+        // When one of these values exceeds 1.0, we have determined our new orientation!
+        private float mConfidence[] = new float[4];
+
+        public SensorEventListenerImpl(WindowOrientationListener orientationListener) {
+            mOrientationListener = orientationListener;
+        }
+
+        public int getCurrentRotation(int lastRotation) {
+            return mRotation != ROTATION_UNKNOWN ? mRotation : lastRotation;
+        }
+
+        @Override
+        public void onAccuracyChanged(Sensor sensor, int accuracy) {
+        }
+
+        @Override
+        public void onSensorChanged(SensorEvent event) {
+            final boolean log = mOrientationListener.mLogEnabled;
+
+            // The vector given in the SensorEvent points straight up (towards the sky) under ideal
+            // conditions (the phone is not accelerating).  I'll call this up vector elsewhere.
+            float x = event.values[ACCELEROMETER_DATA_X];
+            float y = event.values[ACCELEROMETER_DATA_Y];
+            float z = event.values[ACCELEROMETER_DATA_Z];
+
+            if (log) {
+                Slog.v(TAG, "Raw acceleration vector: " +
+                        "x=" + x + ", y=" + y + ", z=" + z);
+            }
+
+            // Apply a low-pass filter to the acceleration up vector in cartesian space.
+            // Reset the orientation listener state if the samples are too far apart in time
+            // or when we see values of (0, 0, 0) which indicates that we polled the
+            // accelerometer too soon after turning it on and we don't have any data yet.
+            final float timeDeltaMS = (event.timestamp - mLastTimestamp) * 0.000001f;
+            boolean skipSample;
+            if (timeDeltaMS <= 0 || timeDeltaMS > MAX_FILTER_DELTA_TIME_MS
+                    || (x == 0 && y == 0 && z == 0)) {
+                if (log) {
+                    Slog.v(TAG, "Resetting orientation listener.");
+                }
+                for (int i = 0; i < 4; i++) {
+                    mConfidence[i] = 0;
+                }
+                skipSample = true;
+            } else {
+                final float alpha = timeDeltaMS
+                        / (FILTER_TIME_CONSTANT_MS + timeDeltaMS) * FILTER_GAIN;
+                x = alpha * (x - mLastFilteredX) + mLastFilteredX;
+                y = alpha * (y - mLastFilteredY) + mLastFilteredY;
+                z = alpha * (z - mLastFilteredZ) + mLastFilteredZ;
+                if (log) {
+                    Slog.v(TAG, "Filtered acceleration vector: " +
+                            "x=" + x + ", y=" + y + ", z=" + z);
+                }
+                skipSample = false;
+            }
+            mLastTimestamp = event.timestamp;
+            mLastFilteredX = x;
+            mLastFilteredY = y;
+            mLastFilteredZ = z;
+
+            boolean orientationChanged = false;
+            if (!skipSample) {
+                // Determine a proposed orientation based on the currently available data.
+                int proposedOrientation = ROTATION_UNKNOWN;
+                float combinedConfidence = 1.0f;
+
+                // Calculate the magnitude of the acceleration vector.
+                final float magnitude = (float) Math.sqrt(x * x + y * y + z * z);
+                if (magnitude < MIN_ACCELERATION_MAGNITUDE
+                        || magnitude > MAX_ACCELERATION_MAGNITUDE) {
+                    if (log) {
+                        Slog.v(TAG, "Ignoring sensor data, magnitude out of range: "
+                                + "magnitude=" + magnitude);
+                    }
+                } else {
+                    // Calculate the tilt angle.
+                    // This is the angle between the up vector and the x-y plane (the plane of
+                    // the screen) in a range of [-90, 90] degrees.
+                    //   -90 degrees: screen horizontal and facing the ground (overhead)
+                    //     0 degrees: screen vertical
+                    //    90 degrees: screen horizontal and facing the sky (on table)
+                   final int tiltAngle = (int) Math.round(
+                           Math.asin(z / magnitude) * RADIANS_TO_DEGREES);
+
+                   // If the tilt angle is too close to horizontal then we cannot determine
+                   // the orientation angle of the screen.
+                   if (Math.abs(tiltAngle) > MAX_TILT) {
+                       if (log) {
+                           Slog.v(TAG, "Ignoring sensor data, tilt angle too high: "
+                                   + "magnitude=" + magnitude + ", tiltAngle=" + tiltAngle);
+                       }
+                   } else {
+                       // Calculate the orientation angle.
+                       // This is the angle between the x-y projection of the up vector onto
+                       // the +y-axis, increasing clockwise in a range of [0, 360] degrees.
+                       int orientationAngle = (int) Math.round(
+                               -Math.atan2(-x, y) * RADIANS_TO_DEGREES);
+                       if (orientationAngle < 0) {
+                           // atan2 returns [-180, 180]; normalize to [0, 360]
+                           orientationAngle += 360;
+                       }
+
+                       // Find the nearest orientation.
+                       // An orientation of 0 can have a nearest angle of 0 or 360 depending
+                       // on which is closer to the measured orientation angle.  We leave the
+                       // nearest angle at 360 in that case since it makes the delta calculation
+                       // for orientation angle confidence easier below.
+                       int nearestOrientation = (orientationAngle + 45) / 90;
+                       int nearestOrientationAngle = nearestOrientation * 90;
+                       if (nearestOrientation == 4) {
+                           nearestOrientation = 0;
+                       }
+
+                       // Determine the proposed orientation.
+                       // The confidence of the proposal is 1.0 when it is ideal and it
+                       // decays exponentially as the proposal moves further from the ideal
+                       // angle, tilt and magnitude of the proposed orientation.
+                       if (isTiltAngleAcceptable(nearestOrientation, tiltAngle)
+                               && isOrientationAngleAcceptable(nearestOrientation,
+                                       orientationAngle)) {
+                           proposedOrientation = nearestOrientation;
+
+                           final float idealOrientationAngle = nearestOrientationAngle;
+                           final float orientationConfidence = confidence(orientationAngle,
+                                   idealOrientationAngle, ORIENTATION_ANGLE_CONFIDENCE_SCALE);
+
+                           final float idealTiltAngle = 0;
+                           final float tiltConfidence = confidence(tiltAngle,
+                                   idealTiltAngle, TILT_ANGLE_CONFIDENCE_SCALE);
+
+                           final float idealMagnitude = SensorManager.STANDARD_GRAVITY;
+                           final float magnitudeConfidence = confidence(magnitude,
+                                   idealMagnitude, MAGNITUDE_CONFIDENCE_SCALE);
+
+                           combinedConfidence = orientationConfidence
+                                   * tiltConfidence * magnitudeConfidence;
+
+                           if (log) {
+                               Slog.v(TAG, "Proposal: "
+                                       + "magnitude=" + magnitude
+                                       + ", tiltAngle=" + tiltAngle
+                                       + ", orientationAngle=" + orientationAngle
+                                       + ", proposedOrientation=" + proposedOrientation
+                                       + ", combinedConfidence=" + combinedConfidence
+                                       + ", orientationConfidence=" + orientationConfidence
+                                       + ", tiltConfidence=" + tiltConfidence
+                                       + ", magnitudeConfidence=" + magnitudeConfidence);
+                           }
+                       } else {
+                           if (log) {
+                               Slog.v(TAG, "Ignoring sensor data, no proposal: "
+                                       + "magnitude=" + magnitude + ", tiltAngle=" + tiltAngle
+                                       + ", orientationAngle=" + orientationAngle);
+                           }
+                       }
+                   }
+                }
+
+                // Sum up the orientation confidence weights.
+                // Detect an orientation change when the sum reaches 1.0.
+                final float confidenceAmount = combinedConfidence * timeDeltaMS
+                        / ORIENTATION_SETTLE_TIME_MS;
+                for (int i = 0; i < 4; i++) {
+                    if (i == proposedOrientation) {
+                        mConfidence[i] += confidenceAmount;
+                        if (mConfidence[i] >= 1.0f) {
+                            mConfidence[i] = 1.0f;
+
+                            if (i != mRotation) {
+                                if (log) {
+                                    Slog.v(TAG, "Orientation changed!  rotation=" + i);
+                                }
+                                mRotation = i;
+                                orientationChanged = true;
+                            }
+                        }
+                    } else {
+                        mConfidence[i] -= confidenceAmount;
+                        if (mConfidence[i] < 0.0f) {
+                            mConfidence[i] = 0.0f;
+                        }
+                    }
+                }
+            }
+
+            // Write final statistics about where we are in the orientation detection process.
+            if (log) {
+                Slog.v(TAG, "Result: rotation=" + mRotation
+                        + ", confidence=["
+                        + mConfidence[0] + ", "
+                        + mConfidence[1] + ", "
+                        + mConfidence[2] + ", "
+                        + mConfidence[3] + "], timeDeltaMS=" + timeDeltaMS);
+            }
+
+            // Tell the listener.
+            if (orientationChanged) {
+                mOrientationListener.onOrientationChanged(mRotation);
+            }
+        }
+
+        /**
+         * Returns true if the tilt angle is acceptable for a proposed
+         * orientation transition.
+         */
+        private boolean isTiltAngleAcceptable(int proposedOrientation,
+                int tiltAngle) {
+            return tiltAngle >= TILT_TOLERANCE[proposedOrientation][0]
+                    && tiltAngle <= TILT_TOLERANCE[proposedOrientation][1];
+        }
+
+        /**
+         * Returns true if the orientation angle is acceptable for a proposed
+         * orientation transition.
+         * This function takes into account the gap between adjacent orientations
+         * for hysteresis.
+         */
+        private boolean isOrientationAngleAcceptable(int proposedOrientation,
+                int orientationAngle) {
+            final int currentOrientation = mRotation;
+
+            // If there is no current rotation, then there is no gap.
+            if (currentOrientation != ROTATION_UNKNOWN) {
+                // If the proposed orientation is the same or is counter-clockwise adjacent,
+                // then we set a lower bound on the orientation angle.
+                // For example, if currentOrientation is ROTATION_0 and proposed is ROTATION_90,
+                // then we want to check orientationAngle > 45 + GAP / 2.
+                if (proposedOrientation == currentOrientation
+                        || proposedOrientation == (currentOrientation + 1) % 4) {
+                    int lowerBound = proposedOrientation * 90 - 45
+                            + ADJACENT_ORIENTATION_ANGLE_GAP / 2;
+                    if (proposedOrientation == 0) {
+                        if (orientationAngle >= 315 && orientationAngle < lowerBound + 360) {
+                            return false;
+                        }
+                    } else {
+                        if (orientationAngle < lowerBound) {
+                            return false;
+                        }
+                    }
+                }
+
+                // If the proposed orientation is the same or is clockwise adjacent,
+                // then we set an upper bound on the orientation angle.
+                // For example, if currentOrientation is ROTATION_0 and proposed is ROTATION_270,
+                // then we want to check orientationAngle < 315 - GAP / 2.
+                if (proposedOrientation == currentOrientation
+                        || proposedOrientation == (currentOrientation + 3) % 4) {
+                    int upperBound = proposedOrientation * 90 + 45
+                            - ADJACENT_ORIENTATION_ANGLE_GAP / 2;
+                    if (proposedOrientation == 0) {
+                        if (orientationAngle <= 45 && orientationAngle > upperBound) {
+                            return false;
+                        }
+                    } else {
+                        if (orientationAngle > upperBound) {
+                            return false;
+                        }
+                    }
+                }
+            }
+            return true;
+        }
+
+        /**
+         * Calculate an exponentially weighted confidence value in the range [0.0, 1.0].
+         * The further the value is from the target, the more the confidence trends to 0.
+         */
+        private static float confidence(float value, float target, float scale) {
+            return (float) Math.exp(-Math.abs(value - target) * scale);
+        }
+
+        /**
+         * Calculate a scale factor for the confidence weight exponent.
+         * The scale value is chosen such that confidence(value, target, scale) == 0.5
+         * whenever abs(value - target) == cutoffDelta.
+         */
+        private static float confidenceScaleFromDelta(float cutoffDelta) {
+            return (float) -Math.log(0.5) / cutoffDelta;
+        }
+    }
 }
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java
index d310237..7edfd7b 100644
--- a/core/java/android/view/inputmethod/InputMethodManager.java
+++ b/core/java/android/view/inputmethod/InputMethodManager.java
@@ -16,6 +16,15 @@
 
 package android.view.inputmethod;
 
+import com.android.internal.os.HandlerCaller;
+import com.android.internal.view.IInputConnectionWrapper;
+import com.android.internal.view.IInputContext;
+import com.android.internal.view.IInputMethodCallback;
+import com.android.internal.view.IInputMethodClient;
+import com.android.internal.view.IInputMethodManager;
+import com.android.internal.view.IInputMethodSession;
+import com.android.internal.view.InputBindResult;
+
 import android.content.Context;
 import android.graphics.Rect;
 import android.os.Bundle;
@@ -27,23 +36,12 @@
 import android.os.ResultReceiver;
 import android.os.ServiceManager;
 import android.util.Log;
-import android.util.Pair;
 import android.util.PrintWriterPrinter;
 import android.util.Printer;
 import android.view.KeyEvent;
 import android.view.MotionEvent;
 import android.view.View;
 import android.view.ViewRoot;
-import android.view.inputmethod.InputMethodSubtype;
-
-import com.android.internal.os.HandlerCaller;
-import com.android.internal.view.IInputConnectionWrapper;
-import com.android.internal.view.IInputContext;
-import com.android.internal.view.IInputMethodCallback;
-import com.android.internal.view.IInputMethodClient;
-import com.android.internal.view.IInputMethodManager;
-import com.android.internal.view.IInputMethodSession;
-import com.android.internal.view.InputBindResult;
 
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
@@ -96,7 +94,7 @@
  * be aware of are:</p>
  * 
  * <ul>
- * <li> Properly set the {@link android.R.attr#inputType} if your editable
+ * <li> Properly set the {@link android.R.attr#inputType} in your editable
  * text views, so that the input method will have enough context to help the
  * user in entering text into them.
  * <li> Deal well with losing screen space when the input method is
@@ -389,6 +387,7 @@
             super(mainLooper, conn);
         }
 
+        @Override
         public boolean isActive() {
             return mActive;
         }
@@ -804,7 +803,7 @@
     public static final int HIDE_NOT_ALWAYS = 0x0002;
     
     /**
-     * Synonym for {@link #hideSoftInputFromWindow(IBinder, int, ResultReceiver)
+     * Synonym for {@link #hideSoftInputFromWindow(IBinder, int, ResultReceiver)}
      * without a result: request to hide the soft input window from the
      * context of the window that is currently accepting input.
      * 
diff --git a/core/java/android/webkit/CacheManager.java b/core/java/android/webkit/CacheManager.java
index a553a459..e440eb9 100644
--- a/core/java/android/webkit/CacheManager.java
+++ b/core/java/android/webkit/CacheManager.java
@@ -33,8 +33,8 @@
 import java.util.Map;
 
 
-import org.bouncycastle.crypto.Digest;
-import org.bouncycastle.crypto.digests.SHA1Digest;
+import com.android.org.bouncycastle.crypto.Digest;
+import com.android.org.bouncycastle.crypto.digests.SHA1Digest;
 
 /**
  * The class CacheManager provides the persistent cache of content that is
diff --git a/core/java/android/webkit/CertTool.java b/core/java/android/webkit/CertTool.java
index 99757d2..d25d970 100644
--- a/core/java/android/webkit/CertTool.java
+++ b/core/java/android/webkit/CertTool.java
@@ -16,10 +16,10 @@
 
 package android.webkit;
 
-import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
-import org.bouncycastle.asn1.x509.AlgorithmIdentifier;
-import org.bouncycastle.jce.netscape.NetscapeCertRequest;
-import org.bouncycastle.util.encoders.Base64;
+import com.android.org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
+import com.android.org.bouncycastle.asn1.x509.AlgorithmIdentifier;
+import com.android.org.bouncycastle.jce.netscape.NetscapeCertRequest;
+import com.android.org.bouncycastle.util.encoders.Base64;
 
 import android.content.ActivityNotFoundException;
 import android.content.Context;
diff --git a/core/java/android/webkit/WebStorage.java b/core/java/android/webkit/WebStorage.java
index 257ed2a..8eb1524 100644
--- a/core/java/android/webkit/WebStorage.java
+++ b/core/java/android/webkit/WebStorage.java
@@ -75,6 +75,9 @@
     private Handler mHandler = null;
     private Handler mUIHandler = null;
 
+    /**
+     * Class containing the HTML5 database quota and usage for an origin.
+     */
     public static class Origin {
         private String mOrigin = null;
         private long mQuota = 0;
@@ -95,14 +98,30 @@
             mOrigin = origin;
         }
 
+        /**
+         * An origin string is created using WebCore::SecurityOrigin::toString().
+         * Note that WebCore::SecurityOrigin uses 0 (which is not printed) for
+         * the port if the port is the default for the protocol. Eg
+         * http://www.google.com and http://www.google.com:80 both record a port
+         * of 0 and hence toString() == 'http://www.google.com' for both.
+         * @return The origin string.
+         */
         public String getOrigin() {
             return mOrigin;
         }
 
+        /**
+         * Returns the quota for this origin's HTML5 database.
+         * @return The quota in bytes.
+         */
         public long getQuota() {
             return mQuota;
         }
 
+        /**
+         * Returns the usage for this origin's HTML5 database.
+         * @return The usage in bytes.
+         */
         public long getUsage() {
             return mUsage;
         }
@@ -229,7 +248,8 @@
      */
 
     /**
-     * Returns a list of origins having a database
+     * Returns a list of origins having a database. The Map is of type
+     * Map<String, Origin>.
      */
     public void getOrigins(ValueCallback<Map> callback) {
         if (callback != null) {
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 83061ec..ca45e68 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -498,9 +498,6 @@
     // default is not set, the UI will continue handle them.
     private boolean mDeferTouchProcess;
 
-    // if true, multi-touch events will be passed to webkit directly before UI
-    private boolean mDeferMultitouch = false;
-
     // Currently, multi-touch events are sent to WebKit first then back to
     // WebView while single-touch events are handled in WebView first.
     // So there is a chance that a single-touch move event is handled in WebView
@@ -5152,6 +5149,7 @@
                 if (mNativeClass != 0) {
                     nativeRecordButtons(false, false, true);
                 }
+                setFocusControllerActive(false);
             }
             mGotKeyDown = false;
         }
@@ -8165,17 +8163,6 @@
     }
 
     /**
-     * Toggle whether multi touch events should be sent to webkit
-     * no matter if UI wants to handle it first.
-     *
-     * @hide This is only used by the webkit layout test.
-     */
-    public void setDeferMultiTouch(boolean value) {
-      mDeferMultitouch = value;
-      Log.v(LOGTAG, "set mDeferMultitouch to " + value);
-    }
-
-    /**
      *  Update our cache with updatedText.
      *  @param updatedText  The new text to put in our cache.
      */
diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java
index bb4441f..0992079b 100644
--- a/core/java/android/webkit/WebViewCore.java
+++ b/core/java/android/webkit/WebViewCore.java
@@ -130,6 +130,7 @@
 
     private int mLowMemoryUsageThresholdMb;
     private int mHighMemoryUsageThresholdMb;
+    private int mHighUsageDeltaMb;
 
     // The thread name used to identify the WebCore thread and for use in
     // debugging other classes that require operation within the WebCore thread.
@@ -186,12 +187,15 @@
 
         // Allow us to use up to our memory class value before V8's GC kicks in.
         // These values have been determined by experimentation.
-        mLowMemoryUsageThresholdMb = manager.getMemoryClass();
+        mLowMemoryUsageThresholdMb = manager.getLargeMemoryClass();
         // If things get crazy, allow V8 to use up to 3 times our memory class, or a third of the
-        // device's total available memory, whichever is smaller. At that point V8 will start
-        // attempting more aggressive garbage collection.
-        mHighMemoryUsageThresholdMb = Math.min(mLowMemoryUsageThresholdMb * 3,
-                (int) (memInfo.availMem / 3) >> 20);
+        // device's total available memory, whichever is smaller.  This value must be no less
+        // than the low memory threshold.
+        // At that point V8 will start attempting more aggressive garbage collection.
+        mHighMemoryUsageThresholdMb = Math.max(Math.min(mLowMemoryUsageThresholdMb * 3,
+                (int) (memInfo.availMem / 3) >> 20), mLowMemoryUsageThresholdMb);
+        // Avoid constant V8 GC when memory usage equals to working set estimate.
+        mHighUsageDeltaMb = 1;
 
         // Send a message to initialize the WebViewCore.
         Message init = sWebCoreHandler.obtainMessage(
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index fc5c893..6d66bbc 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -1098,7 +1098,8 @@
         if (childCount == 0) return true;
         if (childCount != mItemCount) return false;
 
-        return getChildAt(0).getTop() >= 0 && getChildAt(childCount - 1).getBottom() <= mBottom;
+        return getChildAt(0).getTop() >= mListPadding.top &&
+                getChildAt(childCount - 1).getBottom() <= getHeight() - mListPadding.bottom;
     }
 
     /**
diff --git a/core/java/android/widget/CalendarView.java b/core/java/android/widget/CalendarView.java
index 7ef61a8..899e872 100644
--- a/core/java/android/widget/CalendarView.java
+++ b/core/java/android/widget/CalendarView.java
@@ -440,11 +440,18 @@
             return;
         }
         mMinDate.setTimeInMillis(minDate);
-        // reinitialize the adapter since its range depends on min date
-        mAdapter.init();
+        // make sure the current date is not earlier than
+        // the new min date since the latter is used for
+        // calculating the indices in the adapter thus
+        // avoiding out of bounds error
         Calendar date = mAdapter.mSelectedDate;
         if (date.before(mMinDate)) {
-            setDate(mMinDate.getTimeInMillis());
+            mAdapter.setSelectedDay(mMinDate);
+        }
+        // reinitialize the adapter since its range depends on min date
+        mAdapter.init();
+        if (date.before(mMinDate)) {
+            setDate(mTempDate.getTimeInMillis());
         } else {
             // we go to the current date to force the ListView to query its
             // adapter for the shown views since we have changed the adapter
@@ -753,7 +760,13 @@
             mFirstDayOfMonth.set(Calendar.DAY_OF_MONTH, 1);
 
             setMonthDisplayed(mFirstDayOfMonth);
-            position = getWeeksSinceMinDate(mFirstDayOfMonth);
+
+            // the earliest time we can scroll to is the min date
+            if (mFirstDayOfMonth.before(mMinDate)) {
+                position = 0;
+            } else {
+                position = getWeeksSinceMinDate(mFirstDayOfMonth);
+            }
 
             mPreviousScrollState = OnScrollListener.SCROLL_STATE_FLING;
             if (animate) {
diff --git a/core/java/android/widget/DatePicker.java b/core/java/android/widget/DatePicker.java
index f1786e2..ea868a6 100644
--- a/core/java/android/widget/DatePicker.java
+++ b/core/java/android/widget/DatePicker.java
@@ -34,6 +34,7 @@
 
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
+import java.util.Arrays;
 import java.util.Calendar;
 import java.util.Locale;
 import java.util.TimeZone;
@@ -156,8 +157,34 @@
 
         OnValueChangeListener onChangeListener = new OnValueChangeListener() {
             public void onValueChange(NumberPicker picker, int oldVal, int newVal) {
-                updateDate(mYearSpinner.getValue(), mMonthSpinner.getValue(), mDaySpinner
-                        .getValue());
+                mTempDate.setTimeInMillis(mCurrentDate.getTimeInMillis());
+                // take care of wrapping of days and months to update greater fields
+                if (picker == mDaySpinner) {
+                    int maxDayOfMonth = mTempDate.getActualMaximum(Calendar.DAY_OF_MONTH);
+                    if (oldVal == maxDayOfMonth && newVal == 1) {
+                        mTempDate.add(Calendar.DAY_OF_MONTH, 1);
+                    } else if (oldVal == 1 && newVal == maxDayOfMonth) {
+                        mTempDate.add(Calendar.DAY_OF_MONTH, -1);
+                    } else {
+                        mTempDate.add(Calendar.DAY_OF_MONTH, newVal - oldVal);
+                    }
+                } else if (picker == mMonthSpinner) {
+                    if (oldVal == 11 && newVal == 0) {
+                        mTempDate.add(Calendar.MONTH, 1);
+                    } else if (oldVal == 0 && newVal == 11) {
+                        mTempDate.add(Calendar.MONTH, -1);
+                    } else {
+                        mTempDate.add(Calendar.MONTH, newVal - oldVal);
+                    }
+                } else if (picker == mYearSpinner) {
+                    mTempDate.set(Calendar.YEAR, newVal);
+                } else {
+                    throw new IllegalArgumentException();
+                }
+                // now set the date to the adjusted one
+                setDate(mTempDate.get(Calendar.YEAR), mTempDate.get(Calendar.MONTH),
+                        mTempDate.get(Calendar.DAY_OF_MONTH));
+                notifyDateChanged();
             }
         };
 
@@ -167,7 +194,8 @@
         mCalendarView = (CalendarView) findViewById(R.id.calendar_view);
         mCalendarView.setOnDateChangeListener(new CalendarView.OnDateChangeListener() {
             public void onSelectedDayChange(CalendarView view, int year, int month, int monthDay) {
-                updateDate(year, month, monthDay);
+                setDate(year, month, monthDay);
+                notifyDateChanged();
             }
         });
 
@@ -260,10 +288,12 @@
             return;
         }
         mMinDate.setTimeInMillis(minDate);
-        mYearSpinner.setMinValue(mMinDate.get(Calendar.YEAR));
-        mYearSpinner.setMaxValue(mMaxDate.get(Calendar.YEAR));
         mCalendarView.setMinDate(minDate);
-        updateSpinners(mYearSpinner.getValue(), mMonthSpinner.getValue(), mDaySpinner.getValue());
+        if (mCurrentDate.before(mMinDate)) {
+            mCurrentDate.setTimeInMillis(mMinDate.getTimeInMillis());
+            updateCalendarView();
+        }
+        updateSpinners();
     }
 
     /**
@@ -294,10 +324,12 @@
             return;
         }
         mMaxDate.setTimeInMillis(maxDate);
-        mYearSpinner.setMinValue(mMinDate.get(Calendar.YEAR));
-        mYearSpinner.setMaxValue(mMaxDate.get(Calendar.YEAR));
         mCalendarView.setMaxDate(maxDate);
-        updateSpinners(mYearSpinner.getValue(), mMonthSpinner.getValue(), mDaySpinner.getValue());
+        if (mCurrentDate.after(mMaxDate)) {
+            mCurrentDate.setTimeInMillis(mMaxDate.getTimeInMillis());
+            updateCalendarView();
+        }
+        updateSpinners();
     }
 
     @Override
@@ -433,13 +465,11 @@
      * @param dayOfMonth The day of the month.
      */
     public void updateDate(int year, int month, int dayOfMonth) {
-        if (mCurrentDate.get(Calendar.YEAR) != year
-                || mCurrentDate.get(Calendar.MONTH) != dayOfMonth
-                || mCurrentDate.get(Calendar.DAY_OF_MONTH) != month) {
-            updateSpinners(year, month, dayOfMonth);
-            updateCalendarView();
-            notifyDateChanged();
+        if (!isNewDate(year, month, dayOfMonth)) {
+            return;
         }
+        setDate(year, month, dayOfMonth);
+        notifyDateChanged();
     }
 
     // Override so we are in complete control of save / restore for this widget.
@@ -451,15 +481,14 @@
     @Override
     protected Parcelable onSaveInstanceState() {
         Parcelable superState = super.onSaveInstanceState();
-        return new SavedState(superState, mYearSpinner.getValue(), mMonthSpinner.getValue(),
-                mDaySpinner.getValue());
+        return new SavedState(superState, getYear(), getMonth(), getDayOfMonth());
     }
 
     @Override
     protected void onRestoreInstanceState(Parcelable state) {
         SavedState ss = (SavedState) state;
         super.onRestoreInstanceState(ss.getSuperState());
-        updateSpinners(ss.mYear, ss.mMonth, ss.mDay);
+        setDate(ss.mYear, ss.mMonth, ss.mDay);
     }
 
     /**
@@ -474,10 +503,7 @@
      */
     public void init(int year, int monthOfYear, int dayOfMonth,
             OnDateChangedListener onDateChangedListener) {
-        // make sure there is no callback
-        mOnDateChangedListener = null;
-        updateDate(year, monthOfYear, dayOfMonth);
-        // register the callback after updating the date
+        setDate(year, monthOfYear, dayOfMonth);
         mOnDateChangedListener = onDateChangedListener;
     }
 
@@ -514,104 +540,94 @@
         }
     }
 
-    /**
-     * Updates the spinners with the given <code>year</code>, <code>month</code>
-     * , and <code>dayOfMonth</code>. If the provided values designate an
-     * inconsistent date the values are normalized before updating the spinners.
-     */
-    private void updateSpinners(int year, int month, int dayOfMonth) {
-        // compute the deltas before modifying the current date
-        int deltaMonths = getDelataMonth(month);
-        int deltaDays = getDelataDayOfMonth(dayOfMonth);
-        mCurrentDate.set(Calendar.YEAR, year);
-        mCurrentDate.add(Calendar.MONTH, deltaMonths);
-        mCurrentDate.add(Calendar.DAY_OF_MONTH, deltaDays);
+    private boolean isNewDate(int year, int month, int dayOfMonth) {
+        return (mCurrentDate.get(Calendar.YEAR) != year
+                || mCurrentDate.get(Calendar.MONTH) != dayOfMonth
+                || mCurrentDate.get(Calendar.DAY_OF_MONTH) != month);
+    }
 
+    private void setDate(int year, int month, int dayOfMonth) {
+        mCurrentDate.set(year, month, dayOfMonth);
         if (mCurrentDate.before(mMinDate)) {
             mCurrentDate.setTimeInMillis(mMinDate.getTimeInMillis());
         } else if (mCurrentDate.after(mMaxDate)) {
             mCurrentDate.setTimeInMillis(mMaxDate.getTimeInMillis());
         }
+        updateSpinners();
+        updateCalendarView();
+    }
 
+    private void updateSpinners() {
+        // set the spinner ranges respecting the min and max dates
+        if (mCurrentDate.equals(mMinDate)) {
+            mDaySpinner.setMinValue(mCurrentDate.get(Calendar.DAY_OF_MONTH));
+            mDaySpinner.setMaxValue(mCurrentDate.getActualMaximum(Calendar.DAY_OF_MONTH));
+            mDaySpinner.setWrapSelectorWheel(false);
+            mMonthSpinner.setDisplayedValues(null);
+            mMonthSpinner.setMinValue(mCurrentDate.get(Calendar.MONTH));
+            mMonthSpinner.setMaxValue(mCurrentDate.getActualMaximum(Calendar.MONTH));
+            mMonthSpinner.setWrapSelectorWheel(false);
+        } else if (mCurrentDate.equals(mMaxDate)) {
+            mDaySpinner.setMinValue(mCurrentDate.getActualMinimum(Calendar.DAY_OF_MONTH));
+            mDaySpinner.setMaxValue(mCurrentDate.get(Calendar.DAY_OF_MONTH));
+            mDaySpinner.setWrapSelectorWheel(false);
+            mMonthSpinner.setDisplayedValues(null);
+            mMonthSpinner.setMinValue(mCurrentDate.getActualMinimum(Calendar.MONTH));
+            mMonthSpinner.setMaxValue(mCurrentDate.get(Calendar.MONTH));
+            mMonthSpinner.setWrapSelectorWheel(false);
+        } else {
+            mDaySpinner.setMinValue(1);
+            mDaySpinner.setMaxValue(mCurrentDate.getActualMaximum(Calendar.DAY_OF_MONTH));
+            mDaySpinner.setWrapSelectorWheel(true);
+            mMonthSpinner.setDisplayedValues(null);
+            mMonthSpinner.setMinValue(0);
+            mMonthSpinner.setMaxValue(11);
+            mMonthSpinner.setWrapSelectorWheel(true);
+        }
+
+        // make sure the month names are a zero based array
+        // with the months in the month spinner
+        String[] displayedValues = Arrays.copyOfRange(getShortMonths(),
+                mMonthSpinner.getMinValue(), mMonthSpinner.getMaxValue() + 1);
+        mMonthSpinner.setDisplayedValues(displayedValues);
+
+        // year spinner range does not change based on the current date
+        mYearSpinner.setMinValue(mMinDate.get(Calendar.YEAR));
+        mYearSpinner.setMaxValue(mMaxDate.get(Calendar.YEAR));
+        mYearSpinner.setWrapSelectorWheel(false);
+
+        // set the spinner values
         mYearSpinner.setValue(mCurrentDate.get(Calendar.YEAR));
         mMonthSpinner.setValue(mCurrentDate.get(Calendar.MONTH));
-        mDaySpinner.setMinValue(1);
-        mDaySpinner.setMaxValue(mCurrentDate.getActualMaximum(Calendar.DAY_OF_MONTH));
         mDaySpinner.setValue(mCurrentDate.get(Calendar.DAY_OF_MONTH));
     }
 
     /**
-     * @return The delta days of moth from the current date and the given
-     *         <code>dayOfMonth</code>.
-     */
-    private int getDelataDayOfMonth(int dayOfMonth) {
-        int prevDayOfMonth = mCurrentDate.get(Calendar.DAY_OF_MONTH);
-        if (prevDayOfMonth == dayOfMonth) {
-            return 0;
-        }
-        int maxDayOfMonth = mCurrentDate.getActualMaximum(Calendar.DAY_OF_MONTH);
-        if (dayOfMonth == 1 && prevDayOfMonth == maxDayOfMonth) {
-            return 1;
-        }
-        if (dayOfMonth == maxDayOfMonth && prevDayOfMonth == 1) {
-            return -1;
-        }
-        return dayOfMonth - prevDayOfMonth;
-    }
-
-    /**
-     * @return The delta months from the current date and the given
-     *         <code>month</code>.
-     */
-    private int getDelataMonth(int month) {
-        int prevMonth = mCurrentDate.get(Calendar.MONTH);
-        if (prevMonth == month) {
-            return 0;
-        }
-        if (month == 0 && prevMonth == 11) {
-            return 1;
-        }
-        if (month == 11 && prevMonth == 0) {
-            return -1;
-        }
-        return month - prevMonth;
-    }
-
-    /**
-     * Updates the calendar view with the given year, month, and day selected by
-     * the number spinners.
+     * Updates the calendar view with the current date.
      */
     private void updateCalendarView() {
-        mTempDate.setTimeInMillis(mCalendarView.getDate());
-        if (mTempDate.get(Calendar.YEAR) != mYearSpinner.getValue()
-                || mTempDate.get(Calendar.MONTH) != mMonthSpinner.getValue()
-                || mTempDate.get(Calendar.DAY_OF_MONTH) != mDaySpinner.getValue()) {
-            mTempDate.clear();
-            mTempDate.set(mYearSpinner.getValue(), mMonthSpinner.getValue(),
-                    mDaySpinner.getValue());
-            mCalendarView.setDate(mTempDate.getTimeInMillis(), false, false);
-        }
+         mCalendarView.setDate(mCurrentDate.getTimeInMillis(), false, false);
     }
 
     /**
      * @return The selected year.
      */
     public int getYear() {
-        return mYearSpinner.getValue();
+        return mCurrentDate.get(Calendar.YEAR);
     }
 
     /**
      * @return The selected month.
      */
     public int getMonth() {
-        return mMonthSpinner.getValue();
+        return mCurrentDate.get(Calendar.MONTH);
     }
 
     /**
      * @return The selected day of month.
      */
     public int getDayOfMonth() {
-        return mDaySpinner.getValue();
+        return mCurrentDate.get(Calendar.DAY_OF_MONTH);
     }
 
     /**
@@ -619,8 +635,7 @@
      */
     private void notifyDateChanged() {
         if (mOnDateChangedListener != null) {
-            mOnDateChangedListener.onDateChanged(DatePicker.this, mYearSpinner.getValue(),
-                    mMonthSpinner.getValue(), mDaySpinner.getValue());
+            mOnDateChangedListener.onDateChanged(this, getYear(), getMonth(), getDayOfMonth());
         }
     }
 
diff --git a/core/java/android/widget/ListView.java b/core/java/android/widget/ListView.java
index 796af55..a107c60 100644
--- a/core/java/android/widget/ListView.java
+++ b/core/java/android/widget/ListView.java
@@ -2706,7 +2706,7 @@
             int startPos = (mSelectedPosition != INVALID_POSITION) ?
                     mSelectedPosition - 1 :
                     firstPosition + getChildCount() - 1;
-            if (startPos < 0) {
+            if (startPos < 0 || startPos >= mAdapter.getCount()) {
                 return INVALID_POSITION;
             }
             if (startPos > last) {
diff --git a/core/java/android/widget/NumberPicker.java b/core/java/android/widget/NumberPicker.java
index 08db207..c5161bc 100644
--- a/core/java/android/widget/NumberPicker.java
+++ b/core/java/android/widget/NumberPicker.java
@@ -917,6 +917,8 @@
             // force the selector indices array to be reinitialized
             mSelectorIndices[SELECTOR_MIDDLE_ITEM_INDEX] = Integer.MAX_VALUE;
             mWrapSelectorWheel = wrapSelector;
+            // force redraw since we might look different
+            updateIncrementAndDecrementButtonsVisibilityState();
         }
     }
 
@@ -972,7 +974,6 @@
         setWrapSelectorWheel(wrapSelectorWheel);
         resetSelectorWheelIndices();
         updateInputTextView();
-        updateIncrementAndDecrementButtonsVisibilityState();
     }
 
     /**
@@ -1004,7 +1005,6 @@
         setWrapSelectorWheel(wrapSelectorWheel);
         resetSelectorWheelIndices();
         updateInputTextView();
-        updateIncrementAndDecrementButtonsVisibilityState();
     }
 
     /**
diff --git a/core/java/android/widget/SearchView.java b/core/java/android/widget/SearchView.java
index b86366c..a37f12e 100644
--- a/core/java/android/widget/SearchView.java
+++ b/core/java/android/widget/SearchView.java
@@ -214,6 +214,8 @@
             }
         });
 
+        boolean focusable = true;
+
         TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.SearchView, 0, 0);
         setIconifiedByDefault(a.getBoolean(R.styleable.SearchView_iconifiedByDefault, true));
         int maxWidth = a.getDimensionPixelSize(R.styleable.SearchView_maxWidth, -1);
@@ -226,6 +228,11 @@
         }
         a.recycle();
 
+        a = context.obtainStyledAttributes(attrs, R.styleable.View, 0, 0);
+        focusable = a.getBoolean(R.styleable.View_focusable, focusable);
+        a.recycle();
+        setFocusable(focusable);
+
         // Save voice intent for later queries/launching
         mVoiceWebSearchIntent = new Intent(RecognizerIntent.ACTION_WEB_SEARCH);
         mVoiceWebSearchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
@@ -259,10 +266,18 @@
     /** @hide */
     @Override
     public boolean requestFocus(int direction, Rect previouslyFocusedRect) {
-        if (mClearingFocus || isIconified()) return false;
-        boolean result = mQueryTextView.requestFocus(direction, previouslyFocusedRect);
-        if (result) updateViewsVisibility(mIconifiedByDefault);
-        return result;
+        // Don't accept focus if in the middle of clearing focus
+        if (mClearingFocus) return false;
+        // Check if SearchView is focusable.
+        if (!isFocusable()) return false;
+        // If it is not iconified, then give the focus to the text field
+        if (!isIconified()) {
+            boolean result = mQueryTextView.requestFocus(direction, previouslyFocusedRect);
+            if (result) updateViewsVisibility(false);
+            return result;
+        } else {
+            return super.requestFocus(direction, previouslyFocusedRect);
+        }
     }
 
     /** @hide */
@@ -527,7 +542,6 @@
         updateCloseButton();
         updateVoiceButton(!hasText);
         updateSubmitArea();
-        requestLayout();
     }
 
     private boolean hasVoiceSearch() {
@@ -580,7 +594,7 @@
 
     private void setImeVisibility(boolean visible) {
         InputMethodManager imm = (InputMethodManager)
-        getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
+                getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
 
         // We made sure the IME was displayed, so also make sure it is closed
         // when we go away.
@@ -903,8 +917,8 @@
     }
 
     private void onSearchClicked() {
-        mQueryTextView.requestFocus();
         updateViewsVisibility(false);
+        mQueryTextView.requestFocus();
         setImeVisibility(true);
         if (mOnSearchClickListener != null) {
             mOnSearchClickListener.onClick(this);
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index a0a615a..fedda68 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -372,7 +372,7 @@
         mTextPaint.density = getResources().getDisplayMetrics().density;
         mTextPaint.setCompatibilityScaling(
                 getResources().getCompatibilityInfo().applicationScale);
-        
+
         // If we get the paint from the skin, we should set it to left, since
         // the layout always wants it to be left.
         // mTextPaint.setTextAlign(Paint.Align.LEFT);
@@ -4334,7 +4334,7 @@
             selStart = getSelectionStart();
             selEnd = getSelectionEnd();
 
-            if ((mCursorVisible || mTextIsSelectable) && selStart >= 0 && isEnabled()) {
+            if ((isCursorVisible() || mTextIsSelectable) && selStart >= 0 && isEnabled()) {
                 if (mHighlightPath == null)
                     mHighlightPath = new Path();
 
@@ -6491,6 +6491,10 @@
         prepareCursorControllers();
     }
 
+    private boolean isCursorVisible() {
+        return mCursorVisible && isTextEditable();
+    }
+
     private boolean canMarquee() {
         int width = (mRight - mLeft - getCompoundPaddingLeft() - getCompoundPaddingRight());
         return width > 0 && mLayout.getLineWidth(0) > width;
@@ -6979,7 +6983,7 @@
     }
 
     private void makeBlink() {
-        if (!mCursorVisible || !isTextEditable()) {
+        if (!isCursorVisible()) {
             if (mBlink != null) {
                 mBlink.removeCallbacks(mBlink);
             }
@@ -7126,11 +7130,14 @@
 
         super.onFocusChanged(focused, direction, previouslyFocusedRect);
 
-        // After super.onFocusChanged so that this TextView is registered and can ask for the IME
-        // Showing the IME while focus is moved using the D-Pad is a bad idea, however this does
-        // not happen in that case (using the arrows on a bluetooth keyboard).
-        if (focused) {
-            onTouchFinished(null);
+        // Performed after super.onFocusChanged so that this TextView is registered and can ask for
+        // the IME. Showing the IME while focus is moved using the D-Pad is a bad idea, however this
+        // does not happen in that case (using the arrows on a bluetooth keyboard).
+        if (focused && isTextEditable()) {
+            final InputMethodManager imm = (InputMethodManager)
+            getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
+
+            imm.showSoftInput(this, 0, null);
         }
     }
 
@@ -7322,7 +7329,19 @@
                         csr = new CommitSelectionReceiver(oldSelStart, oldSelEnd);
                     }
 
-                    handled = onTouchFinished(csr);
+                    // Show the IME, except when selecting in read-only text.
+                    if (!mTextIsSelectable) {
+                        final InputMethodManager imm = (InputMethodManager)
+                                getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
+
+                        handled |= imm.showSoftInput(this, 0, csr) && (csr != null);
+                    }
+
+                    stopSelectionActionMode();
+                    boolean selectAllGotFocus = mSelectAllOnFocus && mTouchFocusSelected;
+                    if (hasInsertionController() && !selectAllGotFocus) {
+                        getInsertionController().show();
+                    }
                 }
             }
 
@@ -7334,35 +7353,6 @@
         return superResult;
     }
 
-    /** Shows the IME if applicable, ends selection mode and displays the selection controller.
-     *
-     * This method is called at the end of a touch event, when the finger is lifted up.
-     * It is also called when the TextField gains focus indirectly through a dispatched event from
-     * one of its parents. We want to have the same behavior in that case.
-     *
-     * @param csr A (possibly null) callback called if the IME has been displayed
-     * @return true if the event was properly sent to the csr
-     */
-    private boolean onTouchFinished(CommitSelectionReceiver csr) {
-        boolean handled = false;
-
-        // Show the IME, except when selecting in read-only text.
-        if (!mTextIsSelectable) {
-            final InputMethodManager imm = (InputMethodManager)
-                    getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
-
-            handled = imm.showSoftInput(this, 0, csr) && (csr != null);
-        }
-
-        stopSelectionActionMode();
-        boolean selectAllGotFocus = mSelectAllOnFocus && mTouchFocusSelected;
-        if (hasInsertionController() && !selectAllGotFocus) {
-            getInsertionController().show();
-        }
-
-        return handled;
-    }
-
     private void prepareCursorControllers() {
         boolean windowSupportsHandles = false;
 
@@ -7373,8 +7363,7 @@
                     || windowParams.type > WindowManager.LayoutParams.LAST_SUB_WINDOW;
         }
 
-        mInsertionControllerEnabled = windowSupportsHandles && isTextEditable() && mCursorVisible &&
-                mLayout != null;
+        mInsertionControllerEnabled = windowSupportsHandles && isCursorVisible() && mLayout != null;
         mSelectionControllerEnabled = windowSupportsHandles && textCanBeSelected() &&
                 mLayout != null;
 
@@ -8607,7 +8596,6 @@
         private long mTouchTimer;
         private boolean mIsInsertionHandle = false;
         private PastePopupMenu mPastePopupWindow;
-        private Runnable mLongPressCallback;
 
         // Touch-up filter: number of previous positions remembered
         private static final int HISTORY_SIZE = 5;
@@ -8850,73 +8838,49 @@
         @Override
         public boolean onTouchEvent(MotionEvent ev) {
             switch (ev.getActionMasked()) {
-            case MotionEvent.ACTION_DOWN: {
-                startTouchUpFilter(mController.getCurrentOffset(this));
-                mDownPositionX = ev.getRawX();
-                mDownPositionY = ev.getRawY();
-                mTouchToWindowOffsetX = mDownPositionX - mPositionX;
-                mTouchToWindowOffsetY = mDownPositionY - mPositionY;
-                final int[] coords = mTempCoords;
-                TextView.this.getLocationInWindow(coords);
-                mLastParentX = coords[0];
-                mLastParentY = coords[1];
-                mIsDragging = true;
-                if (mIsInsertionHandle) {
-                    mTouchTimer = SystemClock.uptimeMillis();
-                    if (mLongPressCallback == null) {
-                        mLongPressCallback = new Runnable() {
-                            public void run() {
-                                mController.hide();
-                                startSelectionActionMode();
+                case MotionEvent.ACTION_DOWN: {
+                    startTouchUpFilter(mController.getCurrentOffset(this));
+                    mDownPositionX = ev.getRawX();
+                    mDownPositionY = ev.getRawY();
+                    mTouchToWindowOffsetX = mDownPositionX - mPositionX;
+                    mTouchToWindowOffsetY = mDownPositionY - mPositionY;
+                    final int[] coords = mTempCoords;
+                    TextView.this.getLocationInWindow(coords);
+                    mLastParentX = coords[0];
+                    mLastParentY = coords[1];
+                    mIsDragging = true;
+                    break;
+                }
+
+                case MotionEvent.ACTION_MOVE: {
+                    final float rawX = ev.getRawX();
+                    final float rawY = ev.getRawY();
+                    final float newPosX = rawX - mTouchToWindowOffsetX + mHotspotX;
+                    final float newPosY = rawY - mTouchToWindowOffsetY + mHotspotY + mTouchOffsetY;
+
+                    mController.updatePosition(this, Math.round(newPosX), Math.round(newPosY));
+                    break;
+                }
+
+                case MotionEvent.ACTION_UP:
+                    if (mIsInsertionHandle) {
+                        long delay = SystemClock.uptimeMillis() - mTouchTimer;
+                        if (delay < ViewConfiguration.getTapTimeout()) {
+                            if (mPastePopupWindow != null && mPastePopupWindow.isShowing()) {
+                                // Tapping on the handle dismisses the displayed paste view,
+                                mPastePopupWindow.hide();
+                            } else {
+                                ((InsertionPointCursorController) mController).show(0);
                             }
-                        };
-                    }
-                    postDelayed(mLongPressCallback, ViewConfiguration.getLongPressTimeout());
-                }
-                break;
-            }
-
-            case MotionEvent.ACTION_MOVE: {
-                final float rawX = ev.getRawX();
-                final float rawY = ev.getRawY();
-                final float newPosX = rawX - mTouchToWindowOffsetX + mHotspotX;
-                final float newPosY = rawY - mTouchToWindowOffsetY + mHotspotY + mTouchOffsetY;
-
-                mController.updatePosition(this, Math.round(newPosX), Math.round(newPosY));
-
-                if (mIsInsertionHandle) {
-                    final float dx = rawX - mDownPositionX;
-                    final float dy = rawY - mDownPositionY;
-                    final float distanceSquared = dx * dx + dy * dy;
-                    if (distanceSquared >= mSquaredTouchSlopDistance) {
-                        removeLongPressCallback();
-                    }
-                }
-                break;
-            }
-
-            case MotionEvent.ACTION_UP:
-                if (mIsInsertionHandle) {
-                    removeLongPressCallback();
-                    long delay = SystemClock.uptimeMillis() - mTouchTimer;
-                    if (delay < ViewConfiguration.getTapTimeout()) {
-                        if (mPastePopupWindow != null && mPastePopupWindow.isShowing()) {
-                            // Tapping on the handle dismisses the displayed paste view,
-                            mPastePopupWindow.hide();
-                        } else {
-                            ((InsertionPointCursorController) mController).show(0);
                         }
                     }
-                }
-                filterOnTouchUp();
-                mIsDragging = false;
-                break;
+                    filterOnTouchUp();
+                    mIsDragging = false;
+                    break;
 
-            case MotionEvent.ACTION_CANCEL:
-                if (mIsInsertionHandle) {
-                    removeLongPressCallback();
-                }
-                mIsDragging = false;
+                case MotionEvent.ACTION_CANCEL:
+                    mIsDragging = false;
+                    break;
             }
             return true;
         }
@@ -8954,16 +8918,6 @@
                 mPastePopupWindow.show();
             }
         }
-
-        private void removeLongPressCallback() {
-            if (mLongPressCallback != null) {
-                removeCallbacks(mLongPressCallback);
-            }
-        }
-
-        void onDetached() {
-            removeLongPressCallback();
-        }
     }
 
     private class InsertionPointCursorController implements CursorController {
@@ -9090,9 +9044,6 @@
         public void onDetached() {
             removeHiderCallback();
             removePastePopupCallback();
-            if (mHandle != null) {
-                mHandle.onDetached();
-            }
         }
     }
 
diff --git a/core/java/com/android/internal/backup/LocalTransport.java b/core/java/com/android/internal/backup/LocalTransport.java
index 45f8599..e7c3948 100644
--- a/core/java/com/android/internal/backup/LocalTransport.java
+++ b/core/java/com/android/internal/backup/LocalTransport.java
@@ -29,7 +29,7 @@
 import android.os.RemoteException;
 import android.util.Log;
 
-import org.bouncycastle.util.encoders.Base64;
+import com.android.org.bouncycastle.util.encoders.Base64;
 
 import java.io.File;
 import java.io.FileFilter;
diff --git a/core/java/com/android/internal/service/wallpaper/ImageWallpaper.java b/core/java/com/android/internal/service/wallpaper/ImageWallpaper.java
index 78688ee..595c634 100644
--- a/core/java/com/android/internal/service/wallpaper/ImageWallpaper.java
+++ b/core/java/com/android/internal/service/wallpaper/ImageWallpaper.java
@@ -88,9 +88,13 @@
 
         class WallpaperObserver extends BroadcastReceiver {
             public void onReceive(Context context, Intent intent) {
+                if (DEBUG) {
+                    Log.d(TAG, "onReceive");
+                }
+
                 synchronized (mLock) {
                     updateWallpaperLocked();
-                    drawFrameLocked(true, false);
+                    drawFrameLocked();
                 }
 
                 // Assume we are the only one using the wallpaper in this
@@ -101,6 +105,10 @@
 
         @Override
         public void onCreate(SurfaceHolder surfaceHolder) {
+            if (DEBUG) {
+                Log.d(TAG, "onCreate");
+            }
+
             super.onCreate(surfaceHolder);
             IntentFilter filter = new IntentFilter(Intent.ACTION_WALLPAPER_CHANGED);
             mReceiver = new WallpaperObserver();
@@ -120,9 +128,18 @@
 
         @Override
         public void onVisibilityChanged(boolean visible) {
+            if (DEBUG) {
+                Log.d(TAG, "onVisibilityChanged: visible=" + visible);
+            }
+
             synchronized (mLock) {
-                mVisible = visible;
-                drawFrameLocked(false, false);
+                if (mVisible != visible) {
+                    if (DEBUG) {
+                        Log.d(TAG, "Visibility changed to visible=" + visible);
+                    }
+                    mVisible = visible;
+                    drawFrameLocked();
+                }
             }
         }
 
@@ -135,6 +152,12 @@
         public void onOffsetsChanged(float xOffset, float yOffset,
                 float xOffsetStep, float yOffsetStep,
                 int xPixels, int yPixels) {
+            if (DEBUG) {
+                Log.d(TAG, "onOffsetsChanged: xOffset=" + xOffset + ", yOffset=" + yOffset
+                        + ", xOffsetStep=" + xOffsetStep + ", yOffsetStep=" + yOffsetStep
+                        + ", xPixels=" + xPixels + ", yPixels=" + yPixels);
+            }
+
             synchronized (mLock) {
                 if (mXOffset != xOffset || mYOffset != yOffset) {
                     if (DEBUG) {
@@ -142,36 +165,27 @@
                     }
                     mXOffset = xOffset;
                     mYOffset = yOffset;
-                    drawFrameLocked(false, true);
-                } else {
-                    drawFrameLocked(false, false);
+                    mOffsetsChanged = true;
                 }
+                drawFrameLocked();
             }
         }
 
         @Override
         public void onSurfaceChanged(SurfaceHolder holder, int format, int width, int height) {
+            if (DEBUG) {
+                Log.d(TAG, "onSurfaceChanged: width=" + width + ", height=" + height);
+            }
+
             super.onSurfaceChanged(holder, format, width, height);
-            
+
             synchronized (mLock) {
-                drawFrameLocked(true, false);
+                mRedrawNeeded = true;
+                drawFrameLocked();
             }
         }
 
-        @Override
-        public void onSurfaceCreated(SurfaceHolder holder) {
-            super.onSurfaceCreated(holder);
-        }
-
-        @Override
-        public void onSurfaceDestroyed(SurfaceHolder holder) {
-            super.onSurfaceDestroyed(holder);
-        }
-
-        void drawFrameLocked(boolean redrawNeeded, boolean offsetsChanged) {
-            mRedrawNeeded |= redrawNeeded;
-            mOffsetsChanged |= offsetsChanged;
-
+        void drawFrameLocked() {
             if (!mVisible) {
                 if (DEBUG) {
                     Log.d(TAG, "Suppressed drawFrame since wallpaper is not visible.");
diff --git a/core/java/com/android/internal/view/BaseSurfaceHolder.java b/core/java/com/android/internal/view/BaseSurfaceHolder.java
index 1e97cd6..f9f94be 100644
--- a/core/java/com/android/internal/view/BaseSurfaceHolder.java
+++ b/core/java/com/android/internal/view/BaseSurfaceHolder.java
@@ -49,6 +49,7 @@
     
     int mType = -1;
     final Rect mSurfaceFrame = new Rect();
+    Rect mTmpDirty;
     
     public abstract void onUpdateSurface();
     public abstract void onRelayoutContainer();
@@ -171,9 +172,16 @@
 
         Canvas c = null;
         if (onAllowLockCanvas()) {
-            Rect frame = dirty != null ? dirty : mSurfaceFrame;
+            if (dirty == null) {
+                if (mTmpDirty == null) {
+                    mTmpDirty = new Rect();
+                }
+                mTmpDirty.set(mSurfaceFrame);
+                dirty = mTmpDirty;
+            }
+
             try {
-                c = mSurface.lockCanvas(frame);
+                c = mSurface.lockCanvas(dirty);
             } catch (Exception e) {
                 Log.e(TAG, "Exception locking surface", e);
             }
@@ -215,4 +223,11 @@
     public Rect getSurfaceFrame() {
         return mSurfaceFrame;
     }
+
+    public void setSurfaceFrameSize(int width, int height) {
+        mSurfaceFrame.top = 0;
+        mSurfaceFrame.left = 0;
+        mSurfaceFrame.right = width;
+        mSurfaceFrame.bottom = height;
+    }
 };
diff --git a/core/java/com/android/internal/view/menu/ActionMenuView.java b/core/java/com/android/internal/view/menu/ActionMenuView.java
index 30d6878..ff15e44 100644
--- a/core/java/com/android/internal/view/menu/ActionMenuView.java
+++ b/core/java/com/android/internal/view/menu/ActionMenuView.java
@@ -53,7 +53,7 @@
     
     private Drawable mDivider;
 
-    private Runnable mShowOverflow = new Runnable() {
+    private final Runnable mShowOverflow = new Runnable() {
         public void run() {
             showOverflowMenu();
         }
@@ -128,6 +128,10 @@
         if (mOverflowPopup != null && mOverflowPopup.isShowing()) {
             mOverflowPopup.dismiss();
         }
+        removeCallbacks(mShowOverflow);
+        if (mPostedOpenRunnable != null) {
+            removeCallbacks(mPostedOpenRunnable);
+        }
     }
 
     private int getMaxActionButtons() {
diff --git a/core/java/com/android/internal/view/menu/MenuBuilder.java b/core/java/com/android/internal/view/menu/MenuBuilder.java
index ff59950..14d0ac5 100644
--- a/core/java/com/android/internal/view/menu/MenuBuilder.java
+++ b/core/java/com/android/internal/view/menu/MenuBuilder.java
@@ -215,6 +215,11 @@
 
     private ViewGroup mMeasureActionButtonParent;
 
+    private final WeakReference<MenuAdapter>[] mAdapterCache =
+            new WeakReference[NUM_TYPES];
+    private final WeakReference<OverflowMenuAdapter>[] mOverflowAdapterCache =
+            new WeakReference[NUM_TYPES];
+
     // Group IDs that have been added as actions - used temporarily, allocated here for reuse.
     private final SparseBooleanArray mActionButtonGroups = new SparseBooleanArray();
 
@@ -1004,6 +1009,12 @@
                     MenuView menuView = menuTypes[i].mMenuView.get();
                     menuView.updateChildren(cleared);
                 }
+
+                MenuAdapter adapter = mAdapterCache[i] == null ? null : mAdapterCache[i].get();
+                if (adapter != null) adapter.notifyDataSetChanged();
+
+                adapter = mOverflowAdapterCache[i] == null ? null : mOverflowAdapterCache[i].get();
+                if (adapter != null) adapter.notifyDataSetChanged();
             }
         }
     }
@@ -1358,7 +1369,13 @@
      * @return A {@link MenuAdapter} for this menu with the given menu type.
      */
     public MenuAdapter getMenuAdapter(int menuType) {
-        return new MenuAdapter(menuType);
+        MenuAdapter adapter = mAdapterCache[menuType] == null ?
+                null : mAdapterCache[menuType].get();
+        if (adapter != null) return adapter;
+
+        adapter = new MenuAdapter(menuType);
+        mAdapterCache[menuType] = new WeakReference<MenuAdapter>(adapter);
+        return adapter;
     }
 
     /**
@@ -1368,7 +1385,13 @@
      * @return A {@link MenuAdapter} for this menu with the given menu type.
      */
     public MenuAdapter getOverflowMenuAdapter(int menuType) {
-        return new OverflowMenuAdapter(menuType);
+        OverflowMenuAdapter adapter = mOverflowAdapterCache[menuType] == null ?
+                null : mOverflowAdapterCache[menuType].get();
+        if (adapter != null) return adapter;
+
+        adapter = new OverflowMenuAdapter(menuType);
+        mOverflowAdapterCache[menuType] = new WeakReference<OverflowMenuAdapter>(adapter);
+        return adapter;
     }
 
     void setOptionalIconsVisible(boolean visible) {
@@ -1469,21 +1492,18 @@
      * source for overflow menu items that do not fit in the list of action items.
      */
     private class OverflowMenuAdapter extends MenuAdapter {
-        private ArrayList<MenuItemImpl> mOverflowItems;
-
         public OverflowMenuAdapter(int menuType) {
             super(menuType);
-            mOverflowItems = getNonActionItems(true);
         }
 
         @Override
         public MenuItemImpl getItem(int position) {
-            return mOverflowItems.get(position);
+            return getNonActionItems(true).get(position);
         }
 
         @Override
         public int getCount() {
-            return mOverflowItems.size();
+            return getNonActionItems(true).size();
         }
     }
 }
diff --git a/core/java/com/android/internal/view/menu/MenuItemImpl.java b/core/java/com/android/internal/view/menu/MenuItemImpl.java
index 6fbae94..305115f 100644
--- a/core/java/com/android/internal/view/menu/MenuItemImpl.java
+++ b/core/java/com/android/internal/view/menu/MenuItemImpl.java
@@ -690,6 +690,7 @@
 
     public MenuItem setActionView(View view) {
         mActionView = view;
+        mMenu.onItemActionRequestChanged(this);
         return this;
     }
 
diff --git a/core/java/com/android/internal/view/menu/MenuPopupHelper.java b/core/java/com/android/internal/view/menu/MenuPopupHelper.java
index b93fac4..1f93eac 100644
--- a/core/java/com/android/internal/view/menu/MenuPopupHelper.java
+++ b/core/java/com/android/internal/view/menu/MenuPopupHelper.java
@@ -19,6 +19,7 @@
 import com.android.internal.view.menu.MenuBuilder.MenuAdapter;
 
 import android.content.Context;
+import android.os.Handler;
 import android.util.DisplayMetrics;
 import android.view.KeyEvent;
 import android.view.MenuItem;
@@ -46,6 +47,8 @@
     private boolean mOverflowOnly;
     private ViewTreeObserver mTreeObserver;
 
+    private final Handler mHandler = new Handler();
+
     public MenuPopupHelper(Context context, MenuBuilder menu) {
         this(context, menu, null, false);
     }
@@ -137,8 +140,14 @@
         } else {
             item = mMenu.getVisibleItems().get(position);
         }
-        mMenu.performItemAction(item, 0);
         dismiss();
+
+        final MenuItem performItem = item;
+        mHandler.post(new Runnable() {
+            public void run() {
+                mMenu.performItemAction(performItem, 0);
+            }
+        });
     }
 
     public boolean onKey(View v, int keyCode, KeyEvent event) {
diff --git a/core/java/com/android/internal/widget/PasswordEntryKeyboardHelper.java b/core/java/com/android/internal/widget/PasswordEntryKeyboardHelper.java
index a1a28ac..65973b6 100644
--- a/core/java/com/android/internal/widget/PasswordEntryKeyboardHelper.java
+++ b/core/java/com/android/internal/widget/PasswordEntryKeyboardHelper.java
@@ -128,7 +128,8 @@
                 final boolean visiblePassword = Settings.System.getInt(
                         mContext.getContentResolver(),
                         Settings.System.TEXT_SHOW_PASSWORD, 1) != 0;
-                mKeyboardView.setPreviewEnabled(visiblePassword);
+                final boolean enablePreview = false; // TODO: grab from configuration
+                mKeyboardView.setPreviewEnabled(visiblePassword && enablePreview);
                 break;
             case KEYBOARD_MODE_NUMERIC:
                 mKeyboardView.setKeyboard(mNumericKeyboard);
diff --git a/core/jni/android_view_GLES20Canvas.cpp b/core/jni/android_view_GLES20Canvas.cpp
index e4a89d7..9de270d 100644
--- a/core/jni/android_view_GLES20Canvas.cpp
+++ b/core/jni/android_view_GLES20Canvas.cpp
@@ -16,6 +16,8 @@
 
 #define LOG_TAG "OpenGLRenderer"
 
+#include <EGL/egl.h>
+
 #include "jni.h"
 #include "GraphicsJNI.h"
 #include <nativehelper/JNIHelp.h>
@@ -75,6 +77,23 @@
 } gRectClassInfo;
 
 // ----------------------------------------------------------------------------
+// Misc
+// ----------------------------------------------------------------------------
+
+static jboolean android_view_GLES20Canvas_preserveBackBuffer(JNIEnv* env, jobject clazz) {
+    EGLDisplay display = eglGetCurrentDisplay();
+    EGLSurface surface = eglGetCurrentSurface(EGL_DRAW);
+
+    eglGetError();
+    eglSurfaceAttrib(display, surface, EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED);
+
+    EGLint error = eglGetError();
+    RENDERER_LOGD("Could not enable buffer preserved swap behavior (%x)", error);
+
+    return error == EGL_SUCCESS;
+}
+
+// ----------------------------------------------------------------------------
 // Constructors
 // ----------------------------------------------------------------------------
 
@@ -97,32 +116,38 @@
 // Setup
 // ----------------------------------------------------------------------------
 
-static void android_view_GLES20Canvas_setViewport(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_setViewport(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, jint width, jint height) {
     renderer->setViewport(width, height);
 }
 
-static void android_view_GLES20Canvas_prepare(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_prepare(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, jboolean opaque) {
     renderer->prepare(opaque);
 }
 
-static void android_view_GLES20Canvas_finish(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_prepareDirty(JNIEnv* env, jobject clazz,
+        OpenGLRenderer* renderer, jint left, jint top, jint right, jint bottom,
+        jboolean opaque) {
+    renderer->prepareDirty(left, top, right, bottom, opaque);
+}
+
+static void android_view_GLES20Canvas_finish(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer) {
     renderer->finish();
 }
 
-static void android_view_GLES20Canvas_acquireContext(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_acquireContext(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer) {
     renderer->acquireContext();
 }
 
-static bool android_view_GLES20Canvas_callDrawGLFunction(JNIEnv* env, jobject canvas,
+static bool android_view_GLES20Canvas_callDrawGLFunction(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, Functor *functor) {
     return renderer->callDrawGLFunction(functor);
 }
 
-static void android_view_GLES20Canvas_releaseContext(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_releaseContext(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer) {
     renderer->releaseContext();
 }
@@ -131,22 +156,22 @@
 // State
 // ----------------------------------------------------------------------------
 
-static jint android_view_GLES20Canvas_save(JNIEnv* env, jobject canvas, OpenGLRenderer* renderer,
+static jint android_view_GLES20Canvas_save(JNIEnv* env, jobject clazz, OpenGLRenderer* renderer,
         jint flags) {
     return renderer->save(flags);
 }
 
-static jint android_view_GLES20Canvas_getSaveCount(JNIEnv* env, jobject canvas,
+static jint android_view_GLES20Canvas_getSaveCount(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer) {
     return renderer->getSaveCount();
 }
 
-static void android_view_GLES20Canvas_restore(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_restore(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer) {
     renderer->restore();
 }
 
-static void android_view_GLES20Canvas_restoreToCount(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_restoreToCount(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, jint saveCount) {
     renderer->restoreToCount(saveCount);
 }
@@ -155,13 +180,13 @@
 // Layers
 // ----------------------------------------------------------------------------
 
-static jint android_view_GLES20Canvas_saveLayer(JNIEnv* env, jobject canvas,
+static jint android_view_GLES20Canvas_saveLayer(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, jfloat left, jfloat top, jfloat right, jfloat bottom,
         SkPaint* paint, jint saveFlags) {
     return renderer->saveLayer(left, top, right, bottom, paint, saveFlags);
 }
 
-static jint android_view_GLES20Canvas_saveLayerAlpha(JNIEnv* env, jobject canvas,
+static jint android_view_GLES20Canvas_saveLayerAlpha(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, jfloat left, jfloat top, jfloat right, jfloat bottom,
         jint alpha, jint saveFlags) {
     return renderer->saveLayerAlpha(left, top, right, bottom, alpha, saveFlags);
@@ -171,25 +196,25 @@
 // Clipping
 // ----------------------------------------------------------------------------
 
-static bool android_view_GLES20Canvas_quickReject(JNIEnv* env, jobject canvas,
+static bool android_view_GLES20Canvas_quickReject(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, jfloat left, jfloat top, jfloat right, jfloat bottom,
         SkCanvas::EdgeType edge) {
     return renderer->quickReject(left, top, right, bottom);
 }
 
-static bool android_view_GLES20Canvas_clipRectF(JNIEnv* env, jobject canvas,
+static bool android_view_GLES20Canvas_clipRectF(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, jfloat left, jfloat top, jfloat right, jfloat bottom,
         SkRegion::Op op) {
     return renderer->clipRect(left, top, right, bottom, op);
 }
 
-static bool android_view_GLES20Canvas_clipRect(JNIEnv* env, jobject canvas,
+static bool android_view_GLES20Canvas_clipRect(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, jint left, jint top, jint right, jint bottom,
         SkRegion::Op op) {
     return renderer->clipRect(float(left), float(top), float(right), float(bottom), op);
 }
 
-static bool android_view_GLES20Canvas_getClipBounds(JNIEnv* env, jobject canvas,
+static bool android_view_GLES20Canvas_getClipBounds(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, jobject rect) {
     const android::uirenderer::Rect& bounds(renderer->getClipBounds());
 
@@ -203,42 +228,42 @@
 // Transforms
 // ----------------------------------------------------------------------------
 
-static void android_view_GLES20Canvas_translate(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_translate(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, jfloat dx, jfloat dy) {
     renderer->translate(dx, dy);
 }
 
-static void android_view_GLES20Canvas_rotate(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_rotate(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, jfloat degrees) {
     renderer->rotate(degrees);
 }
 
-static void android_view_GLES20Canvas_scale(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_scale(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, jfloat sx, jfloat sy) {
     renderer->scale(sx, sy);
 }
 
-static void android_view_GLES20Canvas_skew(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_skew(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, jfloat sx, jfloat sy) {
     renderer->skew(sx, sy);
 }
 
-static void android_view_GLES20Canvas_setMatrix(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_setMatrix(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, SkMatrix* matrix) {
     renderer->setMatrix(matrix);
 }
 
 static const float* android_view_GLES20Canvas_getNativeMatrix(JNIEnv* env,
-        jobject canvas, OpenGLRenderer* renderer) {
+        jobject clazz, OpenGLRenderer* renderer) {
     return renderer->getMatrix();
 }
 
-static void android_view_GLES20Canvas_getMatrix(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_getMatrix(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, SkMatrix* matrix) {
     renderer->getMatrix(matrix);
 }
 
-static void android_view_GLES20Canvas_concatMatrix(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_concatMatrix(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, SkMatrix* matrix) {
     renderer->concatMatrix(matrix);
 }
@@ -247,7 +272,7 @@
 // Drawing
 // ----------------------------------------------------------------------------
 
-static void android_view_GLES20Canvas_drawBitmap(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_drawBitmap(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, SkBitmap* bitmap, jbyteArray buffer, float left,
         float top, SkPaint* paint) {
     // This object allows the renderer to allocate a global JNI ref to the buffer object.
@@ -256,7 +281,7 @@
     renderer->drawBitmap(bitmap, left, top, paint);
 }
 
-static void android_view_GLES20Canvas_drawBitmapRect(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_drawBitmapRect(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, SkBitmap* bitmap, jbyteArray buffer,
         float srcLeft, float srcTop, float srcRight, float srcBottom,
         float dstLeft, float dstTop, float dstRight, float dstBottom, SkPaint* paint) {
@@ -267,7 +292,7 @@
             dstLeft, dstTop, dstRight, dstBottom, paint);
 }
 
-static void android_view_GLES20Canvas_drawBitmapMatrix(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_drawBitmapMatrix(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, SkBitmap* bitmap, jbyteArray buffer, SkMatrix* matrix,
         SkPaint* paint) {
     // This object allows the renderer to allocate a global JNI ref to the buffer object.
@@ -276,7 +301,7 @@
     renderer->drawBitmap(bitmap, matrix, paint);
 }
 
-static void android_view_GLES20Canvas_drawBitmapMesh(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_drawBitmapMesh(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, SkBitmap* bitmap, jbyteArray buffer,
         jint meshWidth, jint meshHeight, jfloatArray vertices, jint offset,
         jintArray colors, jint colorOffset, SkPaint* paint) {
@@ -292,7 +317,7 @@
     if (colors) env->ReleaseIntArrayElements(colors, colorsArray, 0);
 }
 
-static void android_view_GLES20Canvas_drawPatch(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_drawPatch(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, SkBitmap* bitmap, jbyteArray buffer, jbyteArray chunks,
         float left, float top, float right, float bottom, SkPaint* paint) {
     // This object allows the renderer to allocate a global JNI ref to the buffer object.
@@ -309,41 +334,41 @@
     env->ReleaseByteArrayElements(chunks, storage, 0);
 }
 
-static void android_view_GLES20Canvas_drawColor(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_drawColor(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, jint color, SkXfermode::Mode mode) {
     renderer->drawColor(color, mode);
 }
 
-static void android_view_GLES20Canvas_drawRect(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_drawRect(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, jfloat left, jfloat top, jfloat right, jfloat bottom,
         SkPaint* paint) {
     renderer->drawRect(left, top, right, bottom, paint);
 }
 
-static void android_view_GLES20Canvas_drawRoundRect(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_drawRoundRect(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, jfloat left, jfloat top, jfloat right, jfloat bottom,
         jfloat rx, jfloat ry, SkPaint* paint) {
     renderer->drawRoundRect(left, top, right, bottom, rx, ry, paint);
 }
 
-static void android_view_GLES20Canvas_drawCircle(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_drawCircle(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, jfloat x, jfloat y, jfloat radius, SkPaint* paint) {
     renderer->drawCircle(x, y, radius, paint);
 }
 
-static void android_view_GLES20Canvas_drawOval(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_drawOval(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, jfloat left, jfloat top, jfloat right, jfloat bottom,
         SkPaint* paint) {
     renderer->drawOval(left, top, right, bottom, paint);
 }
 
-static void android_view_GLES20Canvas_drawArc(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_drawArc(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, jfloat left, jfloat top, jfloat right, jfloat bottom,
         jfloat startAngle, jfloat sweepAngle, jboolean useCenter, SkPaint* paint) {
     renderer->drawArc(left, top, right, bottom, startAngle, sweepAngle, useCenter, paint);
 }
 
-static void android_view_GLES20Canvas_drawRects(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_drawRects(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, SkRegion* region, SkPaint* paint) {
     SkRegion::Iterator it(*region);
     while (!it.done()) {
@@ -353,12 +378,12 @@
     }
 }
 
-static void android_view_GLES20Canvas_drawPath(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_drawPath(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, SkPath* path, SkPaint* paint) {
     renderer->drawPath(path, paint);
 }
 
-static void android_view_GLES20Canvas_drawLines(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_drawLines(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, jfloatArray points, jint offset, jint count, SkPaint* paint) {
     jfloat* storage = env->GetFloatArrayElements(points, NULL);
 
@@ -371,24 +396,24 @@
 // Shaders and color filters
 // ----------------------------------------------------------------------------
 
-static void android_view_GLES20Canvas_resetModifiers(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_resetModifiers(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer) {
     renderer->resetShader();
     renderer->resetColorFilter();
     renderer->resetShadow();
 }
 
-static void android_view_GLES20Canvas_setupShader(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_setupShader(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, SkiaShader* shader) {
     renderer->setupShader(shader);
 }
 
-static void android_view_GLES20Canvas_setupColorFilter(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_setupColorFilter(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, SkiaColorFilter* filter) {
     renderer->setupColorFilter(filter);
 }
 
-static void android_view_GLES20Canvas_setupShadow(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_setupShadow(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, jfloat radius, jfloat dx, jfloat dy, jint color) {
     renderer->setupShadow(radius, dx, dy, color);
 }
@@ -425,7 +450,7 @@
     }
 }
 
-static void android_view_GLES20Canvas_drawTextArray(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_drawTextArray(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, jcharArray text, jint index, jint count,
         jfloat x, jfloat y, jint flags, SkPaint* paint) {
     jchar* textArray = env->GetCharArrayElements(text, NULL);
@@ -433,7 +458,7 @@
     env->ReleaseCharArrayElements(text, textArray, JNI_ABORT);
 }
 
-static void android_view_GLES20Canvas_drawText(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_drawText(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, jstring text, jint start, jint end,
         jfloat x, jfloat y, jint flags, SkPaint* paint) {
     const jchar* textArray = env->GetStringChars(text, NULL);
@@ -441,7 +466,7 @@
     env->ReleaseStringChars(text, textArray);
 }
 
-static void android_view_GLES20Canvas_drawTextRunArray(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_drawTextRunArray(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, jcharArray text, jint index, jint count,
         jint contextIndex, jint contextCount, jfloat x, jfloat y, jint dirFlags,
         SkPaint* paint) {
@@ -451,7 +476,7 @@
     env->ReleaseCharArrayElements(text, textArray, JNI_ABORT);
  }
 
-static void android_view_GLES20Canvas_drawTextRun(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_drawTextRun(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, jstring text, jint start, jint end,
         jint contextStart, int contextEnd, jfloat x, jfloat y, jint dirFlags,
         SkPaint* paint) {
@@ -468,7 +493,7 @@
 // ----------------------------------------------------------------------------
 
 static DisplayList* android_view_GLES20Canvas_getDisplayList(JNIEnv* env,
-        jobject canvas, DisplayListRenderer* renderer) {
+        jobject clazz, DisplayListRenderer* renderer) {
     return renderer->getDisplayList();
 }
 
@@ -488,7 +513,7 @@
 }
 
 static bool android_view_GLES20Canvas_drawDisplayList(JNIEnv* env,
-        jobject canvas, OpenGLRenderer* renderer, DisplayList* displayList) {
+        jobject clazz, OpenGLRenderer* renderer, DisplayList* displayList) {
     return renderer->drawDisplayList(displayList);
 }
 
@@ -496,12 +521,12 @@
 // Layers
 // ----------------------------------------------------------------------------
 
-static void android_view_GLES20Canvas_interrupt(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_interrupt(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer) {
     renderer->interrupt();
 }
 
-static void android_view_GLES20Canvas_resume(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_resume(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer) {
     renderer->resume();
 }
@@ -547,7 +572,7 @@
     LayerRenderer::destroyLayerDeferred(layer);
 }
 
-static void android_view_GLES20Canvas_drawLayer(JNIEnv* env, jobject canvas,
+static void android_view_GLES20Canvas_drawLayer(JNIEnv* env, jobject clazz,
         OpenGLRenderer* renderer, Layer* layer, jfloat x, jfloat y, SkPaint* paint) {
     renderer->drawLayer(layer, x, y, paint);
 }
@@ -576,16 +601,20 @@
     { "nIsAvailable",       "()Z",             (void*) android_view_GLES20Canvas_isAvailable },
 
 #ifdef USE_OPENGL_RENDERER
+    { "nPreserveBackBuffer", "()Z",            (void*) android_view_GLES20Canvas_preserveBackBuffer },
+
     { "nCreateRenderer",    "()I",             (void*) android_view_GLES20Canvas_createRenderer },
     { "nDestroyRenderer",   "(I)V",            (void*) android_view_GLES20Canvas_destroyRenderer },
     { "nSetViewport",       "(III)V",          (void*) android_view_GLES20Canvas_setViewport },
     { "nPrepare",           "(IZ)V",           (void*) android_view_GLES20Canvas_prepare },
+    { "nPrepareDirty",      "(IIIIIZ)V",       (void*) android_view_GLES20Canvas_prepareDirty },
     { "nFinish",            "(I)V",            (void*) android_view_GLES20Canvas_finish },
     { "nAcquireContext",    "(I)V",            (void*) android_view_GLES20Canvas_acquireContext },
-    { "nCallDrawGLFunction",    "(II)Z",
-            (void*) android_view_GLES20Canvas_callDrawGLFunction },
     { "nReleaseContext",    "(I)V",            (void*) android_view_GLES20Canvas_releaseContext },
 
+    { "nCallDrawGLFunction", "(II)Z",
+            (void*) android_view_GLES20Canvas_callDrawGLFunction },
+
     { "nSave",              "(II)I",           (void*) android_view_GLES20Canvas_save },
     { "nRestore",           "(I)V",            (void*) android_view_GLES20Canvas_restore },
     { "nRestoreToCount",    "(II)V",           (void*) android_view_GLES20Canvas_restoreToCount },
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 25d3aca..bd0cd35 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -1348,7 +1348,8 @@
 
         <activity android:name="android.accounts.GrantCredentialsPermissionActivity"
                 android:excludeFromRecents="true"
-                android:exported="true">
+                android:exported="true"
+                android:theme="@android:style/Theme.Holo.DialogWhenLarge">
         </activity>
 
         <activity android:name="android.content.SyncActivityTooManyDeletes"
diff --git a/core/res/res/drawable-hdpi/btn_check_off.png b/core/res/res/drawable-hdpi/btn_check_off.png
old mode 100755
new mode 100644
index bb62e6f..3928b7df
--- a/core/res/res/drawable-hdpi/btn_check_off.png
+++ b/core/res/res/drawable-hdpi/btn_check_off.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_check_off_disable.png b/core/res/res/drawable-hdpi/btn_check_off_disable.png
old mode 100755
new mode 100644
index b346381..922737e
--- a/core/res/res/drawable-hdpi/btn_check_off_disable.png
+++ b/core/res/res/drawable-hdpi/btn_check_off_disable.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_check_off_disable_focused.png b/core/res/res/drawable-hdpi/btn_check_off_disable_focused.png
old mode 100755
new mode 100644
index 8663369..992f0fe
--- a/core/res/res/drawable-hdpi/btn_check_off_disable_focused.png
+++ b/core/res/res/drawable-hdpi/btn_check_off_disable_focused.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_check_off_pressed.png b/core/res/res/drawable-hdpi/btn_check_off_pressed.png
old mode 100755
new mode 100644
index 67e49df..c6195ab
--- a/core/res/res/drawable-hdpi/btn_check_off_pressed.png
+++ b/core/res/res/drawable-hdpi/btn_check_off_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_check_off_selected.png b/core/res/res/drawable-hdpi/btn_check_off_selected.png
old mode 100755
new mode 100644
index 1791d1f..d467769
--- a/core/res/res/drawable-hdpi/btn_check_off_selected.png
+++ b/core/res/res/drawable-hdpi/btn_check_off_selected.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_check_on.png b/core/res/res/drawable-hdpi/btn_check_on.png
old mode 100755
new mode 100644
index 15cd25e..91d8ba9
--- a/core/res/res/drawable-hdpi/btn_check_on.png
+++ b/core/res/res/drawable-hdpi/btn_check_on.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_check_on_disable.png b/core/res/res/drawable-hdpi/btn_check_on_disable.png
old mode 100755
new mode 100644
index e3fe323..6472087
--- a/core/res/res/drawable-hdpi/btn_check_on_disable.png
+++ b/core/res/res/drawable-hdpi/btn_check_on_disable.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_check_on_disable_focused.png b/core/res/res/drawable-hdpi/btn_check_on_disable_focused.png
old mode 100755
new mode 100644
index fa41bb7..58ba72d
--- a/core/res/res/drawable-hdpi/btn_check_on_disable_focused.png
+++ b/core/res/res/drawable-hdpi/btn_check_on_disable_focused.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_check_on_pressed.png b/core/res/res/drawable-hdpi/btn_check_on_pressed.png
old mode 100755
new mode 100644
index 906e283..42b8edc
--- a/core/res/res/drawable-hdpi/btn_check_on_pressed.png
+++ b/core/res/res/drawable-hdpi/btn_check_on_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_check_on_selected.png b/core/res/res/drawable-hdpi/btn_check_on_selected.png
old mode 100755
new mode 100644
index eb496a8..7c94adf
--- a/core/res/res/drawable-hdpi/btn_check_on_selected.png
+++ b/core/res/res/drawable-hdpi/btn_check_on_selected.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_disabled_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_default_disabled_focused_holo_dark.9.png
index 3007a84..8ea94e1 100644
--- a/core/res/res/drawable-hdpi/btn_default_disabled_focused_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_disabled_focused_holo_light.9.png b/core/res/res/drawable-hdpi/btn_default_disabled_focused_holo_light.9.png
index 5a108454..8ea94e1 100644
--- a/core/res/res/drawable-hdpi/btn_default_disabled_focused_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_disabled_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_default_disabled_holo_dark.9.png
index bc35a36..bee345e 100644
--- a/core/res/res/drawable-hdpi/btn_default_disabled_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_disabled_holo_light.9.png b/core/res/res/drawable-hdpi/btn_default_disabled_holo_light.9.png
index bc35a36..bee345e 100644
--- a/core/res/res/drawable-hdpi/btn_default_disabled_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_default_focused_holo_dark.9.png
index f6380fa..e83686a 100644
--- a/core/res/res/drawable-hdpi/btn_default_focused_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_focused_holo_light.9.png b/core/res/res/drawable-hdpi/btn_default_focused_holo_light.9.png
index f6380fa..e83686a 100644
--- a/core/res/res/drawable-hdpi/btn_default_focused_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_normal_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_default_normal_holo_dark.9.png
index 7016db1..42e8ba4 100644
--- a/core/res/res/drawable-hdpi/btn_default_normal_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_normal_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_normal_holo_light.9.png b/core/res/res/drawable-hdpi/btn_default_normal_holo_light.9.png
index 228af2e..42e8ba4 100644
--- a/core/res/res/drawable-hdpi/btn_default_normal_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_normal_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_pressed_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_default_pressed_holo_dark.9.png
index bc3bfc2..a24b13b 100644
--- a/core/res/res/drawable-hdpi/btn_default_pressed_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_pressed_holo_light.9.png b/core/res/res/drawable-hdpi/btn_default_pressed_holo_light.9.png
index 8a4759b..a24b13b 100644
--- a/core/res/res/drawable-hdpi/btn_default_pressed_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_group_disabled_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_group_disabled_holo_dark.9.png
index bd353ae..00e8f06 100644
--- a/core/res/res/drawable-hdpi/btn_group_disabled_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_group_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_group_disabled_holo_light.9.png b/core/res/res/drawable-hdpi/btn_group_disabled_holo_light.9.png
index d127b3c..997ccb2 100644
--- a/core/res/res/drawable-hdpi/btn_group_disabled_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_group_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_group_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_group_holo_dark.9.png
deleted file mode 100644
index b86c65a..0000000
--- a/core/res/res/drawable-hdpi/btn_group_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_group_holo_light.9.png b/core/res/res/drawable-hdpi/btn_group_holo_light.9.png
deleted file mode 100644
index 1248e88..0000000
--- a/core/res/res/drawable-hdpi/btn_group_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_group_normal_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_group_normal_holo_dark.9.png
new file mode 100644
index 0000000..b2120f4
--- /dev/null
+++ b/core/res/res/drawable-hdpi/btn_group_normal_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_group_normal_holo_light.9.png b/core/res/res/drawable-hdpi/btn_group_normal_holo_light.9.png
new file mode 100644
index 0000000..782d36b
--- /dev/null
+++ b/core/res/res/drawable-hdpi/btn_group_normal_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_dark.9.png
index 8f95407..63a9219 100755
--- a/core/res/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_light.9.png b/core/res/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_light.9.png
index 408d3d7..d977914 100755
--- a/core/res/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_off_disabled_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_toggle_off_disabled_holo_dark.9.png
index 092fea0..c04393c 100755
--- a/core/res/res/drawable-hdpi/btn_toggle_off_disabled_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_off_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_off_disabled_holo_light.9.png b/core/res/res/drawable-hdpi/btn_toggle_off_disabled_holo_light.9.png
index 2e310a4..96bd351 100755
--- a/core/res/res/drawable-hdpi/btn_toggle_off_disabled_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_off_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_off_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_toggle_off_focused_holo_dark.9.png
index 127b7e2..c30b993 100755
--- a/core/res/res/drawable-hdpi/btn_toggle_off_focused_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_off_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_off_focused_holo_light.9.png b/core/res/res/drawable-hdpi/btn_toggle_off_focused_holo_light.9.png
index a5bde58..730c113 100755
--- a/core/res/res/drawable-hdpi/btn_toggle_off_focused_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_off_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_off_normal_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_toggle_off_normal_holo_dark.9.png
index e46c1af..17de0eb 100755
--- a/core/res/res/drawable-hdpi/btn_toggle_off_normal_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_off_normal_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_off_normal_holo_light.9.png b/core/res/res/drawable-hdpi/btn_toggle_off_normal_holo_light.9.png
index 8756b62..7e62cf9 100755
--- a/core/res/res/drawable-hdpi/btn_toggle_off_normal_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_off_normal_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_off_pressed_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_toggle_off_pressed_holo_dark.9.png
index b5e1e9c..a06f1fc 100755
--- a/core/res/res/drawable-hdpi/btn_toggle_off_pressed_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_off_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_off_pressed_holo_light.9.png b/core/res/res/drawable-hdpi/btn_toggle_off_pressed_holo_light.9.png
index 46ea0d6..21ad0d8 100755
--- a/core/res/res/drawable-hdpi/btn_toggle_off_pressed_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_off_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_dark.9.png
index 4593375..c0f6f74 100755
--- a/core/res/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_light.9.png b/core/res/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_light.9.png
index 4593375..c0f6f74 100755
--- a/core/res/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_on_disabled_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_toggle_on_disabled_holo_dark.9.png
index df2e203..44a2f8bb 100755
--- a/core/res/res/drawable-hdpi/btn_toggle_on_disabled_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_on_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_on_disabled_holo_light.9.png b/core/res/res/drawable-hdpi/btn_toggle_on_disabled_holo_light.9.png
index cd4d819..44a2f8bb 100755
--- a/core/res/res/drawable-hdpi/btn_toggle_on_disabled_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_on_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_on_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_toggle_on_focused_holo_dark.9.png
index 785a9d8..53eb636f 100755
--- a/core/res/res/drawable-hdpi/btn_toggle_on_focused_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_on_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_on_focused_holo_light.9.png b/core/res/res/drawable-hdpi/btn_toggle_on_focused_holo_light.9.png
index b1a190c..53eb636f 100755
--- a/core/res/res/drawable-hdpi/btn_toggle_on_focused_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_on_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_on_normal_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_toggle_on_normal_holo_dark.9.png
index 25a144b..baab86f 100755
--- a/core/res/res/drawable-hdpi/btn_toggle_on_normal_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_on_normal_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_on_normal_holo_light.9.png b/core/res/res/drawable-hdpi/btn_toggle_on_normal_holo_light.9.png
index 1cf6fcd..baab86f 100755
--- a/core/res/res/drawable-hdpi/btn_toggle_on_normal_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_on_normal_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_on_pressed_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_toggle_on_pressed_holo_dark.9.png
index 126dc28..6a954a6 100755
--- a/core/res/res/drawable-hdpi/btn_toggle_on_pressed_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_on_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_on_pressed_holo_light.9.png b/core/res/res/drawable-hdpi/btn_toggle_on_pressed_holo_light.9.png
index d4d3f41..6a954a6 100755
--- a/core/res/res/drawable-hdpi/btn_toggle_on_pressed_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_on_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/cab_background_opaque_holo_dark.9.png b/core/res/res/drawable-hdpi/cab_background_dark.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/cab_background_opaque_holo_dark.9.png
rename to core/res/res/drawable-hdpi/cab_background_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/cab_background_opaque_holo_light.9.png b/core/res/res/drawable-hdpi/cab_background_light.9.png
similarity index 100%
rename from core/res/res/drawable-hdpi/cab_background_opaque_holo_light.9.png
rename to core/res/res/drawable-hdpi/cab_background_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_contact_picture.png b/core/res/res/drawable-hdpi/ic_contact_picture.png
index a60565a..e29e63a 100644
--- a/core/res/res/drawable-hdpi/ic_contact_picture.png
+++ b/core/res/res/drawable-hdpi/ic_contact_picture.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/overscroll_edge.png b/core/res/res/drawable-hdpi/overscroll_edge.png
index 6d3c26d..7eb615b 100644
--- a/core/res/res/drawable-hdpi/overscroll_edge.png
+++ b/core/res/res/drawable-hdpi/overscroll_edge.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/overscroll_glow.png b/core/res/res/drawable-hdpi/overscroll_glow.png
index 0b0b936..a800d8e 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/btn_check_off.png b/core/res/res/drawable-mdpi/btn_check_off.png
index 251ddff..b0541d9 100644
--- a/core/res/res/drawable-mdpi/btn_check_off.png
+++ b/core/res/res/drawable-mdpi/btn_check_off.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_check_off_disable.png b/core/res/res/drawable-mdpi/btn_check_off_disable.png
index 45e6804..5ec8d03 100644
--- a/core/res/res/drawable-mdpi/btn_check_off_disable.png
+++ b/core/res/res/drawable-mdpi/btn_check_off_disable.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_check_off_disable_focused.png b/core/res/res/drawable-mdpi/btn_check_off_disable_focused.png
index 193acd2..341ffb9 100644
--- a/core/res/res/drawable-mdpi/btn_check_off_disable_focused.png
+++ b/core/res/res/drawable-mdpi/btn_check_off_disable_focused.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_check_off_pressed.png b/core/res/res/drawable-mdpi/btn_check_off_pressed.png
index 807901c..5e77a77 100644
--- a/core/res/res/drawable-mdpi/btn_check_off_pressed.png
+++ b/core/res/res/drawable-mdpi/btn_check_off_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_check_off_selected.png b/core/res/res/drawable-mdpi/btn_check_off_selected.png
index dbc3beb..4e40f207 100644
--- a/core/res/res/drawable-mdpi/btn_check_off_selected.png
+++ b/core/res/res/drawable-mdpi/btn_check_off_selected.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_check_on.png b/core/res/res/drawable-mdpi/btn_check_on.png
index 4c83e2e..23304a1 100644
--- a/core/res/res/drawable-mdpi/btn_check_on.png
+++ b/core/res/res/drawable-mdpi/btn_check_on.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_check_on_disable.png b/core/res/res/drawable-mdpi/btn_check_on_disable.png
index f1bf178..817745c 100644
--- a/core/res/res/drawable-mdpi/btn_check_on_disable.png
+++ b/core/res/res/drawable-mdpi/btn_check_on_disable.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_check_on_disable_focused.png b/core/res/res/drawable-mdpi/btn_check_on_disable_focused.png
index ea232ee..13d13b6 100644
--- a/core/res/res/drawable-mdpi/btn_check_on_disable_focused.png
+++ b/core/res/res/drawable-mdpi/btn_check_on_disable_focused.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_check_on_pressed.png b/core/res/res/drawable-mdpi/btn_check_on_pressed.png
index 0de8a4c..9cdc796 100644
--- a/core/res/res/drawable-mdpi/btn_check_on_pressed.png
+++ b/core/res/res/drawable-mdpi/btn_check_on_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_check_on_selected.png b/core/res/res/drawable-mdpi/btn_check_on_selected.png
index 20294f3..b2c3727 100644
--- a/core/res/res/drawable-mdpi/btn_check_on_selected.png
+++ b/core/res/res/drawable-mdpi/btn_check_on_selected.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_default_disabled_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_default_disabled_focused_holo_dark.9.png
index ab5d68b..5ce7321 100644
--- a/core/res/res/drawable-mdpi/btn_default_disabled_focused_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_default_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_default_disabled_focused_holo_light.9.png b/core/res/res/drawable-mdpi/btn_default_disabled_focused_holo_light.9.png
index 9421b1b..5ce7321 100644
--- a/core/res/res/drawable-mdpi/btn_default_disabled_focused_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_default_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_default_disabled_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_default_disabled_holo_dark.9.png
index a2c9b3f..34f69d3f 100644
--- a/core/res/res/drawable-mdpi/btn_default_disabled_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_default_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_default_disabled_holo_light.9.png b/core/res/res/drawable-mdpi/btn_default_disabled_holo_light.9.png
index a2c9b3f..34f69d3f 100644
--- a/core/res/res/drawable-mdpi/btn_default_disabled_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_default_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_default_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_default_focused_holo_dark.9.png
index 02e3323..0629efe 100644
--- a/core/res/res/drawable-mdpi/btn_default_focused_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_default_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_default_focused_holo_light.9.png b/core/res/res/drawable-mdpi/btn_default_focused_holo_light.9.png
index 02e3323..0629efe 100644
--- a/core/res/res/drawable-mdpi/btn_default_focused_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_default_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_default_normal_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_default_normal_holo_dark.9.png
index 5b05722..a2f411e 100644
--- a/core/res/res/drawable-mdpi/btn_default_normal_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_default_normal_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_default_normal_holo_light.9.png b/core/res/res/drawable-mdpi/btn_default_normal_holo_light.9.png
index e7f1690..a2f411e 100644
--- a/core/res/res/drawable-mdpi/btn_default_normal_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_default_normal_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_default_pressed_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_default_pressed_holo_dark.9.png
index b49a583..231997a 100644
--- a/core/res/res/drawable-mdpi/btn_default_pressed_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_default_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_default_pressed_holo_light.9.png b/core/res/res/drawable-mdpi/btn_default_pressed_holo_light.9.png
index e6f1362..231997a 100644
--- a/core/res/res/drawable-mdpi/btn_default_pressed_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_default_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_group_disabled_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_group_disabled_holo_dark.9.png
index aa04cc9..5894afe 100644
--- a/core/res/res/drawable-mdpi/btn_group_disabled_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_group_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_group_disabled_holo_light.9.png b/core/res/res/drawable-mdpi/btn_group_disabled_holo_light.9.png
index 25aefd2..1dfc7d3 100644
--- a/core/res/res/drawable-mdpi/btn_group_disabled_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_group_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_group_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_group_holo_dark.9.png
deleted file mode 100644
index 9541252..0000000
--- a/core/res/res/drawable-mdpi/btn_group_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_group_holo_light.9.png b/core/res/res/drawable-mdpi/btn_group_holo_light.9.png
deleted file mode 100644
index bf4f9b2..0000000
--- a/core/res/res/drawable-mdpi/btn_group_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_group_normal_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_group_normal_holo_dark.9.png
new file mode 100644
index 0000000..c6257bb
--- /dev/null
+++ b/core/res/res/drawable-mdpi/btn_group_normal_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_group_normal_holo_light.9.png b/core/res/res/drawable-mdpi/btn_group_normal_holo_light.9.png
new file mode 100644
index 0000000..7e25ad3
--- /dev/null
+++ b/core/res/res/drawable-mdpi/btn_group_normal_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_dark.9.png
index a087fb3..1964085 100755
--- a/core/res/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_light.9.png b/core/res/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_light.9.png
index 4f0572b..d86a9e6 100755
--- a/core/res/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_off_disabled_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_toggle_off_disabled_holo_dark.9.png
index a0693778..f3f1ab2 100755
--- a/core/res/res/drawable-mdpi/btn_toggle_off_disabled_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_off_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_off_disabled_holo_light.9.png b/core/res/res/drawable-mdpi/btn_toggle_off_disabled_holo_light.9.png
index bbb7eb7..d157fed 100755
--- a/core/res/res/drawable-mdpi/btn_toggle_off_disabled_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_off_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_off_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_toggle_off_focused_holo_dark.9.png
index 0fc02cc..f99d946 100755
--- a/core/res/res/drawable-mdpi/btn_toggle_off_focused_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_off_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_off_focused_holo_light.9.png b/core/res/res/drawable-mdpi/btn_toggle_off_focused_holo_light.9.png
index eec3980..a313744 100755
--- a/core/res/res/drawable-mdpi/btn_toggle_off_focused_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_off_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_off_normal_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_toggle_off_normal_holo_dark.9.png
index 9732a84..00a589f 100755
--- a/core/res/res/drawable-mdpi/btn_toggle_off_normal_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_off_normal_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_off_normal_holo_light.9.png b/core/res/res/drawable-mdpi/btn_toggle_off_normal_holo_light.9.png
index 043d35a..e16e470c 100755
--- a/core/res/res/drawable-mdpi/btn_toggle_off_normal_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_off_normal_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_off_pressed_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_toggle_off_pressed_holo_dark.9.png
index 0763b23..6f7dd45 100755
--- a/core/res/res/drawable-mdpi/btn_toggle_off_pressed_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_off_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_off_pressed_holo_light.9.png b/core/res/res/drawable-mdpi/btn_toggle_off_pressed_holo_light.9.png
index ba93aa3..490c83d 100755
--- a/core/res/res/drawable-mdpi/btn_toggle_off_pressed_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_off_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_dark.9.png
index dcf4436..45dc08f 100755
--- a/core/res/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_light.9.png b/core/res/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_light.9.png
index dcf4436..45dc08f 100755
--- a/core/res/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_on_disabled_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_toggle_on_disabled_holo_dark.9.png
index 41c3bb0..11dc01d 100755
--- a/core/res/res/drawable-mdpi/btn_toggle_on_disabled_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_on_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_on_disabled_holo_light.9.png b/core/res/res/drawable-mdpi/btn_toggle_on_disabled_holo_light.9.png
index d7c7d9f..11dc01d 100755
--- a/core/res/res/drawable-mdpi/btn_toggle_on_disabled_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_on_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_on_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_toggle_on_focused_holo_dark.9.png
index d3d2575..2c95ebd 100755
--- a/core/res/res/drawable-mdpi/btn_toggle_on_focused_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_on_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_on_focused_holo_light.9.png b/core/res/res/drawable-mdpi/btn_toggle_on_focused_holo_light.9.png
index 7802e39..2c95ebd 100755
--- a/core/res/res/drawable-mdpi/btn_toggle_on_focused_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_on_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_on_normal_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_toggle_on_normal_holo_dark.9.png
index 8f46c38..7c410c0 100755
--- a/core/res/res/drawable-mdpi/btn_toggle_on_normal_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_on_normal_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_on_normal_holo_light.9.png b/core/res/res/drawable-mdpi/btn_toggle_on_normal_holo_light.9.png
index a38eb12..7c410c0 100755
--- a/core/res/res/drawable-mdpi/btn_toggle_on_normal_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_on_normal_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_on_pressed_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_toggle_on_pressed_holo_dark.9.png
index a216e35..afb31e1 100755
--- a/core/res/res/drawable-mdpi/btn_toggle_on_pressed_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_on_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_on_pressed_holo_light.9.png b/core/res/res/drawable-mdpi/btn_toggle_on_pressed_holo_light.9.png
index c9af9b2..afb31e1 100755
--- a/core/res/res/drawable-mdpi/btn_toggle_on_pressed_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_on_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/cab_background_opaque_holo_dark.9.png b/core/res/res/drawable-mdpi/cab_background_dark.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/cab_background_opaque_holo_dark.9.png
rename to core/res/res/drawable-mdpi/cab_background_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/cab_background_opaque_holo_light.9.png b/core/res/res/drawable-mdpi/cab_background_light.9.png
similarity index 100%
rename from core/res/res/drawable-mdpi/cab_background_opaque_holo_light.9.png
rename to core/res/res/drawable-mdpi/cab_background_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_contact_picture.png b/core/res/res/drawable-mdpi/ic_contact_picture.png
index 3a338e8..faa3dc0 100644
--- a/core/res/res/drawable-mdpi/ic_contact_picture.png
+++ b/core/res/res/drawable-mdpi/ic_contact_picture.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/overscroll_edge.png b/core/res/res/drawable-mdpi/overscroll_edge.png
index 6d3c26d..86d9454 100644
--- a/core/res/res/drawable-mdpi/overscroll_edge.png
+++ b/core/res/res/drawable-mdpi/overscroll_edge.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 0b0b936..d96b9be 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-mdpi/password_keyboard_background_holo.9.png b/core/res/res/drawable-mdpi/password_keyboard_background_holo.9.png
new file mode 100644
index 0000000..c56c704
--- /dev/null
+++ b/core/res/res/drawable-mdpi/password_keyboard_background_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_bg_activated_holo_dark.9.png b/core/res/res/drawable-mdpi/textfield_bg_activated_holo_dark.9.png
deleted file mode 100644
index 137923b..0000000
--- a/core/res/res/drawable-mdpi/textfield_bg_activated_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_bg_default_holo_dark.9.png b/core/res/res/drawable-mdpi/textfield_bg_default_holo_dark.9.png
deleted file mode 100644
index 62b1deb..0000000
--- a/core/res/res/drawable-mdpi/textfield_bg_default_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_bg_disabled_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/textfield_bg_disabled_focused_holo_dark.9.png
deleted file mode 100644
index ab30a77..0000000
--- a/core/res/res/drawable-mdpi/textfield_bg_disabled_focused_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_bg_disabled_holo_dark.9.png b/core/res/res/drawable-mdpi/textfield_bg_disabled_holo_dark.9.png
deleted file mode 100644
index 9274bc7..0000000
--- a/core/res/res/drawable-mdpi/textfield_bg_disabled_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_bg_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/textfield_bg_focused_holo_dark.9.png
deleted file mode 100644
index e46155e..0000000
--- a/core/res/res/drawable-mdpi/textfield_bg_focused_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/sym_keyboard_delete_holo.png b/core/res/res/drawable-xlarge-mdpi/sym_keyboard_delete_holo.png
new file mode 100644
index 0000000..1555791
--- /dev/null
+++ b/core/res/res/drawable-xlarge-mdpi/sym_keyboard_delete_holo.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/sym_keyboard_shift.png b/core/res/res/drawable-xlarge-mdpi/sym_keyboard_shift.png
new file mode 100644
index 0000000..91d6e32
--- /dev/null
+++ b/core/res/res/drawable-xlarge-mdpi/sym_keyboard_shift.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/sym_keyboard_shift_locked.png b/core/res/res/drawable-xlarge-mdpi/sym_keyboard_shift_locked.png
new file mode 100644
index 0000000..2bd0536
--- /dev/null
+++ b/core/res/res/drawable-xlarge-mdpi/sym_keyboard_shift_locked.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/textfield_bg_activated_holo_dark.9.png b/core/res/res/drawable-xlarge-mdpi/textfield_bg_activated_holo_dark.9.png
new file mode 100644
index 0000000..a233b0d
--- /dev/null
+++ b/core/res/res/drawable-xlarge-mdpi/textfield_bg_activated_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/textfield_bg_default_holo_dark.9.png b/core/res/res/drawable-xlarge-mdpi/textfield_bg_default_holo_dark.9.png
new file mode 100644
index 0000000..403f502
--- /dev/null
+++ b/core/res/res/drawable-xlarge-mdpi/textfield_bg_default_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/textfield_bg_disabled_focused_holo_dark.9.png b/core/res/res/drawable-xlarge-mdpi/textfield_bg_disabled_focused_holo_dark.9.png
new file mode 100644
index 0000000..0ded801
--- /dev/null
+++ b/core/res/res/drawable-xlarge-mdpi/textfield_bg_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/textfield_bg_disabled_holo_dark.9.png b/core/res/res/drawable-xlarge-mdpi/textfield_bg_disabled_holo_dark.9.png
new file mode 100644
index 0000000..27237b8
--- /dev/null
+++ b/core/res/res/drawable-xlarge-mdpi/textfield_bg_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/textfield_bg_focused_holo_dark.9.png b/core/res/res/drawable-xlarge-mdpi/textfield_bg_focused_holo_dark.9.png
new file mode 100644
index 0000000..0e451f1
--- /dev/null
+++ b/core/res/res/drawable-xlarge-mdpi/textfield_bg_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable/action_bar_context_background.xml b/core/res/res/drawable/action_bar_context_background.xml
deleted file mode 100644
index 8789898..0000000
--- a/core/res/res/drawable/action_bar_context_background.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<shape xmlns:android="http://schemas.android.com/apk/res/android">
-    <gradient
-        android:startColor="#ff000000"
-        android:centerColor="#ffd1d2d4"
-        android:endColor="#ff85878a"
-        android:angle="270" />
-</shape>
diff --git a/core/res/res/drawable/btn_default_small_holo_dark.xml b/core/res/res/drawable/btn_default_small_holo_dark.xml
deleted file mode 100644
index a5f5d46..0000000
--- a/core/res/res/drawable/btn_default_small_holo_dark.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_window_focused="false" android:state_enabled="true"
-        android:drawable="@drawable/btn_default_small_normal_holo_dark" />
-    <item android:state_window_focused="false" android:state_enabled="false"
-        android:drawable="@drawable/btn_default_small_disabled_holo_dark" />
-    <item android:state_pressed="true" 
-        android:drawable="@drawable/btn_default_small_pressed_holo_dark" />
-    <item android:state_focused="true" android:state_enabled="true"
-        android:drawable="@drawable/btn_default_small_focused_holo_dark" />
-    <item android:state_enabled="true"
-        android:drawable="@drawable/btn_default_small_normal_holo_dark" />
-    <item android:state_focused="true"
-        android:drawable="@drawable/btn_default_small_disabled_focused_holo_dark" />
-    <item
-         android:drawable="@drawable/btn_default_small_disabled_holo_dark" />
-</selector>
diff --git a/core/res/res/drawable/btn_default_small_holo_light.xml b/core/res/res/drawable/btn_default_small_holo_light.xml
deleted file mode 100644
index ed86f78..0000000
--- a/core/res/res/drawable/btn_default_small_holo_light.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_window_focused="false" android:state_enabled="true"
-        android:drawable="@drawable/btn_default_small_normal_holo_light" />
-    <item android:state_window_focused="false" android:state_enabled="false"
-        android:drawable="@drawable/btn_default_small_disabled_holo_light" />
-    <item android:state_pressed="true" 
-        android:drawable="@drawable/btn_default_small_pressed_holo_light" />
-    <item android:state_focused="true" android:state_enabled="true"
-        android:drawable="@drawable/btn_default_small_focused_holo_light" />
-    <item android:state_enabled="true"
-        android:drawable="@drawable/btn_default_small_normal_holo_light" />
-    <item android:state_focused="true"
-        android:drawable="@drawable/btn_default_small_disabled_focused_holo_light" />
-    <item
-         android:drawable="@drawable/btn_default_small_disabled_holo_light" />
-</selector>
diff --git a/packages/SystemUI/res/drawable/button_frame.xml b/core/res/res/drawable/btn_group_holo_dark.xml
similarity index 73%
rename from packages/SystemUI/res/drawable/button_frame.xml
rename to core/res/res/drawable/btn_group_holo_dark.xml
index 5db39a5..553f023 100644
--- a/packages/SystemUI/res/drawable/button_frame.xml
+++ b/core/res/res/drawable/btn_group_holo_dark.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 The Android Open Source Project
+<!-- Copyright (C) 2011 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -15,7 +15,8 @@
 -->
 
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_pressed="true" android:drawable="@drawable/button_frame_pressed" />
-    <item android:drawable="@drawable/button_frame_default" />
+    <item android:state_enabled="true"
+        android:drawable="@drawable/btn_group_normal_holo_dark" />
+    <item
+        android:drawable="@drawable/btn_group_disabled_holo_dark" />
 </selector>
-
diff --git a/packages/SystemUI/res/drawable/button_frame.xml b/core/res/res/drawable/btn_group_holo_light.xml
similarity index 73%
copy from packages/SystemUI/res/drawable/button_frame.xml
copy to core/res/res/drawable/btn_group_holo_light.xml
index 5db39a5..9c89eef 100644
--- a/packages/SystemUI/res/drawable/button_frame.xml
+++ b/core/res/res/drawable/btn_group_holo_light.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 The Android Open Source Project
+<!-- Copyright (C) 2011 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -15,7 +15,8 @@
 -->
 
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_pressed="true" android:drawable="@drawable/button_frame_pressed" />
-    <item android:drawable="@drawable/button_frame_default" />
+    <item android:state_enabled="true"
+        android:drawable="@drawable/btn_group_normal_holo_light" />
+    <item
+        android:drawable="@drawable/btn_group_disabled_holo_light" />
 </selector>
-
diff --git a/core/res/res/drawable/group_button_background_holo_dark.xml b/core/res/res/drawable/group_button_background_holo_dark.xml
deleted file mode 100644
index fa00785..0000000
--- a/core/res/res/drawable/group_button_background_holo_dark.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <item android:state_window_focused="false" android:drawable="@color/transparent" />
-
-    <!-- Even though these two point to the same resource, have two states so the drawable will invalidate itself when coming out of pressed state. -->
-    <item android:state_focused="true"  android:state_enabled="false" android:state_pressed="true" android:drawable="@drawable/btn_group_disabled_holo_dark" />
-    <item android:state_focused="true"  android:state_enabled="false"                              android:drawable="@drawable/btn_group_disabled_holo_dark" />
-    <item android:state_focused="true"                                android:state_pressed="true" android:drawable="@drawable/btn_group_pressed_holo_dark" />
-    <item android:state_focused="false"                               android:state_pressed="true" android:drawable="@drawable/btn_group_pressed_holo_dark" />
-    <item android:state_focused="true"                                                             android:drawable="@drawable/btn_group_focused_holo_dark" />
-    <item                                                                                          android:drawable="@color/transparent" />
-</selector>
diff --git a/core/res/res/drawable/group_button_background_holo_light.xml b/core/res/res/drawable/group_button_background_holo_light.xml
deleted file mode 100644
index 1e74ec7..0000000
--- a/core/res/res/drawable/group_button_background_holo_light.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <item android:state_window_focused="false" android:drawable="@color/transparent" />
-
-    <!-- Even though these two point to the same resource, have two states so the drawable will invalidate itself when coming out of pressed state. -->
-    <item android:state_focused="true"  android:state_enabled="false" android:state_pressed="true" android:drawable="@drawable/btn_group_disabled_holo_light" />
-    <item android:state_focused="true"  android:state_enabled="false"                              android:drawable="@drawable/btn_group_disabled_holo_light" />
-    <item android:state_focused="true"                                android:state_pressed="true" android:drawable="@drawable/btn_group_pressed_holo_light" />
-    <item android:state_focused="false"                               android:state_pressed="true" android:drawable="@drawable/btn_group_pressed_holo_light" />
-    <item android:state_focused="true"                                                             android:drawable="@drawable/btn_group_focused_holo_light" />
-    <item                                                                                          android:drawable="@color/transparent" />
-</selector>
diff --git a/core/res/res/layout-xlarge/keyguard_screen_password_landscape.xml b/core/res/res/layout-xlarge/keyguard_screen_password_landscape.xml
index c1149e3..16bfc31 100644
--- a/core/res/res/layout-xlarge/keyguard_screen_password_landscape.xml
+++ b/core/res/res/layout-xlarge/keyguard_screen_password_landscape.xml
@@ -69,7 +69,7 @@
             <com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
                 android:layout_width="330dip"
                 android:layout_height="330dip"
-                android:background="#00000000"
+                android:background="#40000000"
                 android:layout_marginTop="5dip"
                 android:keyBackground="@drawable/btn_keyboard_key_fulltrans"
                 android:visibility="gone"
@@ -88,8 +88,9 @@
     <com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboardAlpha"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:background="#00000000"
+        android:background="@drawable/password_keyboard_background_holo"
         android:keyBackground="@drawable/btn_keyboard_key_fulltrans"
+        android:keyTextSize="28dip"
         android:visibility="gone"
     />
 
diff --git a/core/res/res/layout-xlarge/keyguard_screen_password_portrait.xml b/core/res/res/layout-xlarge/keyguard_screen_password_portrait.xml
index fab69d8..b87b51f 100644
--- a/core/res/res/layout-xlarge/keyguard_screen_password_portrait.xml
+++ b/core/res/res/layout-xlarge/keyguard_screen_password_portrait.xml
@@ -61,19 +61,29 @@
             android:textColor="#ffffffff"
             />
 
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="0dip"
+            android:layout_weight="1"
+        />
+
         <!-- Numeric keyboard -->
         <com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
             android:layout_width="330dip"
             android:layout_height="260dip"
-            android:background="#00000000"
+            android:background="#40000000"
             android:keyBackground="@drawable/btn_keyboard_key_fulltrans"
+            android:layout_marginBottom="80dip"
         />
+
         <!-- Alphanumeric keyboard -->
         <com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboardAlpha"
             android:layout_width="match_parent"
             android:layout_height="230dip"
-            android:background="#00000000"
+            android:background="@drawable/password_keyboard_background_holo"
             android:keyBackground="@drawable/btn_keyboard_key_fulltrans"
+            android:keyTextSize="28dip"
+            android:visibility="gone"
         />
 
         <!-- emergency call button -->
diff --git a/core/res/res/layout/action_menu_item_layout.xml b/core/res/res/layout/action_menu_item_layout.xml
index e001894..4477df7 100644
--- a/core/res/res/layout/action_menu_item_layout.xml
+++ b/core/res/res/layout/action_menu_item_layout.xml
@@ -42,6 +42,7 @@
             android:visibility="gone"
             android:textAppearance="?attr/textAppearanceMedium"
             style="?attr/buttonStyleSmall"
+            android:textColor="?attr/textColorPrimary"
             android:background="@null"
             android:paddingLeft="4dip"
             android:paddingRight="4dip" />
diff --git a/core/res/res/layout/grant_credentials_permission.xml b/core/res/res/layout/grant_credentials_permission.xml
index 0ffe8de..8b18454 100644
--- a/core/res/res/layout/grant_credentials_permission.xml
+++ b/core/res/res/layout/grant_credentials_permission.xml
@@ -21,24 +21,10 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:orientation="vertical"
     android:layout_width="match_parent"
-    android:layout_height="match_parent">
-
-    <!-- The header -->
-    <TextView
-        android:id="@+id/header_text"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:textAppearance="?android:attr/textAppearanceMedium"
-        android:textColor="@color/white"
-        android:textStyle="bold"
-        android:text="@string/grant_permissions_header_text"
-        android:shadowColor="@color/shadow"
-        android:shadowRadius="2"
-        android:singleLine="true"
-        android:background="@drawable/title_bar_medium"
-        android:gravity="left|center_vertical"
-	android:paddingLeft="19dip"
-        android:ellipsize="marquee" />
+    android:layout_height="match_parent"
+    android:divider="?android:attr/dividerHorizontal"
+    android:showDividers="middle"
+    android:dividerPadding="16dip" >
 
     <!-- The list of packages that correspond to the requesting UID
     and the account/authtokenType that is being requested -->
@@ -137,25 +123,24 @@
     <LinearLayout
         android:id="@+id/buttons"
         android:layout_width="match_parent"
-        android:layout_height="52dip"
-        android:background="@drawable/bottom_bar"
-        android:paddingTop="4dip"
-        android:paddingLeft="2dip"
-        android:paddingRight="2dip">
+        android:layout_height="54dip"
+        style="?android:attr/buttonBarStyle">
 
         <Button
             android:id="@+id/allow_button"
             android:text="@string/allow"
             android:layout_width="0dip"
             android:layout_height="wrap_content"
-            android:layout_weight="2" />
+            android:layout_weight="2"
+            style="?android:attr/buttonBarButtonStyle" />
 
         <Button
             android:id="@+id/deny_button"
             android:text="@string/deny"
             android:layout_width="0dip"
             android:layout_height="wrap_content"
-            android:layout_weight="2" />
+            android:layout_weight="2"
+            style="?android:attr/buttonBarButtonStyle" />
 
     </LinearLayout>
 </LinearLayout>
diff --git a/core/res/res/layout/popup_menu_item_layout.xml b/core/res/res/layout/popup_menu_item_layout.xml
index d22f74a..fef017d 100644
--- a/core/res/res/layout/popup_menu_item_layout.xml
+++ b/core/res/res/layout/popup_menu_item_layout.xml
@@ -16,7 +16,7 @@
 
 <com.android.internal.view.menu.ListMenuItemView xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="48dip"
+    android:layout_height="?android:attr/dropdownListPreferredItemHeight"
     android:minWidth="196dip"
     android:paddingLeft="16dip"
     android:paddingRight="16dip">
diff --git a/core/res/res/layout/search_bar.xml b/core/res/res/layout/search_bar.xml
index ccc6326..9cf08ea 100644
--- a/core/res/res/layout/search_bar.xml
+++ b/core/res/res/layout/search_bar.xml
@@ -25,7 +25,7 @@
     android:layout_height="wrap_content"
     android:orientation="horizontal"
     android:focusable="true"
-    android:background="@drawable/cab_background_opaque_holo_light"
+    android:background="@drawable/cab_background_light"
     android:descendantFocusability="afterDescendants">
 
     <RelativeLayout
diff --git a/core/res/res/layout/search_view.xml b/core/res/res/layout/search_view.xml
index 0a7cd3c..c41c2de 100644
--- a/core/res/res/layout/search_view.xml
+++ b/core/res/res/layout/search_view.xml
@@ -105,6 +105,7 @@
                 android:layout_gravity="center_vertical"
                 android:background="?android:attr/selectableItemBackground"
                 android:src="?android:attr/searchViewCloseIcon"
+                android:focusable="true"
             />
 
         </LinearLayout>
@@ -127,6 +128,7 @@
             android:background="?android:attr/selectableItemBackground"
             android:src="?android:attr/searchViewGoIcon"
             android:visibility="gone"
+            android:focusable="true"
         />
 
         <ImageView
@@ -139,6 +141,7 @@
             android:src="?android:attr/searchViewVoiceIcon"
             android:background="?android:attr/selectableItemBackground"
             android:visibility="gone"
+            android:focusable="true"
         />
     </LinearLayout>
 </LinearLayout>
diff --git a/core/res/res/layout/simple_spinner_dropdown_item.xml b/core/res/res/layout/simple_spinner_dropdown_item.xml
index 5fd7a09..cb999b6 100644
--- a/core/res/res/layout/simple_spinner_dropdown_item.xml
+++ b/core/res/res/layout/simple_spinner_dropdown_item.xml
@@ -22,5 +22,5 @@
     style="?android:attr/spinnerDropDownItemStyle"
     android:singleLine="true"
     android:layout_width="match_parent"
-    android:layout_height="?android:attr/listPreferredItemHeight"
+    android:layout_height="?android:attr/dropdownListPreferredItemHeight"
     android:ellipsize="marquee" />
diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml
index 8a506a3..7b13a75 100644
--- a/core/res/res/values-ar/strings.xml
+++ b/core/res/res/values-ar/strings.xml
@@ -151,8 +151,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"وضع الطائرة"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"وضع الطائرة قيد التشغيل"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"وضع الطائرة متوقف"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"+100"</string>
     <string name="safeMode" msgid="2788228061547930246">"الوضع الآمن"</string>
     <string name="android_system_label" msgid="6577375335728551336">"نظام Android"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"الخدمات التي تكلفك المال"</string>
@@ -256,6 +255,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"للسماح للمالك بالالتزام بواجهة المستوى العلوي لطريقة الإرسال. لا يجب استخدامه على الإطلاق للتطبيقات العادية."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"الالتزام بخلفية ما"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"للسماح للمالك بالالتزام بواجهة المستوى العلوي للخلفية. لا يجب استخدامه على الإطلاق للتطبيقات العادية."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"التفاعل مع مشرف الجهاز"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"للسماح للمالك بإرسال الأهداف إلى أحد مشرفي الجهاز. لا يجب استخدامه على الإطلاق للتطبيقات العادية."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"تغيير اتجاه الشاشة"</string>
@@ -466,7 +469,7 @@
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"للسماح لتطبيق ما بالكتابة على وحدة تخزين USB."</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"للسماح لتطبيق ما بالكتابة إلى بطاقة SD."</string>
     <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"تعديل/حذف محتويات وحدة تخزين الوسائط الداخلية"</string>
-    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"للسماح لتطبيق ما بتعديل محتويات وحدة تخزين الوسائط الداخلية."</string>
+    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"للسماح لأحد التطبيقات بتعديل محتويات وحدة تخزين الوسائط الداخلية."</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"الدخول إلى نظام ملفات ذاكرة التخزين المؤقت"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"للسماح لتطبيق ما بقراءة نظام ملفات ذاكرة التخزين المؤقت والكتابة به."</string>
     <string name="permlab_use_sip" msgid="5986952362795870502">"إجراء/تلقي مكالمات عبر الإنترنت"</string>
@@ -605,6 +608,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"العمل"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"غير ذلك"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"أدخل رقم التعريف الشخصي"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"أدخل كلمة المرور لإلغاء التأمين"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"أدخل رقم التعريف الشخصي (PIN) لإلغاء القفل"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"كود PIN غير صحيح!"</string>
@@ -648,6 +653,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"كلمة المرور"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"تسجيل الدخول"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"اسم المستخدم غير صحيح أو كلمة المرور غير صحيحة."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"جارٍ التحقق..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"إلغاء تأمين"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"تشغيل الصوت"</string>
@@ -1024,4 +1031,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml
index 2736269..7c8a7f5 100644
--- a/core/res/res/values-bg/strings.xml
+++ b/core/res/res/values-bg/strings.xml
@@ -151,8 +151,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Самолетен режим"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Самолетният режим е ВКЛЮЧЕН"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Самолетният режим е ИЗКЛЮЧЕН"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100+"</string>
     <string name="safeMode" msgid="2788228061547930246">"Безопасен режим"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Системно от Android"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Услуги, които ви струват пари"</string>
@@ -256,6 +255,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Разрешава на притежателя да се обвърже с интерфейса от най-високото ниво на метод на въвеждане. Нормалните приложения би трябвало никога да не се нуждаят от това."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"обвързване с тапет"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Разрешава на притежателя да се обвърже с интерфейса от най-високото ниво на тапет. Нормалните приложения би трябвало никога да не се нуждаят от това."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"взаимодействие с администратор на устройството"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Разрешава на притежателя да изпраща намерения до администратор на устройството. Нормалните приложения би трябвало никога да не се нуждаят от това."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"промяна на ориентацията на екрана"</string>
@@ -465,7 +468,7 @@
     <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"промяна/изтриване на съдържанието на SD картата"</string>
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"Разрешава на приложението да записва в USB хранилището."</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"Разрешава на приложението да записва върху SD картата."</string>
-    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"промяна/изтриване на съдържанието на вътрешното мултимедийно хранилище"</string>
+    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"пром./изтр. на съдърж. на вътр. мултим. хранил."</string>
     <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Разрешава на приложението да променя съдържанието на вътрешното мултимедийно хранилище."</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"достъп до файловата система на кеша"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Разрешава на приложението да чете и записва във файловата система на кеша."</string>
@@ -605,6 +608,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Служебен"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Друг"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Въведете PIN кода"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Въведете паролата, за да отключите"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Въведете PIN за отключване"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Неправилен PIN код!"</string>
@@ -648,6 +653,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Парола"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Вход"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Потребителското име или паролата са невалидни."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Проверява се…"</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Отключване"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Включване на звука"</string>
@@ -1024,4 +1031,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml
index ba93303..1f2cde0 100644
--- a/core/res/res/values-ca/strings.xml
+++ b/core/res/res/values-ca/strings.xml
@@ -151,8 +151,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Mode d\'avió"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Mode d\'avió activat"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Mode d\'avió desactivat"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"+100"</string>
     <string name="safeMode" msgid="2788228061547930246">"Mode segur"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Sistema Android"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Serveis de pagament"</string>
@@ -256,6 +255,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Permet al titular vincular amb la interfície de nivell superior d\'un mètode d\'entrada. No s\'hauria de necessitar mai per a les aplicacions normals."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"vincular a un empaperat"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Permet al titular vincular amb la interfície de nivell superior d\'un empaperat. No s\'hauria de necessitar mai per a les aplicacions normals."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"interactuar amb un administrador del dispositiu"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Permet al titular enviar intencions a un administrador del sistema. No s\'hauria de necessitar mai per a les aplicacions normals."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"canviar l\'orientació de la pantalla"</string>
@@ -465,8 +468,8 @@
     <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"modificar/suprimir el contingut de les targetes SD"</string>
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"Permet que una aplicació gravii a l\'emmagatzematge USB."</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"Permet a una aplicació escriure a la targeta SD."</string>
-    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"modifica/suprimeix el contingut d\'emmagatzematge de mitjans interns"</string>
-    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Permet que una aplicació modifiqui el contingut de l\'emmagatzematge de mitjans interns."</string>
+    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"mod./sup. cont. emm. mult. in."</string>
+    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Permet que una aplicació modifiqui el contingut de l\'emmagatzematge multimèdia intern."</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"accedir al sistema de fitxers de la memòria cau"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Permet a una aplicació llegir el sistema de fitxers de la memòria cau i escriure-hi."</string>
     <string name="permlab_use_sip" msgid="5986952362795870502">"fes/rep trucades per Internet"</string>
@@ -605,6 +608,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Feina"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Altres"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Introduïu el codi PIN"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Introduïu la contrasenya per desbloquejar-lo"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Introdueix el PIN per desbloquejar"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Codi PIN incorrecte."</string>
@@ -648,6 +653,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Contrasenya"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Inicia la sessió"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Nom d\'usuari o contrasenya no vàlids."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"S\'està comprovant..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Desbloqueja"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"So activat"</string>
@@ -1024,4 +1031,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index 7495a66..22d3357 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -152,8 +152,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Režim V letadle"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Režim V letadle je ZAPNUTÝ"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Režim V letadle je VYPNUTÝ"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100+"</string>
     <string name="safeMode" msgid="2788228061547930246">"Nouzový režim"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Systém Android"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Zpoplatněné služby"</string>
@@ -257,6 +256,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Umožňuje držiteli vázat se na nejvyšší úroveň rozhraní pro zadávání dat. Běžné aplikace by toto nastavení nikdy neměly využívat."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"vazba na tapetu"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Umožňuje držiteli navázat se na nejvyšší úroveň rozhraní tapety. Běžné aplikace by toto oprávnění nikdy neměly potřebovat."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"komunikovat se správcem zařízení"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Umožňuje držiteli oprávnění odesílat informace správci zařízení. Běžné aplikace by toto oprávnění nikdy neměly požadovat."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"změna orientace obrazovky"</string>
@@ -466,10 +469,8 @@
     <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"změna/smazání obsahu karty SD"</string>
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"Umožní zápis do úložiště USB."</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"Umožní aplikaci zápis na kartu SD."</string>
-    <!-- no translation found for permlab_mediaStorageWrite (6859839199706879015) -->
-    <skip />
-    <!-- no translation found for permdesc_mediaStorageWrite (8232008512478316233) -->
-    <skip />
+    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"Upravit/smazat interní úlož."</string>
+    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Povoluje aplikaci upravovat obsah interního úložiště médií."</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"přistupovat do souborového systému mezipaměti"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Umožňuje aplikaci číst a zapisovat do souborového systému mezipaměti."</string>
     <string name="permlab_use_sip" msgid="5986952362795870502">"uskutečňovat a přijímat internetové hovory"</string>
@@ -608,6 +609,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Práce"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Jiné"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Zadejte kód PIN"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Zadejte heslo pro odblokování"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Zadejte kód PIN pro odblokování"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Nesprávný kód PIN"</string>
@@ -651,6 +654,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Heslo"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Přihlásit se"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Neplatné uživatelské jméno nebo heslo."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Probíhá kontrola..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Odemknout"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Zapnout zvuk"</string>
@@ -1030,4 +1035,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index 0c9aefd..a9a2614 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -152,8 +152,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Flytilstand"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Flytilstand er TIL"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Flytilstand er slået FRA"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100+"</string>
     <string name="safeMode" msgid="2788228061547930246">"Sikker tilstand"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Android-system"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Tjenester, der koster dig penge"</string>
@@ -257,6 +256,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Tillader, at brugeren forpligter sig til en inputmetodes grænseflade på øverste niveau. Bør aldrig være nødvendig til normale programmer."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"forpligt til et tapet"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Tillader, at brugeren forpligter sig til et tapets grænseflade på øverste niveau. Bør aldrig være nødvendig til normale programmer."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"kommunikere med en enhedsadministrator"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Tillader brugeren at sende hensigter til en enhedsadministrator. Bør aldrig være nødvendigt for almindelige programmer."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"skift skærmretning"</string>
@@ -466,10 +469,8 @@
     <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"ret/slet indholdet på SD-kortet"</string>
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"Tillad skriv til USB-lager."</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"Tillader, at et program skriver til SD-kortet."</string>
-    <!-- no translation found for permlab_mediaStorageWrite (6859839199706879015) -->
-    <skip />
-    <!-- no translation found for permdesc_mediaStorageWrite (8232008512478316233) -->
-    <skip />
+    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"Rediger/slet internt medielagringsindhold"</string>
+    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Tillader, at applikationen ændrer indholdet af det interne medielagringsindhold."</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"få adgang til cache-filsystemet"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Tillader, at et program læser og skriver til cache-filsystemet."</string>
     <string name="permlab_use_sip" msgid="5986952362795870502">"foretage/modtage internetopkald"</string>
@@ -608,6 +609,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Arbejde"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Andre"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Indtast PIN-kode"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Indtast adgangskode for at låse op"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Indtast pinkode for at låse op"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Forkert PIN-kode!"</string>
@@ -651,6 +654,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Adgangskode"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Log ind"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Ugyldigt brugernavn eller ugyldig adgangskode."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Kontrollerer ..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Lås op"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Lyd slået til"</string>
@@ -1030,4 +1035,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index 7856aaf..596affd 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -257,6 +257,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Ermöglicht dem Halter, sich an die Oberfläche einer Eingabemethode auf oberster Ebene zu binden. Sollte nie für normale Anwendungen benötigt werden."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"An einen Hintergrund binden"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Ermöglicht dem Halter, sich an die Oberfläche einer Eingabemethode auf oberster Ebene zu binden. Sollte nie für normale Anwendungen benötigt werden."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"Interaktion mit einem Geräteadministrator"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Ermöglicht dem Halter, Intents an einen Geräteadministrator zu senden. Sollte nie für normale Anwendungen benötigt werden."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"Bildschirmausrichtung ändern"</string>
@@ -608,6 +612,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Geschäftlich"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Sonstige"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"PIN-Code eingeben"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Passwort zum Entsperren eingeben"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"PIN zum Entsperren eingeben"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Falscher PIN-Code!"</string>
@@ -651,6 +657,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Passwort"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Anmelden"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Ungültiger  Nutzername oder ungültiges Passwort."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Überprüfung..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Entsperren"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Ton ein"</string>
@@ -1030,4 +1038,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml
index 7dc9747..146e81f 100644
--- a/core/res/res/values-el/strings.xml
+++ b/core/res/res/values-el/strings.xml
@@ -152,8 +152,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Λειτουργία πτήσης"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Η λειτουργία πτήσης είναι ενεργοποιημένη."</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Η λειτουργία πτήσης είναι απενεργοποιημένη"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100+"</string>
     <string name="safeMode" msgid="2788228061547930246">"Ασφαλής λειτουργία"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Σύστημα Android"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Υπηρεσίες επί πληρωμή"</string>
@@ -257,6 +256,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Επιτρέπει στον κάτοχο τη δέσμευση στη διεπαφή ανωτάτου επιπέδου μιας μεθόδου εισόδου. Δεν είναι απαραίτητο για συνήθεις εφαρμογές."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"δέσμευση σε ταπετσαρία"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Επιτρέπει στον κάτοχο τη δέσμευση στη διεπαφή ανωτάτου επιπέδου μιας ταπετσαρίας. Δεν είναι απαραίτητο για συνήθεις εφαρμογές."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"επικοινωνία με έναν διαχειριστή συσκευής"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Επιτρέπει στον κάτοχο την αποστολή στόχων σε έναν διαχειριστή συσκευής. Δεν θα χρειαστεί ποτέ για κανονικές εφαρμογές."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"αλλαγή προσανατολισμού οθόνης"</string>
@@ -466,10 +469,8 @@
     <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"τροποποίηση/διαγραφή περιεχομένων κάρτας SD"</string>
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"Επ. εγγρ. εφ. σε απ. χώρο USB"</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"Επιτρέπει στην εφαρμογή την εγγραφή στην κάρτα SD."</string>
-    <!-- no translation found for permlab_mediaStorageWrite (6859839199706879015) -->
-    <skip />
-    <!-- no translation found for permdesc_mediaStorageWrite (8232008512478316233) -->
-    <skip />
+    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"τροπ./διαγ. περ. απ. εσ. μνήμ."</string>
+    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Επιτρέπει σε μια εφαρμογή την τροποποίηση περιεχομένων της αποθήκευσης εσωτερικής μνήμης."</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"πρόσβαση στο σύστημα αρχείων προσωρινής μνήμης"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Επιτρέπει σε μια εφαρμογή την ανάγνωση και την εγγραφή του συστήματος αρχείων προσωρινής μνήμης."</string>
     <string name="permlab_use_sip" msgid="5986952362795870502">"πραγματοποίηση/λήψη κλήσεων μέσω Διαδικτύου"</string>
@@ -608,6 +609,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Εργασία"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Άλλο"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Πληκτρολογήστε τον κωδικό αριθμό PIN"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Εισαγάγετε τον κωδικό πρόσβασης για ξεκλείδωμα"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Εισαγάγετε το PIN για ξεκλείδωμα"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Εσφαλμένος κωδικός αριθμός PIN!"</string>
@@ -651,6 +654,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Κωδικός πρόσβασης"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Σύνδεση"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Μη έγκυρο όνομα χρήστη ή κωδικός πρόσβασης."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Έλεγχος..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Ξεκλείδωμα"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Ενεργοποίηση ήχου"</string>
@@ -1030,4 +1035,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml
index a63e2c4..e7ed95f 100644
--- a/core/res/res/values-en-rGB/strings.xml
+++ b/core/res/res/values-en-rGB/strings.xml
@@ -151,8 +151,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Airplane mode"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Aiplane mode is ON"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Airplane mode is OFF"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100+"</string>
     <string name="safeMode" msgid="2788228061547930246">"Safe mode"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Android System"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Services that cost you money"</string>
@@ -256,6 +255,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Allows the holder to bind to the top-level interface of an input method. Should never be needed for normal applications."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"bind to wallpaper"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Allows the holder to bind to the top-level interface of wallpaper. Should never be needed for normal applications."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"interact with device admin"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Allows the holder to send intents to a device administrator. Should never be needed for normal applications."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"change screen orientation"</string>
@@ -605,6 +608,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Work"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Other"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Enter PIN code"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Enter password to unlock"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Enter PIN to unlock"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Incorrect PIN code!"</string>
@@ -648,6 +653,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Password"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Sign in"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Invalid username or password."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Checking..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Unlock"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Sound on"</string>
@@ -1024,4 +1031,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-es-rUS-xlarge/strings.xml b/core/res/res/values-es-rUS-xlarge/strings.xml
index 81b3f1a..dc184b3 100644
--- a/core/res/res/values-es-rUS-xlarge/strings.xml
+++ b/core/res/res/values-es-rUS-xlarge/strings.xml
@@ -38,6 +38,8 @@
     <!-- XL -->
     <string name="global_actions_airplane_mode_on_status" msgid="7272433204482202219">"El modo avión está ENCENDIDO"</string>
     <!-- XL -->
+    <string name="status_bar_notification_info_overflow" msgid="1081154808901480710">"100+"</string>
+    <!-- XL -->
     <string name="android_system_label" msgid="844561213652704593">"Sistema Androide"</string>
     <!-- XL -->
     <string name="permgroupdesc_costMoney" msgid="4836624191696189469">"Admitir que las aplicaciones realicen actividades que se cobran."</string>
@@ -303,16 +305,10 @@
     <!-- XL -->
     <string name="websearch" msgid="904596193450917688">"Búsqueda web"</string>
     <!-- XL -->
-    <string name="status_bar_notification_info_overflow" msgid="1081154808901480710">"100+"</string>
-    <!-- XL -->
     <string name="permlab_accessMtp" msgid="2385215229145694622">"implementar protocolo MTP"</string>
     <!-- XL -->
     <string name="permdesc_accessMtp" msgid="4707854877711083465">"Permite acceso al driver kernel MTP para implementar el protocolo MTP USB."</string>
     <!-- XL -->
-    <string name="permlab_mediaStorageWrite" product="default" msgid="5585262071354704256">"modificar/eliminar los contenidos del almacenamientos de medios internos"</string>
-    <!-- XL -->
-    <string name="permdesc_mediaStorageWrite" product="default" msgid="2372999661142345443">"Permite que una aplicación modifique los contenidos del almacenamiento interno de medios."</string>
-    <!-- XL -->
     <string name="policylab_encryptedStorage" msgid="488196329176602372">"Establecer la encriptación del almacenamiento"</string>
     <!-- XL -->
     <string name="policydesc_encryptedStorage" msgid="6111889605506443825">"Requiere que los datos almacenados de la aplicación estén encriptados"</string>
@@ -321,6 +317,8 @@
     <!-- XL -->
     <string name="autofill_address_summary_format" msgid="8398158823767723887">"$1$2$3"</string>
     <!-- XL -->
+    <string name="configure_input_methods" msgid="8093308517599282222">"Configurar métodos de entrada"</string>
+    <!-- XL -->
     <string name="gpsNotifTicker" msgid="6612390321359669319">"Solicitud de ubicación de <xliff:g id="NAME">%s</xliff:g>"</string>
     <!-- XL -->
     <string name="gpsNotifTitle" msgid="7533028619350196545">"Solicitud de ubicación"</string>
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index 5d1a25f..de964c1 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -151,8 +151,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Modo avión"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"El modo avión está Encendido"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"El modo avión está Apagado"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100 +"</string>
     <string name="safeMode" msgid="2788228061547930246">"Modo seguro"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Sistema Android"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Servicios que te cuestan dinero"</string>
@@ -256,6 +255,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Permite al propietario vincularse a la interfaz de nivel superior de un método de entrada. Se debe evitar utilizarlo en aplicaciones normales."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"vincular a un fondo de pantalla"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Permite al propietario vincularse a la interfaz de nivel superior de un fondo de pantalla. Se debe evitar utilizarlo en aplicaciones normales."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"interactuar con un administrador de dispositivo"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Permite que el propietario envíe sus intentos a un administrador de dispositivos. No se necesita para las aplicaciones normales."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"cambiar la orientación de la pantalla"</string>
@@ -465,10 +468,8 @@
     <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"modificar/suprimir el contenido de la tarjeta SD"</string>
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"Permite que una aplicación escriba en el almacenamiento USB."</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"Admite que una aplicación escriba en la tarjeta SD."</string>
-    <!-- no translation found for permlab_mediaStorageWrite (6859839199706879015) -->
-    <skip />
-    <!-- no translation found for permdesc_mediaStorageWrite (8232008512478316233) -->
-    <skip />
+    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"modificar/eliminar los contenidos del almacenamientos de medios internos"</string>
+    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Permite que una aplicación modifique los contenidos del almacenamiento interno de medios."</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"Acceder al sistema de archivos caché"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Permite que una aplicación lea y escriba el sistema de archivos caché."</string>
     <string name="permlab_use_sip" msgid="5986952362795870502">"realizar o recibir llamadas por Internet"</string>
@@ -607,6 +608,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Trabajo"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Otro"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Ingresar el código de PIN"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Ingresar la contraseña para desbloquear"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Ingresa el PIN para desbloquear"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"¡Código de PIN incorrecto!"</string>
@@ -650,6 +653,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Contraseña"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Inicia sesión"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Nombre de usuario o contraseña incorrecta."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Comprobando..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Desbloquear"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Sonido encendido"</string>
@@ -1028,4 +1033,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index a4d6545..ccc7dab 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -152,8 +152,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Modo avión"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Modo avión activado. Desactivar."</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Modo avión desactivado. Activar."</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"+100"</string>
     <string name="safeMode" msgid="2788228061547930246">"Modo seguro"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Sistema Android"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Servicios por los que tienes que pagar"</string>
@@ -257,6 +256,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Permite enlazar con la interfaz de nivel superior de un método de introducción de texto. No debe ser necesario para las aplicaciones normales."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"enlazar con un fondo de pantalla"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Permite enlazar con la interfaz de nivel superior de un fondo de pantalla. No debe ser necesario para las aplicaciones normales."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"interactuar con el administrador de un dispositivo"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Permite enviar intentos a un administrador de dispositivos. Este permiso nunca debería ser necesario para las aplicaciones normales."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"cambiar orientación de la pantalla"</string>
@@ -466,10 +469,8 @@
     <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"modificar/eliminar contenido de la tarjeta SD"</string>
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"Permite escribir en USB"</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"Permite que una aplicación escriba en la tarjeta SD."</string>
-    <!-- no translation found for permlab_mediaStorageWrite (6859839199706879015) -->
-    <skip />
-    <!-- no translation found for permdesc_mediaStorageWrite (8232008512478316233) -->
-    <skip />
+    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"Cambiar/borrar almac interno"</string>
+    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Permite que una aplicación modifique el contenido del almacenamiento interno de medios."</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"acceder al sistema de archivos almacenado en caché"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Permite que una aplicación lea y escriba el sistema de archivos almacenado en caché."</string>
     <string name="permlab_use_sip" msgid="5986952362795870502">"realizar/recibir llamadas por Internet"</string>
@@ -608,6 +609,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Trabajo"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Otro"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Introduce el código PIN"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Introducir contraseña para desbloquear"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Introducir PIN para desbloquear"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"El código PIN es incorrecto."</string>
@@ -630,7 +633,7 @@
     <string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Falta la tarjeta SIM"</string>
     <string name="lockscreen_missing_sim_message" product="tablet" msgid="151659196095791474">"No se ha insertado ninguna tarjeta SIM en la tableta."</string>
     <string name="lockscreen_missing_sim_message" product="default" msgid="2186920585695169078">"No se ha insertado ninguna tarjeta SIM en el teléfono."</string>
-    <string name="lockscreen_missing_sim_instructions" msgid="8874620818937719067">"Inserta una tarjeta SIM."</string>
+    <string name="lockscreen_missing_sim_instructions" msgid="8874620818937719067">"Inserta una tarjeta SIM"</string>
     <string name="emergency_calls_only" msgid="6733978304386365407">"Solo llamadas de emergencia"</string>
     <string name="lockscreen_network_locked_message" msgid="143389224986028501">"Bloqueada para la red"</string>
     <string name="lockscreen_sim_puk_locked_message" msgid="7441797339976230">"La tarjeta SIM está bloqueada con el código PUK."</string>
@@ -651,6 +654,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Contraseña"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Acceder"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Nombre de usuario o contraseña no válido"</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Comprobando..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Desbloquear"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Activar sonido"</string>
@@ -1030,4 +1035,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index 767655d..d3eac2d 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/strings.xml
@@ -151,8 +151,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"حالت هواپیما"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"حالت هواپیما روشن است"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"حالت هواپیما خاموش است"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100+"</string>
     <string name="safeMode" msgid="2788228061547930246">"حالت ایمن"</string>
     <string name="android_system_label" msgid="6577375335728551336">"سیستم Android"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"سرویس های غیر رایگان"</string>
@@ -256,6 +255,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"به نگهدارنده اجازه می دهد به رابط سطح بالای یک روش ورودی متصل شود. هرگز برای برنامه های معمولی مورد نیاز نیست."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"پیوند شده به تصویر زمینه"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"به نگهدارنده اجازه می دهد که به رابط سطح بالای تصویر زمینه متصل شود. هرگز برای برنامه های معمولی مورد نیاز نیست."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"تعامل با یک سرپرست دستگاه"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"به نگهدارنده اجازه می دهد مفاد را به یک سرپرست دستگاه ارسال کند. هرگز برای برنامه های معمولی مورد نیاز نیست."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"تغییر جهت صفحه"</string>
@@ -465,8 +468,8 @@
     <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"اصلاح کردن/حذف محتویات کارت SD"</string>
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"به یک برنامه کاربردی اجازه می دهد تا دستگاه USB را بنویسید."</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"به یک برنامه کاربردی اجازه می دهد در کارت SD رایت کند."</string>
-    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"اصلاح/حذف محتواهای ذخیره سازی رسانه داخلی"</string>
-    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"به یک برنامه کاربردی برای اصلاح محتواهای حافظه رسانه داخلی اجازه می دهد."</string>
+    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"تغییر/حذف محتواهای حافظه رسانه داخلی"</string>
+    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"به یک برنامه کاربردی برای تغییر محتواهای حافظه رسانه داخلی اجازه می دهد."</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"دسترسی به سیستم فایل حافظه پنهان"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"به یک برنامه کاربردی امکان می دهد سیستم فایل حافظه پنهان را بخواند و بنویسد."</string>
     <string name="permlab_use_sip" msgid="5986952362795870502">"علامتگذاری/دریافت تماس های اینترنتی"</string>
@@ -605,6 +608,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"محل کار"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"سایر موارد"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"کد پین را وارد کنید"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"رمز ورود را برای بازگشایی قفل وارد کنید"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"کد پین را برای بازگشایی قفل وارد کنید"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"پین کد اشتباه است!"</string>
@@ -648,6 +653,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"رمز ورود"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"ورود به سیستم"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"نام کاربر یا رمز ورود نامعتبر است."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"در حال بررسی..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"بازگشایی قفل"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"صدا روشن"</string>
@@ -1024,4 +1031,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml
index d8d13ef..0e12063 100644
--- a/core/res/res/values-fi/strings.xml
+++ b/core/res/res/values-fi/strings.xml
@@ -151,8 +151,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Lentokonetila"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Lentokonetila on KÄYTÖSSÄ"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Lentokonetila on POIS KÄYTÖSTÄ"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100+"</string>
     <string name="safeMode" msgid="2788228061547930246">"Suojattu tila"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Android-järjestelmä"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Maksulliset palvelut"</string>
@@ -256,6 +255,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Antaa sovelluksen sitoutua syöttötavan ylemmän tason käyttöliittymään. Ei tavallisten sovelluksien käyttöön."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"sido taustakuvaan"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Antaa sovelluksen sitoutua taustakuvan ylemmän tason käyttöliittymään. Ei tavallisten sovelluksien käyttöön."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"kommunikoi laitteen järjestelmänvalvojan kanssa"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Antaa sovelluksen lähettää kyselyitä laitteen järjestelmänvalvojalle. Ei tavallisten sovelluksien käyttöön."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"muuta näytön suuntaa"</string>
@@ -465,7 +468,7 @@
     <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"muokkaa/poista SD-kortin sisältöä"</string>
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"Antaa sovelluksen kirjoittaa USB-tallennustilaan."</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"Antaa sovelluksen kirjoittaa SD-kortille."</string>
-    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"muokkaa/poista säilytystilan sisältöä"</string>
+    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"muokkaa/poista sisäisen säilytystilan sisältöä"</string>
     <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Antaa sovelluksen muokata sisäisen tallennustilan sisältöä."</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"käytä välimuistin tiedostojärjestelmää"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Antaa sovelluksen lukea välimuistin tiedostojärjestelmää ja kirjoittaa sinne."</string>
@@ -605,6 +608,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Työ"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Muu"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Anna PIN-koodi"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Poista lukitus antamalla salasana"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Poista lukitus antamalla PIN-koodi"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Virheellinen PIN-koodi!"</string>
@@ -648,6 +653,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Salasana"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Kirjaudu sisään"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Virheellinen käyttäjänimi tai salasana."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Tarkistetaan..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Poista lukitus"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Ääni käytössä"</string>
@@ -1024,4 +1031,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index c3fb6eb..194f23f 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -257,6 +257,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Permet au support de se connecter à l\'interface de plus haut niveau d\'un mode de saisie. Les applications normales ne devraient jamais avoir recours à cette fonctionnalité."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"Se fixer sur un fond d\'écran"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Permet au support de se fixer sur l\'interface de plus haut niveau d\'un fond d\'écran. Les applications normales ne devraient jamais avoir recours à cette fonctionnalité."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"interagir avec l\'administrateur du périphérique"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Permet à l\'application d\'envoyer des intentions à l\'administrateur du périphérique. Les applications standard ne devraient jamais avoir recours à cette fonctionnalité."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"Changement d\'orientation de l\'écran"</string>
@@ -608,6 +612,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Professionnelle"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Autre"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Saisissez le code PIN"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Saisissez le mot de passe pour procéder au déverrouillage."</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Saisissez le code PIN pour procéder au déverrouillage."</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Le code PIN est incorrect !"</string>
@@ -651,6 +657,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Mot de passe"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Se connecter"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Nom d\'utilisateur ou mot de passe incorrect."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Vérification..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Débloquer"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Son activé"</string>
@@ -1030,4 +1038,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index fe9f319f..43a1c28 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -256,6 +256,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Nositelju omogućuje da se veže uz sučelje najviše razine za metodu unosa. Nikad ne bi trebalo koristiti za uobičajene aplikacije."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"povezano s pozadinskom slikom"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Nositelju omogućuje da se veže uz sučelje najviše razine za pozadinsku sliku. Nikad ne bi trebalo koristiti za uobičajene aplikacije."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"interakcija s administratorom uređaja"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Nositelju omogućuje slanje namjera administratoru uređaja. Nikad ne bi trebalo koristiti za uobičajene aplikacije."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"promjena orijentacije zaslona"</string>
@@ -605,6 +609,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Posao"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Drugo"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Unesite PIN kôd"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Unesite zaporku za otključavanje"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Unesite PIN za otključavanje"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Netočan PIN kôd!"</string>
@@ -648,6 +654,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Zaporka"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Prijava"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Nevažeće korisničko ime ili zaporka."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Provjera..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Otključaj"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Zvuk je uključen"</string>
@@ -1024,4 +1032,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml
index a090f0b..c4ee0ff 100644
--- a/core/res/res/values-hu/strings.xml
+++ b/core/res/res/values-hu/strings.xml
@@ -151,8 +151,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Repülőgép üzemmód"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Repülőgép üzemmód bekapcsolva"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Repülőgép üzemmód kikapcsolva"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100+"</string>
     <string name="safeMode" msgid="2788228061547930246">"Biztonsági üzemmód"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Android rendszer"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Fizetős szolgáltatások"</string>
@@ -256,6 +255,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Lehetővé teszi a használó számára a beviteli módszer legfelső szintű kezelőfelületéhez való csatlakozást. A normál alkalmazások soha nem használják ezt."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"összekapcsolás háttérképpel"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Lehetővé teszi a használó számára, hogy csatlakozzon egy háttérkép legfelső szintű kezelőfelületéhez. A normál alkalmazásoknak erre soha nincs szüksége."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"az eszközkezelő használata"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Lehetővé teszi a használó számára, hogy célokat küldjön egy eszközkezelőnek. A normál alkalmazásoknak erre soha nincs szüksége."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"képernyő irányának módosítása"</string>
@@ -465,7 +468,7 @@
     <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"az SD-kártya tartalmának módosítása és törlése"</string>
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"Lehetővé teszi az alkalmazások számára, hogy írjanak az USB-tárra."</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"Lehetővé teszi egy alkalmazás számára, hogy írjon az SD-kártyára."</string>
-    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"a belső médiatároló tartalmának módosítása és törlése"</string>
+    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"belső tár tartalmának módosítása/törlése"</string>
     <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Lehetővé teszi az alkalmazások számára, hogy módosítsák a belső tárhely tartalmát."</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"hozzáférés a gyorsítótár fájlrendszeréhez"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Lehetővé teszi egy alkalmazás számára a gyorsítótár fájlrendszerének olvasását és írását."</string>
@@ -605,6 +608,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Munkahely"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Egyéb"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Adja meg a PIN-kódot"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"A feloldáshoz írja be a jelszót"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Feloldáshoz írja be a PIN kódot"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Helytelen PIN-kód."</string>
@@ -648,6 +653,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Jelszó"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Bejelentkezés"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Érvénytelen felhasználónév vagy jelszó."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Ellenőrzés..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Feloldás"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Hang bekapcsolása"</string>
@@ -1024,4 +1031,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index 8f738d6..537ae5f 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -151,8 +151,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Mode pesawat"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Mode pesawat HIDUP"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Mode pesawat MATI"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100+"</string>
     <string name="safeMode" msgid="2788228061547930246">"Mode aman"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Sistem Android"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Layanan berbayar"</string>
@@ -256,6 +255,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Mengizinkan pemegang mengikat antarmuka tingkat tinggi pada suatu metode masukan. Tidak diperlukan untuk aplikasi normal."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"mengikat ke wallpaper"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Mengizinkan pemegang mengikat antarmuka tingkat tinggi dari suatu wallpaper. Tidak diperlukan untuk aplikasi normal."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"berinteraksi dengan admin perangkat"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Mengizinkan pemegang mengirimkan tujuan kepada administrator perangkat. Tidak diperlukan untuk aplikasi normal."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"ubah orientasi layar"</string>
@@ -605,6 +608,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Kerjaan"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Lainnya"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Masukkan kode PIN"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Masukkan sandi untuk membuka"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Masukkan PIN untuk membuka kunci"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Kode PIN salah!"</string>
@@ -648,6 +653,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Sandi"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Masuk"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Nama pengguna atau sandi tidak valid."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Memeriksa..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Buka kunci"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Suara hidup"</string>
@@ -1024,4 +1031,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index 887a96d..0d24924 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -152,8 +152,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Modalità aereo"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Modalità aereo attiva"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Modalità aereo non attiva"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100+"</string>
     <string name="safeMode" msgid="2788228061547930246">"Modalità provvisoria"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Sistema Android"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Servizi che prevedono un costo"</string>
@@ -257,6 +256,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Consente l\'associazione all\'interfaccia principale di un metodo di inserimento. Non dovrebbe essere mai necessario per le normali applicazioni."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"associazione a sfondo"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Consente l\'associazione di uno sfondo all\'interfaccia principale. Non dovrebbe mai essere necessario per le normali applicazioni."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"interazione con un amministratore dispositivo"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Consente l\'invio di intent a un amministratore del dispositivo. L\'autorizzazione non deve mai essere necessaria per le normali applicazioni."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"modifica orientamento dello schermo"</string>
@@ -466,10 +469,8 @@
     <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"modificare/eliminare i contenuti della scheda SD"</string>
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"Consente di scrivere nell\'archivio USB."</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"Consente a un\'applicazione di scrivere sulla scheda SD."</string>
-    <!-- no translation found for permlab_mediaStorageWrite (6859839199706879015) -->
-    <skip />
-    <!-- no translation found for permdesc_mediaStorageWrite (8232008512478316233) -->
-    <skip />
+    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"modifica/eliminaz. contenuti archivio media int."</string>
+    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Consente a un\'applicazione di modificare i contenuti dell\'archivio media interno."</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"accesso al filesystem nella cache"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Consente a un\'applicazione di leggere e scrivere il filesystem nella cache."</string>
     <string name="permlab_use_sip" msgid="5986952362795870502">"effettuazione/ricezione chiamate Internet"</string>
@@ -608,6 +609,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Lavoro"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Altro"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Inserisci il PIN"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Inserisci password per sbloccare"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Inserisci PIN per sbloccare"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Codice PIN errato."</string>
@@ -651,6 +654,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Password"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Accedi"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Password o nome utente non valido."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Controllo in corso..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Sblocca"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Audio attivato"</string>
@@ -1030,4 +1035,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index eab8673..387073c 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -151,8 +151,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"מצב טיסה"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"מצב טיסה מופעל"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"מצב טיסה כבוי"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100+‎"</string>
     <string name="safeMode" msgid="2788228061547930246">"מצב בטוח"</string>
     <string name="android_system_label" msgid="6577375335728551336">"מערכת Android"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"שירותים שעולים לך כסף"</string>
@@ -256,6 +255,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"מאפשר למחזיק להכפיף לממשק ברמה עליונה של שיטת קלט. לא אמור להידרש לעולם ביישומים רגילים."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"קשור לטפט"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"מאפשר למחזיק לקשור לממשק ברמה עליונה של טפט. לא אמור להידרש לעולם ביישומים רגילים."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"קיים אינטראקציה עם מנהל מכשיר"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"מאפשר למשתמש לשלוח כוונות למנהל התקן. לא אמור להידרש לעולם ביישומים רגילים."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"שנה את כיוון המסך"</string>
@@ -465,8 +468,8 @@
     <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"שנה/מחק את התוכן של כרטיס SD"</string>
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"מאפשר ליישום לכתוב לאמצעי אחסון מסוג USB."</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"מאפשר ליישום לכתובת לכרטיס ה-SD."</string>
-    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"שנה/מחק תכנים של מדיית אחסון פנימית"</string>
-    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"מאפשר ליישום לשנות את התכנים של אחסון המדיה הפנימי."</string>
+    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"שנה/מחק תוכן של מדיית אחסון פנימית"</string>
+    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"מאפשר ליישום לשנות את התוכן של מדיית האחסון הפנימית."</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"גישה למערכת הקבצים של הקובץ השמור"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"מאפשר ליישום לקרוא ולכתוב במערכת הקבצים של הקובץ השמור."</string>
     <string name="permlab_use_sip" msgid="5986952362795870502">"בצע/קבל שיחות אינטרנט"</string>
@@ -605,6 +608,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"עבודה"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"אחר"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"הזן קוד PIN"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"הזן סיסמה לביטול הנעילה"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"הזן PIN לביטול נעילה"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"קוד PIN שגוי!"</string>
@@ -648,6 +653,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"סיסמה"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"כניסה"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"שם משתמש או סיסמה לא חוקיים."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"בודק..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"בטל נעילה"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"קול פועל"</string>
@@ -1024,4 +1031,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index c1b9f5d..f9b5c7d 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -257,6 +257,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"入力方法のトップレベルインターフェースに関連付けることを所有者に許可します。通常のアプリケーションにはまったく必要ありません。"</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"壁紙にバインド"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"壁紙のトップレベルインターフェースへのバインドを所有者に許可します。通常のアプリケーションでは不要です。"</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"デバイス管理者との通信"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"デバイス管理者へのintentの送信を所有者に許可します。通常のアプリケーションでは不要です。"</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"画面の向きの変更"</string>
@@ -608,6 +612,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"勤務先"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"その他"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"PINコードを入力"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"ロックを解除するにはパスワードを入力"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"ロックを解除するにはPINを入力"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"PINコードが正しくありません。"</string>
@@ -651,6 +657,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"パスワード"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"ログイン"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"ユーザー名またはパスワードが正しくありません。"</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"確認中..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"ロック解除"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"サウンドON"</string>
@@ -1030,4 +1038,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index eda018d..5ab9684 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -152,8 +152,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"비행기 모드"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"비행기 모드 사용"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"비행기 모드 사용 안함"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100+"</string>
     <string name="safeMode" msgid="2788228061547930246">"안전 모드"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Android 시스템"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"요금이 부과되는 서비스"</string>
@@ -257,6 +256,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"권한을 가진 프로그램이 입력 방법에 대한 최상위 인터페이스를 사용하도록 합니다. 일반 애플리케이션에는 절대로 필요하지 않습니다."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"배경화면 연결"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"권한을 가진 프로그램이 배경화면에 대한 최상위 인터페이스를 사용하도록 합니다. 일반 애플리케이션에는 절대로 필요하지 않습니다."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"기기 관리자와 상호 작용"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"보유자가 기기 관리자에게 인텐트를 보낼 수 있도록 합니다. 일반 애플리케이션에는 절대로 필요하지 않습니다."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"화면 방향 변경"</string>
@@ -466,10 +469,8 @@
     <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"SD 카드 콘텐츠 수정/삭제"</string>
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"애플리케이션에서 USB 저장소의 정보를 변경할 수 있습니다."</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"애플리케이션이 SD 카드에 쓸 수 있도록 합니다."</string>
-    <!-- no translation found for permlab_mediaStorageWrite (6859839199706879015) -->
-    <skip />
-    <!-- no translation found for permdesc_mediaStorageWrite (8232008512478316233) -->
-    <skip />
+    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"내부 미디어 저장소 콘텐츠 수정/삭제"</string>
+    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"애플리케이션이 내부 미디어 저장소의 콘텐츠를 수정할 수 있도록 합니다."</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"캐시 파일시스템 액세스"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"애플리케이션이 캐시 파일시스템을 읽고 쓸 수 있도록 합니다."</string>
     <string name="permlab_use_sip" msgid="5986952362795870502">"인터넷 전화 걸기/받기"</string>
@@ -608,6 +609,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"직장"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"기타"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"PIN 코드 입력"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"잠금을 해제하려면 비밀번호 입력"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"잠금을 해제하려면 PIN 입력"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"PIN 코드가 잘못되었습니다."</string>
@@ -651,6 +654,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"비밀번호"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"로그인"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"사용자 이름 또는 비밀번호가 잘못되었습니다."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"확인 중..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"잠금해제"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"사운드 켜기"</string>
@@ -1030,4 +1035,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml
index f9f01e4..d979c4c 100644
--- a/core/res/res/values-lt/strings.xml
+++ b/core/res/res/values-lt/strings.xml
@@ -151,8 +151,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Lėktuvo režimas"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"ĮJUNGTAS lėktuvo režimas"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"lėktuvo režimas IŠJUNGTAS"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100+"</string>
     <string name="safeMode" msgid="2788228061547930246">"Saugos režimas"</string>
     <string name="android_system_label" msgid="6577375335728551336">"„Android“ sistema"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Paslaugos, už kurias mokėjote"</string>
@@ -256,6 +255,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Leidžia savininkui susisaistyti su įvesties būdo aukščiausio lygio sąsaja. Neturėtų reikėti įprastoms programoms."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"susaistyti su darbalaukio fonu"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Leidžia savininkui susisaistyti su aukščiausio lygio darbalaukio fono sąsaja. Neturėtų reikėti įprastose programose."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"sąveikauti su įrenginio administratoriumi"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Leidžia savininkui siųsti tikslus įrenginio administratoriui. Neturėtų reikėti įprastose programose."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"keisti ekrano padėtį"</string>
@@ -465,7 +468,7 @@
     <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"keisti / ištrinti SD kortelės turinį"</string>
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"Leidžiama programai įrašyti į USB atmintinę."</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"Leidžia programai rašyti į SD kortelę."</string>
-    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"keisti / ištrinti vidinės medijos atmintinės turinį"</string>
+    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"keisti / ištr. vid. med. atm. tur."</string>
     <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Leidžiama programai keisti vidinės medijos atmintinės turinį."</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"pasiekti talpyklos failų sistemą"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Leidžia programai skaityti ir rašyti į talpyklos failų sistemą."</string>
@@ -605,6 +608,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Darbas"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Kita"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Įveskite PIN kodą"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Įveskite slaptažodį, kad atrakintumėte"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Jei norite atrakinti, įveskite PIN kodą"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Neteisingas PIN kodas!"</string>
@@ -648,6 +653,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Slaptažodis"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Prisijungti"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Neteisingas naudotojo vardas ar slaptažodis."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Tikrinama..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Atblokuoti"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Garsas įjungtas"</string>
@@ -1024,4 +1031,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml
index 6d25c54..ad108ff 100644
--- a/core/res/res/values-lv/strings.xml
+++ b/core/res/res/values-lv/strings.xml
@@ -151,8 +151,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Lidojuma režīms"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Lidojuma režīms ir IESLĒGTS."</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Lidojuma režīms ir IZSLĒGTS."</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100+"</string>
     <string name="safeMode" msgid="2788228061547930246">"Drošais režīms"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Android sistēma"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Maksas pakalpojumi"</string>
@@ -256,6 +255,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Ļauj īpašniekam saistīt ar ievades metodes augšējā līmeņa saskarni. Parastajām lietojumprogrammām nekad nav nepieciešama."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"saistīt ar tapeti"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Ļauj īpašniekam saistīties ar tapetes augšējā līmeņa saskarni. Parastajās lietojumprogrammās nekad nav nepieciešama."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"mijiedarboties ar ierīces administratoru"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Ļauj īpašniekam sūtīt nolūkus ierīces administratoram. Nekad nav nepieciešams parastajām lietojumprogrammām."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"mainīt ekrāna orientāciju"</string>
@@ -465,8 +468,8 @@
     <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"pārveidot/dzēst SD kartes saturu"</string>
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"Ļauj lietoj. rakstīt USB kr."</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"Ļauj lietojumprogrammai rakstīt SD kartē."</string>
-    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"pārveidot/dzēst datu nesēja iekšējās krātuves saturu"</string>
-    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Ļauj lietojumprogrammai pārveidot iekšējas datu nesēja krātuves saturu."</string>
+    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"pārv./dz.datu n.iekš.atm.sat."</string>
+    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Ļauj lietojumprogrammai pārveidot datu nesēja iekšējas atmiņas saturu."</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"piekļūt kešatmiņas failu sistēmai"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Ļauj lietojumprogrammai lasīt kešatmiņas failu sistēmu un rakstīt tajā."</string>
     <string name="permlab_use_sip" msgid="5986952362795870502">"veikt/saņemt interneta zvanus"</string>
@@ -605,6 +608,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Darbs"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Cits"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Ievadiet PIN kodu"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Lai atbloķētu, ievadiet paroli."</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Lai atbloķētu, ievadiet PIN"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"PIN kods nav pareizs."</string>
@@ -648,6 +653,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Parole"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Pierakstīties"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Lietotājvārds vai parole nav derīga."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Notiek pārbaude..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Atbloķēt"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Skaņa ir ieslēgta"</string>
@@ -1024,4 +1031,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index aed9163..5a67d6f 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -152,8 +152,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Flymodus"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Flymodus er på"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Flymodus er av"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"Over 100"</string>
     <string name="safeMode" msgid="2788228061547930246">"Sikkermodus"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Android-system"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Betaltjenester"</string>
@@ -257,6 +256,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Lar applikasjonen binde til toppnivågrensesnittet for en inndatametode. Vanlige applikasjoner bør aldri trenge dette."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"bind til bakgrunnsbilde"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Lar innehaveren binde det øverste nivået av grensesnittet til en bakgrunnsbilder. Skal ikke være nødvendig for vanlige programmer."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"kommuniser med enhetsadministrator"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Tillater innehaveren å sende hensikter til enhetsadministrator. Bør aldri være nødvendig for normale programmer."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"snu skjermen"</string>
@@ -466,10 +469,8 @@
     <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"redigere/slette innhold på minnekort"</string>
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"Prog. skriver til USB-lagr."</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"Lar applikasjonen skrive til minnekortet."</string>
-    <!-- no translation found for permlab_mediaStorageWrite (6859839199706879015) -->
-    <skip />
-    <!-- no translation found for permdesc_mediaStorageWrite (8232008512478316233) -->
-    <skip />
+    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"endre eller slette innhold på interne medier"</string>
+    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Tillater et program til å endre innholdet i interne medier."</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"tilgang til bufrede filer"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Tillater et program å lese og skrive til bufrede filer."</string>
     <string name="permlab_use_sip" msgid="5986952362795870502">"foreta/motta Internett-anrop"</string>
@@ -608,6 +609,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Arbeid"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Annen"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Skriv inn PIN-kode:"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Skriv inn passord for å låse opp"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Skriv inn personlig kode for å låse opp"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Gal PIN-kode!"</string>
@@ -651,6 +654,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Passord"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Logg på"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Ugyldig brukernavn eller passord."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Kontrollerer ..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Lås opp"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Lyd på"</string>
@@ -1030,4 +1035,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index 062caee..979b9a3 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -152,8 +152,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Vliegmodus"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Vliegmodus is AAN"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Vliegmodus is UIT"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100+"</string>
     <string name="safeMode" msgid="2788228061547930246">"Veilige modus"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Android-systeem"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Services waarvoor u moet betalen"</string>
@@ -257,6 +256,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Hiermee staat u de houder toe zich te verbinden met de hoofdinterface van een invoermethode. Nooit vereist voor normale toepassingen."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"verbinden met een achtergrond"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Hiermee staat u de houder toe zich te verbinden met de hoofdinterface van een achtergrond. Nooit vereist voor normale toepassingen."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"interactie met apparaatbeheer"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Staat de houder toe intenties te verzenden naar een apparaatbeheerder. Nooit vereist voor normale toepassingen."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"schermstand wijzigen"</string>
@@ -466,10 +469,8 @@
     <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"inhoud op de SD-kaart aanpassen/verwijderen"</string>
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"Hiermee kan een toepassing schrijven naar de USB-opslag."</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"Hiermee kan een toepassing schrijven naar de SD-kaart."</string>
-    <!-- no translation found for permlab_mediaStorageWrite (6859839199706879015) -->
-    <skip />
-    <!-- no translation found for permdesc_mediaStorageWrite (8232008512478316233) -->
-    <skip />
+    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"inh. mediaopsl. wijz./verw."</string>
+    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Hiermee kan een toepassing de inhoud van interne mediaopslag aanpassen."</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"het cachebestandssysteem openen"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Staat een toepassing toe het cachebestandssysteem te lezen en te schrijven."</string>
     <string name="permlab_use_sip" msgid="5986952362795870502">"internetoproepen starten/ontvangen"</string>
@@ -608,6 +609,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Werk"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Overig"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"PIN-code invoeren"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Voer het wachtwoord in om te ontgrendelen"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Voer de PIN-code in om te ontgrendelen"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Onjuiste PIN-code!"</string>
@@ -651,6 +654,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Wachtwoord"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Aanmelden"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Gebruikersnaam of wachtwoord ongeldig."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Controleren..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Ontgrendelen"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Geluid aan"</string>
@@ -1030,4 +1035,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index 868f168..85aeaf4 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -152,8 +152,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Tryb samolotowy"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Tryb samolotowy jest włączony"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Tryb samolotowy jest wyłączony"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100+"</string>
     <string name="safeMode" msgid="2788228061547930246">"Tryb awaryjny"</string>
     <string name="android_system_label" msgid="6577375335728551336">"System Android"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Usługi płatne"</string>
@@ -257,6 +256,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Pozwala na tworzenie powiązania z interfejsem najwyższego poziomu metody wejściowej. To uprawnienie nie powinno być nigdy wymagane przez zwykłe aplikacje."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"powiązanie z tapetą"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Umożliwia posiadaczowi powiązać interfejs najwyższego poziomu dla tapety. Nie powinno być nigdy potrzebne w przypadku zwykłych aplikacji."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"interakcja z administratorem urządzenia"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Zezwala posiadaczowi na wysyłanie informacji o zamiarach do administratora urządzenia. Opcja nie powinna być nigdy potrzebna w przypadku zwykłych aplikacji."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"zmienianie orientacji ekranu"</string>
@@ -466,10 +469,8 @@
     <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"modyfikowanie/usuwanie zawartości karty SD"</string>
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"Umożliwia zapis na nośnik USB."</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"Umożliwia aplikacji zapis na karcie SD."</string>
-    <!-- no translation found for permlab_mediaStorageWrite (6859839199706879015) -->
-    <skip />
-    <!-- no translation found for permdesc_mediaStorageWrite (8232008512478316233) -->
-    <skip />
+    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"modyf./usuw. zawartości pam. wewn."</string>
+    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Zezwala aplikacji na modyfikowanie zawartości pamięci wewnętrznej."</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"dostęp do systemu plików pamięci podręcznej"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Zezwala aplikacji na odczyt i zapis w systemie plików pamięci podręcznej."</string>
     <string name="permlab_use_sip" msgid="5986952362795870502">"nawiązywanie/odbieranie połączeń przez internet"</string>
@@ -608,6 +609,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Służbowy"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Inny"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Wprowadź kod PIN"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Wprowadź hasło, aby odblokować"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Wprowadź kod PIN, aby odblokować"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Błędny kod PIN!"</string>
@@ -651,6 +654,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Hasło"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Zaloguj się"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Błędna nazwa użytkownika lub hasło."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Trwa sprawdzanie..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Odblokuj"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Włącz dźwięk"</string>
@@ -1030,4 +1035,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index f306b8d..bd1cb56 100644
--- a/core/res/res/values-pt-rPT/strings.xml
+++ b/core/res/res/values-pt-rPT/strings.xml
@@ -152,8 +152,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Modo de avião"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"O modo de voo está activado"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"O modo de voo está desactivado"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100+"</string>
     <string name="safeMode" msgid="2788228061547930246">"Modo seguro"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Sistema Android"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Serviços que implicam pagamento"</string>
@@ -257,6 +256,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Permite ao titular vincular a interface de nível superior a um método de entrada de som. Nunca deve ser necessário para aplicações normais."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"vincular a uma imagem de fundo"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Permite ao titular vincular a interface de nível superior de uma imagem de fundo. Nunca deverá ser necessário para aplicações normais."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"interagir com um administrador do dispositivo"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Permite ao titular enviar intenções para um administrador do dispositivo. Nunca deverá ser necessário para aplicações normais."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"mudar orientação do ecrã"</string>
@@ -466,10 +469,8 @@
     <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"modificar/eliminar conteúdo do cartão SD"</string>
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"Permite que uma aplicação escreva no armaz. USB."</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"Permite que uma aplicação escreva no cartão SD."</string>
-    <!-- no translation found for permlab_mediaStorageWrite (6859839199706879015) -->
-    <skip />
-    <!-- no translation found for permdesc_mediaStorageWrite (8232008512478316233) -->
-    <skip />
+    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"modificar/eliminar conteúdo de suportes de armazenamento interno"</string>
+    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Permite à aplicação modificar o conteúdo dos suportes de armazenamento interno."</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"aceder ao sistema de ficheiros da cache"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Permite a uma aplicação ler e escrever no sistema de ficheiros da cache."</string>
     <string name="permlab_use_sip" msgid="5986952362795870502">"fazer/receber chamadas pela internet"</string>
@@ -608,6 +609,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Emprego"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Outro"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Introduzir código PIN"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Introduza a palavra-passe para desbloquear"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Introduza o PIN para desbloquear"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Código PIN incorrecto!"</string>
@@ -651,6 +654,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Palavra-passe"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Iniciar sessão"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Nome de utilizador ou palavra-passe inválidos."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"A verificar..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Desbloquear"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Som activado"</string>
@@ -1030,4 +1035,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index 7cd6cc4..6cf4404 100644
--- a/core/res/res/values-pt/strings.xml
+++ b/core/res/res/values-pt/strings.xml
@@ -257,6 +257,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Permite que o detentor se sujeite à interface de nível superior de um método de entrada. Aplicativos normais não devem precisar disso em momento algum."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"sujeitar-se a um plano de fundo"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Permite que o detentor se sujeite à interface de nível superior de um plano de fundo. Aplicativos normais não devem precisar disso em momento algum."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"interagir com o administrador de um dispositivo"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Permite que o detentor envie tentativas ao administrador de um dispositivo. Não é necessário para aplicativos normais."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"alterar orientação da tela"</string>
@@ -608,6 +612,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Comercial"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Outros"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Digite o código PIN"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Digite a senha para desbloquear"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Digite o PIN para desbloquear"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Código PIN incorreto!"</string>
@@ -651,6 +657,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Senha"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Fazer login"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Nome de usuário ou senha inválidos."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Verificando..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Desbloquear"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Som ativado"</string>
@@ -1030,4 +1038,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-rm/strings.xml b/core/res/res/values-rm/strings.xml
index a3d8191..54fb39e 100644
--- a/core/res/res/values-rm/strings.xml
+++ b/core/res/res/values-rm/strings.xml
@@ -259,6 +259,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Permetta da sa fixar al nivel d\'interfatscha pli aut dad ina metoda d\'endataziun. Betg previs per applicaziuns normalas."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"sa fixar vid in fund davos"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Permetta da sa fixar al nivel d\'interfatscha pli aut dad ina metoda d\'endataziun. Betg previs per applicaziuns normalas."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"interacziun cun in administratur dad apparats"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Permetta al possessur da trametter intenziuns a l\'administratur dal apparat periferic. Betg previs per applicaziuns normalas."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"midar l\'orientaziun dal visur"</string>
@@ -636,6 +640,8 @@
     <!-- no translation found for sipAddressTypeOther (4408436162950119849) -->
     <skip />
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Endatar il code PIN"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Endatai il pled-clav per debloccar."</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Endatar il PIN per debloccar"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Code PIN nuncorrect!"</string>
@@ -681,6 +687,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Pled-clav"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"S\'annunziar"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Num d\'utilisader u pled-clav nunvalid."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Verifitgar..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Debloccar"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Tun activà"</string>
@@ -1089,4 +1097,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index 07a6213..52f30c2 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -151,8 +151,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Mod Avion"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Modul Avion este ACTIVAT"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Modul avion este DEZACTIVAT"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100 +"</string>
     <string name="safeMode" msgid="2788228061547930246">"Mod sigur"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Sistemul Android"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Servicii cu plată"</string>
@@ -256,6 +255,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Permite deţinătorului să se conecteze la interfaţa de nivel superior a unei metode de intrare. Nu ar trebui să fie niciodată necesară pentru aplicaţiile obişnuite."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"conectare la o imagine de fundal"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Permite proprietarului să se conecteze la interfaţa de nivel superior a unei imagini de fundal. Nu ar trebui să fie niciodată necesară pentru aplicaţiile obişnuite."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"interacţionare cu administratorul unui dispozitiv"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Permite proprietarului să trimită intenţii către un administrator al dispozitivului. Nu ar trebui să fie niciodată necesară pentru aplicaţiile obişnuite."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"modificare orientare ecran"</string>
@@ -465,7 +468,7 @@
     <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"modificare/ştergere conţinut card SD"</string>
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"Permite unei apl. să scrie în stoc. USB."</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"Permite unei aplicaţii să scrie pe cardul SD."</string>
-    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"modificare/ştergere a conţinutului din stocarea media internă"</string>
+    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"mod./şt. con. stoc. media int."</string>
     <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Permite unei aplicaţii să modifice conţinutul stocării media interne."</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"accesare sistem de fişiere cache"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Permite unei aplicaţii să scrie şi să citească sistemul de fişiere cache."</string>
@@ -605,6 +608,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Serviciu"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Altul"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Introduceţi codul PIN"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Introduceţi parola pentru a debloca"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Introduceţi PIN pentru deblocare"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Cod PIN incorect!"</string>
@@ -648,6 +653,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Parolă"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Conectaţi-vă"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Nume de utilizator sau parolă nevalide."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Se verifică..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Deblocaţi"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Sunet activat"</string>
@@ -1024,4 +1031,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index dfc5d08..46261d1 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -152,8 +152,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Режим полета"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Режим полета ВКЛЮЧЕН"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Режим полета ВЫКЛЮЧЕН"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100+"</string>
     <string name="safeMode" msgid="2788228061547930246">"Безопасный режим"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Система Android"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Платные услуги"</string>
@@ -257,6 +256,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Позволяет выполнять привязку к интерфейсу ввода верхнего уровня. Не требуется для обычных приложений."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"связать с фоновым рисунком"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Разрешает выполнять привязку к интерфейсу фонового рисунка верхнего уровня. Не требуется для обычных приложений."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"взаимодействовать с администратором устройства"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Позволяет владельцу отправлять целевые значения администратору устройства. Никогда не используется обычными приложениями."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"изменять ориентацию экрана"</string>
@@ -466,10 +469,8 @@
     <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"изменять/удалять содержимое SD-карты"</string>
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"Разрешает приложению запись на USB-накопитель."</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"Разрешает приложению запись на SD-карту"</string>
-    <!-- no translation found for permlab_mediaStorageWrite (6859839199706879015) -->
-    <skip />
-    <!-- no translation found for permdesc_mediaStorageWrite (8232008512478316233) -->
-    <skip />
+    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"изм./удал. содерж. мультимедиа"</string>
+    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Позволяет приложению изменять содержание внутреннего хранилища мультимедиа."</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"получать доступ к кэшу файловой системы"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Разрешает программам доступ для записи и чтения к кэшу файловой системы."</string>
     <string name="permlab_use_sip" msgid="5986952362795870502">"совершать и принимать интернет-вызовы"</string>
@@ -608,6 +609,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Рабочий"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Другой"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Введите PIN-код"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Введите пароль для разблокировки"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Введите PIN-код для разблокировки"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Неверный PIN-код!"</string>
@@ -651,6 +654,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Пароль"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Вход"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Неверное имя пользователя или пароль."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Проверка..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Разблокировать"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Вкл. звук"</string>
@@ -669,7 +674,7 @@
     <string name="js_dialog_before_unload" msgid="1901675448179653089">"Перейти с этой страницы?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Нажмите \"ОК\", чтобы продолжить, или \"Отмена\", чтобы остаться на текущей странице."</string>
     <string name="save_password_label" msgid="6860261758665825069">"Подтвердите"</string>
     <string name="double_tap_toast" msgid="1068216937244567247">"Совет: нажмите дважды, чтобы увеличить и уменьшить масштаб."</string>
-    <string name="autofill_this_form" msgid="1272247532604569872">"Автозап."</string>
+    <string name="autofill_this_form" msgid="1272247532604569872">"Автозаполнение"</string>
     <string name="setup_autofill" msgid="8154593408885654044">"Нужна настройка"</string>
     <string name="autofill_address_name_separator" msgid="2504700673286691795">" "</string>
     <!-- no translation found for autofill_address_summary_name_format (3268041054899214945) -->
@@ -692,7 +697,7 @@
     <string name="save_password_never" msgid="8274330296785855105">"Никогда"</string>
     <string name="open_permission_deny" msgid="5661861460947222274">"У вас нет разрешения на открытие этой страницы."</string>
     <string name="text_copied" msgid="4985729524670131385">"Текст скопирован в буфер обмена."</string>
-    <string name="more_item_label" msgid="4650918923083320495">"Дополнительно"</string>
+    <string name="more_item_label" msgid="4650918923083320495">"Ещё"</string>
     <string name="prepend_shortcut_label" msgid="2572214461676015642">"Меню+"</string>
     <string name="menu_space_shortcut_label" msgid="2410328639272162537">"пробел"</string>
     <string name="menu_enter_shortcut_label" msgid="2743362785111309668">"ввод"</string>
@@ -1030,4 +1035,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index e7bbaf6..0722bc9 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -151,8 +151,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Režim V lietadle"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Režim V lietadle je ZAPNUTÝ"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Režim V lietadle je VYPNUTÝ"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100+"</string>
     <string name="safeMode" msgid="2788228061547930246">"Núdzový režim"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Systém Android"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Spoplatnené služby"</string>
@@ -256,6 +255,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Umožňuje držiteľovi viazať sa na najvyššiu úroveň rozhrania metódy vstupu. Bežné aplikácie by toto nastavenie nemali vôbec využívať."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"väzba na tapetu"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Umožňuje držiteľovi viazať sa na najvyššiu úroveň rozhrania tapety. Bežné aplikácie by toto nastavenie vôbec nemali využívať."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"komunikovať so správcom zariadenia"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Umožňuje držiteľovi odosielať informácie správcovi zariadenia. Bežné aplikácie by toto oprávnenie nemali nikdy požadovať."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"zmena orientácie obrazovky"</string>
@@ -605,6 +608,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Práca"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Iné"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Zadajte kód PIN"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Zadajte heslo pre odomknutie"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Zadajte kód PIN pre odomknutie"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Nesprávny kód PIN"</string>
@@ -648,6 +653,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Heslo"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Prihlásiť sa"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Neplatné používateľské meno alebo heslo."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Prebieha kontrola..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Odomknúť"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Zapnúť zvuk"</string>
@@ -1024,4 +1031,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index c6b4302..1587d2e 100644
--- a/core/res/res/values-sl/strings.xml
+++ b/core/res/res/values-sl/strings.xml
@@ -151,8 +151,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Način za letalo"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Način za letalo je VKLOPLJEN"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Način za letalo je IZKLOPLJEN"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100 +"</string>
     <string name="safeMode" msgid="2788228061547930246">"Varni način"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Sistem Android"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Plačljive storitve"</string>
@@ -256,6 +255,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Dovoljuje lastniku, da se poveže z vmesnikom načina vnosa najvišje ravni. Tega nikoli ni treba uporabiti za navadne programe."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"povezovanje z ozadjem"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Dovoljuje, da se lastnik poveže z vmesnikom ozadja najvišje ravni. Tega nikoli ni treba uporabiti za navadne programe."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"interakcija s skrbnikom naprave"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Dovoljuje lastniku, da pošlje namere skrbniku naprave. Nikoli se ne uporablja za navadne programe."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"spreminjanje usmerjenosti zaslona"</string>
@@ -605,6 +608,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Služba"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Drugo"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Vnesite kodo PIN"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Vnesite geslo za odklop"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Vnesite PIN za odklepanje"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Nepravilna koda PIN."</string>
@@ -648,6 +653,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Geslo"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Prijava"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Neveljavno uporabniško ime ali geslo."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Preverjanje ..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Odkleni"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Vklopi zvok"</string>
@@ -1024,4 +1031,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index 0493685..dcf9f1a 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -151,8 +151,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Режим рада у авиону"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Режим рада у авиону је УКЉУЧЕН"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Режим рада у авиону је ИСКЉУЧЕН"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100+"</string>
     <string name="safeMode" msgid="2788228061547930246">"Безбедни режим"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Android систем"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Услуге које се плаћају"</string>
@@ -256,6 +255,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Омогућава власнику да се обавеже на интерфејс методе уноса највишег нивоа. Обичне апликације никада не би требало да је користе."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"обавезивање на позадину"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Омогућава власнику да се обавеже на интерфејс позадине највишег нивоа. Обичне апликације никада не би требало да је користе."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"интеракција са администратором уређаја"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Омогућава власнику да шаље своје намере администратору уређаја. Обичне апликације никада не би требало да је користе."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"промена положаја екрана"</string>
@@ -605,6 +608,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Посао"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Други"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Унесите PIN кôд"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Унесите лозинку за откључавање"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Унесите PIN да бисте откључали тастатуру"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"PIN кôд је нетачан!"</string>
@@ -648,6 +653,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Лозинка"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Пријави ме"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Неважеће корисничко име или лозинка."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Проверавање..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Откључај"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Укључи звук"</string>
@@ -1024,4 +1031,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index a60e7f9..13cd84c 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -152,8 +152,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Flygplansläge"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Flygplansläge är AKTIVERAT"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Flygplansläge är INAKTIVERAT"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"&gt;100"</string>
     <string name="safeMode" msgid="2788228061547930246">"Säkert läge"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Android-system"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Tjänster som kostar pengar"</string>
@@ -257,6 +256,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Innehavaren tillåts att binda till den översta nivåns gränssnitt för en inmatningsmetod. Ska inte behövas för vanliga program."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"binda till en bakgrund"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Innehavaren tillåts att binda till den översta nivåns gränssnitt för en bakgrund. Ska inte behövas för vanliga program."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"arbeta med en enhetsadministratör"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Tillåter att innehavaren skickar avsikter till en enhetsadministratör. Vanliga program behöver aldrig göra detta."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"ändra bildskärmens rikting"</string>
@@ -466,10 +469,8 @@
     <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"ändra/ta bort innehåll på SD-kortet"</string>
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"Får skriva till USB-enheten."</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"Tillåter att ett program skriver till SD-kortet."</string>
-    <!-- no translation found for permlab_mediaStorageWrite (6859839199706879015) -->
-    <skip />
-    <!-- no translation found for permdesc_mediaStorageWrite (8232008512478316233) -->
-    <skip />
+    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"ändra/ta bort innehåll"</string>
+    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Tillåter att en app ändrar innehållet på den interna lagringsenheten."</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"åtkomst till cachefilsystemet"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Tillåter att ett program läser och skriver till cachefilsystemet."</string>
     <string name="permlab_use_sip" msgid="5986952362795870502">"ringa/ta emot Internetsamtal"</string>
@@ -608,6 +609,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Arbete"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Övrigt"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Ange PIN-kod"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Ange lösenord för att låsa upp"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Ange PIN-kod för att låsa upp"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Fel PIN-kod!"</string>
@@ -651,6 +654,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Lösenord"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Logga in"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Ogiltigt användarnamn eller lösenord."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Kontrollerar ..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Lås upp"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Ljud på"</string>
@@ -1030,4 +1035,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml
index f192c6d..30a5ee7 100644
--- a/core/res/res/values-th/strings.xml
+++ b/core/res/res/values-th/strings.xml
@@ -151,8 +151,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"โหมดใช้งานบนเครื่องบิน"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"เปิดโหมดใช้งานบนเครื่องบิน"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"โหมดใช้งานบนเครื่องบินปิดทำงานอยู่"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100+"</string>
     <string name="safeMode" msgid="2788228061547930246">"โหมดปลอดภัย"</string>
     <string name="android_system_label" msgid="6577375335728551336">"ระบบ Android"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"บริการที่ต้องเสียค่าใช้จ่าย"</string>
@@ -256,6 +255,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"อนุญาตให้ผู้ถือเชื่อมโยงกับอินเทอร์เฟซระดับสูงสุดของวิธีป้อนข้อมูล ไม่ควรต้องใช้สำหรับแอปพลิเคชันทั่วไป"</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"เชื่อมโยงกับวอลเปเปอร์"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"อนุญาตให้ผู้ถือเชื่อมโยงกับอินเทอร์เฟซระดับสูงสุดของวอลเปเปอร์ ไม่ควรต้องใช้สำหรับแอปพลิเคชันทั่วไป"</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"ติดต่อกับผู้ดูแลอุปกรณ์"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"อนุญาตให้ผู้ถือส่งเนื้อหาไปยังโปรแกรมควบคุมอุปกรณ์ ไม่ควรต้องใช้สำหรับแอปพลิเคชันทั่วไป"</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"เปลี่ยนการวางแนวหน้าจอ"</string>
@@ -465,7 +468,7 @@
     <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"แก้ไข/ลบข้อมูลการ์ด SD"</string>
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"อนุญาตให้แอปพลิเคชันเขียนไปยังที่เก็บข้อมูล USB"</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"อนุญาตให้แอปพลิเคชันเขียนลงบนการ์ด SD"</string>
-    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"แก้ไข/ลบเนื้อหาของที่เก็บข้อมูลสื่อภายใน"</string>
+    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"แก้/ลบเนื้อหาข้อมูลสื่อภายใน"</string>
     <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"อนุญาตให้แอปพลิเคชันแก้ไขเนื้อหาของที่เก็บข้อมูลสื่อภายใน"</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"เข้าถึงระบบไฟล์แคช"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"อนุญาตให้แอปพลิเคชันอ่านและเขียนระบบไฟล์แคช"</string>
@@ -605,6 +608,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"ที่ทำงาน"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"อื่นๆ"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"ป้อนรหัส PIN"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"ป้อนรหัสผ่านเพื่อปลดล็อก"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"ป้อน PIN เพื่อปลดล็อก"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"รหัส PIN ไม่ถูกต้อง!"</string>
@@ -648,6 +653,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"รหัสผ่าน"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"ลงชื่อเข้าใช้"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"ชื่อผู้ใช้หรือรหัสผ่านไม่ถูกต้อง"</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"กำลังตรวจสอบ..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"ปลดล็อก"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"เปิดเสียง"</string>
@@ -1024,4 +1031,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml
index d42ef28..577accb 100644
--- a/core/res/res/values-tl/strings.xml
+++ b/core/res/res/values-tl/strings.xml
@@ -151,8 +151,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Airplane mode"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Naka-ON ang airplane mode"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Naka-OFF ang airplane mode"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100+"</string>
     <string name="safeMode" msgid="2788228061547930246">"Safe mode"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Android System"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Mga serbisyong ginagastusan mo"</string>
@@ -256,6 +255,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Pinapayagan ang holder na sumailalim sa nangungunang antas na interface ng pamamaraan ng pag-input. Hindi dapat kailanmang kailanganin para sa mga normal na application."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"sumailalim sa wallpaper"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Pinapayagan ang holder na sumailalim sa interface na nasa nangungunang antas ng wallpaper. Hindi kailanman dapat na kailanganin para sa mga normal na application."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"makipag-ugnay sa tagapangasiwa ng device"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Pinapayagan ang holder na magpadala ng mga intensyon sa administrator ng device. Hindi kailanman dapat kailanganin para sa mga normal na application."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"baguhin ang orientation ng screen"</string>
@@ -605,6 +608,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Trabaho"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Iba pa"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Ipasok ang PIN code"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Ipasok ang password upang i-unlock"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Ipasok ang PIN upang i-unlock"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Maling PIN code!"</string>
@@ -648,6 +653,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Password"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Mag-sign in"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Di-wastong username o password."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Sinusuri..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"I-unlock"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"I-on ang tunog"</string>
@@ -1024,4 +1031,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index 8b338dd..45bc2b2 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -152,8 +152,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Uçak modu"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Uçak modu AÇIK"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Uçak modu KAPALI"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100+"</string>
     <string name="safeMode" msgid="2788228061547930246">"Güvenli mod"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Android Sistemi"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Size maliyet getiren hizmetler"</string>
@@ -257,6 +256,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Tutucunun bir giriş yönteminin en üst düzey arayüzüne bağlanmasına izin verir. Normal uygulamalarda hiçbir zaman gerek duyulmamalıdır."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"bir duvar kağıdına tabi kıl"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Hesap sahibine bir duvar kağıdının en üst düzey arayüzüne bağlanma izni verir. Normal uygulamalarda hiçbir zaman gerek duyulmamalıdır."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"bir cihaz yöneticisi ile etkileşimde bulun"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Cihazın sahibinin cihaz yöneticisine amaç göndermesine izin verir. Normal uygulamalarda hiçbir zaman gerek duyulmamalıdır."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"ekran yönünü değiştir"</string>
@@ -466,10 +469,8 @@
     <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"SD kart içeriklerini değiştir/sil"</string>
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"Uygulamanın USB dep birimine yazmasına izni verir."</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"Bir uygulamaya SD karta yazma izni verir."</string>
-    <!-- no translation found for permlab_mediaStorageWrite (6859839199706879015) -->
-    <skip />
-    <!-- no translation found for permdesc_mediaStorageWrite (8232008512478316233) -->
-    <skip />
+    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"dahili medya depolama birimi içeriğini değiştir/sil"</string>
+    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Uygulamaya, dahili medya depolama içeriğini değiştirme izni verir."</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"önbellek dosya sistemine eriş"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Bir uygulamanın önbellek dosya sisteminde okuma yazma yapmasına izin verir."</string>
     <string name="permlab_use_sip" msgid="5986952362795870502">"İnternet çağrılar yap/alma"</string>
@@ -608,6 +609,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"İş"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Diğer"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"PIN kodunu gir"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Kilidi açmak için şifreyi girin"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Kilidi açmak için PIN\'i girin"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Yanlış PIN kodu!"</string>
@@ -651,6 +654,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Şifre"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Oturum aç"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Geçersiz kullanıcı adı veya şifre."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Kontrol ediliyor..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Kilit Aç"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Sesi aç"</string>
@@ -1030,4 +1035,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml
index 6e5fdaa..7d5a8f54 100644
--- a/core/res/res/values-uk/strings.xml
+++ b/core/res/res/values-uk/strings.xml
@@ -151,8 +151,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Режим польоту"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Режим польоту ВВІМК."</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Режим польоту ВИМК."</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100+"</string>
     <string name="safeMode" msgid="2788228061547930246">"Безп. режим"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Система Android"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Служби, які потребують оплати"</string>
@@ -256,6 +255,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Дозволяє власнику прив\'язувати до інтерфейсу верхнього рівня методу введення. Ніколи не потрібний для звичайних програм."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"прив\'зати до фон. мал."</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Дозволяє власнику прив\'язувати до інтерфейсу верхнього рівня фон. малюнка. Ніколи не потрібний для звичайних програм."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"взаємодіяти з адмін. пристрою"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Дозволяє власнику надсилати цілі адміністратору пристрою. Ніколи не потрібний для звичайних програм."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"змінювати орієнтацію екрана"</string>
@@ -465,8 +468,8 @@
     <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"змінювати/видал. вміст карти SD"</string>
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"Дозволяє програмі записувати на носій USB."</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"Дозволяє програмі записувати на карту SD."</string>
-    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"змін./видаляти вміст внутр. сховища медіа-файлів"</string>
-    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Дозволяє програмі змінювати вміст внутрішнього сховища медіа-файлів."</string>
+    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"змінювати/видаляти вміст внутр. сховища даних"</string>
+    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Дозволяє програмі змінювати вміст внутрішнього сховища даних."</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"отр. дост. до файл. сист. кешу"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Дозволяє програмі зчитувати та записувати файлову сист. кешу."</string>
     <string name="permlab_use_sip" msgid="5986952362795870502">"здійсн./отрим. Інтернет-дзвін."</string>
@@ -605,6 +608,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Робоча"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Інша"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Введіть PIN-код"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Введіть пароль, щоб розбл."</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Введ. PIN для розблок."</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Неправильний PIN-код!"</string>
@@ -648,6 +653,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Пароль"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Увійти"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Недійсне ім\'я корист. чи пароль."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Перевірка..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Розблок."</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Увімк. звук"</string>
@@ -1024,4 +1031,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml
index 08c8990..9f0a4f5 100644
--- a/core/res/res/values-vi/strings.xml
+++ b/core/res/res/values-vi/strings.xml
@@ -151,8 +151,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Chế độ trên máy bay"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Chế độ trên máy bay BẬT"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Chế độ trên máy bay TẮT"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100+"</string>
     <string name="safeMode" msgid="2788228061547930246">"Chế độ an toàn"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Hệ thống Android"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Dịch vụ tính tiền của bạn"</string>
@@ -256,6 +255,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Cho phép chủ nhân ràng buộc với giao diện cấp cao nhất của phương thức nhập. Không cần thiết cho các ứng dụng thông thường."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"liên kết với hình nền"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Cho phép chủ nhân ràng buộc với giao diện cấp cao nhất của hình nền. Không cần thiết cho các ứng dụng thông thường."</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"tương tác với quản trị viên thiết bị"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Cho phép chủ nhân gửi các ý định đến quản trị viên thiết bị. Không cần thiết cho các ứng dụng thông thường."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"thay đổi hướng màn hình"</string>
@@ -466,7 +469,7 @@
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"C.phép ứ.dụng ghi vào b.nhớ USB."</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"Cho phép ứng dụng ghi vào thẻ SD."</string>
     <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"sửa đổi/xóa nội dung trên bộ nhớ phương tiện cục bộ"</string>
-    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Cho phép ứng dụng sửa đổi nội dung của bộ nhớ phương tiện nội bộ."</string>
+    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Cho phép ứng dụng sửa đổi nội dung của bộ nhớ phương tiện cục bộ."</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"truy cập hệ thống tệp bộ nhớ cache"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Cho phép ứng dụng đọc và ghi hệ thống tệp bộ nhớ cache."</string>
     <string name="permlab_use_sip" msgid="5986952362795870502">"thực hiện/nhận cuộc gọi qua Internet"</string>
@@ -605,6 +608,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Cơ quan"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Khác"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Nhập mã PIN"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Nhập mật khẩu để mở khoá"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"Nhập PIN để mở khóa"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Mã PIN không chính xác!"</string>
@@ -648,6 +653,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Mật khẩu"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Đăng nhập"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Tên người dùng hoặc mật khẩu không hợp lệ."</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Đang kiểm tra..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"Mở khoá"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Bật âm thanh"</string>
@@ -1024,4 +1031,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index ecfdd63..f69f965 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -257,6 +257,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"允许手机用户绑定至输入法的顶级界面。普通应用程序从不需要使用此权限。"</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"绑定到壁纸"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"允许手机用户绑定到壁纸的顶级界面。应该从不需要将此权限授予普通应用程序。"</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"与设备管理器交互"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"允许持有对象将意向发送到设备管理器。普通的应用程序一律无需此权限。"</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"更改屏幕显示方向"</string>
@@ -608,6 +612,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"单位"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"其他"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"输入 PIN 码"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"输入密码进行解锁"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"输入 PIN 进行解锁"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"PIN 码不正确!"</string>
@@ -651,6 +657,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"密码"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"登录"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"用户名或密码无效。"</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"正在检查..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"解锁"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"打开声音"</string>
@@ -1030,4 +1038,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index 28cb8b2..a584cd3 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -152,8 +152,7 @@
     <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"飛航模式"</string>
     <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"飛航模式為 [開啟]"</string>
     <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"飛航模式為 [關閉]"</string>
-    <!-- no translation found for status_bar_notification_info_overflow (5833510281787786290) -->
-    <skip />
+    <string name="status_bar_notification_info_overflow" msgid="5833510281787786290">"100+"</string>
     <string name="safeMode" msgid="2788228061547930246">"安全模式"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Android 系統"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"需要額外費用的服務。"</string>
@@ -257,6 +256,10 @@
     <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"允許擁有人連結至輸入法的最頂層介面。一般應用程式不需使用此選項。"</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"連結至桌布"</string>
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"允許擁有人連結至桌布的最頂層介面,一般應用程式不需使用此選項。"</string>
+    <!-- no translation found for permlab_bindRemoteViews (5697987759897367099) -->
+    <skip />
+    <!-- no translation found for permdesc_bindRemoteViews (2930855984822926963) -->
+    <skip />
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"與裝置管理員互動"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"允許應用程式將調用請求 (intent) 傳送至裝置管理員;一般應用程式不需使用此選項。"</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"變更螢幕顯示方向"</string>
@@ -466,10 +469,8 @@
     <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"修改/刪除 SD 卡的內容"</string>
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"允許應用程式寫入 USB 儲存裝置。"</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"允許應用程式寫入 SD 卡。"</string>
-    <!-- no translation found for permlab_mediaStorageWrite (6859839199706879015) -->
-    <skip />
-    <!-- no translation found for permdesc_mediaStorageWrite (8232008512478316233) -->
-    <skip />
+    <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"修改/刪除內部媒體儲存裝置內容"</string>
+    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"允許應用程式修改內部媒體儲存裝置內容。"</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"存取快取檔案系統"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"允許應用程式讀取及寫入快取檔案系統。"</string>
     <string name="permlab_use_sip" msgid="5986952362795870502">"撥打/接聽網路電話"</string>
@@ -608,6 +609,8 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"公司"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"其他"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"輸入 PIN 碼"</string>
+    <!-- no translation found for keyguard_password_entry_touch_hint (7906561917570259833) -->
+    <skip />
     <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"輸入密碼即可解鎖"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="638347075625491514">"輸入 PIN 進行解鎖"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"PIN 碼錯誤!"</string>
@@ -651,6 +654,8 @@
     <string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"密碼"</string>
     <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"登入"</string>
     <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"使用者名稱或密碼錯誤。"</string>
+    <!-- no translation found for lockscreen_glogin_account_recovery_hint (8253152905532900548) -->
+    <skip />
     <string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"檢查中..."</string>
     <string name="lockscreen_unlock_label" msgid="737440483220667054">"解除封鎖"</string>
     <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"開啟音效"</string>
@@ -1030,4 +1035,12 @@
     <skip />
     <!-- no translation found for sync_do_nothing (8717589462945226869) -->
     <skip />
+    <!-- no translation found for vpn_notification_title_connected (3197819122581348515) -->
+    <skip />
+    <!-- no translation found for vpn_notification_title_disconnected (4614192702448522822) -->
+    <skip />
+    <!-- no translation found for vpn_notification_hint_disconnected (4689796928510104200) -->
+    <skip />
+    <!-- no translation found for choose_account_label (4191313562041125787) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index c808a07..260c7c6 100755
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -223,6 +223,9 @@
         <!-- The preferred right bound for an expandable list child's indicator. -->
         <attr name="expandableListPreferredChildIndicatorRight" format="dimension" />
 
+        <!-- The preferred item height for dropdown lists. -->
+        <attr name="dropdownListPreferredItemHeight" format="dimension" />
+
         <!-- ============= -->
         <!-- Window styles -->
         <!-- ============= -->
@@ -1829,7 +1832,7 @@
         </attr>
         
         <!-- Specifies the type of layer backing this view. The default value is none.
-             Refer to {@link android.view.View#setLayerType(int, android.graphics.Paint)
+             Refer to {@link android.view.View#setLayerType(int, android.graphics.Paint)}
              for more information.-->
         <attr name="layerType">
             <!-- Don't use a layer. -->
diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml
index 1a6f404..ff9ef59 100644
--- a/core/res/res/values/colors.xml
+++ b/core/res/res/values/colors.xml
@@ -56,8 +56,8 @@
     <color name="hint_foreground_light">#808080</color>
     <color name="highlight_background">#cc475925</color>
     <color name="highlight_background_inverse">#ccd2e461</color>
-    <color name="highlighted_text_dark">#cc475925</color>
-    <color name="highlighted_text_light">#ccd2e461</color>
+    <color name="highlighted_text_dark">#9983CC39</color>
+    <color name="highlighted_text_light">#9983CC39</color>
     <color name="link_text_dark">#5c5cff</color>
     <color name="link_text_light">#0000ee</color>
 
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index 36dec8e..385b2e6 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -1065,19 +1065,20 @@
     </style>
 
     <style name="TextAppearance.Widget.ActionBar.Title"
-           parent="@android:style/TextAppearance.Medium.Inverse">
+           parent="@android:style/TextAppearance.Medium">
     </style>
 
     <style name="TextAppearance.Widget.ActionBar.Subtitle"
-           parent="@android:style/TextAppearance.Small.Inverse">
+           parent="@android:style/TextAppearance.Small">
     </style>
 
     <style name="TextAppearance.Widget.ActionMode.Title"
-           parent="@android:style/TextAppearance.Medium.Inverse">
+           parent="@android:style/TextAppearance.Medium">
     </style>
 
     <style name="TextAppearance.Widget.ActionMode.Subtitle"
-           parent="@android:style/TextAppearance.Small.Inverse">
+           parent="@android:style/TextAppearance.Small">
+        <item name="android:textColor">?android:attr/textColorSecondary</item>
     </style>
 
     <style name="Widget.ActionButton">
@@ -1266,11 +1267,9 @@
     </style>
 
     <style name="TextAppearance.Holo.Widget.ActionMode.Title" parent="TextAppearance.Widget.ActionMode.Title">
-        <item name="android:textColor">?android:attr/textColorPrimary</item>
     </style>
 
     <style name="TextAppearance.Holo.Widget.ActionMode.Subtitle" parent="TextAppearance.Widget.ActionMode.Subtitle">
-        <item name="android:textColor">?android:attr/textColorSecondary</item>
     </style>
 
     <style name="TextAppearance.Holo.Widget.Switch" parent="TextAppearance.Holo.Small">
@@ -1369,11 +1368,9 @@
     </style>
 
     <style name="TextAppearance.Holo.Light.Widget.ActionMode.Title" parent="TextAppearance.Widget.ActionMode.Title">
-        <item name="android:textColor">?android:attr/textColorPrimary</item>
     </style>
 
     <style name="TextAppearance.Holo.Light.Widget.ActionMode.Subtitle" parent="TextAppearance.Widget.ActionMode.Subtitle">
-        <item name="android:textColor">?android:attr/textColorPrimary</item>
     </style>
 
     <style name="TextAppearance.Holo.Light.WindowTitle">
@@ -1402,6 +1399,7 @@
         <item name="android:textAppearance">?android:attr/textAppearanceMedium</item>
         <item name="android:textColor">@android:color/primary_text_holo_dark</item>
         <item name="android:minHeight">48dip</item>
+        <item name="android:minWidth">64dip</item>
     </style>
 
     <style name="Widget.Holo.Button.Borderless">
@@ -1409,10 +1407,11 @@
     </style>
 
     <style name="Widget.Holo.Button.Small">
-        <item name="android:background">@android:drawable/btn_default_small_holo_dark</item>
+        <item name="android:background">@android:drawable/btn_default_holo_dark</item>
         <item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
         <item name="android:textColor">@android:color/primary_text_holo_dark</item>
         <item name="android:minHeight">48dip</item>
+        <item name="android:minWidth">48dip</item>
     </style>
 
     <style name="Widget.Holo.Button.Inset">
@@ -1791,6 +1790,7 @@
         <item name="android:textAppearance">?android:attr/textAppearanceMediumInverse</item>
         <item name="android:textColor">@android:color/primary_text_holo_light</item>
         <item name="android:minHeight">48dip</item>
+        <item name="android:minWidth">64dip</item>
     </style>
 
     <style name="Widget.Holo.Light.Button.Borderless">
@@ -1798,10 +1798,11 @@
     </style>
 
     <style name="Widget.Holo.Light.Button.Small">
-        <item name="android:background">@android:drawable/btn_default_small_holo_light</item>
+        <item name="android:background">@android:drawable/btn_default_holo_light</item>
         <item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
         <item name="android:textColor">@android:color/primary_text_holo_light</item>
         <item name="android:minHeight">48dip</item>
+        <item name="android:minWidth">48dip</item>
     </style>
 
     <style name="Widget.Holo.Light.Button.Inset">
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index 08542bf..ddaeb82 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -95,6 +95,8 @@
 
         <!-- List attributes -->
         <item name="listPreferredItemHeight">64dip</item>
+        <item name="dropdownListPreferredItemHeight">64dip</item>
+
         <!-- @hide -->
         <item name="searchResultListItemHeight">58dip</item>
         <item name="listDivider">@drawable/divider_horizontal_dark</item>
@@ -253,7 +255,7 @@
         <item name="actionDropDownStyle">@android:style/Widget.Spinner.DropDown</item>
         <item name="actionButtonStyle">@android:style/Widget.ActionButton</item>
         <item name="actionOverflowButtonStyle">@android:style/Widget.ActionButton.Overflow</item>
-        <item name="actionModeBackground">@android:drawable/action_bar_context_background</item>
+        <item name="actionModeBackground">@android:drawable/cab_background_dark</item>
         <item name="actionModeCloseDrawable">@android:drawable/ic_menu_close_clear_cancel</item>
         <item name="actionModeCutDrawable">@android:drawable/ic_menu_cut_dark</item>
         <item name="actionModeCopyDrawable">@android:drawable/ic_menu_copy_dark</item>
@@ -376,6 +378,8 @@
         <item name="actionModeCutDrawable">@android:drawable/ic_menu_cut_light</item>
         <item name="actionModeCopyDrawable">@android:drawable/ic_menu_copy_light</item>
         <item name="actionModePasteDrawable">@android:drawable/ic_menu_paste_light</item>
+        <item name="actionModeBackground">@android:drawable/cab_background_light</item>
+
         <!-- SearchView attributes -->
         <item name="searchDropdownBackground">@android:drawable/search_dropdown_light</item>
         <item name="searchViewCloseIcon">@android:drawable/ic_clear_holo_light</item>
@@ -518,6 +522,7 @@
         <item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
         <item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item>
         <item name="android:windowCloseOnTouchOutside">@bool/config_closeDialogWhenTouchOutside</item>
+        <item name="android:windowActionModeOverlay">true</item>
 
         <item name="android:colorBackgroundCacheHint">@null</item>
         
@@ -813,6 +818,8 @@
 
         <!-- List attributes -->
         <item name="listPreferredItemHeight">64dip</item>
+        <item name="dropdownListPreferredItemHeight">48dip</item>
+
         <!-- @hide -->
         <item name="searchResultListItemHeight">58dip</item>
         <item name="listDivider">@drawable/list_divider_holo_dark</item>
@@ -1084,6 +1091,8 @@
 
         <!-- List attributes -->
         <item name="listPreferredItemHeight">64dip</item>
+        <item name="dropdownListPreferredItemHeight">48dip</item>
+
         <!-- @hide -->
         <item name="searchResultListItemHeight">58dip</item>
         <item name="listDivider">@drawable/list_divider_holo_light</item>
diff --git a/core/res/res/xml-xlarge/password_kbd_numeric.xml b/core/res/res/xml-xlarge/password_kbd_numeric.xml
new file mode 100755
index 0000000..02531222
--- /dev/null
+++ b/core/res/res/xml-xlarge/password_kbd_numeric.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2011, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
+    android:keyWidth="33.33%p"
+    android:verticalGap="0px"
+    android:keyHeight="@dimen/password_keyboard_key_height_numeric"
+    >
+
+    <Row android:rowEdgeFlags="top">
+        <Key android:codes="49" android:keyIcon="@drawable/sym_keyboard_num1"
+             android:keyEdgeFlags="left"/>
+        <Key android:codes="50" android:keyIcon="@drawable/sym_keyboard_num2"/>
+        <Key android:codes="51" android:keyIcon="@drawable/sym_keyboard_num3"
+             android:keyEdgeFlags="right"/>
+    </Row>
+
+    <Row>
+        <Key android:codes="52" android:keyIcon="@drawable/sym_keyboard_num4"
+             android:keyEdgeFlags="left"/>
+        <Key android:codes="53" android:keyIcon="@drawable/sym_keyboard_num5"/>
+        <Key android:codes="54" android:keyIcon="@drawable/sym_keyboard_num6"
+             android:keyEdgeFlags="right"/>
+    </Row>
+
+    <Row>
+        <Key android:codes="55" android:keyIcon="@drawable/sym_keyboard_num7"
+             android:keyEdgeFlags="left"/>
+        <Key android:codes="56" android:keyIcon="@drawable/sym_keyboard_num8"/>
+        <Key android:codes="57" android:keyIcon="@drawable/sym_keyboard_num9"
+             android:keyEdgeFlags="right"/>
+    </Row>
+
+    <Row android:rowEdgeFlags="bottom">
+        <Key android:codes="10" android:keyIcon="@drawable/sym_keyboard_ok"
+             android:keyEdgeFlags="left"/>
+        <Key android:codes="48" android:keyIcon="@drawable/sym_keyboard_num0_no_plus"/>
+        <Key android:codes="-5" android:keyIcon="@drawable/sym_keyboard_delete"
+             android:iconPreview="@drawable/sym_keyboard_feedback_delete"
+             android:isRepeatable="true" android:keyEdgeFlags="right"/>
+    </Row>
+
+</Keyboard>
diff --git a/core/res/res/xml-xlarge/password_kbd_qwerty.xml b/core/res/res/xml-xlarge/password_kbd_qwerty.xml
index fd1d5f1..1009c9a 100755
--- a/core/res/res/xml-xlarge/password_kbd_qwerty.xml
+++ b/core/res/res/xml-xlarge/password_kbd_qwerty.xml
@@ -38,10 +38,9 @@
         <Key android:keyLabel="i"/>
         <Key android:keyLabel="o"/>
         <Key android:keyLabel="p"/>
-        <Key android:keyIcon="@drawable/sym_keyboard_delete"
+        <Key android:keyIcon="@drawable/sym_keyboard_delete_holo"
             android:codes="-5"
             android:keyWidth="9.331%p"
-            android:iconPreview="@drawable/sym_keyboard_feedback_delete"
             android:isRepeatable="true"
             android:keyEdgeFlags="right"/>
     </Row>
@@ -62,7 +61,6 @@
         <Key android:keyLabel="l"/>
         <Key android:codes="10"
             android:keyIcon="@drawable/sym_keyboard_ok"
-            android:iconPreview="@drawable/sym_keyboard_feedback_ok"
             android:keyWidth="15.750%p"
             android:keyEdgeFlags="right"/>
     </Row>
@@ -72,7 +70,6 @@
             android:keyIcon="@drawable/sym_keyboard_shift"
             android:keyWidth="15.192%p"
             android:isModifier="true"
-            android:iconPreview="@drawable/sym_keyboard_feedback_shift"
             android:isSticky="true"
             android:keyEdgeFlags="left"/>
         <Key android:keyLabel="z"/>
@@ -88,7 +85,6 @@
             android:keyIcon="@drawable/sym_keyboard_shift"
             android:keyWidth="12.530%p"
             android:isModifier="true"
-            android:iconPreview="@drawable/sym_keyboard_feedback_shift"
             android:isSticky="true"
             android:keyEdgeFlags="right"/>
     </Row>
@@ -96,9 +92,7 @@
     <Row android:keyWidth="8.042%p"
         android:keyboardMode="@+id/mode_normal">
         <Key android:keyLabel="/" android:horizontalGap="24.126%p"/>
-        <Key android:codes="32"
-            android:keyIcon="@drawable/sym_keyboard_space"
-            android:iconPreview="@drawable/sym_keyboard_feedback_space"
+        <Key android:keyLabel=" "
             android:keyWidth="37.454%p"/>
         <Key android:keyLabel="'" />
         <Key android:keyLabel="-" />
diff --git a/core/res/res/xml-xlarge/password_kbd_qwerty_shifted.xml b/core/res/res/xml-xlarge/password_kbd_qwerty_shifted.xml
index 671d87f..cbf17c3 100755
--- a/core/res/res/xml-xlarge/password_kbd_qwerty_shifted.xml
+++ b/core/res/res/xml-xlarge/password_kbd_qwerty_shifted.xml
@@ -38,10 +38,9 @@
         <Key android:keyLabel="I"/>
         <Key android:keyLabel="O"/>
         <Key android:keyLabel="P"/>
-        <Key android:keyIcon="@drawable/sym_keyboard_delete"
+        <Key android:keyIcon="@drawable/sym_keyboard_delete_holo"
             android:codes="-5"
             android:keyWidth="9.331%p"
-            android:iconPreview="@drawable/sym_keyboard_feedback_delete"
             android:isRepeatable="true"
             android:keyEdgeFlags="right"/>
     </Row>
@@ -62,7 +61,6 @@
         <Key android:keyLabel="L"/>
         <Key android:codes="10"
             android:keyIcon="@drawable/sym_keyboard_ok"
-            android:iconPreview="@drawable/sym_keyboard_feedback_ok"
             android:keyWidth="15.750%p"
             android:keyEdgeFlags="right"/>
     </Row>
@@ -72,7 +70,6 @@
             android:keyIcon="@drawable/sym_keyboard_shift"
             android:keyWidth="15.192%p"
             android:isModifier="true"
-            android:iconPreview="@drawable/sym_keyboard_feedback_shift"
             android:isSticky="true"
             android:keyEdgeFlags="left"/>
         <Key android:keyLabel="Z"/>
@@ -88,7 +85,6 @@
             android:keyIcon="@drawable/sym_keyboard_shift"
             android:keyWidth="12.530%p"
             android:isModifier="true"
-            android:iconPreview="@drawable/sym_keyboard_feedback_shift"
             android:isSticky="true"
             android:keyEdgeFlags="right"/>
     </Row>
@@ -96,9 +92,7 @@
     <Row android:keyWidth="8.042%p"
         android:keyboardMode="@+id/mode_normal">
         <Key android:keyLabel="\@" android:horizontalGap="24.126%p"/>
-        <Key android:codes="32"
-            android:keyIcon="@drawable/sym_keyboard_space"
-            android:iconPreview="@drawable/sym_keyboard_feedback_space"
+        <Key android:keyLabel=" "
             android:keyWidth="37.454%p"/>
         <Key android:keyLabel="&quot;" />
         <Key android:keyLabel="_" />
diff --git a/core/res/res/xml-xlarge/password_kbd_symbols.xml b/core/res/res/xml-xlarge/password_kbd_symbols.xml
index 5ae5577..a58a023 100755
--- a/core/res/res/xml-xlarge/password_kbd_symbols.xml
+++ b/core/res/res/xml-xlarge/password_kbd_symbols.xml
@@ -38,10 +38,9 @@
         <Key android:keyLabel="8"/>
         <Key android:keyLabel="9"/>
         <Key android:keyLabel="0"/>
-        <Key android:keyIcon="@drawable/sym_keyboard_delete"
+        <Key android:keyIcon="@drawable/sym_keyboard_delete_holo"
             android:codes="-5"
             android:keyWidth="9.331%p"
-            android:iconPreview="@drawable/sym_keyboard_feedback_delete"
             android:isRepeatable="true"
             android:keyEdgeFlags="right"/>
     </Row>
@@ -62,7 +61,6 @@
         <Key android:keyLabel=")"/>
         <Key android:codes="10"
             android:keyIcon="@drawable/sym_keyboard_ok"
-            android:iconPreview="@drawable/sym_keyboard_feedback_ok"
             android:keyWidth="15.750%p"
             android:keyEdgeFlags="right"/>
     </Row>
@@ -94,9 +92,7 @@
     <Row android:keyWidth="8.042%p">
         <Key android:keyLabel="\@" android:horizontalGap="16.084%p"/>
         <Key android:keyLabel="/" />
-        <Key android:codes="32"
-            android:keyIcon="@drawable/sym_keyboard_space"
-            android:iconPreview="@drawable/sym_keyboard_feedback_space"
+        <Key android:keyLabel=" "
             android:keyWidth="37.454%p"/>
         <Key android:keyLabel="\'" />
         <Key android:keyLabel="-" />
diff --git a/core/res/res/xml-xlarge/password_kbd_symbols_shift.xml b/core/res/res/xml-xlarge/password_kbd_symbols_shift.xml
index 26ade76..9d9acf5 100755
--- a/core/res/res/xml-xlarge/password_kbd_symbols_shift.xml
+++ b/core/res/res/xml-xlarge/password_kbd_symbols_shift.xml
@@ -37,10 +37,9 @@
         <Key android:keyLabel="×" />
         <Key android:keyLabel="§" />
         <Key android:keyLabel="Δ" />
-        <Key android:keyIcon="@drawable/sym_keyboard_delete"
+        <Key android:keyIcon="@drawable/sym_keyboard_delete_holo"
             android:codes="-5"
             android:keyWidth="9.331%p"
-            android:iconPreview="@drawable/sym_keyboard_feedback_delete"
             android:isRepeatable="true"
             android:keyEdgeFlags="right"/>
     </Row>
@@ -61,7 +60,6 @@
         <Key android:keyLabel="}" />
         <Key android:codes="10"
             android:keyIcon="@drawable/sym_keyboard_ok"
-            android:iconPreview="@drawable/sym_keyboard_feedback_ok"
             android:keyWidth="15.750%p"
             android:keyEdgeFlags="right"/>
     </Row>
@@ -92,9 +90,7 @@
 
     <!-- This row is intentionally not marked as a bottom row -->
     <Row android:keyWidth="8.042%p">
-        <Key android:codes="32" android:horizontalGap="32.168%p"
-            android:keyIcon="@drawable/sym_keyboard_space"
-            android:iconPreview="@drawable/sym_keyboard_feedback_space"
+        <Key android:keyLabel=" " android:horizontalGap="32.168%p"
             android:keyWidth="37.454%p"/>
     </Row>
 </Keyboard>
diff --git a/data/fonts/AndroidClock-Solid.ttf b/data/fonts/AndroidClock-Solid.ttf
new file mode 100644
index 0000000..108839e
--- /dev/null
+++ b/data/fonts/AndroidClock-Solid.ttf
Binary files differ
diff --git a/data/fonts/AndroidClock.ttf b/data/fonts/AndroidClock.ttf
index 03e36cb..7b550eed 100644
--- a/data/fonts/AndroidClock.ttf
+++ b/data/fonts/AndroidClock.ttf
Binary files differ
diff --git a/data/fonts/AndroidClock_Highlight.ttf b/data/fonts/AndroidClock_Highlight.ttf
index 8fb31ba..a95d548 100644
--- a/data/fonts/AndroidClock_Highlight.ttf
+++ b/data/fonts/AndroidClock_Highlight.ttf
Binary files differ
diff --git a/data/keyboards/qwerty.idc b/data/keyboards/qwerty.idc
index 129b0bc..4cf0b84 100644
--- a/data/keyboards/qwerty.idc
+++ b/data/keyboards/qwerty.idc
@@ -21,3 +21,5 @@
 keyboard.orientationAware = 1
 keyboard.builtIn = 1
 
+cursor.mode = navigation
+cursor.orientationAware = 1
diff --git a/data/keyboards/qwerty2.idc b/data/keyboards/qwerty2.idc
index 1a795c6..2e5a938 100644
--- a/data/keyboards/qwerty2.idc
+++ b/data/keyboards/qwerty2.idc
@@ -21,3 +21,5 @@
 keyboard.orientationAware = 1
 keyboard.builtIn = 1
 
+cursor.mode = navigation
+cursor.orientationAware = 1
diff --git a/docs/html/sdk/android-3.0.jd b/docs/html/sdk/android-3.0.jd
index 9ca6a04..2c8a7f0 100644
--- a/docs/html/sdk/android-3.0.jd
+++ b/docs/html/sdk/android-3.0.jd
@@ -72,7 +72,7 @@
 states</li>
   <li>By <a
 href="{@docRoot}guide/topics/resources/providing-resources.html#AlternativeResources">providing
-alternative resources</a>, you can mix and match fragments, based
+alternative layouts</a>, you can mix and match fragments, based
 on the screen size and orientation</li>
   <li>Fragments have direct access to their container activity and can contribute items to the
 activity's Action Bar (discussed next)</li>
@@ -83,15 +83,15 @@
 as finding fragments in the activity and popping fragments off the back stack to restore them
 after they've been removed or hidden.</p>
 
-<p>To perform transactions, such as add or remove fragments, you must create a {@link
+<p>To perform a transaction, such as add or remove a fragment, you must create a {@link
 android.app.FragmentTransaction}. You can then call methods such as {@link
 android.app.FragmentTransaction#add add()} {@link android.app.FragmentTransaction#remove
-remove()}, {@link android.app.FragmentTransaction#replace replace()}. Once you've applied all
+remove()}, or {@link android.app.FragmentTransaction#replace replace()}. Once you've applied all
 the changes you want to perform for the transaction, you must call {@link
-android.app.FragmentTransaction#commit commit()} and the system will apply the transaction to
+android.app.FragmentTransaction#commit commit()} and the system applies the fragment transaction to
 the activity.</p>
 
-<p>For more information about using fragments in your application, read the <a
+<p>For more information about using fragments, read the <a
 href="{@docRoot}guide/topics/fundamentals/fragments.html">Fragments</a> developer guide.</p>
 
 
@@ -99,38 +99,37 @@
 
 <h3>Action Bar</h3>
 
-<p>The Action Bar is a replacement for the traditional title bar at the top of the activity
-window. It includes the application logo in the left corner and also replaces the previous Options
-Menu UI with a drop-down list for the menu items. Additionally, the Action Bar allows you
-to:</p></p>
+<p>The Action Bar is a replacement for the traditional title bar at the top of the activity window.
+It includes the application logo in the left corner and provides a new interface for items in the
+activity's Options Menu. Additionally, the Action Bar allows you to:</p>
 
 <ul>
   <li>Include select menu items directly in the Action Bar&mdash;as "action
-items"&mdash;for quick access to global actions.
+items"&mdash;for quick access to global user actions.
     <p>In your XML declaration for the menu item, include the attribute, {@code
 android:showAsAction} with a value of {@code "ifRoom"}. When there's enough room in the
-Action Bar, the menu item appears directly in the bar. Otherwise, it is placed in the
+Action Bar, the menu item appears directly in the bar. Otherwise, the item is placed in the
 overflow menu, revealed by the icon on the right side of the Action Bar.</p></li>
-  <li>Add interactive widgets ("action views"), such as a search box.
-    <p>In your XML, include the attribute, {@code android:actionViewLayout} with a layout
-resource for the action view, or {@code android:actionViewClass} with the class name of the
+
+  <li>Add interactive widgets to the Action Bar&mdash;as "action views"&mdash;such as a search box.
+    <p>In the XML for the menu item that should behave as an action view, include the {@code
+android:actionViewLayout} attribute with a layout
+resource for the action view or {@code android:actionViewClass} with the class name of the
 widget. Like action items, an action view appears only when there's room for it in the Action
 Bar. If there's not enough room, it is placed in the overflow menu and behaves like a regular
 menu item (for example, an item can provide a {@link android.widget.SearchView} as an action
-view, but when in the overflow menu, selecting the item will activate the search dialog).</p>
-    <p></p></li>
+view, but when in the overflow menu, selecting the item activates the search dialog).</p></li>
+
   <li>Add an action to the application logo when tapped and replace it with a custom logo
     <p>The application logo is automatically assigned the {@code android.R.id.home} ID,
-which is delivered to your activity's {@link android.app.Activity#onOptionsItemSelected
+which the system deliveres to your activity's {@link android.app.Activity#onOptionsItemSelected
 onOptionsItemSelected()} callback when tapped. Simply respond to this ID in your callback
 method to perform an action such as go to your application's "home" activity.</p>
-    <p>If your activity does not respond to the icon action, you should hide it by calling {@link
-android.app.ActionBar#setDisplayShowHomeEnabled setDisplayShowHomeEnabled(false)}.</p>
-    <p>By default, this is true, so the icon will visually respond when pressed, even if you don't
-respond. Thus, you should remove the icon if you don't respond to it.</p></li>
+    <p>To replace the icon with a logo, </p></li>
+
   <li>Add breadcrumbs for navigating backward through fragments</li>
   <li>Add built in tabs and a drop-down list for navigation</li>
-  <li>Customize the Action Bar  themes and custom backgrounds</li>
+  <li>Customize the Action Bar themes and custom backgrounds</li>
 </ul>
 
 <p>The Action Bar is standard for all applications that set either the <a
@@ -139,9 +138,11 @@
 href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
 android:targetSdkVersion}</a> to {@code "Honeycomb"}. (The "Honeycomb" API Level is provisional
 and effective only while using the preview SDK&mdash;you must change it to the official API
-Level when the final SDK becomes available.)</p>
+Level when the final SDK becomes available&mdash;see <a
+href="{@docRoot}sdk/preview/start.html">Getting Started</a> for more information.)</p>
 
-<p>For more information, read the <a href="{@docRoot}guide/topics/ui/actionbar.html">Action
+<p>For more information about the Action Bar, read the <a
+href="{@docRoot}guide/topics/ui/actionbar.html">Action
 Bar</a> developer guide.</p>
 
 
@@ -159,10 +160,10 @@
 <p>To start using the clipboard, get the global {@link android.content.ClipboardManager} object
 by calling {@link android.content.Context#getSystemService getSystemService(CLIPBOARD_SERVICE)}.</p>
 
-<p>To create an item to attach to the clipboard, you need to create a new {@link
+<p>To create an item to attach to the clipboard ("copy"), you need to create a new {@link
 android.content.ClipData} object, which holds one or more {@link android.content.ClipData.Item}
 objects, each describing a single entity. To create a {@link android.content.ClipData} object with
-just one {@link android.content.ClipData.Item}, you can use one of the helper methods such as,
+just one {@link android.content.ClipData.Item}, you can use one of the helper methods, such as
 {@link android.content.ClipData#newPlainText newPlainText()}, {@link
 android.content.ClipData#newUri newUri()}, and {@link android.content.ClipData#newIntent
 newIntent()}, which each return a {@link android.content.ClipData} object pre-loaded with the
@@ -186,7 +187,7 @@
 
 <h3>Drag and drop</h3>
 
-<p>New APIs now facilitate the ability for your application to implement drag and drop
+<p>New APIs facilitate the ability for your application to implement drag and drop
 functionality in the UI.</p>
 
 <p>To begin dragging content in your activity, call {@link android.view.View#startDrag startDrag()}
@@ -196,13 +197,16 @@
 the drag object with views that may receive the object.</p>
 
 <p>To accept a drag object (receive the "drop") in a
-{@link android.view.View}, register the view with an {@link android.view.View.OnDragListener} by
+{@link android.view.View}, register the view with an {@link android.view.View.OnDragListener
+OnDragListener} by
 calling {@link android.view.View#setOnDragListener setOnDragListener()}. When a drag event occurs on
 the view, the system calls {@link android.view.View.OnDragListener#onDrag onDrag()} for the  {@link
-android.view.View.OnDragListener}, which receives a {@link android.view.DragEvent} describing the
-type of event has occurred (such as "drag started", "drag ended", and "drop"). During a drag
-operation, there is a stream of drag events, so the system calls {@link
-android.view.View.OnDragListener#onDrag onDrag()} repeatedly on the view. The receiving view can
+android.view.View.OnDragListener OnDragListener}, which receives a {@link android.view.DragEvent}
+describing the
+type of event has occurred (such as "drag started", "drag ended", or "drop"). During a drag, the
+system repeatedly calls {@link
+android.view.View.OnDragListener#onDrag onDrag()} for the view underneath the drag, to
+deliver a stream of events. The receiving view can
 inquire the event type delivered to {@link android.view.View#onDragEvent onDragEvent()} by calling
 {@link android.view.DragEvent#getAction getAction()} on the {@link android.view.DragEvent}.</p>
 
@@ -217,16 +221,14 @@
 
 <h3>App widgets</h3>
 
-<p>App widgets can now be more interactive with scrolling list views, grid views, view flippers, and
-a new 3D stack widget.</p>
-
-<p>Android 3.0 supports several new widget classes for app widgets, including: {@link
+<p>Android 3.0 supports several new widget classes for more interactive app widgets, including:
+{@link
 android.widget.GridView}, {@link android.widget.ListView}, {@link android.widget.StackView}, {@link
 android.widget.ViewFlipper}, and {@link android.widget.AdapterViewFlipper}.</p>
 
-<p>You can use the new {@link android.widget.RemoteViewsService} to populate the new remote
-collection views ({@link android.widget.GridView}, {@link android.widget.ListView}, and {@link
-android.widget.StackView}).</p>
+<p>You can also use the new {@link android.widget.RemoteViewsService} to populate
+collection views such as ({@link android.widget.GridView}, {@link android.widget.ListView}, and
+{@link android.widget.StackView}).</p>
 
 <p>{@link android.appwidget.AppWidgetProviderInfo} also supports two new fields: {@link
 android.appwidget.AppWidgetProviderInfo#autoAdvanceViewId} and {@link
@@ -234,11 +236,11 @@
 android.appwidget.AppWidgetProviderInfo#autoAdvanceViewId} field lets you specify the view ID of the
 app widget subview, which is auto-advanced by the app widget’s host. The
 {@link android.appwidget.AppWidgetProviderInfo#previewImage} field specifies a preview of what the
-App Widget looks like and is shown to the user from the widget picker. If this field is not
+app widget looks like and is shown to the user from the widget picker. If this field is not
 supplied, the app widget's icon is used for the preview.</p>
 
-<p>Android also provides a new widget preview tool (WidgetPreview), located in the SDK tools, to
-take a screenshot of your app widget, which you can use when specifying the {@link
+<p>Android also provides a new widget preview tool ({@code WidgetPreview}), located in the SDK
+tools, to take a screenshot of your app widget, which you can use when specifying the {@link
 android.appwidget.AppWidgetProviderInfo#previewImage} field.</p>
 
 
@@ -249,12 +251,13 @@
 
 <p>The {@link android.app.Notification} APIs have been extended to support more content-rich status
 bar notifications, plus a new {@link android.app.Notification.Builder} class allows you to easily
-control the notification properties. New features include:</p>
+control the notification properties.</p>
+<p>New features include:</p>
 <ul>
-  <li>Support for a large icon in the notification. This is usually for
+  <li>Support for a large icon in the notification, using {@link
+android.app.Notification.Builder#setLargeIcon setLargeIcon()}. This is usually for
 social applications to show the contact photo of the person who is the source of the
-notification or for media apps to show an album thumbnail. Set using {@link
-android.app.Notification.Builder#setLargeIcon setLargeIcon()}.</li>
+notification or for media apps to show an album thumbnail.</li>
   <li>Support for custom layouts in the status bar ticker, using {@link
 android.app.Notification.Builder#setTicker(CharSequence,RemoteViews) setTicker()}.</li>
   <li>Support for custom notification layouts to include buttons with {@link
@@ -269,7 +272,7 @@
 
 <p>New framework APIs facilitate asynchronous loading of data using the {@link
 android.content.Loader} class. You can use it in combination with UI components such as views and
-fragments to dynamically load data from background threads. The {@link
+fragments to dynamically load data from worker threads. The {@link
 android.content.CursorLoader} subclass is specially designed to help do so for data queried from
 a {@link android.content.ContentResolver}.</p>
 
@@ -280,21 +283,25 @@
 <h3>Bluetooth A2DP and headset APIs</h3>
 
 <p>Android now includes APIs for applications to verify the state of connected Bluetooth A2DP and
-headset profile devices. You can initialize the respective {@link
-android.bluetooth.BluetoothProfile} by calling {@link
+headset profile devices. For example, applications can identify when a Bluetooth headset is
+connected for listening to music and notify the user as appropriate. Applications can also receive
+broadcasts for vendor specific AT commands and notify the user about the state of the connected
+device, such as when the connected device's battery is low.</p>
+
+<p>You can initialize the respective {@link android.bluetooth.BluetoothProfile} by calling {@link
 android.bluetooth.BluetoothAdapter#getProfileProxy getProfileProxy()} with either the {@link
 android.bluetooth.BluetoothProfile#A2DP} or {@link android.bluetooth.BluetoothProfile#HEADSET}
 profile constant and a {@link android.bluetooth.BluetoothProfile.ServiceListener} to receive
-callbacks when the client is connected or disconnected.</p>
+callbacks when the Bluetooth client is connected or disconnected.</p>
 
 
 
 
 <h3>Animation framework</h3>
 
-<p>An all new flexible animation framework allows you to animate the properties of any object
-(View, Drawable, Fragment, Object, anything). It allows you to define many aspects of an animation,
-such as:</p>
+<p>An all new flexible animation framework allows you to animate arbitrary properties of any object
+(View, Drawable, Fragment, Object, or anything else). It allows you to define many aspects of an
+animation, such as:</p>
 <ul>
   <li>Duration</li>
   <li>Repeat amount and behavior</li>
@@ -308,7 +315,7 @@
 the values for that given type, by implementing the {@link android.animation.TypeEvaluator}
 interface.</p>
 
-<p>There are two animators that you can use to animate values of a property: {@link
+<p>There are two animators you can use to animate values of a property: {@link
 android.animation.ValueAnimator} and {@link android.animation.ObjectAnimator}. The {@link
 android.animation.ValueAnimator} computes the animation values, but is not aware of the specific
 object or property that is animated as a result. It simply performs the calculations, and you must
@@ -320,13 +327,13 @@
 time in order to animate it, then start the animation.</p>
 
 <p>Additionally, the {@link android.animation.LayoutTransition} class enables automatic transition
-animations for changes you make to your activity layout. To enable transitions for a {@link
-android.view.ViewGroup}, create a {@link android.animation.LayoutTransition} object and set it on
+animations for changes you make to your activity layout. To enable transitions for part of the
+layout, create a {@link android.animation.LayoutTransition} object and set it on
 any {@link android.view.ViewGroup} by calling {@link
 android.view.ViewGroup#setLayoutTransition setLayoutTransition()}. This causes default
 animations to run whenever items are added to or removed from the group. To specify custom
 animations, call {@link android.animation.LayoutTransition#setAnimator setAnimator()} on the {@link
-android.animation.LayoutTransition} to provide a custom {@link android.animation.Animator},
+android.animation.LayoutTransition} and provide a custom {@link android.animation.Animator},
 such as a {@link android.animation.ValueAnimator} or {@link android.animation.ObjectAnimator}
 discussed above.</p>
 
@@ -397,14 +404,14 @@
   <li><b>New holographic themes</b>
 
     <p>The standard system widgets and overall look have been redesigned for use on larger screens
-such as tablets and incorporate the new holographic UI theme. These style changes are applied
+such as tablets and incorporate the new "holographic" UI theme. The system applies these styles
 using the standard <a href="{@docRoot}guide/topics/ui/themes.html">style and theme</a> system.
-Any application that targets the Android 3.0 platform inherit the holographic theme by default.
+Any application that targets the Android 3.0 platform inherits the holographic theme by default.
 However, if your application also applies its own styles, then it will override the holographic
-theme, unless you update your styles to inherit them.</p>
+theme, unless you update your styles to inherit the holographic theme.</p>
 
 <p>To apply the holographic theme to individual activities or to inherit them in your own theme
-definitions, you can use one of several new {@link android.R.style#Theme_Holo Theme.Holo}
+definitions, use one of several new {@link android.R.style#Theme_Holo Theme.Holo}
 themes.</p>
   </li>
   
@@ -522,20 +529,40 @@
 
 
 <ul>
-  <li><b>Camcorder profiles</b>
 
-<p>New {@link android.media.CamcorderProfile#hasProfile hasProfile()} method and several video
-quality profiles, such as {@link android.media.CamcorderProfile#QUALITY_1080P}, {@link
-android.media.CamcorderProfile#QUALITY_720P}, {@link
-android.media.CamcorderProfile#QUALITY_CIF}, and more, to determine the camcorder quality
-profiles.</p></li>
-
-  <li><b>Time lapse video mode</b>
+  <li><b>Time lapse video</b>
 
 <p>Camcorder APIs now support the ability to record time lapse video. The {@link
 android.media.MediaRecorder#setCaptureRate setCaptureRate()} sets the rate at which frames
 should be captured.</p></li>
 
+  <li><b>Texture support for image streams</b>
+    
+<p>New {@link android.graphics.SurfaceTexture} allows you to capture an image stream as an OpenGL ES
+texture. By calling {@link android.hardware.Camera#setPreviewTexture setPreviewTexture()} for your
+{@link android.hardware.Camera} instance, you can specify the {@link
+android.graphics.SurfaceTexture} upon which to draw video playback or preview frames from the
+camera.</p></li>
+
+  <li><b>HTTP Live streaming</b>
+    
+<p>Applications can now pass an M3U playlist URL to the media framework to begin an HTTP Live
+streaming session. The media framework supports most of the HTTP Live streaming specification,
+including adaptive bit rate.</p></li>
+
+  <li><b>EXIF data</b>
+    
+<p>The {@link android.media.ExifInterface} includes new fields for photo aperture, ISO, and exposure
+time.</p></li>
+
+  <li><b>Camcorder profiles</b>
+
+<p>New {@link android.media.CamcorderProfile#hasProfile hasProfile()} method and several video
+quality profiles (such as {@link android.media.CamcorderProfile#QUALITY_1080P}, {@link
+android.media.CamcorderProfile#QUALITY_720P}, {@link
+android.media.CamcorderProfile#QUALITY_CIF}, and others) allow you to determine camcorder
+quality options.</p></li>
+
   <li><b>Digital media file transfer</b>
 
 <p>The platform includes built-in support for Media/Picture Transfer Protocol (MTP/PTP) over USB,
diff --git a/include/media/stagefright/StagefrightMediaScanner.h b/include/media/stagefright/StagefrightMediaScanner.h
index 4437eee..108acb4 100644
--- a/include/media/stagefright/StagefrightMediaScanner.h
+++ b/include/media/stagefright/StagefrightMediaScanner.h
@@ -22,8 +22,6 @@
 
 namespace android {
 
-struct MediaMetadataRetriever;
-
 struct StagefrightMediaScanner : public MediaScanner {
     StagefrightMediaScanner();
     virtual ~StagefrightMediaScanner();
@@ -35,8 +33,6 @@
     virtual char *extractAlbumArt(int fd);
 
 private:
-    sp<MediaMetadataRetriever> mRetriever;
-
     StagefrightMediaScanner(const StagefrightMediaScanner &);
     StagefrightMediaScanner &operator=(const StagefrightMediaScanner &);
 };
diff --git a/include/ui/Input.h b/include/ui/Input.h
index 30b45f7..2012fcc 100644
--- a/include/ui/Input.h
+++ b/include/ui/Input.h
@@ -50,8 +50,10 @@
 /*
  * Maximum number of pointers supported per motion event.
  * Smallest number of pointers is 1.
+ * (We want at least 10 but some touch controllers obstensibly configured for 10 pointers
+ * will occasionally emit 11.  There is not much harm making this constant bigger.)
  */
-#define MAX_POINTERS 10
+#define MAX_POINTERS 16
 
 /*
  * Maximum pointer id value supported in a motion event.
diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp
index a768efe..c2106d4 100644
--- a/libs/hwui/DisplayListRenderer.cpp
+++ b/libs/hwui/DisplayListRenderer.cpp
@@ -629,7 +629,8 @@
     mHeight = height;
 }
 
-void DisplayListRenderer::prepare(bool opaque) {
+void DisplayListRenderer::prepareDirty(float left, float top,
+        float right, float bottom, bool opaque) {
     mSnapshot = new Snapshot(mFirstSnapshot,
             SkCanvas::kMatrix_SaveFlag | SkCanvas::kClip_SaveFlag);
     mSaveCount = 1;
@@ -848,7 +849,7 @@
 
 void DisplayListRenderer::drawArc(float left, float top, float right, float bottom,
         float startAngle, float sweepAngle, bool useCenter, SkPaint* paint) {
-    addOp(DisplayList::DrawOval);
+    addOp(DisplayList::DrawArc);
     addBounds(left, top, right, bottom);
     addPoint(startAngle, sweepAngle);
     addInt(useCenter ? 1 : 0);
diff --git a/libs/hwui/DisplayListRenderer.h b/libs/hwui/DisplayListRenderer.h
index 6c8e8f5..bab5149 100644
--- a/libs/hwui/DisplayListRenderer.h
+++ b/libs/hwui/DisplayListRenderer.h
@@ -28,7 +28,7 @@
 #include <SkTSearch.h>
 
 #include "OpenGLRenderer.h"
-#include "Functor.h"
+#include "utils/Functor.h"
 
 namespace android {
 namespace uirenderer {
@@ -241,7 +241,7 @@
     DisplayList* getDisplayList();
 
     void setViewport(int width, int height);
-    void prepare(bool opaque);
+    void prepareDirty(float left, float top, float right, float bottom, bool opaque);
     void finish();
 
     bool callDrawGLFunction(Functor *functor);
diff --git a/libs/hwui/LayerRenderer.cpp b/libs/hwui/LayerRenderer.cpp
index 1c89577..36709dc 100644
--- a/libs/hwui/LayerRenderer.cpp
+++ b/libs/hwui/LayerRenderer.cpp
@@ -26,7 +26,7 @@
 // Rendering
 ///////////////////////////////////////////////////////////////////////////////
 
-void LayerRenderer::prepare(bool opaque) {
+void LayerRenderer::prepareDirty(float left, float top, float right, float bottom, bool opaque) {
     LAYER_RENDERER_LOGD("Rendering into layer, fbo = %d", mLayer->fbo);
 
 #if RENDER_LAYERS_AS_REGIONS
@@ -35,7 +35,7 @@
 
     glBindFramebuffer(GL_FRAMEBUFFER, mLayer->fbo);
 
-    OpenGLRenderer::prepare(opaque);
+    OpenGLRenderer::prepareDirty(0.0f, 0.0f, mLayer->width, mLayer->height, opaque);
 }
 
 void LayerRenderer::finish() {
diff --git a/libs/hwui/LayerRenderer.h b/libs/hwui/LayerRenderer.h
index 1e39847..d2f565e 100644
--- a/libs/hwui/LayerRenderer.h
+++ b/libs/hwui/LayerRenderer.h
@@ -46,7 +46,7 @@
     ~LayerRenderer() {
     }
 
-    void prepare(bool opaque);
+    void prepareDirty(float left, float top, float right, float bottom, bool opaque);
     void finish();
 
     bool hasLayer();
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 98f8fc5..9f491b3 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -136,6 +136,10 @@
 }
 
 void OpenGLRenderer::prepare(bool opaque) {
+    prepareDirty(0.0f, 0.0f, mWidth, mHeight, opaque);
+}
+
+void OpenGLRenderer::prepareDirty(float left, float top, float right, float bottom, bool opaque) {
     mCaches.clearGarbage();
 
     mSnapshot = new Snapshot(mFirstSnapshot,
@@ -146,15 +150,14 @@
 
     glDisable(GL_DITHER);
 
+    glEnable(GL_SCISSOR_TEST);
+    glScissor(left, mSnapshot->height - bottom, right - left, bottom - top);
+    mSnapshot->setClip(left, top, right, bottom);
+
     if (!opaque) {
-        glDisable(GL_SCISSOR_TEST);
         glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
         glClear(GL_COLOR_BUFFER_BIT);
     }
-
-    glEnable(GL_SCISSOR_TEST);
-    glScissor(0, 0, mWidth, mHeight);
-    mSnapshot->setClip(0.0f, 0.0f, mWidth, mHeight);
 }
 
 void OpenGLRenderer::finish() {
@@ -1210,8 +1213,7 @@
         const bool pureTranslate = mSnapshot->transform->isPureTranslate();
 #if RENDER_LAYERS_AS_REGIONS
         // Mark the current layer dirty where we are going to draw the patch
-        if ((mSnapshot->flags & Snapshot::kFlagFboTarget) &&
-                mSnapshot->region && mesh->hasEmptyQuads) {
+        if (hasLayer() && mesh->hasEmptyQuads) {
             const size_t count = mesh->quads.size();
             for (size_t i = 0; i < count; i++) {
                 const Rect& bounds = mesh->quads.itemAt(i);
@@ -1607,18 +1609,18 @@
     layer->alpha = alpha;
     layer->mode = mode;
 
-
 #if RENDER_LAYERS_AS_REGIONS
     if (!layer->region.isEmpty()) {
         if (layer->region.isRect()) {
             const Rect r(x, y, x + layer->layer.getWidth(), y + layer->layer.getHeight());
             composeLayerRect(layer, r);
         } else if (layer->mesh) {
+            const float a = alpha / 255.0f;
             const Rect& rect = layer->layer;
 
             setupDraw();
             setupDrawWithTexture();
-            setupDrawColor(alpha, alpha, alpha, alpha);
+            setupDrawColor(a, a, a, a);
             setupDrawColorFilter();
             setupDrawBlending(layer->blend || layer->alpha < 255, layer->mode, false);
             setupDrawProgram();
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index bd29609..77de1d2 100644
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -62,7 +62,8 @@
 
     virtual void setViewport(int width, int height);
 
-    virtual void prepare(bool opaque);
+    void prepare(bool opaque);
+    virtual void prepareDirty(float left, float top, float right, float bottom, bool opaque);
     virtual void finish();
 
     // These two calls must not be recorded in display lists
diff --git a/libs/rs/java/tests/src/com/android/rs/test/math.rs b/libs/rs/java/tests/src/com/android/rs/test/math.rs
index 02993fe..8cad82b 100644
--- a/libs/rs/java/tests/src/com/android/rs/test/math.rs
+++ b/libs/rs/java/tests/src/com/android/rs/test/math.rs
@@ -12,6 +12,31 @@
 volatile int3 i3;
 volatile int4 i4;
 
+volatile uint ui1;
+volatile uint2 ui2;
+volatile uint3 ui3;
+volatile uint4 ui4;
+
+volatile short s1;
+volatile short2 s2;
+volatile short3 s3;
+volatile short4 s4;
+
+volatile ushort us1;
+volatile ushort2 us2;
+volatile ushort3 us3;
+volatile ushort4 us4;
+
+volatile char c1;
+volatile char2 c2;
+volatile char3 c3;
+volatile char4 c4;
+
+volatile uchar uc1;
+volatile uchar2 uc2;
+volatile uchar3 uc3;
+volatile uchar4 uc4;
+
 #define TEST_FN_FUNC_FN(fnc)        \
     rsDebug("Testing " #fnc, 0);    \
     f1 = fnc(f1);                   \
@@ -168,9 +193,124 @@
     return failed;
 }
 
+#define DECL_INT(prefix)            \
+volatile char prefix##_c_1 = 1;     \
+volatile char2 prefix##_c_2 = 1;    \
+volatile char3 prefix##_c_3 = 1;    \
+volatile char4 prefix##_c_4 = 1;    \
+volatile uchar prefix##_uc_1 = 1;   \
+volatile uchar2 prefix##_uc_2 = 1;  \
+volatile uchar3 prefix##_uc_3 = 1;  \
+volatile uchar4 prefix##_uc_4 = 1;  \
+volatile short prefix##_s_1 = 1;    \
+volatile short2 prefix##_s_2 = 1;   \
+volatile short3 prefix##_s_3 = 1;   \
+volatile short4 prefix##_s_4 = 1;   \
+volatile ushort prefix##_us_1 = 1;  \
+volatile ushort2 prefix##_us_2 = 1; \
+volatile ushort3 prefix##_us_3 = 1; \
+volatile ushort4 prefix##_us_4 = 1; \
+volatile int prefix##_i_1 = 1;      \
+volatile int2 prefix##_i_2 = 1;     \
+volatile int3 prefix##_i_3 = 1;     \
+volatile int4 prefix##_i_4 = 1;     \
+volatile uint prefix##_ui_1 = 1;    \
+volatile uint2 prefix##_ui_2 = 1;   \
+volatile uint3 prefix##_ui_3 = 1;   \
+volatile uint4 prefix##_ui_4 = 1;   \
+volatile long prefix##_l_1 = 1;     \
+volatile ulong prefix##_ul_1 = 1;
+
+#define TEST_INT_OP_TYPE(op, type)                      \
+rsDebug("Testing " #op " for " #type "1", i++);         \
+res_##type##_1 = src1_##type##_1 op src2_##type##_1;    \
+rsDebug("Testing " #op " for " #type "2", i++);         \
+res_##type##_2 = src1_##type##_2 op src2_##type##_2;    \
+rsDebug("Testing " #op " for " #type "3", i++);         \
+res_##type##_3 = src1_##type##_3 op src2_##type##_3;    \
+rsDebug("Testing " #op " for " #type "4", i++);         \
+res_##type##_4 = src1_##type##_4 op src2_##type##_4;
+
+#define TEST_INT_OP(op)                     \
+TEST_INT_OP_TYPE(op, c)                     \
+TEST_INT_OP_TYPE(op, uc)                    \
+TEST_INT_OP_TYPE(op, s)                     \
+TEST_INT_OP_TYPE(op, us)                    \
+TEST_INT_OP_TYPE(op, i)                     \
+TEST_INT_OP_TYPE(op, ui)                    \
+rsDebug("Testing " #op " for l1", i++);     \
+res_l_1 = src1_l_1 op src2_l_1;             \
+rsDebug("Testing " #op " for ul1", i++);    \
+res_ul_1 = src1_ul_1 op src2_ul_1;
+
+DECL_INT(res)
+DECL_INT(src1)
+DECL_INT(src2)
+
+static bool test_basic_operators() {
+    bool failed = false;
+    int i = 0;
+
+    TEST_INT_OP(+);
+    TEST_INT_OP(-);
+    TEST_INT_OP(*);
+    TEST_INT_OP(/);
+    TEST_INT_OP(%);
+    TEST_INT_OP(<<);
+    TEST_INT_OP(>>);
+
+    if (failed) {
+        rsDebug("test_basic_operators FAILED", 0);
+    }
+    else {
+        rsDebug("test_basic_operators PASSED", 0);
+    }
+
+    return failed;
+}
+
+#define TEST_CVT(to, from, type)                        \
+rsDebug("Testing convert from " #from " to " #to, 0);   \
+to##1 = from##1;                                        \
+to##2 = convert_##type##2(from##2);                     \
+to##3 = convert_##type##3(from##3);                     \
+to##4 = convert_##type##4(from##4);
+
+#define TEST_CVT_MATRIX(to, type)   \
+TEST_CVT(to, c, type);              \
+TEST_CVT(to, uc, type);             \
+TEST_CVT(to, s, type);              \
+TEST_CVT(to, us, type);             \
+TEST_CVT(to, i, type);              \
+TEST_CVT(to, ui, type);             \
+TEST_CVT(to, f, type);              \
+
+static bool test_convert() {
+    bool failed = false;
+
+    TEST_CVT_MATRIX(c, char);
+    TEST_CVT_MATRIX(uc, uchar);
+    TEST_CVT_MATRIX(s, short);
+    TEST_CVT_MATRIX(us, ushort);
+    TEST_CVT_MATRIX(i, int);
+    TEST_CVT_MATRIX(ui, uint);
+    TEST_CVT_MATRIX(f, float);
+
+    if (failed) {
+        rsDebug("test_convert FAILED", 0);
+    }
+    else {
+        rsDebug("test_convert PASSED", 0);
+    }
+
+    return failed;
+}
+
 void math_test(uint32_t index, int test_num) {
     bool failed = false;
+    failed |= test_convert();
     failed |= test_fp_math(index);
+    failed |= test_basic_operators();
 
     if (failed) {
         rsSendToClientBlocking(RS_MSG_TEST_FAILED);
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index 3acb624..40cb5c7 100644
--- a/libs/rs/rsContext.cpp
+++ b/libs/rs/rsContext.cpp
@@ -201,9 +201,9 @@
     mGL.mExtensions = glGetString(GL_EXTENSIONS);
 
     //LOGV("EGL Version %i %i", mEGL.mMajorVersion, mEGL.mMinorVersion);
-    LOGV("GL Version %s", mGL.mVersion);
+    //LOGV("GL Version %s", mGL.mVersion);
     //LOGV("GL Vendor %s", mGL.mVendor);
-    LOGV("GL Renderer %s", mGL.mRenderer);
+    //LOGV("GL Renderer %s", mGL.mRenderer);
     //LOGV("GL Extensions %s", mGL.mExtensions);
 
     const char *verptr = NULL;
@@ -468,7 +468,6 @@
          return NULL;
      }
 
-     rsc->mScriptC.init(rsc);
      if (rsc->mIsGraphicsContext) {
          rsc->mStateRaster.init(rsc);
          rsc->setProgramRaster(NULL);
@@ -528,7 +527,7 @@
 }
 
 void Context::destroyWorkerThreadResources() {
-    LOGV("destroyWorkerThreadResources 1");
+    //LOGV("destroyWorkerThreadResources 1");
     if (mIsGraphicsContext) {
          mRaster.clear();
          mFragment.clear();
@@ -544,7 +543,7 @@
          mShaderCache.cleanupAll();
     }
     ObjectBase::zeroAllUserRef(this);
-    LOGV("destroyWorkerThreadResources 2");
+    //LOGV("destroyWorkerThreadResources 2");
     mExit = true;
 }
 
@@ -552,7 +551,7 @@
      Context *rsc = static_cast<Context *>(vrsc);
      uint32_t idx = (uint32_t)android_atomic_inc(&rsc->mWorkers.mLaunchCount);
 
-     LOGV("RS helperThread starting %p idx=%i", rsc, idx);
+     //LOGV("RS helperThread starting %p idx=%i", rsc, idx);
 
      rsc->mWorkers.mLaunchSignals[idx].init();
      rsc->mWorkers.mNativeThreadId[idx] = gettid();
@@ -573,7 +572,7 @@
          LOGE("pthread_setspecific %i", status);
      }
 
-     while (rsc->mRunning) {
+     while (!rsc->mExit) {
          rsc->mWorkers.mLaunchSignals[idx].wait();
          if (rsc->mWorkers.mLaunchCallback) {
             rsc->mWorkers.mLaunchCallback(rsc->mWorkers.mLaunchData, idx);
@@ -582,7 +581,7 @@
          rsc->mWorkers.mCompleteSignal.set();
      }
 
-     LOGV("RS helperThread exiting %p idx=%i", rsc, idx);
+     //LOGV("RS helperThread exited %p idx=%i", rsc, idx);
      return NULL;
 }
 
@@ -730,6 +729,18 @@
     mIO.shutdown();
     int status = pthread_join(mThreadId, &res);
 
+    // Cleanup compute threads.
+    mWorkers.mLaunchData = NULL;
+    mWorkers.mLaunchCallback = NULL;
+    mWorkers.mRunningCount = (int)mWorkers.mCount;
+    for (uint32_t ct = 0; ct < mWorkers.mCount; ct++) {
+        mWorkers.mLaunchSignals[ct].set();
+    }
+    for (uint32_t ct = 0; ct < mWorkers.mCount; ct++) {
+        int status = pthread_join(mWorkers.mThreadId[ct], &res);
+    }
+    rsAssert(!mWorkers.mRunningCount);
+
     // Global structure cleanup.
     pthread_mutex_lock(&gInitMutex);
     if (mDev) {
diff --git a/libs/rs/rsLocklessFifo.cpp b/libs/rs/rsLocklessFifo.cpp
index eb2af1c..3f88543 100644
--- a/libs/rs/rsLocklessFifo.cpp
+++ b/libs/rs/rsLocklessFifo.cpp
@@ -76,7 +76,8 @@
 }
 
 bool LocklessCommandFifo::isEmpty() const {
-    return mPut == mGet;
+    uint32_t p = android_atomic_acquire_load((int32_t *)&mPut);
+    return ((uint8_t *)p) == mGet;
 }
 
 
@@ -155,7 +156,9 @@
 
 void LocklessCommandFifo::next() {
     uint32_t bytes = reinterpret_cast<const uint16_t *>(mGet)[1];
-    mGet += ((bytes + 3) & ~3) + 4;
+
+    android_atomic_add(((bytes + 3) & ~3) + 4, (int32_t *)&mGet);
+    //mGet += ((bytes + 3) & ~3) + 4;
     if (isEmpty()) {
         mSignalToControl.set();
     }
diff --git a/libs/rs/rsScriptC.cpp b/libs/rs/rsScriptC.cpp
index eecfa16..3858e1c 100644
--- a/libs/rs/rsScriptC.cpp
+++ b/libs/rs/rsScriptC.cpp
@@ -421,21 +421,9 @@
 }
 
 ScriptCState::ScriptCState() {
-    mScript.clear();
 }
 
 ScriptCState::~ScriptCState() {
-    mScript.clear();
-}
-
-void ScriptCState::init(Context *rsc) {
-    clear(rsc);
-}
-
-void ScriptCState::clear(Context *rsc) {
-    rsAssert(rsc);
-    mScript.clear();
-    mScript.set(new ScriptC(rsc));
 }
 
 static void* symbolLookup(void* pContext, char const* name) {
@@ -608,8 +596,6 @@
 namespace renderscript {
 
 void rsi_ScriptCBegin(Context * rsc) {
-    ScriptCState *ss = &rsc->mScriptC;
-    ss->clear(rsc);
 }
 
 void rsi_ScriptCSetText(Context *rsc, const char *text, uint32_t len) {
@@ -618,8 +604,8 @@
     char *t = (char *)malloc(len + 1);
     memcpy(t, text, len);
     t[len] = 0;
-    ss->mScript->mEnviroment.mScriptText = t;
-    ss->mScript->mEnviroment.mScriptTextLength = len;
+    ss->mScriptText = t;
+    ss->mScriptLen = len;
 }
 
 
@@ -630,17 +616,19 @@
 {
     ScriptCState *ss = &rsc->mScriptC;
 
-    ObjectBaseRef<ScriptC> s(ss->mScript);
-    ss->mScript.clear();
+    ScriptC *s = new ScriptC(rsc);
+    s->mEnviroment.mScriptText = ss->mScriptText;
+    s->mEnviroment.mScriptTextLength = ss->mScriptLen;
+    ss->mScriptText = NULL;
+    ss->mScriptLen = 0;
     s->incUserRef();
 
-    if (!ss->runCompiler(rsc, s.get(), resName, cacheDir)) {
+    if (!ss->runCompiler(rsc, s, resName, cacheDir)) {
         // Error during compile, destroy s and return null.
-        s->zeroUserRef();
+        delete s;
         return NULL;
     }
-    ss->clear(rsc);
-    return s.get();
+    return s;
 }
 
 }
diff --git a/libs/rs/rsScriptC.h b/libs/rs/rsScriptC.h
index 612e38a..7143c67 100644
--- a/libs/rs/rsScriptC.h
+++ b/libs/rs/rsScriptC.h
@@ -76,11 +76,9 @@
     ScriptCState();
     ~ScriptCState();
 
-    ObjectBaseRef<ScriptC> mScript;
+    char * mScriptText;
+    size_t mScriptLen;
 
-    void init(Context *rsc);
-
-    void clear(Context *rsc);
     bool runCompiler(Context *rsc, ScriptC *s, const char *resName, const char *cacheDir);
 
     struct SymbolTable_t {
@@ -88,7 +86,6 @@
         void * mPtr;
         bool threadable;
     };
-    //static SymbolTable_t gSyms[];
     static const SymbolTable_t * lookupSymbol(const char *);
     static const SymbolTable_t * lookupSymbolCL(const char *);
     static const SymbolTable_t * lookupSymbolGL(const char *);
diff --git a/libs/rs/rsScriptC_Lib.cpp b/libs/rs/rsScriptC_Lib.cpp
index f550d98..beb4d72 100644
--- a/libs/rs/rsScriptC_Lib.cpp
+++ b/libs/rs/rsScriptC_Lib.cpp
@@ -305,6 +305,14 @@
     return a % b;
 }
 
+unsigned int SC_udivsi3(unsigned int a, unsigned int b) {
+    return a / b;
+}
+
+unsigned int SC_umodsi3(unsigned int a, unsigned int b) {
+    return a % b;
+}
+
 int SC_getAllocation(const void *ptr) {
     GET_TLS();
     const Allocation *alloc = sc->ptrToAllocation(ptr);
@@ -363,6 +371,8 @@
 static ScriptCState::SymbolTable_t gSyms[] = {
     { "__divsi3", (void *)&SC_divsi3, true },
     { "__modsi3", (void *)&SC_modsi3, true },
+    { "__udivsi3", (void *)&SC_udivsi3, true },
+    { "__umodsi3", (void *)&SC_umodsi3, true },
 
     // allocation
     { "_Z19rsAllocationGetDimX13rs_allocation", (void *)&SC_allocGetDimX, true },
diff --git a/libs/rs/scriptc/rs_core.rsh b/libs/rs/scriptc/rs_core.rsh
index f3e0ab0..21c0f7b 100644
--- a/libs/rs/scriptc/rs_core.rsh
+++ b/libs/rs/scriptc/rs_core.rsh
@@ -683,7 +683,7 @@
 rsQuaternionMultiply(rs_quaternion *q, const rs_quaternion *rhs) {
     q->w = -q->x*rhs->x - q->y*rhs->y - q->z*rhs->z + q->w*rhs->w;
     q->x =  q->x*rhs->w + q->y*rhs->z - q->z*rhs->y + q->w*rhs->x;
-    q->y = -q->x*rhs->z + q->y*rhs->w + q->z*rhs->z + q->w*rhs->y;
+    q->y = -q->x*rhs->z + q->y*rhs->w + q->z*rhs->x + q->w*rhs->y;
     q->z =  q->x*rhs->y - q->y*rhs->x + q->z*rhs->w + q->w*rhs->z;
 }
 
diff --git a/media/java/android/media/ExifInterface.java b/media/java/android/media/ExifInterface.java
index 11e27a9..925f965 100644
--- a/media/java/android/media/ExifInterface.java
+++ b/media/java/android/media/ExifInterface.java
@@ -299,12 +299,16 @@
         String lngRef = mAttributes.get(ExifInterface.TAG_GPS_LONGITUDE_REF);
 
         if (latValue != null && latRef != null && lngValue != null && lngRef != null) {
-            output[0] = convertRationalLatLonToFloat(latValue, latRef);
-            output[1] = convertRationalLatLonToFloat(lngValue, lngRef);
-            return true;
-        } else {
-            return false;
+            try {
+                output[0] = convertRationalLatLonToFloat(latValue, latRef);
+                output[1] = convertRationalLatLonToFloat(lngValue, lngRef);
+                return true;
+            } catch (IllegalArgumentException e) {
+                // if values are not parseable
+            }
         }
+
+        return false;
     }
 
     /**
@@ -373,12 +377,12 @@
 
             String [] pair;
             pair = parts[0].split("/");
-            int degrees = (int) (Float.parseFloat(pair[0].trim())
-                    / Float.parseFloat(pair[1].trim()));
+            double degrees = Double.parseDouble(pair[0].trim())
+                    / Double.parseDouble(pair[1].trim());
 
             pair = parts[1].split("/");
-            int minutes = (int) ((Float.parseFloat(pair[0].trim())
-                    / Float.parseFloat(pair[1].trim())));
+            double minutes = Double.parseDouble(pair[0].trim())
+                    / Double.parseDouble(pair[1].trim());
 
             pair = parts[2].split("/");
             double seconds = Double.parseDouble(pair[0].trim())
@@ -389,10 +393,12 @@
                 return (float) -result;
             }
             return (float) result;
-        } catch (RuntimeException ex) {
-            // if for whatever reason we can't parse the lat long then return
-            // null
-            return 0f;
+        } catch (NumberFormatException e) {
+            // Some of the nubmers are not valid
+            throw new IllegalArgumentException();
+        } catch (ArrayIndexOutOfBoundsException e) {
+            // Some of the rational does not follow the correct format
+            throw new IllegalArgumentException();
         }
     }
 
diff --git a/media/java/android/media/videoeditor/MediaArtistNativeHelper.java b/media/java/android/media/videoeditor/MediaArtistNativeHelper.java
index b0d29a1..f078cf6 100755
--- a/media/java/android/media/videoeditor/MediaArtistNativeHelper.java
+++ b/media/java/android/media/videoeditor/MediaArtistNativeHelper.java
@@ -30,6 +30,9 @@
 import android.util.Log;
 import android.util.Pair;
 import android.view.Surface;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.Rect;
 
 /**
  *This class provide Native methods to be used by MediaArtist {@hide}
@@ -67,7 +70,10 @@
     private boolean mExportDone = false;
 
     private int mProgressToApp;
-
+    /**
+     *  The resize paint
+     */
+    private static final Paint sResizePaint = new Paint(Paint.FILTER_BITMAP_FLAG);
 
     public static final int TASK_LOADING_SETTINGS = 1;
 
@@ -1896,7 +1902,9 @@
     private void onPreviewProgressUpdate(int progress, boolean isFinished) {
         if (mPreviewProgressListener != null) {
             mPreviewProgressListener.onProgress(mVideoEditor, progress, isFinished);
-            mPreviewProgress = progress;
+            if (progress != 0) {
+                mPreviewProgress = progress;
+            }
         }
     }
 
@@ -3013,7 +3021,7 @@
      */
     public void doPreview(Surface surface, long fromMs, long toMs, boolean loop,
             int callbackAfterFrameCount, PreviewProgressListener listener) {
-        mPreviewProgress = 0;
+        mPreviewProgress = fromMs;
         if (listener != null) {
             mPreviewProgressListener = listener;
         }
@@ -3836,11 +3844,39 @@
             throw new IllegalArgumentException();
         }
 
-        IntBuffer rgb888 = IntBuffer.allocate(width * height * 4);
-        Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
-        nativeGetPixels(inputFile, rgb888.array(), width, height, timeMS);
-        bitmap.copyPixelsFromBuffer(rgb888);
+        int newWidth = 0;
+        int newHeight = 0;
+        Bitmap tempBitmap = null;
 
+        /* Make width and height as even */
+        newWidth = (width + 1) & 0xFFFFFFFE;
+        newHeight = (height + 1) & 0xFFFFFFFE;
+
+        /* Create a temp bitmap for resized thumbnails */
+        if ((newWidth != width) || (newHeight != height)) {
+             tempBitmap = Bitmap.createBitmap(newWidth, newHeight, Bitmap.Config.ARGB_8888);
+        }
+
+        IntBuffer rgb888 = IntBuffer.allocate(newWidth * newHeight * 4);
+        Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
+        nativeGetPixels(inputFile, rgb888.array(), newWidth, newHeight, timeMS);
+
+        if ((newWidth == width) && (newHeight == height)) {
+            bitmap.copyPixelsFromBuffer(rgb888);
+        } else {
+            /* Create a temp bitmap to be used for resize */
+            tempBitmap.copyPixelsFromBuffer(rgb888);
+
+            /* Create a canvas to resize */
+            final Canvas canvas = new Canvas(bitmap);
+            canvas.drawBitmap(tempBitmap, new Rect(0, 0, newWidth, newHeight),
+                                          new Rect(0, 0, width, height),
+                                          sResizePaint);
+        }
+
+        if (tempBitmap != null) {
+            tempBitmap.recycle();
+        }
         return bitmap;
     }
 
@@ -3861,11 +3897,24 @@
     public Bitmap[] getPixelsList(String filename, int width, int height, long startMs, long endMs,
             int thumbnailCount) {
         int[] rgb888 = null;
-        int thumbnailSize = width * height * 4;
+        int thumbnailSize = 0;
+        int newWidth = 0;
+        int newHeight = 0;
+        Bitmap tempBitmap = null;
 
+        /* Make width and height as even */
+        newWidth = (width + 1) & 0xFFFFFFFE;
+        newHeight = (height + 1) & 0xFFFFFFFE;
+        thumbnailSize = newWidth * newHeight * 4;
+
+        /* Create a temp bitmap for resized thumbnails */
+        if ((newWidth != width) || (newHeight != height)) {
+            tempBitmap = Bitmap.createBitmap(newWidth, newHeight, Bitmap.Config.ARGB_8888);
+        }
         int i = 0;
         int deltaTime = (int)(endMs - startMs) / thumbnailCount;
         Bitmap[] bitmap = null;
+
         try {
             // This may result in out of Memory Error
             rgb888 = new int[thumbnailSize * thumbnailCount];
@@ -3878,19 +3927,35 @@
                 bitmap = new Bitmap[MAX_THUMBNAIL_PERMITTED];
                 thumbnailCount = MAX_THUMBNAIL_PERMITTED;
             } catch (Throwable ex) {
-                throw new RuntimeException("Memory allocation fails,reduce nos of thumbanail count");
+                throw new RuntimeException("Memory allocation fails, thumbnail count too large: "+thumbnailCount);
             }
         }
         IntBuffer tmpBuffer = IntBuffer.allocate(thumbnailSize);
-        nativeGetPixelsList(filename, rgb888, width, height, deltaTime, thumbnailCount, startMs,
+        nativeGetPixelsList(filename, rgb888, newWidth, newHeight, deltaTime, thumbnailCount, startMs,
                 endMs);
+
         for (; i < thumbnailCount; i++) {
             bitmap[i] = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
             tmpBuffer.put(rgb888, (i * thumbnailSize), thumbnailSize);
             tmpBuffer.rewind();
-            bitmap[i].copyPixelsFromBuffer(tmpBuffer);
+
+            if ((newWidth == width) && (newHeight == height)) {
+                bitmap[i].copyPixelsFromBuffer(tmpBuffer);
+            } else {
+                /* Copy the out rgb buffer to temp bitmap */
+                tempBitmap.copyPixelsFromBuffer(tmpBuffer);
+
+                /* Create a canvas to resize */
+                final Canvas canvas = new Canvas(bitmap[i]);
+                canvas.drawBitmap(tempBitmap, new Rect(0, 0, newWidth, newHeight),
+                                              new Rect(0, 0, width, height),
+                                              sResizePaint);
+            }
         }
 
+        if (tempBitmap != null) {
+            tempBitmap.recycle();
+        }
         return bitmap;
     }
 
@@ -3940,12 +4005,11 @@
         }
     }
 
-    public void clearPreviewSurface(Surface surface, int width, int height) {
-       nativeClearSurface(surface,width,height);
+    public void clearPreviewSurface(Surface surface) {
+       nativeClearSurface(surface);
     }
     /**     Native Methods        */
-
-    public native Properties getMediaProperties(String file) throws IllegalArgumentException,
+    native Properties getMediaProperties(String file) throws IllegalArgumentException,
     IllegalStateException, RuntimeException, Exception;
 
     /**
@@ -3955,7 +4019,7 @@
      * @throws RuntimeException if an error occurred
      * @see Version
      */
-    public static native Version getVersion() throws RuntimeException;
+    private static native Version getVersion() throws RuntimeException;
 
     /**
      * Returns the video thumbnail in an array of integers. Output format is
@@ -3972,10 +4036,10 @@
      *             negative
      * @throws RuntimeException on runtime errors in native code
      */
-    public native int nativeGetPixels(String fileName, int[] pixelArray, int width, int height,
+    private native int nativeGetPixels(String fileName, int[] pixelArray, int width, int height,
             long timeMS);
 
-    public native int nativeGetPixelsList(String fileName, int[] pixelArray, int width, int height,
+    private native int nativeGetPixelsList(String fileName, int[] pixelArray, int width, int height,
             int timeMS, int nosofTN, long startTimeMs, long endTimeMs);
 
     /**
@@ -3984,12 +4048,12 @@
      *
      * @throws IllegalStateException if the method could not be called
      */
-    public native void release() throws IllegalStateException, RuntimeException;
+    private native void release() throws IllegalStateException, RuntimeException;
 
     /*
      * Clear the preview surface
      */
-    public native void nativeClearSurface(Surface surface, int width, int height);
+    private native void nativeClearSurface(Surface surface);
 
 
     /**
@@ -3998,7 +4062,7 @@
      *
      * @throws IllegalStateException if the method could not be called
      */
-    public native void stopEncoding() throws IllegalStateException, RuntimeException;
+    private native void stopEncoding() throws IllegalStateException, RuntimeException;
 
 
 
@@ -4024,12 +4088,12 @@
 
     private native void nativeStopPreview();
 
-    public native int nativeGenerateAudioGraph(String pcmFilePath, String outGraphPath,
+    private native int nativeGenerateAudioGraph(String pcmFilePath, String outGraphPath,
             int frameDuration, int channels, int sampleCount);
 
-    public native int nativeGenerateRawAudio(String InFileName, String PCMFileName);
+    private native int nativeGenerateRawAudio(String InFileName, String PCMFileName);
 
-    public native int nativeGenerateClip(EditSettings editSettings)
+    private native int nativeGenerateClip(EditSettings editSettings)
     throws IllegalArgumentException, IllegalStateException, RuntimeException;
 
 }
diff --git a/media/java/android/media/videoeditor/MediaImageItem.java b/media/java/android/media/videoeditor/MediaImageItem.java
index 1c02878..a977b8e 100755
--- a/media/java/android/media/videoeditor/MediaImageItem.java
+++ b/media/java/android/media/videoeditor/MediaImageItem.java
@@ -1013,9 +1013,20 @@
 
             if (dx > dy) {
                 bitmapWidth = width;
-                bitmapHeight = Math.round(nativeHeight / dx);
+
+                if (((float)nativeHeight / dx) < (float)height) {
+                    bitmapHeight = (float)Math.ceil(nativeHeight / dx);
+                } else { // value equals the requested height
+                    bitmapHeight = (float)Math.floor(nativeHeight / dx);
+                }
+
             } else {
-                bitmapWidth = Math.round(nativeWidth / dy);
+                if (((float)nativeWidth / dy) > (float)width) {
+                    bitmapWidth = (float)Math.floor(nativeWidth / dy);
+                } else { // value equals the requested width
+                    bitmapWidth = (float)Math.ceil(nativeWidth / dy);
+                }
+
                 bitmapHeight = height;
             }
 
diff --git a/media/java/android/media/videoeditor/VideoEditorImpl.java b/media/java/android/media/videoeditor/VideoEditorImpl.java
index 5b87d16..c19725c 100755
--- a/media/java/android/media/videoeditor/VideoEditorImpl.java
+++ b/media/java/android/media/videoeditor/VideoEditorImpl.java
@@ -1828,9 +1828,6 @@
       if (surfaceHolder == null) {
          throw new IllegalArgumentException();
        }
-      Rect frame;
-      int surfaceWidth;
-      int surfaceHeight;
       Surface surface = surfaceHolder.getSurface();
 
       if (surface == null) {
@@ -1838,10 +1835,7 @@
         "Surface could not be retrieved from surface holder");
         throw new RuntimeException();
       }
-      frame = surfaceHolder.getSurfaceFrame();
-      surfaceWidth = frame.width();
-      surfaceHeight = frame.height();
-      mMANativeHelper.clearPreviewSurface(surface,surfaceWidth,surfaceHeight);
+      mMANativeHelper.clearPreviewSurface(surface);
     }
 
 }
diff --git a/media/java/android/mtp/MtpPropertyGroup.java b/media/java/android/mtp/MtpPropertyGroup.java
index fff96c7..57e2304 100644
--- a/media/java/android/mtp/MtpPropertyGroup.java
+++ b/media/java/android/mtp/MtpPropertyGroup.java
@@ -282,7 +282,7 @@
     }
 
     MtpPropertyList getPropertyList(int handle, int format, int depth, int storageID) {
-        Log.d(TAG, "getPropertyList handle: " + handle + " format: " + format + " depth: " + depth);
+        //Log.d(TAG, "getPropertyList handle: " + handle + " format: " + format + " depth: " + depth);
         if (depth > 1) {
             // we only support depth 0 and 1
             // depth 0: single object, depth 1: immediate children
diff --git a/media/java/android/mtp/MtpServer.java b/media/java/android/mtp/MtpServer.java
index 2e69373..d433887 100644
--- a/media/java/android/mtp/MtpServer.java
+++ b/media/java/android/mtp/MtpServer.java
@@ -54,12 +54,8 @@
         native_set_ptp_mode(usePtp);
     }
 
-    // used by the JNI code
-    private int mNativeContext;
-
     private native final void native_setup(MtpDatabase database, String storagePath,
             long reserveSpace);
-    private native final void native_finalize();
     private native final void native_start();
     private native final void native_stop();
     private native final void native_send_object_added(int handle);
diff --git a/media/jni/android_mtp_MtpServer.cpp b/media/jni/android_mtp_MtpServer.cpp
index 1452d21..3883fb2 100644
--- a/media/jni/android_mtp_MtpServer.cpp
+++ b/media/jni/android_mtp_MtpServer.cpp
@@ -40,9 +40,6 @@
 
 // ----------------------------------------------------------------------------
 
-static jfieldID field_context;
-static Mutex    sMutex;
-
 // in android_mtp_MtpDatabase.cpp
 extern MtpDatabase* getMtpDatabase(JNIEnv *env, jobject database);
 
@@ -61,96 +58,74 @@
     MtpServer*      mServer;
     String8         mStoragePath;
     uint64_t        mReserveSpace;
-    jobject         mJavaServer;
-    bool            mDone;
+    Mutex           mMutex;
+    bool            mUsePtp;
     int             mFd;
 
 public:
-    MtpThread(MtpDatabase* database, const char* storagePath, uint64_t reserveSpace,
-                jobject javaServer)
+    MtpThread(MtpDatabase* database, const char* storagePath, uint64_t reserveSpace)
         :   mDatabase(database),
             mServer(NULL),
             mStoragePath(storagePath),
             mReserveSpace(reserveSpace),
-            mJavaServer(javaServer),
-            mDone(false),
             mFd(-1)
     {
     }
 
     void setPtpMode(bool usePtp) {
-        sMutex.lock();
-        if (mFd >= 0) {
-            ioctl(mFd, MTP_SET_INTERFACE_MODE,
-                    (usePtp ? MTP_INTERFACE_MODE_PTP : MTP_INTERFACE_MODE_MTP));
-        } else {
-            int fd = open("/dev/mtp_usb", O_RDWR);
-            if (fd >= 0) {
-                ioctl(fd, MTP_SET_INTERFACE_MODE,
-                        (usePtp ? MTP_INTERFACE_MODE_PTP : MTP_INTERFACE_MODE_MTP));
-                close(fd);
-            }
-        }
-        sMutex.unlock();
+        mMutex.lock();
+        mUsePtp = usePtp;
+        mMutex.unlock();
     }
 
     virtual bool threadLoop() {
-        sMutex.lock();
-
-        while (!mDone) {
-            mFd = open("/dev/mtp_usb", O_RDWR);
-            printf("open returned %d\n", mFd);
-            if (mFd < 0) {
-                LOGE("could not open MTP driver\n");
-                sMutex.unlock();
-                return false;
-            }
+        mMutex.lock();
+        mFd = open("/dev/mtp_usb", O_RDWR);
+        if (mFd >= 0) {
+            ioctl(mFd, MTP_SET_INTERFACE_MODE,
+                    (mUsePtp ? MTP_INTERFACE_MODE_PTP : MTP_INTERFACE_MODE_MTP));
 
             mServer = new MtpServer(mFd, mDatabase, AID_MEDIA_RW, 0664, 0775);
             mServer->addStorage(mStoragePath, mReserveSpace);
 
-            sMutex.unlock();
-
+            mMutex.unlock();
             mServer->run();
-            sleep(1);
-
-            sMutex.lock();
+            mMutex.lock();
 
             close(mFd);
             mFd = -1;
             delete mServer;
             mServer = NULL;
+        } else {
+            LOGE("could not open MTP driver, errno: %d", errno);
+        }
+        mMutex.unlock();
+        // delay a bit before retrying to avoid excessive spin
+        if (!exitPending()) {
+            sleep(1);
         }
 
-        JNIEnv* env = AndroidRuntime::getJNIEnv();
-        env->SetIntField(mJavaServer, field_context, 0);
-        env->DeleteGlobalRef(mJavaServer);
-        sMutex.unlock();
-
-        return false;
-    }
-
-    void stop() {
-        sMutex.lock();
-        mDone = true;
-        sMutex.unlock();
+        return true;
     }
 
     void sendObjectAdded(MtpObjectHandle handle) {
-        sMutex.lock();
+        mMutex.lock();
         if (mServer)
             mServer->sendObjectAdded(handle);
-        sMutex.unlock();
+        mMutex.unlock();
     }
 
     void sendObjectRemoved(MtpObjectHandle handle) {
-        sMutex.lock();
+        mMutex.lock();
         if (mServer)
             mServer->sendObjectRemoved(handle);
-        sMutex.unlock();
+        mMutex.unlock();
     }
 };
 
+// This smart pointer is necessary for preventing MtpThread from exiting too early
+static sp<MtpThread> sThread;
+
 #endif // HAVE_ANDROID_OS
 
 static void
@@ -161,9 +136,8 @@
     MtpDatabase* database = getMtpDatabase(env, javaDatabase);
     const char *storagePathStr = env->GetStringUTFChars(storagePath, NULL);
 
-    MtpThread* thread = new MtpThread(database, storagePathStr,
-            reserveSpace, env->NewGlobalRef(thiz));
-    env->SetIntField(thiz, field_context, (int)thread);
+    // create the thread and assign it to the smart pointer
+    sThread = new MtpThread(database, storagePathStr, reserveSpace);
 
     env->ReleaseStringUTFChars(storagePath, storagePathStr);
 #endif
@@ -173,8 +147,9 @@
 android_mtp_MtpServer_start(JNIEnv *env, jobject thiz)
 {
 #ifdef HAVE_ANDROID_OS
-    MtpThread *thread = (MtpThread *)env->GetIntField(thiz, field_context);
-    thread->run("MtpThread");
+    MtpThread *thread = sThread.get();
+    if (thread)
+        thread->run("MtpThread");
 #endif // HAVE_ANDROID_OS
 }
 
@@ -182,9 +157,11 @@
 android_mtp_MtpServer_stop(JNIEnv *env, jobject thiz)
 {
 #ifdef HAVE_ANDROID_OS
-    MtpThread *thread = (MtpThread *)env->GetIntField(thiz, field_context);
-    if (thread)
-        thread->stop();
+    MtpThread *thread = sThread.get();
+    if (thread) {
+        thread->requestExitAndWait();
+        sThread = NULL;
+    }
 #endif
 }
 
@@ -192,7 +169,7 @@
 android_mtp_MtpServer_send_object_added(JNIEnv *env, jobject thiz, jint handle)
 {
 #ifdef HAVE_ANDROID_OS
-    MtpThread *thread = (MtpThread *)env->GetIntField(thiz, field_context);
+    MtpThread *thread = sThread.get();
     if (thread)
         thread->sendObjectAdded(handle);
 #endif
@@ -202,7 +179,7 @@
 android_mtp_MtpServer_send_object_removed(JNIEnv *env, jobject thiz, jint handle)
 {
 #ifdef HAVE_ANDROID_OS
-    MtpThread *thread = (MtpThread *)env->GetIntField(thiz, field_context);
+    MtpThread *thread = sThread.get();
     if (thread)
         thread->sendObjectRemoved(handle);
 #endif
@@ -212,7 +189,7 @@
 android_mtp_MtpServer_set_ptp_mode(JNIEnv *env, jobject thiz, jboolean usePtp)
 {
 #ifdef HAVE_ANDROID_OS
-    MtpThread *thread = (MtpThread *)env->GetIntField(thiz, field_context);
+    MtpThread *thread = sThread.get();
     if (thread)
         thread->setPtpMode(usePtp);
 #endif
@@ -241,11 +218,6 @@
         LOGE("Can't find android/mtp/MtpServer");
         return -1;
     }
-    field_context = env->GetFieldID(clazz, "mNativeContext", "I");
-    if (field_context == NULL) {
-        LOGE("Can't find MtpServer.mNativeContext");
-        return -1;
-    }
 
     return AndroidRuntime::registerNativeMethods(env,
                 "android/mtp/MtpServer", gMethods, NELEM(gMethods));
diff --git a/media/jni/mediaeditor/VideoBrowserMain.c b/media/jni/mediaeditor/VideoBrowserMain.c
index 0d40f56..f54a16e 100755
--- a/media/jni/mediaeditor/VideoBrowserMain.c
+++ b/media/jni/mediaeditor/VideoBrowserMain.c
@@ -522,7 +522,7 @@
 
     if (M4WAR_VIDEORENDERER_NO_NEW_FRAME == err)
     {
-        err = M4NO_ERROR;
+        return err;
     }
     CHECK_ERR(videoBrowserPrepareFrame, err) ;
 
diff --git a/media/jni/mediaeditor/VideoEditorMain.cpp b/media/jni/mediaeditor/VideoEditorMain.cpp
index 1751396..8ce788b 100755
--- a/media/jni/mediaeditor/VideoEditorMain.cpp
+++ b/media/jni/mediaeditor/VideoEditorMain.cpp
@@ -261,9 +261,7 @@
 
 static void videoEditor_clearSurface(JNIEnv* pEnv,
                                     jobject thiz,
-                                    jobject surface,
-                                    jint width,
-                                    jint height);
+                                    jobject surface);
 
 static JNINativeMethod gManualEditMethods[] = {
     {"getVersion",               "()L"VERSION_CLASS_NAME";",
@@ -300,7 +298,7 @@
                                 (int *)videoEditor_generateAudioRawFile      },
     {"nativeGenerateClip",      "(L"EDIT_SETTINGS_CLASS_NAME";)I",
                                 (void *)videoEditor_generateClip  },
-    {"nativeClearSurface",       "(Landroid/view/Surface;II)V",
+    {"nativeClearSurface",       "(Landroid/view/Surface;)V",
                                 (void *)videoEditor_clearSurface  },
 };
 
@@ -428,16 +426,15 @@
 
 static void videoEditor_clearSurface(JNIEnv* pEnv,
                                     jobject thiz,
-                                    jobject surface,
-                                    jint width,
-                                    jint height)
+                                    jobject surface)
 {
     bool needToBeLoaded = true;
-    M4OSA_UInt32 framesizeYuv =0;
     M4OSA_ERR result = M4NO_ERROR;
     VideoEditor_renderPreviewFrameStr frameStr;
     const char* pMessage = NULL;
-    M4VIFI_ImagePlane *yuvPlane;
+    // Let the size be QVGA
+    int width = 320;
+    int height = 240;
     ManualEditContext* pContext = M4OSA_NULL;
 
     // Get the context.
@@ -474,62 +471,7 @@
     Surface* const p = (Surface*)pEnv->GetIntField(surface, surface_native);
     sp<Surface> previewSurface = sp<Surface>(p);
 
-    /**
-    * Allocate output YUV planes
-    */
-    yuvPlane = (M4VIFI_ImagePlane*)M4OSA_malloc(3*sizeof(M4VIFI_ImagePlane), M4VS,
-        (M4OSA_Char*)"videoEditor_clearSurface Output plane YUV");
-    if (yuvPlane == M4OSA_NULL) {
-        VIDEOEDIT_LOG_FUNCTION(ANDROID_LOG_INFO, "VIDEO_EDITOR",
-            "videoEditor_clearSurface() malloc error for yuv plane");
-        pMessage = videoEditJava_getErrorName(M4ERR_ALLOC);
-        jniThrowException(pEnv, "java/lang/RuntimeException", pMessage);
-        return ;
-    }
-
-    framesizeYuv = width * height * 1.5;
-    yuvPlane[0].u_width = width;
-    yuvPlane[0].u_height = height;
-    yuvPlane[0].u_topleft = 0;
-    yuvPlane[0].u_stride = width;
-    yuvPlane[0].pac_data = (M4VIFI_UInt8 *)M4OSA_malloc(framesizeYuv, M4VS,
-            (M4OSA_Char*)"videoEditor pixelArray");
-    if (yuvPlane[0].pac_data == M4OSA_NULL) {
-       VIDEOEDIT_LOG_FUNCTION(ANDROID_LOG_INFO, "VIDEO_EDITOR",
-       "videoEditor_renderPreviewFrame() malloc error");
-       pMessage = videoEditJava_getErrorName(M4ERR_ALLOC);
-       jniThrowException(pEnv, "java/lang/RuntimeException", pMessage);
-       return;
-    }
-
-    /* memset yuvPlane[0].pac_data with 0 for black frame */
-    M4OSA_memset((M4OSA_MemAddr8)yuvPlane[0].pac_data,framesizeYuv,0x00);
-    FILE *p1 = fopen("/mnt/sdcard/black.raw","wb");
-    fwrite(yuvPlane[0].pac_data,1,framesizeYuv,p1);
-    fclose(p1);
-
-    yuvPlane[1].u_width = width>>1;
-    yuvPlane[1].u_height = height>>1;
-    yuvPlane[1].u_topleft = 0;
-    yuvPlane[1].u_stride = width>>1;
-    yuvPlane[1].pac_data = yuvPlane[0].pac_data
-                + yuvPlane[0].u_width * yuvPlane[0].u_height;
-
-    M4OSA_memset((M4OSA_MemAddr8)yuvPlane[1].pac_data,yuvPlane[1].u_width *
-                                yuvPlane[1].u_height,128);
-    yuvPlane[2].u_width = (width)>>1;
-    yuvPlane[2].u_height = (height)>>1;
-    yuvPlane[2].u_topleft = 0;
-    yuvPlane[2].u_stride = (width)>>1;
-    yuvPlane[2].pac_data = yuvPlane[1].pac_data
-                + yuvPlane[1].u_width * yuvPlane[1].u_height;
-
-    M4OSA_memset((M4OSA_MemAddr8)yuvPlane[2].pac_data,yuvPlane[2].u_width *
-                                 yuvPlane[2].u_height,128);
-
-    /* Fill up the render structure*/
-    frameStr.pBuffer = (M4OSA_Void*)yuvPlane[0].pac_data;
-
+    frameStr.pBuffer = M4OSA_NULL;
     frameStr.timeMs = 0;
     frameStr.uiSurfaceWidth = width;
     frameStr.uiSurfaceHeight = height;
@@ -539,19 +481,11 @@
     frameStr.clipBeginCutTime = 0;
     frameStr.clipEndCutTime = 0;
 
-    /*pContext->mPreviewController->setPreviewFrameRenderingMode(
-        pContext->pEditSettings->\
-        pClipList[iCurrentClipIndex]->xVSS.MediaRendering,
-        pContext->pEditSettings->xVSS.outputVideoSize);
-     */
-
-    result = pContext->mPreviewController->renderPreviewFrame(previewSurface,
+    result = pContext->mPreviewController->clearSurface(previewSurface,
                                                               &frameStr);
     videoEditJava_checkAndThrowRuntimeException(&needToBeLoaded, pEnv,
             (M4NO_ERROR != result), result);
 
-    M4OSA_free((M4OSA_MemAddr32)yuvPlane[0].pac_data);
-    M4OSA_free((M4OSA_MemAddr32)yuvPlane);
   }
 
 static int videoEditor_renderPreviewFrame(JNIEnv* pEnv,
diff --git a/media/libstagefright/AudioSource.cpp b/media/libstagefright/AudioSource.cpp
index 235d752..f96df18 100644
--- a/media/libstagefright/AudioSource.cpp
+++ b/media/libstagefright/AudioSource.cpp
@@ -91,14 +91,17 @@
         mStartTimeUs = startTimeUs;
     }
     status_t err = mRecord->start();
-
     if (err == OK) {
         mGroup = new MediaBufferGroup;
         mGroup->add_buffer(new MediaBuffer(kMaxBufferSize));
 
         mStarted = true;
+    } else {
+        delete mRecord;
+        mRecord = NULL;
     }
 
+
     return err;
 }
 
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp
index 89b3dab..11ac56c 100644
--- a/media/libstagefright/AwesomePlayer.cpp
+++ b/media/libstagefright/AwesomePlayer.cpp
@@ -378,11 +378,14 @@
 }
 
 void AwesomePlayer::reset() {
+    LOGI("reset");
+
     Mutex::Autolock autoLock(mLock);
     reset_l();
 }
 
 void AwesomePlayer::reset_l() {
+    LOGI("reset_l");
     mDisplayWidth = 0;
     mDisplayHeight = 0;
 
@@ -408,6 +411,10 @@
         }
     }
 
+    if (mFlags & PREPARING) {
+        LOGI("waiting until preparation is completes.");
+    }
+
     while (mFlags & PREPARING) {
         mPreparedCondition.wait(mLock);
     }
@@ -431,6 +438,8 @@
     }
     mAudioSource.clear();
 
+    LOGI("audio source cleared");
+
     mTimeSource = NULL;
 
     delete mAudioPlayer;
@@ -471,6 +480,8 @@
         IPCThreadState::self()->flushCommands();
     }
 
+    LOGI("video source cleared");
+
     mDurationUs = -1;
     mFlags = 0;
     mExtractorFlags = 0;
@@ -487,6 +498,8 @@
     mFileSource.clear();
 
     mBitrate = -1;
+
+    LOGI("reset_l completed");
 }
 
 void AwesomePlayer::notifyListener_l(int msg, int ext1, int ext2) {
diff --git a/media/libstagefright/MPEG4Writer.cpp b/media/libstagefright/MPEG4Writer.cpp
index a47ee3a..d1a497f8 100644
--- a/media/libstagefright/MPEG4Writer.cpp
+++ b/media/libstagefright/MPEG4Writer.cpp
@@ -78,6 +78,7 @@
     volatile bool mDone;
     volatile bool mPaused;
     volatile bool mResumed;
+    volatile bool mStarted;
     bool mIsAvc;
     bool mIsAudio;
     bool mIsMPEG4;
@@ -951,6 +952,7 @@
       mDone(false),
       mPaused(false),
       mResumed(false),
+      mStarted(false),
       mTrackDurationUs(0),
       mEstimatedTrackSizeBytes(0),
       mSamplesHaveSameSize(true),
@@ -1279,6 +1281,7 @@
     pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
 
     mDone = false;
+    mStarted = true;
     mTrackDurationUs = 0;
     mReachedEOS = false;
     mEstimatedTrackSizeBytes = 0;
@@ -1307,10 +1310,14 @@
 
 status_t MPEG4Writer::Track::stop() {
     LOGD("Stopping %s track", mIsAudio? "Audio": "Video");
+    if (!mStarted) {
+        LOGE("Stop() called but track is not started");
+        return ERROR_END_OF_STREAM;
+    }
+
     if (mDone) {
         return OK;
     }
-
     mDone = true;
 
     void *dummy;
diff --git a/media/libstagefright/StagefrightMediaScanner.cpp b/media/libstagefright/StagefrightMediaScanner.cpp
index 39b0021..be3df7c 100644
--- a/media/libstagefright/StagefrightMediaScanner.cpp
+++ b/media/libstagefright/StagefrightMediaScanner.cpp
@@ -28,9 +28,7 @@
 
 namespace android {
 
-StagefrightMediaScanner::StagefrightMediaScanner()
-    : mRetriever(new MediaMetadataRetriever) {
-}
+StagefrightMediaScanner::StagefrightMediaScanner() {}
 
 StagefrightMediaScanner::~StagefrightMediaScanner() {}
 
@@ -131,37 +129,41 @@
         if (status != OK) {
             return status;
         }
-    } else if (mRetriever->setDataSource(path) == OK) {
-        const char *value;
-        if ((value = mRetriever->extractMetadata(
-                        METADATA_KEY_MIMETYPE)) != NULL) {
-            client.setMimeType(value);
-        }
+    } else {
+        sp<MediaMetadataRetriever> mRetriever(new MediaMetadataRetriever);
 
-        struct KeyMap {
-            const char *tag;
-            int key;
-        };
-        static const KeyMap kKeyMap[] = {
-            { "tracknumber", METADATA_KEY_CD_TRACK_NUMBER },
-            { "discnumber", METADATA_KEY_DISC_NUMBER },
-            { "album", METADATA_KEY_ALBUM },
-            { "artist", METADATA_KEY_ARTIST },
-            { "albumartist", METADATA_KEY_ALBUMARTIST },
-            { "composer", METADATA_KEY_COMPOSER },
-            { "genre", METADATA_KEY_GENRE },
-            { "title", METADATA_KEY_TITLE },
-            { "year", METADATA_KEY_YEAR },
-            { "duration", METADATA_KEY_DURATION },
-            { "writer", METADATA_KEY_WRITER },
-            { "compilation", METADATA_KEY_COMPILATION },
-        };
-        static const size_t kNumEntries = sizeof(kKeyMap) / sizeof(kKeyMap[0]);
-
-        for (size_t i = 0; i < kNumEntries; ++i) {
+         if (mRetriever->setDataSource(path) == OK) {
             const char *value;
-            if ((value = mRetriever->extractMetadata(kKeyMap[i].key)) != NULL) {
-                client.addStringTag(kKeyMap[i].tag, value);
+            if ((value = mRetriever->extractMetadata(
+                            METADATA_KEY_MIMETYPE)) != NULL) {
+                client.setMimeType(value);
+            }
+
+            struct KeyMap {
+                const char *tag;
+                int key;
+            };
+            static const KeyMap kKeyMap[] = {
+                { "tracknumber", METADATA_KEY_CD_TRACK_NUMBER },
+                { "discnumber", METADATA_KEY_DISC_NUMBER },
+                { "album", METADATA_KEY_ALBUM },
+                { "artist", METADATA_KEY_ARTIST },
+                { "albumartist", METADATA_KEY_ALBUMARTIST },
+                { "composer", METADATA_KEY_COMPOSER },
+                { "genre", METADATA_KEY_GENRE },
+                { "title", METADATA_KEY_TITLE },
+                { "year", METADATA_KEY_YEAR },
+                { "duration", METADATA_KEY_DURATION },
+                { "writer", METADATA_KEY_WRITER },
+                { "compilation", METADATA_KEY_COMPILATION },
+            };
+            static const size_t kNumEntries = sizeof(kKeyMap) / sizeof(kKeyMap[0]);
+
+            for (size_t i = 0; i < kNumEntries; ++i) {
+                const char *value;
+                if ((value = mRetriever->extractMetadata(kKeyMap[i].key)) != NULL) {
+                    client.addStringTag(kKeyMap[i].tag, value);
+                }
             }
         }
     }
@@ -180,6 +182,7 @@
     }
     lseek64(fd, 0, SEEK_SET);
 
+    sp<MediaMetadataRetriever> mRetriever(new MediaMetadataRetriever);
     if (mRetriever->setDataSource(fd, 0, size) == OK) {
         sp<IMemory> mem = mRetriever->extractAlbumArt();
 
diff --git a/media/libstagefright/codecs/aacenc/AACEncoder.cpp b/media/libstagefright/codecs/aacenc/AACEncoder.cpp
index 9524884..a8b1292 100644
--- a/media/libstagefright/codecs/aacenc/AACEncoder.cpp
+++ b/media/libstagefright/codecs/aacenc/AACEncoder.cpp
@@ -151,7 +151,11 @@
     mInputFrame = new int16_t[mChannels * kNumSamplesPerFrame];
     CHECK(mInputFrame != NULL);
 
-    mSource->start(params);
+    status_t err = mSource->start(params);
+    if (err != OK) {
+         LOGE("AudioSource is not available");
+        return err;
+    }
 
     mStarted = true;
 
@@ -159,11 +163,6 @@
 }
 
 status_t AACEncoder::stop() {
-    if (!mStarted) {
-        LOGW("Call stop() when encoder has not started");
-        return OK;
-    }
-
     if (mInputBuffer) {
         mInputBuffer->release();
         mInputBuffer = NULL;
@@ -172,8 +171,17 @@
     delete mBufferGroup;
     mBufferGroup = NULL;
 
-    mSource->stop();
+    if (mInputFrame) {
+        delete[] mInputFrame;
+        mInputFrame = NULL;
+    }
 
+    if (!mStarted) {
+        LOGW("Call stop() when encoder has not started");
+        return ERROR_END_OF_STREAM;
+    }
+
+    mSource->stop();
     if (mEncoderHandle) {
         CHECK_EQ(VO_ERR_NONE, mApiHandle->Uninit(mEncoderHandle));
         mEncoderHandle = NULL;
@@ -182,10 +190,6 @@
     mApiHandle = NULL;
 
     mStarted = false;
-    if (mInputFrame) {
-        delete[] mInputFrame;
-        mInputFrame = NULL;
-    }
 
     return OK;
 }
diff --git a/media/libstagefright/codecs/m4v_h263/dec/M4vH263Decoder.cpp b/media/libstagefright/codecs/m4v_h263/dec/M4vH263Decoder.cpp
index 38778fb..2bdb3ef 100644
--- a/media/libstagefright/codecs/m4v_h263/dec/M4vH263Decoder.cpp
+++ b/media/libstagefright/codecs/m4v_h263/dec/M4vH263Decoder.cpp
@@ -23,8 +23,8 @@
 #include "mp4dec_api.h"
 
 #include <OMX_Component.h>
+#include <media/stagefright/foundation/ADebug.h>
 #include <media/stagefright/MediaBufferGroup.h>
-#include <media/stagefright/MediaDebug.h>
 #include <media/stagefright/MediaDefs.h>
 #include <media/stagefright/MediaErrors.h>
 #include <media/stagefright/MetaData.h>
@@ -106,7 +106,7 @@
     int32_t vol_size = 0;
     if (meta->findData(kKeyESDS, &type, &data, &size)) {
         ESDS esds((const uint8_t *)data, size);
-        CHECK_EQ(esds.InitCheck(), OK);
+        CHECK_EQ(esds.InitCheck(), (status_t)OK);
 
         const void *codec_specific_data;
         size_t codec_specific_data_size;
@@ -185,7 +185,7 @@
     ReadOptions::SeekMode mode;
     if (options && options->getSeekTo(&seekTimeUs, &mode)) {
         seeking = true;
-        CHECK_EQ(PVResetVideoDecoder(mHandle), PV_TRUE);
+        CHECK_EQ((int)PVResetVideoDecoder(mHandle), PV_TRUE);
     }
 
     MediaBuffer *inputBuffer = NULL;
@@ -223,19 +223,28 @@
         return UNKNOWN_ERROR;
     }
 
-    int32_t width, height;
-    PVGetVideoDimensions(mHandle, &width, &height);
-    if (width != mWidth || height != mHeight) {
+    int32_t disp_width, disp_height;
+    PVGetVideoDimensions(mHandle, &disp_width, &disp_height);
+
+    int32_t buf_width, buf_height;
+    PVGetBufferDimensions(mHandle, &buf_width, &buf_height);
+
+    if (buf_width != mWidth || buf_height != mHeight) {
         ++mNumSamplesOutput;  // The client will never get to see this frame.
 
         inputBuffer->release();
         inputBuffer = NULL;
 
-        mWidth = width;
-        mHeight = height;
+        mWidth = buf_width;
+        mHeight = buf_height;
         mFormat->setInt32(kKeyWidth, mWidth);
         mFormat->setInt32(kKeyHeight, mHeight);
 
+        CHECK_LE(disp_width, buf_width);
+        CHECK_LE(disp_height, buf_height);
+
+        mFormat->setRect(kKeyCropRect, 0, 0, disp_width - 1, disp_height - 1);
+
         return INFO_FORMAT_CHANGED;
     }
 
diff --git a/media/libstagefright/codecs/m4v_h263/dec/include/mp4dec_api.h b/media/libstagefright/codecs/m4v_h263/dec/include/mp4dec_api.h
index ef09900..24a50ce 100644
--- a/media/libstagefright/codecs/m4v_h263/dec/include/mp4dec_api.h
+++ b/media/libstagefright/codecs/m4v_h263/dec/include/mp4dec_api.h
@@ -159,6 +159,7 @@
     Bool    PVDecodeVopBody(VideoDecControls *decCtrl, int32 buffer_size[]);
     void    PVDecPostProcess(VideoDecControls *decCtrl, uint8 *outputYUV);
     OSCL_IMPORT_REF void    PVGetVideoDimensions(VideoDecControls *decCtrl, int32 *display_width, int32 *display_height);
+    OSCL_IMPORT_REF void    PVGetBufferDimensions(VideoDecControls *decCtrl, int32 *buf_width, int32 *buf_height);
     OSCL_IMPORT_REF void    PVSetPostProcType(VideoDecControls *decCtrl, int mode);
     uint32  PVGetVideoTimeStamp(VideoDecControls *decoderControl);
     int     PVGetDecBitrate(VideoDecControls *decCtrl);
diff --git a/media/libstagefright/codecs/m4v_h263/dec/src/pvdec_api.cpp b/media/libstagefright/codecs/m4v_h263/dec/src/pvdec_api.cpp
index 0c354d9..844bd14 100644
--- a/media/libstagefright/codecs/m4v_h263/dec/src/pvdec_api.cpp
+++ b/media/libstagefright/codecs/m4v_h263/dec/src/pvdec_api.cpp
@@ -722,6 +722,12 @@
     *display_height = video->displayHeight;
 }
 
+OSCL_EXPORT_REF void PVGetBufferDimensions(VideoDecControls *decCtrl, int32 *width, int32 *height) {
+    VideoDecData *video = (VideoDecData *)decCtrl->videoDecoderData;
+    *width = video->width;
+    *height = video->height;
+}
+
 /* ======================================================================== */
 /*  Function : PVGetVideoTimeStamp()                                        */
 /*  Date     : 04/27/2000, 08/29/2000                                       */
diff --git a/media/libstagefright/matroska/MatroskaExtractor.cpp b/media/libstagefright/matroska/MatroskaExtractor.cpp
index eca9ed6..733de92 100644
--- a/media/libstagefright/matroska/MatroskaExtractor.cpp
+++ b/media/libstagefright/matroska/MatroskaExtractor.cpp
@@ -707,6 +707,12 @@
     for (size_t index = 0; index < tracks->GetTracksCount(); ++index) {
         const mkvparser::Track *track = tracks->GetTrackByIndex(index);
 
+        if (track == NULL) {
+            // Apparently this is currently valid (if unexpected) behaviour
+            // of the mkv parser lib.
+            continue;
+        }
+
         const char *const codecID = track->GetCodecId();
         LOGV("codec id = %s", codecID);
         LOGV("codec name = %s", track->GetCodecNameAsUTF8());
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp
index ed36171..8977fbf 100644
--- a/opengl/libs/EGL/egl.cpp
+++ b/opengl/libs/EGL/egl.cpp
@@ -388,6 +388,13 @@
     return tls;
 }
 
+static inline void clearError() {
+    if (gEGLThreadLocalStorageKey != -1) {
+        tls_t* tls = getTLS();
+        tls->error = EGL_SUCCESS;
+    }
+}
+
 template<typename T>
 static __attribute__((noinline))
 T setErrorEtc(const char* caller, int line, EGLint error, T returnValue) {
@@ -708,6 +715,8 @@
 
 EGLDisplay eglGetDisplay(NativeDisplayType display)
 {
+    clearError();
+
     uint32_t index = uint32_t(display);
     if (index >= NUM_DISPLAYS) {
         return setError(EGL_BAD_PARAMETER, EGL_NO_DISPLAY);
@@ -727,6 +736,8 @@
 
 EGLBoolean eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
 {
+    clearError();
+
     egl_display_t * const dp = get_display(dpy);
     if (!dp) return setError(EGL_BAD_DISPLAY, EGL_FALSE);
 
@@ -858,6 +869,8 @@
     // after eglTerminate() has been called. eglTerminate() only
     // terminates an EGLDisplay, not a EGL itself.
 
+    clearError();
+
     egl_display_t* const dp = get_display(dpy);
     if (!dp) return setError(EGL_BAD_DISPLAY, EGL_FALSE);
 
@@ -909,6 +922,8 @@
                             EGLConfig *configs,
                             EGLint config_size, EGLint *num_config)
 {
+    clearError();
+
     egl_display_t const * const dp = get_display(dpy);
     if (!dp) return setError(EGL_BAD_DISPLAY, EGL_FALSE);
 
@@ -933,6 +948,8 @@
                             EGLConfig *configs, EGLint config_size,
                             EGLint *num_config)
 {
+    clearError();
+
     egl_display_t const * const dp = get_display(dpy);
     if (!dp) return setError(EGL_BAD_DISPLAY, EGL_FALSE);
 
@@ -1046,6 +1063,8 @@
 EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config,
         EGLint attribute, EGLint *value)
 {
+    clearError();
+
     egl_display_t const* dp = 0;
     egl_connection_t* cnx = validate_display_config(dpy, config, dp);
     if (!cnx) return EGL_FALSE;
@@ -1067,6 +1086,8 @@
                                     NativeWindowType window,
                                     const EGLint *attrib_list)
 {
+    clearError();
+
     egl_display_t const* dp = 0;
     egl_connection_t* cnx = validate_display_config(dpy, config, dp);
     if (cnx) {
@@ -1097,6 +1118,8 @@
                                     NativePixmapType pixmap,
                                     const EGLint *attrib_list)
 {
+    clearError();
+
     egl_display_t const* dp = 0;
     egl_connection_t* cnx = validate_display_config(dpy, config, dp);
     if (cnx) {
@@ -1115,6 +1138,8 @@
 EGLSurface eglCreatePbufferSurface( EGLDisplay dpy, EGLConfig config,
                                     const EGLint *attrib_list)
 {
+    clearError();
+
     egl_display_t const* dp = 0;
     egl_connection_t* cnx = validate_display_config(dpy, config, dp);
     if (cnx) {
@@ -1132,6 +1157,8 @@
                                     
 EGLBoolean eglDestroySurface(EGLDisplay dpy, EGLSurface surface)
 {
+    clearError();
+
     SurfaceRef _s(surface);
     if (!_s.get()) return setError(EGL_BAD_SURFACE, EGL_FALSE);
 
@@ -1154,6 +1181,8 @@
 EGLBoolean eglQuerySurface( EGLDisplay dpy, EGLSurface surface,
                             EGLint attribute, EGLint *value)
 {
+    clearError();
+
     SurfaceRef _s(surface);
     if (!_s.get()) return setError(EGL_BAD_SURFACE, EGL_FALSE);
 
@@ -1181,6 +1210,8 @@
 EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config,
                             EGLContext share_list, const EGLint *attrib_list)
 {
+    clearError();
+
     egl_display_t const* dp = 0;
     egl_connection_t* cnx = validate_display_config(dpy, config, dp);
     if (cnx) {
@@ -1218,6 +1249,8 @@
 
 EGLBoolean eglDestroyContext(EGLDisplay dpy, EGLContext ctx)
 {
+    clearError();
+
     ContextRef _c(ctx);
     if (!_c.get()) return setError(EGL_BAD_CONTEXT, EGL_FALSE);
     
@@ -1257,6 +1290,8 @@
 EGLBoolean eglMakeCurrent(  EGLDisplay dpy, EGLSurface draw,
                             EGLSurface read, EGLContext ctx)
 {
+    clearError();
+
     // get a reference to the object passed in
     ContextRef _c(ctx);
     SurfaceRef _d(draw);
@@ -1353,6 +1388,8 @@
 EGLBoolean eglQueryContext( EGLDisplay dpy, EGLContext ctx,
                             EGLint attribute, EGLint *value)
 {
+    clearError();
+
     ContextRef _c(ctx);
     if (!_c.get()) return setError(EGL_BAD_CONTEXT, EGL_FALSE);
 
@@ -1379,6 +1416,8 @@
     // could be called before eglInitialize(), but we wouldn't have a context
     // then, and this function would correctly return EGL_NO_CONTEXT.
 
+    clearError();
+
     EGLContext ctx = getContext();
     return ctx;
 }
@@ -1388,6 +1427,8 @@
     // could be called before eglInitialize(), but we wouldn't have a context
     // then, and this function would correctly return EGL_NO_SURFACE.
 
+    clearError();
+
     EGLContext ctx = getContext();
     if (ctx) {
         egl_context_t const * const c = get_context(ctx);
@@ -1406,6 +1447,8 @@
     // could be called before eglInitialize(), but we wouldn't have a context
     // then, and this function would correctly return EGL_NO_DISPLAY.
 
+    clearError();
+
     EGLContext ctx = getContext();
     if (ctx) {
         egl_context_t const * const c = get_context(ctx);
@@ -1420,6 +1463,8 @@
     // could be called before eglInitialize(), but we wouldn't have a context
     // then, and this function would return GL_TRUE, which isn't wrong.
 
+    clearError();
+
     EGLBoolean res = EGL_TRUE;
     EGLContext ctx = getContext();
     if (ctx) {
@@ -1439,7 +1484,9 @@
 {
     // could be called before eglInitialize(), but we wouldn't have a context
     // then, and this function would return GL_TRUE, which isn't wrong.
-    
+
+    clearError();
+
     EGLBoolean res = EGL_TRUE;
     EGLContext ctx = getContext();
     if (ctx) {
@@ -1502,6 +1549,8 @@
     // in which case we must make sure we've initialized ourselves, this
     // happens the first time egl_get_display() is called.
 
+    clearError();
+
     if (egl_init_drivers() == EGL_FALSE) {
         setError(EGL_BAD_PARAMETER, NULL);
         return  NULL;
@@ -1577,6 +1626,8 @@
 
 EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface draw)
 {
+    clearError();
+
     SurfaceRef _s(draw);
     if (!_s.get()) return setError(EGL_BAD_SURFACE, EGL_FALSE);
 
@@ -1590,6 +1641,8 @@
 EGLBoolean eglCopyBuffers(  EGLDisplay dpy, EGLSurface surface,
                             NativePixmapType target)
 {
+    clearError();
+
     SurfaceRef _s(surface);
     if (!_s.get()) return setError(EGL_BAD_SURFACE, EGL_FALSE);
 
@@ -1603,6 +1656,8 @@
 
 const char* eglQueryString(EGLDisplay dpy, EGLint name)
 {
+    clearError();
+
     egl_display_t const * const dp = get_display(dpy);
     switch (name) {
         case EGL_VENDOR:
@@ -1625,6 +1680,8 @@
 EGLBoolean eglSurfaceAttrib(
         EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value)
 {
+    clearError();
+
     SurfaceRef _s(surface);
     if (!_s.get()) return setError(EGL_BAD_SURFACE, EGL_FALSE);
 
@@ -1642,6 +1699,8 @@
 EGLBoolean eglBindTexImage(
         EGLDisplay dpy, EGLSurface surface, EGLint buffer)
 {
+    clearError();
+
     SurfaceRef _s(surface);
     if (!_s.get()) return setError(EGL_BAD_SURFACE, EGL_FALSE);
 
@@ -1659,6 +1718,8 @@
 EGLBoolean eglReleaseTexImage(
         EGLDisplay dpy, EGLSurface surface, EGLint buffer)
 {
+    clearError();
+
     SurfaceRef _s(surface);
     if (!_s.get()) return setError(EGL_BAD_SURFACE, EGL_FALSE);
 
@@ -1675,6 +1736,8 @@
 
 EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval)
 {
+    clearError();
+
     egl_display_t * const dp = get_display(dpy);
     if (!dp) return setError(EGL_BAD_DISPLAY, EGL_FALSE);
 
@@ -1700,6 +1763,8 @@
 
 EGLBoolean eglWaitClient(void)
 {
+    clearError();
+
     // could be called before eglInitialize(), but we wouldn't have a context
     // then, and this function would return GL_TRUE, which isn't wrong.
     EGLBoolean res = EGL_TRUE;
@@ -1723,6 +1788,8 @@
 
 EGLBoolean eglBindAPI(EGLenum api)
 {
+    clearError();
+
     if (egl_init_drivers() == EGL_FALSE) {
         return setError(EGL_BAD_PARAMETER, EGL_FALSE);
     }
@@ -1744,6 +1811,8 @@
 
 EGLenum eglQueryAPI(void)
 {
+    clearError();
+
     if (egl_init_drivers() == EGL_FALSE) {
         return setError(EGL_BAD_PARAMETER, EGL_FALSE);
     }
@@ -1764,6 +1833,8 @@
 
 EGLBoolean eglReleaseThread(void)
 {
+    clearError();
+
     // If there is context bound to the thread, release it
     loseCurrent(get_context(getContext()));
 
@@ -1783,6 +1854,8 @@
           EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer,
           EGLConfig config, const EGLint *attrib_list)
 {
+    clearError();
+
     egl_display_t const* dp = 0;
     egl_connection_t* cnx = validate_display_config(dpy, config, dp);
     if (!cnx) return EGL_FALSE;
@@ -1802,6 +1875,8 @@
 EGLBoolean eglLockSurfaceKHR(EGLDisplay dpy, EGLSurface surface,
         const EGLint *attrib_list)
 {
+    clearError();
+
     SurfaceRef _s(surface);
     if (!_s.get()) return setError(EGL_BAD_SURFACE, EGL_FALSE);
 
@@ -1820,6 +1895,8 @@
 
 EGLBoolean eglUnlockSurfaceKHR(EGLDisplay dpy, EGLSurface surface)
 {
+    clearError();
+
     SurfaceRef _s(surface);
     if (!_s.get()) return setError(EGL_BAD_SURFACE, EGL_FALSE);
 
@@ -1839,6 +1916,8 @@
 EGLImageKHR eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target,
         EGLClientBuffer buffer, const EGLint *attrib_list)
 {
+    clearError();
+
     if (ctx != EGL_NO_CONTEXT) {
         ContextRef _c(ctx);
         if (!_c.get()) return setError(EGL_BAD_CONTEXT, EGL_NO_IMAGE_KHR);
@@ -1910,6 +1989,8 @@
 
 EGLBoolean eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR img)
 {
+    clearError();
+
     egl_display_t const * const dp = get_display(dpy);
      if (dp == 0) {
          return setError(EGL_BAD_DISPLAY, EGL_FALSE);
@@ -1948,6 +2029,8 @@
 
 EGLSyncKHR eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list)
 {
+    clearError();
+
     EGLContext ctx = eglGetCurrentContext();
     ContextRef _c(ctx);
     if (!_c.get()) return setError(EGL_BAD_CONTEXT, EGL_NO_SYNC_KHR);
@@ -1968,6 +2051,8 @@
 
 EGLBoolean eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync)
 {
+    clearError();
+
     egl_display_t const * const dp = get_display(dpy);
     if (dp == 0) {
         return setError(EGL_BAD_DISPLAY, EGL_FALSE);
@@ -1995,6 +2080,8 @@
 
 EGLint eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout)
 {
+    clearError();
+
     egl_display_t const * const dp = get_display(dpy);
     if (dp == 0) {
         return setError(EGL_BAD_DISPLAY, EGL_FALSE);
@@ -2022,6 +2109,8 @@
 
 EGLBoolean eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value)
 {
+    clearError();
+
     egl_display_t const * const dp = get_display(dpy);
     if (dp == 0) {
         return setError(EGL_BAD_DISPLAY, EGL_FALSE);
@@ -2054,6 +2143,8 @@
 EGLBoolean eglSetSwapRectangleANDROID(EGLDisplay dpy, EGLSurface draw,
         EGLint left, EGLint top, EGLint width, EGLint height)
 {
+    clearError();
+
     SurfaceRef _s(draw);
     if (!_s.get()) return setError(EGL_BAD_SURFACE, EGL_FALSE);
 
diff --git a/packages/SystemUI/res/drawable-hdpi/battery_low_battery.png b/packages/SystemUI/res/drawable-hdpi/battery_low_battery.png
index e74c22f..2c7a0d4 100644
--- a/packages/SystemUI/res/drawable-hdpi/battery_low_battery.png
+++ b/packages/SystemUI/res/drawable-hdpi/battery_low_battery.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/button_frame_default.9.png b/packages/SystemUI/res/drawable-hdpi/button_frame_default.9.png
deleted file mode 100644
index d809b84..0000000
--- a/packages/SystemUI/res/drawable-hdpi/button_frame_default.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/button_frame_pressed.9.png b/packages/SystemUI/res/drawable-hdpi/button_frame_pressed.9.png
deleted file mode 100644
index 5cc007c..0000000
--- a/packages/SystemUI/res/drawable-hdpi/button_frame_pressed.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/signal_0.png b/packages/SystemUI/res/drawable-hdpi/signal_0.png
deleted file mode 100644
index 00e36c4..0000000
--- a/packages/SystemUI/res/drawable-hdpi/signal_0.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_notify_alarm.png b/packages/SystemUI/res/drawable-hdpi/stat_notify_alarm.png
index 89daee1..2d3eb30 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_notify_alarm.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_notify_alarm.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_bluetooth.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_bluetooth.png
index 96dc085..e8fbc9e 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_bluetooth.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_bluetooth.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_bluetooth_connected.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_bluetooth_connected.png
index 1e4bbf5..18c77df 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_bluetooth_connected.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_bluetooth_connected.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_1x.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_1x.png
index bdc8c27..818e292 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_1x.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_3g.png
index d0d1345..95866b1 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_3g.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_e.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_e.png
index 4211b8c..016b30b 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_e.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_g.png
index d5ece7a..ec672eb 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_g.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_h.png
index 6687b40..27bab73 100755
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_h.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_connected_1x.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_connected_1x.png
old mode 100755
new mode 100644
index ba24082..0e6849b
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_connected_1x.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_connected_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_connected_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_connected_3g.png
old mode 100755
new mode 100644
index 5af2b05..a86a324
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_connected_3g.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_connected_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_connected_e.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_connected_e.png
old mode 100755
new mode 100644
index 9909b09..24902d6
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_connected_e.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_connected_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_connected_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_connected_g.png
old mode 100755
new mode 100644
index 0e02b8d..4160a95
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_connected_g.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_connected_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_connected_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_connected_h.png
old mode 100755
new mode 100644
index f84ad32..d459ee3
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_connected_h.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_connected_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_in_1x.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_in_1x.png
old mode 100755
new mode 100644
index d80a8ce..7b64751
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_in_1x.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_in_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_in_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_in_3g.png
old mode 100755
new mode 100644
index 31c976a..d82930c
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_in_3g.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_in_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_in_e.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_in_e.png
index ae90cc8..8096846 100755
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_in_e.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_in_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_in_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_in_g.png
old mode 100755
new mode 100644
index a487f29..e94e146
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_in_g.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_in_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_in_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_in_h.png
old mode 100755
new mode 100644
index 816085b..8805a40
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_in_h.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_in_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_inandout_1x.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_inandout_1x.png
old mode 100755
new mode 100644
index 0132019..07545d5
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_inandout_1x.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_inandout_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_inandout_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_inandout_3g.png
old mode 100755
new mode 100644
index 3903545..7629cef
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_inandout_3g.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_inandout_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_inandout_e.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_inandout_e.png
old mode 100755
new mode 100644
index ed099ff..28578c6
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_inandout_e.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_inandout_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_inandout_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_inandout_g.png
old mode 100755
new mode 100644
index c930e4c..d9f7a30
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_inandout_g.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_inandout_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_inandout_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_inandout_h.png
old mode 100755
new mode 100644
index 407a06c..505ccd4
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_inandout_h.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_inandout_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_out_1x.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_out_1x.png
old mode 100755
new mode 100644
index 6141f72..783c2b6
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_out_1x.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_out_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_out_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_out_3g.png
old mode 100755
new mode 100644
index d44a4cf..001eaea
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_out_3g.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_out_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_out_e.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_out_e.png
old mode 100755
new mode 100644
index 54ebd9b..cbae7dc
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_out_e.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_out_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_out_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_out_g.png
old mode 100755
new mode 100644
index 2fe0bbf..11f3a5c
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_out_g.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_out_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_out_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_out_h.png
old mode 100755
new mode 100644
index e58e019..eb42294
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_out_h.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_out_h.png
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
index 00a29a4..66fb60e 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_1x.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_1x.png
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
index 11ee0f2..07ea499 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_3g.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_3g.png
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
index fc135fc..e39767a 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_e.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_e.png
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
index 3d33a6262..47c1fca 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_g.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_g.png
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
index f36e1eb..ac80dce 100755
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_h.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_h.png
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
index ef5dbf4..f88091b 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_1x.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_1x.png
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
index dba9675..95bb3cd 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_3g.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_3g.png
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
index 2e5d82e..0ef4701 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_e.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_e.png
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
index 0985a09..31b926b 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_g.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_g.png
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
index 7a32c43..ed02984 100755
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_h.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_h.png
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
index b622556..0ee5b08 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_1x.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_1x.png
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
index 04ec59e..cac7802 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_3g.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_3g.png
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
index a47b982..df6e195 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_e.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_e.png
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
index 9d90e71..4a2f867 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_g.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_g.png
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
index 920f290..2b4628f 100755
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_h.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_gps_acquiring.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_gps_acquiring.png
index 9003d67..150c9fc 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_gps_acquiring.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_gps_acquiring.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0.png
index 95ba181..1ef75d3 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully.png
index 95ba181..1ef75d3 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1.png
index adf668d..a7dc07e 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully.png
index adf668d..f1f4c4e 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2.png
index 7bf6b51..918a476 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully.png
index 7bf6b51..6e34e66 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3.png
index 78738ac..5b2acc6 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully.png
index 78738ac..3664ab4 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4.png
index ac88143..f1ff548 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully.png
index ac88143..b4fa481 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_ringer_silent.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_ringer_silent.png
index bdd37e1..5a741bb 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_ringer_silent.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_ringer_silent.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_ringer_vibrate.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_ringer_vibrate.png
index 21c1c08..7ff375a 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_ringer_vibrate.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_ringer_vibrate.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_null.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_null.png
index 1adc05a..03d2147 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_null.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_null.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/status_bar_expand_default.png b/packages/SystemUI/res/drawable-hdpi/status_bar_expand_default.png
deleted file mode 100644
index 92fc7f8..0000000
--- a/packages/SystemUI/res/drawable-hdpi/status_bar_expand_default.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/status_bar_expand_pressed.png b/packages/SystemUI/res/drawable-hdpi/status_bar_expand_pressed.png
deleted file mode 100644
index 77f09ac..0000000
--- a/packages/SystemUI/res/drawable-hdpi/status_bar_expand_pressed.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/status_bar_veto_normal.png b/packages/SystemUI/res/drawable-hdpi/status_bar_veto_normal.png
deleted file mode 100644
index df532b8..0000000
--- a/packages/SystemUI/res/drawable-hdpi/status_bar_veto_normal.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/status_bar_veto_pressed.png b/packages/SystemUI/res/drawable-hdpi/status_bar_veto_pressed.png
deleted file mode 100644
index 118c01b..0000000
--- a/packages/SystemUI/res/drawable-hdpi/status_bar_veto_pressed.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/button_frame_default.9.png b/packages/SystemUI/res/drawable-mdpi/button_frame_default.9.png
deleted file mode 100644
index 7ab1f26..0000000
--- a/packages/SystemUI/res/drawable-mdpi/button_frame_default.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/button_frame_pressed.9.png b/packages/SystemUI/res/drawable-mdpi/button_frame_pressed.9.png
deleted file mode 100644
index 08f7a4d..0000000
--- a/packages/SystemUI/res/drawable-mdpi/button_frame_pressed.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/scrubber_control_disabled_holo.png b/packages/SystemUI/res/drawable-mdpi/scrubber_control_disabled_holo.png
index b8adc97..177ddb8 100644
--- a/packages/SystemUI/res/drawable-mdpi/scrubber_control_disabled_holo.png
+++ b/packages/SystemUI/res/drawable-mdpi/scrubber_control_disabled_holo.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/signal_0.png b/packages/SystemUI/res/drawable-mdpi/signal_0.png
deleted file mode 100644
index 00fb261..0000000
--- a/packages/SystemUI/res/drawable-mdpi/signal_0.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/layout-xlarge/status_bar_input_methods_item.xml b/packages/SystemUI/res/layout-xlarge/status_bar_input_methods_item.xml
index 3028a42..3fef7e0 100644
--- a/packages/SystemUI/res/layout-xlarge/status_bar_input_methods_item.xml
+++ b/packages/SystemUI/res/layout-xlarge/status_bar_input_methods_item.xml
@@ -47,12 +47,11 @@
                 android:id="@+id/item_radio"
                 android:layout_width="30dip"
                 android:layout_height="wrap_content"
-                android:layout_marginRight="11dip"
                 android:focusable="false"
                 android:clickable="false" />
             <ImageView
                 android:id="@+id/item_icon"
-                android:layout_width="wrap_content"
+                android:layout_width="@android:dimen/app_icon_size"
                 android:layout_height="wrap_content"
                 android:scaleType="fitCenter" />
             <LinearLayout
diff --git a/packages/SystemUI/res/layout-xlarge/status_bar_notification_area.xml b/packages/SystemUI/res/layout-xlarge/status_bar_notification_area.xml
index 5a41421..faae62c 100644
--- a/packages/SystemUI/res/layout-xlarge/status_bar_notification_area.xml
+++ b/packages/SystemUI/res/layout-xlarge/status_bar_notification_area.xml
@@ -88,13 +88,12 @@
             android:id="@+id/network_text"
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
-            android:layout_marginTop="12dp"
             android:layout_marginRight="6dip"
             android:layout_marginLeft="6dip"
             android:gravity="center"
             android:singleLine="true"
             android:visibility="gone"
-            android:textSize="14dip"
+            android:textSize="16sp"
             android:textColor="#606060"
             />
 
diff --git a/packages/SystemUI/res/layout/status_bar_toggle_slider.xml b/packages/SystemUI/res/layout/status_bar_toggle_slider.xml
index cdf56c5..3105dab 100644
--- a/packages/SystemUI/res/layout/status_bar_toggle_slider.xml
+++ b/packages/SystemUI/res/layout/status_bar_toggle_slider.xml
@@ -27,7 +27,7 @@
         android:layout_alignParentLeft="true"
         android:layout_alignParentTop="true"
         android:layout_alignParentBottom="true"
-        android:button="@drawable/status_bar_toggle_button"
+        android:button="@null"
         />
     <SeekBar
         android:id="@+id/slider"
diff --git a/packages/SystemUI/res/values-bg-xlarge/strings.xml b/packages/SystemUI/res/values-bg-xlarge/strings.xml
index 8dd6d7c..9ddb662 100644
--- a/packages/SystemUI/res/values-bg-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-bg-xlarge/strings.xml
@@ -19,7 +19,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Изчистване на всичко"</string>
+    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Изч. на вс."</string>
     <string name="status_bar_settings_signal_meter_disconnected" msgid="4684094636492991496">"Няма връзка с интернет"</string>
     <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="1456658018593445677">"Wi-Fi: има връзка"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ca-xlarge/strings.xml b/packages/SystemUI/res/values-ca-xlarge/strings.xml
index 289a2a3..26b4651 100644
--- a/packages/SystemUI/res/values-ca-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-ca-xlarge/strings.xml
@@ -19,7 +19,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Esborra-ho tot"</string>
+    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Esborra-ho"</string>
     <string name="status_bar_settings_signal_meter_disconnected" msgid="4684094636492991496">"No connexió Internet"</string>
     <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="1456658018593445677">"Wi-Fi: connectat"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-cs-xlarge/strings.xml b/packages/SystemUI/res/values-cs-xlarge/strings.xml
index b257792..47a9e5c 100644
--- a/packages/SystemUI/res/values-cs-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-cs-xlarge/strings.xml
@@ -19,8 +19,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
-    <skip />
+    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Vymazat vše"</string>
     <string name="status_bar_settings_signal_meter_disconnected" msgid="4684094636492991496">"Žádné připojení"</string>
     <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="1456658018593445677">"Wi-Fi: připojeno"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-da-xlarge/strings.xml b/packages/SystemUI/res/values-da-xlarge/strings.xml
index 78107ab..c99afbd 100644
--- a/packages/SystemUI/res/values-da-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-da-xlarge/strings.xml
@@ -19,8 +19,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
-    <skip />
+    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Ryd alt"</string>
     <string name="status_bar_settings_signal_meter_disconnected" msgid="4684094636492991496">"Ingen internetforb."</string>
     <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="1456658018593445677">"Wi-Fi er forbundet"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-el-xlarge/strings.xml b/packages/SystemUI/res/values-el-xlarge/strings.xml
index 41f61e2..bbf7637 100644
--- a/packages/SystemUI/res/values-el-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-el-xlarge/strings.xml
@@ -19,8 +19,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
-    <skip />
+    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Διαγ. όλων"</string>
     <string name="status_bar_settings_signal_meter_disconnected" msgid="4684094636492991496">"Χωρίς σύνδ. σε Διαδ."</string>
     <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="1456658018593445677">"Wi-Fi: συνδέθηκε"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-es-rUS-xlarge/strings.xml b/packages/SystemUI/res/values-es-rUS-xlarge/strings.xml
index 5c9c6fc..00b951e 100644
--- a/packages/SystemUI/res/values-es-rUS-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-es-rUS-xlarge/strings.xml
@@ -1,18 +1,25 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/**
+ * Copyright (c) 2010, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); 
+ * you may not use this file except in compliance with the License. 
+ * You may obtain a copy of the License at 
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0 
+ *
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+ -->
+
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <!-- XL xlarge -->
-    <string name="status_bar_clear_all_button" msgid="4341545325987974494">"Eliminar todos"</string>
-    <!-- XL -->
-    <string name="status_bar_no_notifications_title" msgid="2492933749414725897">"No tienes notificaciones"</string>
-    <!-- XL -->
-    <string name="status_bar_settings_rotation_lock" msgid="9125161825884157545">"Bloquear orient. de pant."</string>
-    <!-- XL -->
-    <string name="recent_tasks_app_label" msgid="5550538721034982973">"Google Apps"</string>
-    <!-- XL -->
-    <string name="bluetooth_tethered" msgid="8017158699581472359">"Bluetooth anclado"</string>
-    <!-- XL xlarge -->
-    <string name="status_bar_settings_signal_meter_disconnected" msgid="4866302415753953027">"Sin conexión a Internet"</string>
-    <!-- XL xlarge -->
-    <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="3832182580451976589">"Wi-Fi conectado"</string>
+    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Eliminar todos"</string>
+    <string name="status_bar_settings_signal_meter_disconnected" msgid="4684094636492991496">"Sin conexión a Int."</string>
+    <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="1456658018593445677">"WiFi conectado"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-es-xlarge/strings.xml b/packages/SystemUI/res/values-es-xlarge/strings.xml
index 935fdbc..a544f79 100644
--- a/packages/SystemUI/res/values-es-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-es-xlarge/strings.xml
@@ -19,8 +19,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
-    <skip />
+    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Borrar todo"</string>
     <string name="status_bar_settings_signal_meter_disconnected" msgid="4684094636492991496">"Sin conexión a Internet"</string>
     <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="1456658018593445677">"Con conexión WiFi"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-hu-xlarge/strings.xml b/packages/SystemUI/res/values-hu-xlarge/strings.xml
index d49266f..debf906 100644
--- a/packages/SystemUI/res/values-hu-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-hu-xlarge/strings.xml
@@ -19,7 +19,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Az összes törlése"</string>
+    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Össz.törl."</string>
     <string name="status_bar_settings_signal_meter_disconnected" msgid="4684094636492991496">"Nincs internetkapcs."</string>
     <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="1456658018593445677">"Wi-Fi csatlakozva"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-it-xlarge/strings.xml b/packages/SystemUI/res/values-it-xlarge/strings.xml
index 3b1e302..9130b8d 100644
--- a/packages/SystemUI/res/values-it-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-it-xlarge/strings.xml
@@ -19,8 +19,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
-    <skip />
+    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Canc. tutto"</string>
     <string name="status_bar_settings_signal_meter_disconnected" msgid="4684094636492991496">"No connessione Internet"</string>
     <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="1456658018593445677">"Wi-Fi: connesso"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ko-xlarge/strings.xml b/packages/SystemUI/res/values-ko-xlarge/strings.xml
index 4962b5e..8c48978 100644
--- a/packages/SystemUI/res/values-ko-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-ko-xlarge/strings.xml
@@ -19,8 +19,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
-    <skip />
+    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"모두 지우기"</string>
     <string name="status_bar_settings_signal_meter_disconnected" msgid="4684094636492991496">"인터넷에 연결되지 않음"</string>
     <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="1456658018593445677">"Wi-Fi 연결됨"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-lt-xlarge/strings.xml b/packages/SystemUI/res/values-lt-xlarge/strings.xml
index f9b3ac1..d3c8fce 100644
--- a/packages/SystemUI/res/values-lt-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-lt-xlarge/strings.xml
@@ -19,7 +19,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Išvalyti viską"</string>
+    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Išv. viską"</string>
     <string name="status_bar_settings_signal_meter_disconnected" msgid="4684094636492991496">"Nėra interneto ryšio"</string>
     <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="1456658018593445677">"Prisijungta prie „Wi-Fi“"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-lv-xlarge/strings.xml b/packages/SystemUI/res/values-lv-xlarge/strings.xml
index af3423f..9bc9aa6 100644
--- a/packages/SystemUI/res/values-lv-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-lv-xlarge/strings.xml
@@ -19,7 +19,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Notīrīt visu"</string>
+    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Notīr.visu"</string>
     <string name="status_bar_settings_signal_meter_disconnected" msgid="4684094636492991496">"Nav interneta sav."</string>
     <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="1456658018593445677">"Izv. sav. ar Wi-Fi"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-nb-xlarge/strings.xml b/packages/SystemUI/res/values-nb-xlarge/strings.xml
index 726b061..d236f18 100644
--- a/packages/SystemUI/res/values-nb-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-nb-xlarge/strings.xml
@@ -19,8 +19,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
-    <skip />
+    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Tøm alt"</string>
     <string name="status_bar_settings_signal_meter_disconnected" msgid="4684094636492991496">"Ingen Int.-tilkobl."</string>
     <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="1456658018593445677">"Wi-Fi: tilkoblet"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-nl-xlarge/strings.xml b/packages/SystemUI/res/values-nl-xlarge/strings.xml
index b2946ae..eee7e35 100644
--- a/packages/SystemUI/res/values-nl-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-nl-xlarge/strings.xml
@@ -19,8 +19,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
-    <skip />
+    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Wissen"</string>
     <string name="status_bar_settings_signal_meter_disconnected" msgid="4684094636492991496">"Geen internetverb."</string>
     <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="1456658018593445677">"Verbonden via Wi-Fi"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-pl-xlarge/strings.xml b/packages/SystemUI/res/values-pl-xlarge/strings.xml
index 8642ea4..e223b84 100644
--- a/packages/SystemUI/res/values-pl-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-pl-xlarge/strings.xml
@@ -19,8 +19,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
-    <skip />
+    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Wyczyść wszystko"</string>
     <string name="status_bar_settings_signal_meter_disconnected" msgid="4684094636492991496">"Brak połączenia internetowego"</string>
     <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="1456658018593445677">"Wi-Fi: połączono"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-pt-rPT-xlarge/strings.xml b/packages/SystemUI/res/values-pt-rPT-xlarge/strings.xml
index 8ddb2b1..7df815c 100644
--- a/packages/SystemUI/res/values-pt-rPT-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT-xlarge/strings.xml
@@ -19,8 +19,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
-    <skip />
+    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Limpar tudo"</string>
     <string name="status_bar_settings_signal_meter_disconnected" msgid="4684094636492991496">"Sem ligação internet"</string>
     <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="1456658018593445677">"Wi-Fi ligado"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ro-xlarge/strings.xml b/packages/SystemUI/res/values-ro-xlarge/strings.xml
index 07badf4..e6296cd 100644
--- a/packages/SystemUI/res/values-ro-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-ro-xlarge/strings.xml
@@ -19,7 +19,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Ştergeţi-le pe toate"</string>
+    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Şterg. tot"</string>
     <string name="status_bar_settings_signal_meter_disconnected" msgid="4684094636492991496">"Fără conex. internet"</string>
     <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="1456658018593445677">"Wi-Fi conectat"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ru-xlarge/strings.xml b/packages/SystemUI/res/values-ru-xlarge/strings.xml
index 001f95c8..5c26e90 100644
--- a/packages/SystemUI/res/values-ru-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-ru-xlarge/strings.xml
@@ -19,8 +19,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
-    <skip />
+    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Удалить все"</string>
     <string name="status_bar_settings_signal_meter_disconnected" msgid="4684094636492991496">"Нет подключения"</string>
-    <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="1456658018593445677">"Wi-Fi: подключено"</string>
+    <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="1456658018593445677">"Wi-Fi подкл."</string>
 </resources>
diff --git a/packages/SystemUI/res/values-sl-xlarge/strings.xml b/packages/SystemUI/res/values-sl-xlarge/strings.xml
index ef50a67..fcc65de 100644
--- a/packages/SystemUI/res/values-sl-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-sl-xlarge/strings.xml
@@ -19,7 +19,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Počisti vse"</string>
+    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Izbriši vse"</string>
     <string name="status_bar_settings_signal_meter_disconnected" msgid="4684094636492991496">"Brez inter. povez."</string>
     <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="1456658018593445677">"Wi-Fi – povezano"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-sv-xlarge/strings.xml b/packages/SystemUI/res/values-sv-xlarge/strings.xml
index 9379451..db85ee1 100644
--- a/packages/SystemUI/res/values-sv-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-sv-xlarge/strings.xml
@@ -19,8 +19,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
-    <skip />
+    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Ta bort alla"</string>
     <string name="status_bar_settings_signal_meter_disconnected" msgid="4684094636492991496">"Ingen Internetansl."</string>
     <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="1456658018593445677">"Wi-Fi-ansluten"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-th-xlarge/strings.xml b/packages/SystemUI/res/values-th-xlarge/strings.xml
index fb4cbae..428e9ab 100644
--- a/packages/SystemUI/res/values-th-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-th-xlarge/strings.xml
@@ -19,7 +19,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"ล้างทั้งหมด"</string>
+    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"ล้างหมด"</string>
     <string name="status_bar_settings_signal_meter_disconnected" msgid="4684094636492991496">"ไม่มีการเชื่อมต่ออินเทอร์เน็ต"</string>
     <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="1456658018593445677">"เชื่อมต่อ Wi-Fi แล้ว"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-tl-xlarge/strings.xml b/packages/SystemUI/res/values-tl-xlarge/strings.xml
index 3560c96..25584b1 100644
--- a/packages/SystemUI/res/values-tl-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-tl-xlarge/strings.xml
@@ -19,7 +19,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"I-clear ang lahat"</string>
+    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"I-clear lahat"</string>
     <string name="status_bar_settings_signal_meter_disconnected" msgid="4684094636492991496">"Wala net connection"</string>
     <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="1456658018593445677">"Konektado ang WiFi"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-tr-xlarge/strings.xml b/packages/SystemUI/res/values-tr-xlarge/strings.xml
index f7d20b5e..fa937c3 100644
--- a/packages/SystemUI/res/values-tr-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-tr-xlarge/strings.xml
@@ -19,8 +19,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
-    <skip />
+    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Tümünü temizle"</string>
     <string name="status_bar_settings_signal_meter_disconnected" msgid="4684094636492991496">"İnternet bağlnts yok"</string>
     <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="1456658018593445677">"Kablosuz bağlandı"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-uk-xlarge/strings.xml b/packages/SystemUI/res/values-uk-xlarge/strings.xml
index 47242a6..864cb0c 100644
--- a/packages/SystemUI/res/values-uk-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-uk-xlarge/strings.xml
@@ -19,7 +19,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Очистити все"</string>
+    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"Очист. все"</string>
     <string name="status_bar_settings_signal_meter_disconnected" msgid="4684094636492991496">"Інтернет не під\'єдн."</string>
     <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="1456658018593445677">"Wi-Fi під\'єднано"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-zh-rTW-xlarge/strings.xml b/packages/SystemUI/res/values-zh-rTW-xlarge/strings.xml
index 6a8ef52..82f757e 100644
--- a/packages/SystemUI/res/values-zh-rTW-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW-xlarge/strings.xml
@@ -19,8 +19,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
-    <skip />
+    <string name="status_bar_clear_all_button" msgid="4722520806446512408">"全部清除"</string>
     <string name="status_bar_settings_signal_meter_disconnected" msgid="4684094636492991496">"沒有網路連線"</string>
     <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="1456658018593445677">"Wi-Fi 已連線"</string>
 </resources>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodsPanel.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodsPanel.java
index a3ccef9..06c789c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodsPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodsPanel.java
@@ -36,9 +36,12 @@
 import android.widget.RadioButton;
 import android.widget.TextView;
 
+import java.util.Comparator;
 import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
+import java.util.TreeMap;
 
 import com.android.systemui.R;
 
@@ -47,9 +50,10 @@
     private static final String TAG = "InputMethodsPanel";
 
     private final InputMethodManager mImm;
-    private final HashMap<InputMethodInfo, List<InputMethodSubtype>>
+    private final TreeMap<InputMethodInfo, List<InputMethodSubtype>>
             mEnabledInputMethodAndSubtypesCache =
-                    new HashMap<InputMethodInfo, List<InputMethodSubtype>>();
+                    new TreeMap<InputMethodInfo, List<InputMethodSubtype>>(
+                            new InputMethodComparator());
     private final HashMap<View, Pair<InputMethodInfo, InputMethodSubtype>> mRadioViewAndImiMap =
             new HashMap<View, Pair<InputMethodInfo, InputMethodSubtype>>();
 
@@ -61,6 +65,21 @@
     private String mEnabledInputMethodAndSubtypesCacheStr;
     private View mConfigureImeShortcut;
 
+    private class InputMethodComparator implements Comparator<InputMethodInfo> {
+        public int compare(InputMethodInfo imi1, InputMethodInfo imi2) {
+            if (imi2 == null) return 0;
+            if (imi1 == null) return 1;
+            if (mPackageManager != null) {
+                CharSequence imiId1 = imi1.loadLabel(mPackageManager);
+                CharSequence imiId2 = imi2.loadLabel(mPackageManager);
+                if (imiId1 != null && imiId2 != null) {
+                    return imiId1.toString().compareTo(imiId2.toString());
+                }
+            }
+            return imi1.getId().compareTo(imi2.getId());
+        }
+    }
+
     public InputMethodsPanel(Context context, AttributeSet attrs) {
         this(context, attrs, 0);
     }
@@ -190,8 +209,8 @@
         mRadioViewAndImiMap.clear();
         mPackageManager = mContext.getPackageManager();
 
-        HashMap<InputMethodInfo, List<InputMethodSubtype>> enabledIMIs
-                = getEnabledInputMethodAndSubtypeList();
+        Map<InputMethodInfo, List<InputMethodSubtype>> enabledIMIs =
+                getEnabledInputMethodAndSubtypeList();
         // TODO: Sort by alphabet and mode.
         Set<InputMethodInfo> cachedImiSet = enabledIMIs.keySet();
         for (InputMethodInfo imi: cachedImiSet) {
@@ -278,7 +297,7 @@
         }
     }
 
-    private HashMap<InputMethodInfo, List<InputMethodSubtype>>
+    private TreeMap<InputMethodInfo, List<InputMethodSubtype>>
             getEnabledInputMethodAndSubtypeList() {
         String newEnabledIMIs = Settings.Secure.getString(
                 mContext.getContentResolver(), Settings.Secure.ENABLED_INPUT_METHODS);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java
index 7544f46..a5e2fda 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java
@@ -98,10 +98,12 @@
     };
 
     public boolean isInContentArea(int x, int y) {
-        final int l = mRecentsContainer.getPaddingLeft();
-        final int r = mRecentsContainer.getWidth() - mRecentsContainer.getPaddingRight();
-        final int t = mRecentsContainer.getPaddingTop();
-        final int b = mRecentsContainer.getHeight() - mRecentsContainer.getPaddingBottom();
+        // use mRecentsContainer's exact bounds to determine horizontal position
+        final int l = mRecentsContainer.getLeft();
+        final int r = mRecentsContainer.getRight();
+        // use surrounding mRecentsGlowView's position in parent determine vertical bounds
+        final int t = mRecentsGlowView.getTop();
+        final int b = mRecentsGlowView.getBottom();
         return x >= l && x < r && y >= t && y < b;
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
index e26b8ea..9549930 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
@@ -81,7 +81,7 @@
 
     public static final int MAX_NOTIFICATION_ICONS = 5;
     // IME switcher icon is big and occupy width of two icons
-    public static final int MAX_NOTIFICATION_ICONS_IME_BUTTON_VISIBLE = MAX_NOTIFICATION_ICONS - 2;
+    public static final int MAX_NOTIFICATION_ICONS_IME_BUTTON_VISIBLE = MAX_NOTIFICATION_ICONS - 1;
 
     public static final int MSG_OPEN_NOTIFICATION_PANEL = 1000;
     public static final int MSG_CLOSE_NOTIFICATION_PANEL = 1001;
@@ -860,11 +860,8 @@
         if (DEBUG) {
             Slog.d(TAG, (visible?"showing":"hiding") + " the IME button");
         }
-        int oldVisibility = mInputMethodSwitchButton.getVisibility();
         mInputMethodSwitchButton.setIMEButtonVisible(token, visible);
-        if (oldVisibility != mInputMethodSwitchButton.getVisibility()) {
-            updateNotificationIcons();
-        }
+        updateNotificationIcons();
         mInputMethodsPanel.setImeToken(token);
         mBackButton.setImageResource(
                 visible ? R.drawable.ic_sysbar_back_ime : R.drawable.ic_sysbar_back);
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
index 6a1d199..88f30ed 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -116,7 +116,6 @@
     private ViewGroup mContentParent;
 
     SurfaceHolder.Callback2 mTakeSurfaceCallback;
-    BaseSurfaceHolder mSurfaceHolder;
     
     InputQueue.Callback mTakeInputQueueCallback;
     
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 67e0e67..9b5c42e 100755
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -389,6 +389,8 @@
             resolver.registerContentObserver(Settings.System.getUriFor(
                     Settings.System.SCREEN_OFF_TIMEOUT), false, this);
             resolver.registerContentObserver(Settings.System.getUriFor(
+                    Settings.System.WINDOW_ORIENTATION_LISTENER_LOG), false, this);
+            resolver.registerContentObserver(Settings.System.getUriFor(
                     Settings.System.POINTER_LOCATION), false, this);
             resolver.registerContentObserver(Settings.Secure.getUriFor(
                     Settings.Secure.DEFAULT_INPUT_METHOD), false, this);
@@ -759,6 +761,10 @@
                 updateOrientationListenerLp();
             }
 
+            mOrientationListener.setLogEnabled(
+                    Settings.System.getInt(resolver,
+                            Settings.System.WINDOW_ORIENTATION_LISTENER_LOG, 0) != 0);
+
             if (mSystemReady) {
                 int pointerLocation = Settings.System.getInt(resolver,
                         Settings.System.POINTER_LOCATION, 0);
@@ -2492,18 +2498,11 @@
                     return mSeascapeRotation;
                 case ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE:
                     //return either landscape rotation based on the sensor
-                    mOrientationListener.setAllow180Rotation(
-                            isLandscapeOrSeascape(Surface.ROTATION_180));
                     return getCurrentLandscapeRotation(lastRotation);
                 case ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT:
-                    mOrientationListener.setAllow180Rotation(
-                            !isLandscapeOrSeascape(Surface.ROTATION_180));
                     return getCurrentPortraitRotation(lastRotation);
             }
 
-            mOrientationListener.setAllow180Rotation(mAllowAllRotations ||
-                    orientation == ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR);
-
             // case for nosensor meaning ignore sensor and consider only lid
             // or orientation sensor disabled
             //or case.unspecified
@@ -2519,7 +2518,15 @@
                 return mUserRotation;
             } else {
                 if (useSensorForOrientationLp(orientation)) {
-                    return mOrientationListener.getCurrentRotation(lastRotation);
+                    // Disable 180 degree rotation unless allowed by default for the device
+                    // or explicitly requested by the application.
+                    int rotation = mOrientationListener.getCurrentRotation(lastRotation);
+                    if (rotation == Surface.ROTATION_180
+                            && !mAllowAllRotations
+                            && orientation != ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR) {
+                        return lastRotation;
+                    }
+                    return rotation;
                 }
                 return Surface.ROTATION_0;
             }
diff --git a/preloaded-classes b/preloaded-classes
index ca2e6ed..3780853 100644
--- a/preloaded-classes
+++ b/preloaded-classes
@@ -1839,94 +1839,94 @@
 org.apache.http.util.ByteArrayBuffer
 org.apache.http.util.CharArrayBuffer
 org.apache.http.util.LangUtils
-org.bouncycastle.asn1.ASN1Choice
-org.bouncycastle.asn1.ASN1Collection
-org.bouncycastle.asn1.ASN1Collection$ASN1CollectionEnumeration
-org.bouncycastle.asn1.ASN1Encodable
-org.bouncycastle.asn1.ASN1EncodableVector
-org.bouncycastle.asn1.ASN1InputStream
-org.bouncycastle.asn1.ASN1Null
-org.bouncycastle.asn1.ASN1Object
-org.bouncycastle.asn1.ASN1OctetString
-org.bouncycastle.asn1.ASN1OctetStringParser
-org.bouncycastle.asn1.ASN1OutputStream
-org.bouncycastle.asn1.ASN1Sequence
-org.bouncycastle.asn1.ASN1SequenceParser
-org.bouncycastle.asn1.ASN1Set
-org.bouncycastle.asn1.ASN1StreamParser
-org.bouncycastle.asn1.ASN1TaggedObject
-org.bouncycastle.asn1.ASN1TaggedObjectParser
-org.bouncycastle.asn1.BERTaggedObjectParser
-org.bouncycastle.asn1.DERBitString
-org.bouncycastle.asn1.DERBoolean
-org.bouncycastle.asn1.DEREncodable
-org.bouncycastle.asn1.DEREncodableVector
-org.bouncycastle.asn1.DERFactory
-org.bouncycastle.asn1.DERIA5String
-org.bouncycastle.asn1.DERInteger
-org.bouncycastle.asn1.DERNull
-org.bouncycastle.asn1.DERObject
-org.bouncycastle.asn1.DERObjectIdentifier
-org.bouncycastle.asn1.DEROctetString
-org.bouncycastle.asn1.DEROctetStringParser
-org.bouncycastle.asn1.DEROutputStream
-org.bouncycastle.asn1.DERPrintableString
-org.bouncycastle.asn1.DERSequence
-org.bouncycastle.asn1.DERSequenceParser
-org.bouncycastle.asn1.DERSet
-org.bouncycastle.asn1.DERString
-org.bouncycastle.asn1.DERT61String
-org.bouncycastle.asn1.DERTaggedObject
-org.bouncycastle.asn1.DERTags
-org.bouncycastle.asn1.DERUTCTime
-org.bouncycastle.asn1.DERUTF8String
-org.bouncycastle.asn1.DERUniversalString
-org.bouncycastle.asn1.DefiniteLengthInputStream
-org.bouncycastle.asn1.IndefiniteLengthInputStream
-org.bouncycastle.asn1.LimitedInputStream
-org.bouncycastle.asn1.OIDTokenizer
-org.bouncycastle.asn1.OrderedTable
-org.bouncycastle.asn1.bc.BCObjectIdentifiers
-org.bouncycastle.asn1.iana.IANAObjectIdentifiers
-org.bouncycastle.asn1.nist.NISTObjectIdentifiers
-org.bouncycastle.asn1.oiw.OIWObjectIdentifiers
-org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers
-org.bouncycastle.asn1.x509.AlgorithmIdentifier
-org.bouncycastle.asn1.x509.BasicConstraints
-org.bouncycastle.asn1.x509.SubjectPublicKeyInfo
-org.bouncycastle.asn1.x509.TBSCertificateStructure
-org.bouncycastle.asn1.x509.Time
-org.bouncycastle.asn1.x509.X509CertificateStructure
-org.bouncycastle.asn1.x509.X509Extension
-org.bouncycastle.asn1.x509.X509Extensions
-org.bouncycastle.asn1.x509.X509Name
-org.bouncycastle.asn1.x509.X509NameElementList
-org.bouncycastle.asn1.x509.X509ObjectIdentifiers
-org.bouncycastle.asn1.x9.X9ObjectIdentifiers
-org.bouncycastle.crypto.Digest
-org.bouncycastle.crypto.ExtendedDigest
-org.bouncycastle.crypto.Mac
-org.bouncycastle.crypto.digests.OpenSSLDigest
-org.bouncycastle.crypto.digests.OpenSSLDigest$SHA1
-org.bouncycastle.crypto.macs.HMac
-org.bouncycastle.jce.ProviderConfigurationPermission
-org.bouncycastle.jce.interfaces.BCKeyStore
-org.bouncycastle.jce.interfaces.ConfigurableProvider
-org.bouncycastle.jce.interfaces.PKCS12BagAttributeCarrier
-org.bouncycastle.jce.provider.BouncyCastleProvider
-org.bouncycastle.jce.provider.BouncyCastleProvider$1
-org.bouncycastle.jce.provider.JDKKeyStore
-org.bouncycastle.jce.provider.JDKKeyStore$StoreEntry
-org.bouncycastle.jce.provider.JDKX509CertificateFactory
-org.bouncycastle.jce.provider.PEMUtil
-org.bouncycastle.jce.provider.PKCS12BagAttributeCarrierImpl
-org.bouncycastle.jce.provider.PKIXCertPathValidatorSpi
-org.bouncycastle.jce.provider.ProviderUtil
-org.bouncycastle.jce.provider.X509CertificateObject
-org.bouncycastle.jce.provider.asymmetric.ECMappings
-org.bouncycastle.jce.provider.symmetric.AESMappings
-org.bouncycastle.util.Strings
-org.bouncycastle.util.io.Streams
+com.android.org.bouncycastle.asn1.ASN1Choice
+com.android.org.bouncycastle.asn1.ASN1Collection
+com.android.org.bouncycastle.asn1.ASN1Collection$ASN1CollectionEnumeration
+com.android.org.bouncycastle.asn1.ASN1Encodable
+com.android.org.bouncycastle.asn1.ASN1EncodableVector
+com.android.org.bouncycastle.asn1.ASN1InputStream
+com.android.org.bouncycastle.asn1.ASN1Null
+com.android.org.bouncycastle.asn1.ASN1Object
+com.android.org.bouncycastle.asn1.ASN1OctetString
+com.android.org.bouncycastle.asn1.ASN1OctetStringParser
+com.android.org.bouncycastle.asn1.ASN1OutputStream
+com.android.org.bouncycastle.asn1.ASN1Sequence
+com.android.org.bouncycastle.asn1.ASN1SequenceParser
+com.android.org.bouncycastle.asn1.ASN1Set
+com.android.org.bouncycastle.asn1.ASN1StreamParser
+com.android.org.bouncycastle.asn1.ASN1TaggedObject
+com.android.org.bouncycastle.asn1.ASN1TaggedObjectParser
+com.android.org.bouncycastle.asn1.BERTaggedObjectParser
+com.android.org.bouncycastle.asn1.DERBitString
+com.android.org.bouncycastle.asn1.DERBoolean
+com.android.org.bouncycastle.asn1.DEREncodable
+com.android.org.bouncycastle.asn1.DEREncodableVector
+com.android.org.bouncycastle.asn1.DERFactory
+com.android.org.bouncycastle.asn1.DERIA5String
+com.android.org.bouncycastle.asn1.DERInteger
+com.android.org.bouncycastle.asn1.DERNull
+com.android.org.bouncycastle.asn1.DERObject
+com.android.org.bouncycastle.asn1.DERObjectIdentifier
+com.android.org.bouncycastle.asn1.DEROctetString
+com.android.org.bouncycastle.asn1.DEROctetStringParser
+com.android.org.bouncycastle.asn1.DEROutputStream
+com.android.org.bouncycastle.asn1.DERPrintableString
+com.android.org.bouncycastle.asn1.DERSequence
+com.android.org.bouncycastle.asn1.DERSequenceParser
+com.android.org.bouncycastle.asn1.DERSet
+com.android.org.bouncycastle.asn1.DERString
+com.android.org.bouncycastle.asn1.DERT61String
+com.android.org.bouncycastle.asn1.DERTaggedObject
+com.android.org.bouncycastle.asn1.DERTags
+com.android.org.bouncycastle.asn1.DERUTCTime
+com.android.org.bouncycastle.asn1.DERUTF8String
+com.android.org.bouncycastle.asn1.DERUniversalString
+com.android.org.bouncycastle.asn1.DefiniteLengthInputStream
+com.android.org.bouncycastle.asn1.IndefiniteLengthInputStream
+com.android.org.bouncycastle.asn1.LimitedInputStream
+com.android.org.bouncycastle.asn1.OIDTokenizer
+com.android.org.bouncycastle.asn1.OrderedTable
+com.android.org.bouncycastle.asn1.bc.BCObjectIdentifiers
+com.android.org.bouncycastle.asn1.iana.IANAObjectIdentifiers
+com.android.org.bouncycastle.asn1.nist.NISTObjectIdentifiers
+com.android.org.bouncycastle.asn1.oiw.OIWObjectIdentifiers
+com.android.org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers
+com.android.org.bouncycastle.asn1.x509.AlgorithmIdentifier
+com.android.org.bouncycastle.asn1.x509.BasicConstraints
+com.android.org.bouncycastle.asn1.x509.SubjectPublicKeyInfo
+com.android.org.bouncycastle.asn1.x509.TBSCertificateStructure
+com.android.org.bouncycastle.asn1.x509.Time
+com.android.org.bouncycastle.asn1.x509.X509CertificateStructure
+com.android.org.bouncycastle.asn1.x509.X509Extension
+com.android.org.bouncycastle.asn1.x509.X509Extensions
+com.android.org.bouncycastle.asn1.x509.X509Name
+com.android.org.bouncycastle.asn1.x509.X509NameElementList
+com.android.org.bouncycastle.asn1.x509.X509ObjectIdentifiers
+com.android.org.bouncycastle.asn1.x9.X9ObjectIdentifiers
+com.android.org.bouncycastle.crypto.Digest
+com.android.org.bouncycastle.crypto.ExtendedDigest
+com.android.org.bouncycastle.crypto.Mac
+com.android.org.bouncycastle.crypto.digests.OpenSSLDigest
+com.android.org.bouncycastle.crypto.digests.OpenSSLDigest$SHA1
+com.android.org.bouncycastle.crypto.macs.HMac
+com.android.org.bouncycastle.jce.ProviderConfigurationPermission
+com.android.org.bouncycastle.jce.interfaces.BCKeyStore
+com.android.org.bouncycastle.jce.interfaces.ConfigurableProvider
+com.android.org.bouncycastle.jce.interfaces.PKCS12BagAttributeCarrier
+com.android.org.bouncycastle.jce.provider.BouncyCastleProvider
+com.android.org.bouncycastle.jce.provider.BouncyCastleProvider$1
+com.android.org.bouncycastle.jce.provider.JDKKeyStore
+com.android.org.bouncycastle.jce.provider.JDKKeyStore$StoreEntry
+com.android.org.bouncycastle.jce.provider.JDKX509CertificateFactory
+com.android.org.bouncycastle.jce.provider.PEMUtil
+com.android.org.bouncycastle.jce.provider.PKCS12BagAttributeCarrierImpl
+com.android.org.bouncycastle.jce.provider.PKIXCertPathValidatorSpi
+com.android.org.bouncycastle.jce.provider.ProviderUtil
+com.android.org.bouncycastle.jce.provider.X509CertificateObject
+com.android.org.bouncycastle.jce.provider.asymmetric.ECMappings
+com.android.org.bouncycastle.jce.provider.symmetric.AESMappings
+com.android.org.bouncycastle.util.Strings
+com.android.org.bouncycastle.util.io.Streams
 org.xml.sax.Attributes
 org.xml.sax.ContentHandler
 org.xml.sax.Locator
diff --git a/services/input/EventHub.cpp b/services/input/EventHub.cpp
index 487e73f..41dbe2f 100644
--- a/services/input/EventHub.cpp
+++ b/services/input/EventHub.cpp
@@ -778,12 +778,12 @@
         // Is this a new modern multi-touch driver?
         if (test_bit(ABS_MT_POSITION_X, abs_bitmask)
                 && test_bit(ABS_MT_POSITION_Y, abs_bitmask)) {
-            device->classes |= INPUT_DEVICE_CLASS_TOUCHSCREEN | INPUT_DEVICE_CLASS_TOUCHSCREEN_MT;
+            device->classes |= INPUT_DEVICE_CLASS_TOUCH | INPUT_DEVICE_CLASS_TOUCH_MT;
 
         // Is this an old style single-touch driver?
         } else if (test_bit(BTN_TOUCH, key_bitmask)
                 && test_bit(ABS_X, abs_bitmask) && test_bit(ABS_Y, abs_bitmask)) {
-            device->classes |= INPUT_DEVICE_CLASS_TOUCHSCREEN;
+            device->classes |= INPUT_DEVICE_CLASS_TOUCH;
         }
     }
 
@@ -808,7 +808,7 @@
     }
 #endif
 
-    if ((device->classes & INPUT_DEVICE_CLASS_TOUCHSCREEN)) {
+    if ((device->classes & INPUT_DEVICE_CLASS_TOUCH)) {
         // Load the virtual keys for the touch screen, if any.
         // We do this now so that we can make sure to load the keymap if necessary.
         status_t status = loadVirtualKeyMap(device);
diff --git a/services/input/EventHub.h b/services/input/EventHub.h
index 74b7ec5..0ee0b9b 100644
--- a/services/input/EventHub.h
+++ b/services/input/EventHub.h
@@ -106,14 +106,14 @@
     /* The input device is an alpha-numeric keyboard (not just a dial pad). */
     INPUT_DEVICE_CLASS_ALPHAKEY      = 0x00000002,
 
-    /* The input device is a touchscreen (either single-touch or multi-touch). */
-    INPUT_DEVICE_CLASS_TOUCHSCREEN   = 0x00000004,
+    /* The input device is a touchscreen or a touchpad (either single-touch or multi-touch). */
+    INPUT_DEVICE_CLASS_TOUCH         = 0x00000004,
 
     /* The input device is a cursor device such as a trackball or mouse. */
     INPUT_DEVICE_CLASS_CURSOR        = 0x00000008,
 
     /* The input device is a multi-touch touchscreen. */
-    INPUT_DEVICE_CLASS_TOUCHSCREEN_MT= 0x00000010,
+    INPUT_DEVICE_CLASS_TOUCH_MT      = 0x00000010,
 
     /* The input device is a directional pad (implies keyboard, has DPAD keys). */
     INPUT_DEVICE_CLASS_DPAD          = 0x00000020,
diff --git a/services/input/InputDispatcher.cpp b/services/input/InputDispatcher.cpp
index e314145..cbfdd75 100644
--- a/services/input/InputDispatcher.cpp
+++ b/services/input/InputDispatcher.cpp
@@ -1165,12 +1165,15 @@
         mTempTouchState.reset();
         mTempTouchState.down = true;
         mTempTouchState.deviceId = entry->deviceId;
+        mTempTouchState.source = entry->source;
         isSplit = false;
         wrongDevice = false;
     } else {
         mTempTouchState.copyFrom(mTouchState);
         isSplit = mTempTouchState.split;
-        wrongDevice = mTempTouchState.down && mTempTouchState.deviceId != entry->deviceId;
+        wrongDevice = mTempTouchState.down
+                && (mTempTouchState.deviceId != entry->deviceId
+                        || mTempTouchState.source != entry->source);
         if (wrongDevice) {
 #if DEBUG_INPUT_DISPATCHER_POLICY
             LOGD("Dropping event because a pointer for a different device is already down.");
@@ -1599,6 +1602,9 @@
         if (inputTarget->pointerIds.count() != originalMotionEntry->pointerCount) {
             MotionEntry* splitMotionEntry = splitMotionEvent(
                     originalMotionEntry, inputTarget->pointerIds);
+            if (!splitMotionEntry) {
+                return; // split event was dropped
+            }
 #if DEBUG_FOCUS
             LOGD("channel '%s' ~ Split motion event.",
                     connection->getInputChannelName());
@@ -2120,7 +2126,19 @@
             splitPointerCount += 1;
         }
     }
-    assert(splitPointerCount == pointerIds.count());
+
+    if (splitPointerCount != pointerIds.count()) {
+        // This is bad.  We are missing some of the pointers that we expected to deliver.
+        // Most likely this indicates that we received an ACTION_MOVE events that has
+        // different pointer ids than we expected based on the previous ACTION_DOWN
+        // or ACTION_POINTER_DOWN events that caused us to decide to split the pointers
+        // in this way.
+        LOGW("Dropping split motion event because the pointer count is %d but "
+                "we expected there to be %d pointers.  This probably means we received "
+                "a broken sequence of pointer ids from the input device.",
+                splitPointerCount, pointerIds.count());
+        return NULL;
+    }
 
     int32_t action = originalMotionEntry->action;
     int32_t maskedAction = action & AMOTION_EVENT_ACTION_MASK;
@@ -2196,7 +2214,7 @@
     }
 }
 
-void InputDispatcher::notifyKey(nsecs_t eventTime, int32_t deviceId, int32_t source,
+void InputDispatcher::notifyKey(nsecs_t eventTime, int32_t deviceId, uint32_t source,
         uint32_t policyFlags, int32_t action, int32_t flags,
         int32_t keyCode, int32_t scanCode, int32_t metaState, nsecs_t downTime) {
 #if DEBUG_INBOUND_EVENT_DETAILS
@@ -2243,7 +2261,7 @@
     }
 }
 
-void InputDispatcher::notifyMotion(nsecs_t eventTime, int32_t deviceId, int32_t source,
+void InputDispatcher::notifyMotion(nsecs_t eventTime, int32_t deviceId, uint32_t source,
         uint32_t policyFlags, int32_t action, int32_t flags, int32_t metaState, int32_t edgeFlags,
         uint32_t pointerCount, const int32_t* pointerIds, const PointerCoords* pointerCoords,
         float xPrecision, float yPrecision, nsecs_t downTime) {
@@ -2296,6 +2314,7 @@
                 }
 
                 if (motionEntry->action != AMOTION_EVENT_ACTION_MOVE
+                        || motionEntry->source != source
                         || motionEntry->pointerCount != pointerCount
                         || motionEntry->isInjected()) {
                     // Last motion event in the queue for this device is not compatible for
@@ -2355,6 +2374,7 @@
                             dispatchEntry->eventEntry);
                     if (motionEntry->action != AMOTION_EVENT_ACTION_MOVE
                             || motionEntry->deviceId != deviceId
+                            || motionEntry->source != source
                             || motionEntry->pointerCount != pointerCount
                             || motionEntry->isInjected()) {
                         // The motion event is not compatible with this move.
@@ -2883,6 +2903,7 @@
     dump.appendFormat(INDENT "TouchDown: %s\n", toString(mTouchState.down));
     dump.appendFormat(INDENT "TouchSplit: %s\n", toString(mTouchState.split));
     dump.appendFormat(INDENT "TouchDeviceId: %d\n", mTouchState.deviceId);
+    dump.appendFormat(INDENT "TouchSource: 0x%08x\n", mTouchState.source);
     if (!mTouchState.windows.isEmpty()) {
         dump.append(INDENT "TouchedWindows:\n");
         for (size_t i = 0; i < mTouchState.windows.size(); i++) {
@@ -3308,7 +3329,7 @@
 }
 
 InputDispatcher::KeyEntry* InputDispatcher::Allocator::obtainKeyEntry(nsecs_t eventTime,
-        int32_t deviceId, int32_t source, uint32_t policyFlags, int32_t action,
+        int32_t deviceId, uint32_t source, uint32_t policyFlags, int32_t action,
         int32_t flags, int32_t keyCode, int32_t scanCode, int32_t metaState,
         int32_t repeatCount, nsecs_t downTime) {
     KeyEntry* entry = mKeyEntryPool.alloc();
@@ -3329,7 +3350,7 @@
 }
 
 InputDispatcher::MotionEntry* InputDispatcher::Allocator::obtainMotionEntry(nsecs_t eventTime,
-        int32_t deviceId, int32_t source, uint32_t policyFlags, int32_t action, int32_t flags,
+        int32_t deviceId, uint32_t source, uint32_t policyFlags, int32_t action, int32_t flags,
         int32_t metaState, int32_t edgeFlags, float xPrecision, float yPrecision,
         nsecs_t downTime, uint32_t pointerCount,
         const int32_t* pointerIds, const PointerCoords* pointerCoords) {
@@ -3757,7 +3778,7 @@
 // --- InputDispatcher::TouchState ---
 
 InputDispatcher::TouchState::TouchState() :
-    down(false), split(false), deviceId(-1) {
+    down(false), split(false), deviceId(-1), source(0) {
 }
 
 InputDispatcher::TouchState::~TouchState() {
@@ -3767,6 +3788,7 @@
     down = false;
     split = false;
     deviceId = -1;
+    source = 0;
     windows.clear();
 }
 
@@ -3774,6 +3796,7 @@
     down = other.down;
     split = other.split;
     deviceId = other.deviceId;
+    source = other.source;
     windows.clear();
     windows.appendVector(other.windows);
 }
diff --git a/services/input/InputDispatcher.h b/services/input/InputDispatcher.h
index 11e5117..006c6b8 100644
--- a/services/input/InputDispatcher.h
+++ b/services/input/InputDispatcher.h
@@ -227,10 +227,10 @@
      * These methods should only be called on the input reader thread.
      */
     virtual void notifyConfigurationChanged(nsecs_t eventTime) = 0;
-    virtual void notifyKey(nsecs_t eventTime, int32_t deviceId, int32_t source,
+    virtual void notifyKey(nsecs_t eventTime, int32_t deviceId, uint32_t source,
             uint32_t policyFlags, int32_t action, int32_t flags, int32_t keyCode,
             int32_t scanCode, int32_t metaState, nsecs_t downTime) = 0;
-    virtual void notifyMotion(nsecs_t eventTime, int32_t deviceId, int32_t source,
+    virtual void notifyMotion(nsecs_t eventTime, int32_t deviceId, uint32_t source,
             uint32_t policyFlags, int32_t action, int32_t flags,
             int32_t metaState, int32_t edgeFlags,
             uint32_t pointerCount, const int32_t* pointerIds, const PointerCoords* pointerCoords,
@@ -313,10 +313,10 @@
     virtual void dispatchOnce();
 
     virtual void notifyConfigurationChanged(nsecs_t eventTime);
-    virtual void notifyKey(nsecs_t eventTime, int32_t deviceId, int32_t source,
+    virtual void notifyKey(nsecs_t eventTime, int32_t deviceId, uint32_t source,
             uint32_t policyFlags, int32_t action, int32_t flags, int32_t keyCode,
             int32_t scanCode, int32_t metaState, nsecs_t downTime);
-    virtual void notifyMotion(nsecs_t eventTime, int32_t deviceId, int32_t source,
+    virtual void notifyMotion(nsecs_t eventTime, int32_t deviceId, uint32_t source,
             uint32_t policyFlags, int32_t action, int32_t flags,
             int32_t metaState, int32_t edgeFlags,
             uint32_t pointerCount, const int32_t* pointerIds, const PointerCoords* pointerCoords,
@@ -379,7 +379,7 @@
 
     struct KeyEntry : EventEntry {
         int32_t deviceId;
-        int32_t source;
+        uint32_t source;
         int32_t action;
         int32_t flags;
         int32_t keyCode;
@@ -407,7 +407,7 @@
 
     struct MotionEntry : EventEntry {
         int32_t deviceId;
-        int32_t source;
+        uint32_t source;
         int32_t action;
         int32_t flags;
         int32_t metaState;
@@ -549,11 +549,11 @@
         InjectionState* obtainInjectionState(int32_t injectorPid, int32_t injectorUid);
         ConfigurationChangedEntry* obtainConfigurationChangedEntry(nsecs_t eventTime);
         KeyEntry* obtainKeyEntry(nsecs_t eventTime,
-                int32_t deviceId, int32_t source, uint32_t policyFlags, int32_t action,
+                int32_t deviceId, uint32_t source, uint32_t policyFlags, int32_t action,
                 int32_t flags, int32_t keyCode, int32_t scanCode, int32_t metaState,
                 int32_t repeatCount, nsecs_t downTime);
         MotionEntry* obtainMotionEntry(nsecs_t eventTime,
-                int32_t deviceId, int32_t source, uint32_t policyFlags, int32_t action,
+                int32_t deviceId, uint32_t source, uint32_t policyFlags, int32_t action,
                 int32_t flags, int32_t metaState, int32_t edgeFlags,
                 float xPrecision, float yPrecision,
                 nsecs_t downTime, uint32_t pointerCount,
@@ -645,7 +645,7 @@
     private:
         struct KeyMemento {
             int32_t deviceId;
-            int32_t source;
+            uint32_t source;
             int32_t keyCode;
             int32_t scanCode;
             int32_t flags;
@@ -654,7 +654,7 @@
 
         struct MotionMemento {
             int32_t deviceId;
-            int32_t source;
+            uint32_t source;
             float xPrecision;
             float yPrecision;
             nsecs_t downTime;
@@ -846,6 +846,7 @@
         bool down;
         bool split;
         int32_t deviceId; // id of the device that is currently down, others are rejected
+        uint32_t source;  // source of the device that is current down, others are rejected
         Vector<TouchedWindow> windows;
 
         TouchState();
diff --git a/services/input/InputReader.cpp b/services/input/InputReader.cpp
index 2e83256..46d374d 100644
--- a/services/input/InputReader.cpp
+++ b/services/input/InputReader.cpp
@@ -260,10 +260,10 @@
         device->addMapper(new CursorInputMapper(device));
     }
 
-    // Touchscreen-like devices.
-    if (classes & INPUT_DEVICE_CLASS_TOUCHSCREEN_MT) {
+    // Touchscreens and touchpad devices.
+    if (classes & INPUT_DEVICE_CLASS_TOUCH_MT) {
         device->addMapper(new MultiTouchInputMapper(device));
-    } else if (classes & INPUT_DEVICE_CLASS_TOUCHSCREEN) {
+    } else if (classes & INPUT_DEVICE_CLASS_TOUCH) {
         device->addMapper(new SingleTouchInputMapper(device));
     }
 
@@ -605,11 +605,19 @@
 
     mSources = 0;
 
-    size_t numMappers = mMappers.size();
-    for (size_t i = 0; i < numMappers; i++) {
+    for (size_t i = 0; i < mMappers.size(); i++) {
         InputMapper* mapper = mMappers[i];
         mapper->configure();
-        mSources |= mapper->getSources();
+
+        uint32_t sources = mapper->getSources();
+        if (sources) {
+            mSources |= sources;
+        } else {
+            // The input mapper does not provide any sources.  Remove it from the list.
+            mMappers.removeAt(i);
+            delete mapper;
+            i -= 1;
+        }
     }
 }
 
@@ -1074,7 +1082,7 @@
     // Configure device mode.
     switch (mParameters.mode) {
     case Parameters::MODE_POINTER:
-        mSources = AINPUT_SOURCE_MOUSE;
+        mSources = 0; // AINPUT_SOURCE_MOUSE; disable mouse support
         mXPrecision = 1.0f;
         mYPrecision = 1.0f;
         mXScale = 1.0f;
@@ -1455,12 +1463,12 @@
     mParameters.virtualKeyQuietTime = getPolicy()->getVirtualKeyQuietTime();
 
     String8 deviceTypeString;
-    mParameters.deviceType = Parameters::DEVICE_TYPE_TOUCH_SCREEN;
+    mParameters.deviceType = Parameters::DEVICE_TYPE_TOUCH_PAD;
     if (getDevice()->getConfiguration().tryGetProperty(String8("touch.deviceType"),
             deviceTypeString)) {
-        if (deviceTypeString == "touchPad") {
-            mParameters.deviceType = Parameters::DEVICE_TYPE_TOUCH_PAD;
-        } else if (deviceTypeString != "touchScreen") {
+        if (deviceTypeString == "touchScreen") {
+            mParameters.deviceType = Parameters::DEVICE_TYPE_TOUCH_SCREEN;
+        } else if (deviceTypeString != "touchPad") {
             LOGW("Invalid value for touch.deviceType: '%s'", deviceTypeString.string());
         }
     }
diff --git a/services/input/tests/InputReader_test.cpp b/services/input/tests/InputReader_test.cpp
index 98d627d..25030d8 100644
--- a/services/input/tests/InputReader_test.cpp
+++ b/services/input/tests/InputReader_test.cpp
@@ -188,7 +188,7 @@
     struct NotifyKeyArgs {
         nsecs_t eventTime;
         int32_t deviceId;
-        int32_t source;
+        uint32_t source;
         uint32_t policyFlags;
         int32_t action;
         int32_t flags;
@@ -201,7 +201,7 @@
     struct NotifyMotionArgs {
         nsecs_t eventTime;
         int32_t deviceId;
-        int32_t source;
+        uint32_t source;
         uint32_t policyFlags;
         int32_t action;
         int32_t flags;
@@ -288,7 +288,7 @@
         mNotifyConfigurationChangedArgs.push_back(args);
     }
 
-    virtual void notifyKey(nsecs_t eventTime, int32_t deviceId, int32_t source,
+    virtual void notifyKey(nsecs_t eventTime, int32_t deviceId, uint32_t source,
             uint32_t policyFlags, int32_t action, int32_t flags, int32_t keyCode,
             int32_t scanCode, int32_t metaState, nsecs_t downTime) {
         NotifyKeyArgs args;
@@ -305,7 +305,7 @@
         mNotifyKeyArgs.push_back(args);
     }
 
-    virtual void notifyMotion(nsecs_t eventTime, int32_t deviceId, int32_t source,
+    virtual void notifyMotion(nsecs_t eventTime, int32_t deviceId, uint32_t source,
             uint32_t policyFlags, int32_t action, int32_t flags,
             int32_t metaState, int32_t edgeFlags,
             uint32_t pointerCount, const int32_t* pointerIds, const PointerCoords* pointerCoords,
@@ -976,8 +976,10 @@
 }
 
 TEST_F(InputReaderTest, GetInputConfiguration_WhenTouchScreenPresent_ReturnsFingerTouchScreen) {
+    PropertyMap configuration;
+    configuration.addProperty(String8("touch.deviceType"), String8("touchScreen"));
     ASSERT_NO_FATAL_FAILURE(addDevice(0, String8("touchscreen"),
-            INPUT_DEVICE_CLASS_TOUCHSCREEN, NULL));
+            INPUT_DEVICE_CLASS_TOUCH, &configuration));
 
     InputConfiguration config;
     mReader->getInputConfiguration(&config);
@@ -987,6 +989,18 @@
     ASSERT_EQ(InputConfiguration::TOUCHSCREEN_FINGER, config.touchScreen);
 }
 
+TEST_F(InputReaderTest, GetInputConfiguration_WhenTouchPadPresent_ReturnsFingerNoTouch) {
+    ASSERT_NO_FATAL_FAILURE(addDevice(0, String8("touchpad"),
+            INPUT_DEVICE_CLASS_TOUCH, NULL));
+
+    InputConfiguration config;
+    mReader->getInputConfiguration(&config);
+
+    ASSERT_EQ(InputConfiguration::KEYBOARD_NOKEYS, config.keyboard);
+    ASSERT_EQ(InputConfiguration::NAVIGATION_NONAV, config.navigation);
+    ASSERT_EQ(InputConfiguration::TOUCHSCREEN_NOTOUCH, config.touchScreen);
+}
+
 TEST_F(InputReaderTest, GetInputConfiguration_WhenMousePresent_ReturnsNoNavigation) {
     sp<FakePointerController> controller = new FakePointerController();
     mFakePolicy->setPointerController(0, controller);
@@ -2385,6 +2399,14 @@
 }
 
 
+TEST_F(SingleTouchInputMapperTest, GetSources_WhenDeviceTypeIsNotSpecified_ReturnsTouchPad) {
+    SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    prepareAxes(POSITION);
+    addMapperAndConfigure(mapper);
+
+    ASSERT_EQ(AINPUT_SOURCE_TOUCHPAD, mapper->getSources());
+}
+
 TEST_F(SingleTouchInputMapperTest, GetSources_WhenDeviceTypeIsTouchPad_ReturnsTouchPad) {
     SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
     prepareAxes(POSITION);
@@ -2405,6 +2427,7 @@
 
 TEST_F(SingleTouchInputMapperTest, GetKeyCodeState) {
     SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
     prepareDisplay(DISPLAY_ORIENTATION_0);
     prepareAxes(POSITION);
     prepareVirtualKeys();
@@ -2432,6 +2455,7 @@
 
 TEST_F(SingleTouchInputMapperTest, GetScanCodeState) {
     SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
     prepareDisplay(DISPLAY_ORIENTATION_0);
     prepareAxes(POSITION);
     prepareVirtualKeys();
@@ -2459,6 +2483,7 @@
 
 TEST_F(SingleTouchInputMapperTest, MarkSupportedKeyCodes) {
     SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
     prepareDisplay(DISPLAY_ORIENTATION_0);
     prepareAxes(POSITION);
     prepareVirtualKeys();
@@ -2475,6 +2500,7 @@
     // Note: Ideally we should send cancels but the implementation is more straightforward
     // with up and this will only happen if a device is forcibly removed.
     SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
     prepareDisplay(DISPLAY_ORIENTATION_0);
     prepareAxes(POSITION);
     prepareVirtualKeys();
@@ -2508,6 +2534,7 @@
 
 TEST_F(SingleTouchInputMapperTest, Reset_WhenNothingIsPressed_NothingMuchHappens) {
     SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
     prepareDisplay(DISPLAY_ORIENTATION_0);
     prepareAxes(POSITION);
     prepareVirtualKeys();
@@ -2534,6 +2561,7 @@
 
 TEST_F(SingleTouchInputMapperTest, Process_WhenVirtualKeyIsPressedAndReleasedNormally_SendsKeyDownAndKeyUp) {
     SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
     prepareDisplay(DISPLAY_ORIENTATION_0);
     prepareAxes(POSITION);
     prepareVirtualKeys();
@@ -2583,6 +2611,7 @@
 
 TEST_F(SingleTouchInputMapperTest, Process_WhenVirtualKeyIsPressedAndMovedOutOfBounds_SendsKeyDownAndKeyCancel) {
     SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
     prepareDisplay(DISPLAY_ORIENTATION_0);
     prepareAxes(POSITION);
     prepareVirtualKeys();
@@ -2697,6 +2726,7 @@
 
 TEST_F(SingleTouchInputMapperTest, Process_WhenTouchStartsOutsideDisplayAndMovesIn_SendsDownAsTouchEntersDisplay) {
     SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
     prepareDisplay(DISPLAY_ORIENTATION_0);
     prepareAxes(POSITION);
     prepareVirtualKeys();
@@ -2765,6 +2795,7 @@
 
 TEST_F(SingleTouchInputMapperTest, Process_NormalSingleTouchGesture) {
     SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
     prepareDisplay(DISPLAY_ORIENTATION_0);
     prepareAxes(POSITION);
     prepareVirtualKeys();
@@ -2848,6 +2879,7 @@
 
 TEST_F(SingleTouchInputMapperTest, Process_WhenNotOrientationAware_DoesNotRotateMotions) {
     SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
     prepareAxes(POSITION);
     addConfigurationProperty("touch.orientationAware", "0");
     addMapperAndConfigure(mapper);
@@ -2870,6 +2902,7 @@
 
 TEST_F(SingleTouchInputMapperTest, Process_WhenOrientationAware_RotatesMotions) {
     SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
     prepareAxes(POSITION);
     addMapperAndConfigure(mapper);
 
@@ -2930,6 +2963,7 @@
 
 TEST_F(SingleTouchInputMapperTest, Process_AllAxes_DefaultCalibration) {
     SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
     prepareDisplay(DISPLAY_ORIENTATION_0);
     prepareAxes(POSITION | PRESSURE | TOOL);
     addMapperAndConfigure(mapper);
@@ -3062,6 +3096,7 @@
 
 TEST_F(MultiTouchInputMapperTest, Process_NormalMultiTouchGesture_WithoutTrackingIds) {
     MultiTouchInputMapper* mapper = new MultiTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
     prepareDisplay(DISPLAY_ORIENTATION_0);
     prepareAxes(POSITION);
     prepareVirtualKeys();
@@ -3313,6 +3348,7 @@
 
 TEST_F(MultiTouchInputMapperTest, Process_NormalMultiTouchGesture_WithTrackingIds) {
     MultiTouchInputMapper* mapper = new MultiTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
     prepareDisplay(DISPLAY_ORIENTATION_0);
     prepareAxes(POSITION | ID);
     prepareVirtualKeys();
@@ -3473,6 +3509,7 @@
 
 TEST_F(MultiTouchInputMapperTest, Process_AllAxes_WithDefaultCalibration) {
     MultiTouchInputMapper* mapper = new MultiTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
     prepareDisplay(DISPLAY_ORIENTATION_0);
     prepareAxes(POSITION | TOUCH | TOOL | PRESSURE | ORIENTATION | ID | MINOR);
     addMapperAndConfigure(mapper);
@@ -3518,6 +3555,7 @@
 
 TEST_F(MultiTouchInputMapperTest, Process_TouchAndToolAxes_GeometricCalibration) {
     MultiTouchInputMapper* mapper = new MultiTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
     prepareDisplay(DISPLAY_ORIENTATION_0);
     prepareAxes(POSITION | TOUCH | TOOL | MINOR);
     addConfigurationProperty("touch.touchSize.calibration", "geometric");
@@ -3559,6 +3597,7 @@
 
 TEST_F(MultiTouchInputMapperTest, Process_TouchToolPressureSizeAxes_SummedLinearCalibration) {
     MultiTouchInputMapper* mapper = new MultiTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
     prepareDisplay(DISPLAY_ORIENTATION_0);
     prepareAxes(POSITION | TOUCH | TOOL);
     addConfigurationProperty("touch.touchSize.calibration", "pressure");
@@ -3615,6 +3654,7 @@
 
 TEST_F(MultiTouchInputMapperTest, Process_TouchToolPressureSizeAxes_AreaCalibration) {
     MultiTouchInputMapper* mapper = new MultiTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
     prepareDisplay(DISPLAY_ORIENTATION_0);
     prepareAxes(POSITION | TOUCH | TOOL);
     addConfigurationProperty("touch.touchSize.calibration", "pressure");
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java
index 21c1e81..0147b1a 100644
--- a/services/java/com/android/server/InputMethodManagerService.java
+++ b/services/java/com/android/server/InputMethodManagerService.java
@@ -1356,14 +1356,27 @@
 
     public boolean switchToLastInputMethod(IBinder token) {
         synchronized (mMethodMap) {
-            Pair<String, String> lastIme = mSettings.getLastInputMethodAndSubtypeLocked();
-            if (lastIme != null) {
-                InputMethodInfo imi = mMethodMap.get(lastIme.first);
-                if (imi != null) {
-                    setInputMethodWithSubtypeId(token, lastIme.first, getSubtypeIdFromHashCode(
-                            imi, Integer.valueOf(lastIme.second)));
-                    return true;
+            final Pair<String, String> lastIme = mSettings.getLastInputMethodAndSubtypeLocked();
+            if (lastIme == null) return false;
+            final InputMethodInfo lastImi = mMethodMap.get(lastIme.first);
+            if (lastImi == null) return false;
+
+            final boolean imiIdIsSame = lastImi.getId().equals(mCurMethodId);
+            final int lastSubtypeHash = Integer.valueOf(lastIme.second);
+            // If the last IME is the same as the current IME and the last subtype is not defined,
+            // there is no need to switch to the last IME.
+            if (imiIdIsSame && lastSubtypeHash == NOT_A_SUBTYPE_ID) return false;
+
+            int currentSubtypeHash = mCurrentSubtype == null ? NOT_A_SUBTYPE_ID
+                    : mCurrentSubtype.hashCode();
+            if (!imiIdIsSame || lastSubtypeHash != currentSubtypeHash) {
+                if (DEBUG) {
+                    Slog.d(TAG, "Switch to: " + lastImi.getId() + ", " + lastIme.second + ", from: "
+                            + mCurMethodId + ", " + currentSubtypeHash);
                 }
+                setInputMethodWithSubtypeId(token, lastIme.first, getSubtypeIdFromHashCode(
+                        lastImi, lastSubtypeHash));
+                return true;
             }
             return false;
         }
diff --git a/services/java/com/android/server/PackageManagerService.java b/services/java/com/android/server/PackageManagerService.java
index 059c0b8..5806de2 100644
--- a/services/java/com/android/server/PackageManagerService.java
+++ b/services/java/com/android/server/PackageManagerService.java
@@ -2087,7 +2087,7 @@
                 return (List<ResolveInfo>) mActivities.queryIntentForPackage(intent,
                         resolvedType, flags, pkg.activities);
             }
-            return null;
+            return new ArrayList<ResolveInfo>();
         }
     }
 
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java
index eeb224c..2c8403c 100644
--- a/services/java/com/android/server/WindowManagerService.java
+++ b/services/java/com/android/server/WindowManagerService.java
@@ -677,8 +677,7 @@
 
             // stop intercepting input
             mDragState.unregister();
-            mInputMonitor.setUpdateInputWindowsNeededLw();
-            mInputMonitor.updateInputWindowsLw();
+            mInputMonitor.updateInputWindowsLw(true /*force*/);
 
             // free our resources and drop all the object references
             mDragState.reset();
@@ -2382,6 +2381,8 @@
                 res |= WindowManagerImpl.ADD_FLAG_APP_VISIBLE;
             }
 
+            mInputMonitor.setUpdateInputWindowsNeededLw();
+
             boolean focusChanged = false;
             if (win.canReceiveKeys()) {
                 focusChanged = updateFocusedWindowLocked(UPDATE_FOCUS_WILL_ASSIGN_LAYERS,
@@ -2404,7 +2405,7 @@
             if (focusChanged) {
                 finishUpdateFocusedWindowAfterAssignLayersLocked(false /*updateInputWindows*/);
             }
-            mInputMonitor.updateInputWindowsLw();
+            mInputMonitor.updateInputWindowsLw(false /*force*/);
 
             if (localLOGV) Slog.v(
                 TAG, "New client " + client.asBinder()
@@ -2484,7 +2485,7 @@
                 updateFocusedWindowLocked(UPDATE_FOCUS_WILL_PLACE_SURFACES,
                         false /*updateInputWindows*/);
                 performLayoutAndPlaceSurfacesLocked();
-                mInputMonitor.updateInputWindowsLw();
+                mInputMonitor.updateInputWindowsLw(false /*force*/);
                 if (win.mAppToken != null) {
                     win.mAppToken.updateReportedVisibilityLocked();
                 }
@@ -2600,8 +2601,7 @@
             }
         }
         
-        mInputMonitor.setUpdateInputWindowsNeededLw();
-        mInputMonitor.updateInputWindowsLw();
+        mInputMonitor.updateInputWindowsLw(true /*force*/);
     }
 
     private static void logSurface(WindowState w, String msg, RuntimeException where) {
@@ -2851,8 +2851,7 @@
                         outSurface.release();
                     }
                 } catch (Exception e) {
-                    mInputMonitor.setUpdateInputWindowsNeededLw();
-                    mInputMonitor.updateInputWindowsLw();
+                    mInputMonitor.updateInputWindowsLw(true /*force*/);
                     
                     Slog.w(TAG, "Exception thrown when creating surface for client "
                              + client + " (" + win.mAttrs.getTitle() + ")",
@@ -2996,8 +2995,7 @@
 
             inTouchMode = mInTouchMode;
             
-            mInputMonitor.setUpdateInputWindowsNeededLw();
-            mInputMonitor.updateInputWindowsLw();
+            mInputMonitor.updateInputWindowsLw(true /*force*/);
         }
 
         if (configChanged) {
@@ -3380,8 +3378,7 @@
                     }
                 }
 
-                mInputMonitor.setUpdateInputWindowsNeededLw();
-                mInputMonitor.updateInputWindowsLw();
+                mInputMonitor.updateInputWindowsLw(true /*force*/);
             } else {
                 Slog.w(TAG, "Attempted to remove non-existing token: " + token);
             }
@@ -4042,7 +4039,7 @@
                             false /*updateInputWindows*/);
                     performLayoutAndPlaceSurfacesLocked();
                 }
-                mInputMonitor.updateInputWindowsLw();
+                mInputMonitor.updateInputWindowsLw(false /*force*/);
             }
         }
 
@@ -4479,8 +4476,9 @@
                 updateFocusedWindowLocked(UPDATE_FOCUS_WILL_PLACE_SURFACES,
                         false /*updateInputWindows*/);
                 mLayoutNeeded = true;
+                mInputMonitor.setUpdateInputWindowsNeededLw();
                 performLayoutAndPlaceSurfacesLocked();
-                mInputMonitor.updateInputWindowsLw();
+                mInputMonitor.updateInputWindowsLw(false /*force*/);
             }
             Binder.restoreCallingIdentity(origId);
         }
@@ -4517,13 +4515,14 @@
         pos = reAddAppWindowsLocked(pos, wtoken);
 
         if (updateFocusAndLayout) {
+            mInputMonitor.setUpdateInputWindowsNeededLw();
             if (!updateFocusedWindowLocked(UPDATE_FOCUS_WILL_PLACE_SURFACES,
                     false /*updateInputWindows*/)) {
                 assignLayersLocked();
             }
             mLayoutNeeded = true;
             performLayoutAndPlaceSurfacesLocked();
-            mInputMonitor.updateInputWindowsLw();
+            mInputMonitor.updateInputWindowsLw(false /*force*/);
         }
     }
 
@@ -4549,13 +4548,14 @@
             }
         }
 
+        mInputMonitor.setUpdateInputWindowsNeededLw();
         if (!updateFocusedWindowLocked(UPDATE_FOCUS_WILL_PLACE_SURFACES,
                 false /*updateInputWindows*/)) {
             assignLayersLocked();
         }
         mLayoutNeeded = true;
         performLayoutAndPlaceSurfacesLocked();
-        mInputMonitor.updateInputWindowsLw();
+        mInputMonitor.updateInputWindowsLw(false /*force*/);
 
         //dump();
     }
@@ -5909,8 +5909,8 @@
         }
 
         /* Updates the cached window information provided to the input dispatcher. */
-        public void updateInputWindowsLw() {
-            if (!mUpdateInputWindowsNeeded) {
+        public void updateInputWindowsLw(boolean force) {
+            if (!force && !mUpdateInputWindowsNeeded) {
                 return;
             }
             mUpdateInputWindowsNeeded = false;
@@ -6060,7 +6060,7 @@
                 setUpdateInputWindowsNeededLw();
 
                 if (updateInputWindows) {
-                    updateInputWindowsLw();
+                    updateInputWindowsLw(false /*force*/);
                 }
             }
         }
@@ -6088,8 +6088,7 @@
                 }
                 
                 window.paused = true;
-                setUpdateInputWindowsNeededLw();
-                updateInputWindowsLw();
+                updateInputWindowsLw(true /*force*/);
             }
         }
         
@@ -6100,8 +6099,7 @@
                 }
                 
                 window.paused = false;
-                setUpdateInputWindowsNeededLw();
-                updateInputWindowsLw();
+                updateInputWindowsLw(true /*force*/);
             }
         }
         
@@ -6577,15 +6575,13 @@
                 // the actual drag event dispatch stuff in the dragstate
 
                 mDragState.register();
-                mInputMonitor.setUpdateInputWindowsNeededLw();
-                mInputMonitor.updateInputWindowsLw();
+                mInputMonitor.updateInputWindowsLw(true /*force*/);
                 if (!mInputManager.transferTouchFocus(callingWin.mInputChannel,
                         mDragState.mServerChannel)) {
                     Slog.e(TAG, "Unable to transfer touch focus");
                     mDragState.unregister();
                     mDragState = null;
-                    mInputMonitor.setUpdateInputWindowsNeededLw();
-                    mInputMonitor.updateInputWindowsLw();
+                    mInputMonitor.updateInputWindowsLw(true /*force*/);
                     return false;
                 }
 
@@ -9183,8 +9179,7 @@
                         // !!! TODO: ANR the app that has failed to start the drag in time
                         if (mDragState != null) {
                             mDragState.unregister();
-                            mInputMonitor.setUpdateInputWindowsNeededLw();
-                            mInputMonitor.updateInputWindowsLw();
+                            mInputMonitor.updateInputWindowsLw(true /*force*/);
                             mDragState.reset();
                             mDragState = null;
                         }
@@ -9584,7 +9579,7 @@
         // Window frames may have changed.  Tell the input dispatcher about it.
         mInputMonitor.setUpdateInputWindowsNeededLw();
         if (updateInputWindows) {
-            mInputMonitor.updateInputWindowsLw();
+            mInputMonitor.updateInputWindowsLw(false /*force*/);
         }
 
         return mPolicy.finishLayoutLw();
@@ -10858,8 +10853,7 @@
         }
 
         // Finally update all input windows now that the window changes have stabilized.
-        mInputMonitor.setUpdateInputWindowsNeededLw();
-        mInputMonitor.updateInputWindowsLw();
+        mInputMonitor.updateInputWindowsLw(true /*force*/);
 
         setHoldScreenLocked(holdScreen != null);
         if (screenBrightness < 0 || screenBrightness > 1.0f) {
diff --git a/services/java/com/android/server/connectivity/Tethering.java b/services/java/com/android/server/connectivity/Tethering.java
index dd9db9a..26c7e71 100644
--- a/services/java/com/android/server/connectivity/Tethering.java
+++ b/services/java/com/android/server/connectivity/Tethering.java
@@ -31,6 +31,7 @@
 import android.net.InterfaceConfiguration;
 import android.net.IConnectivityManager;
 import android.net.INetworkManagementEventObserver;
+import android.net.LinkProperties;
 import android.net.NetworkInfo;
 import android.os.Binder;
 import android.os.Environment;
@@ -1219,7 +1220,20 @@
             }
             protected String findActiveUpstreamIface() {
                 // check for what iface we can use - if none found switch to error.
-                IBinder b = ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE);
+                IBinder b = ServiceManager.getService(Context.CONNECTIVITY_SERVICE);
+                IConnectivityManager cm = IConnectivityManager.Stub.asInterface(b);
+
+                try {
+                    LinkProperties defaultProp = cm.getActiveLinkProperties();
+                    if (defaultProp != null) {
+                        String iface = defaultProp.getInterfaceName();
+                        for(String regex : mUpstreamIfaceRegexs) {
+                            if (iface.matches(regex)) return iface;
+                        }
+                    }
+                } catch (RemoteException e) { }
+
+                b = ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE);
                 INetworkManagementService service = INetworkManagementService.Stub.asInterface(b);
 
                 String[] ifaces = new String[0];
@@ -1390,7 +1404,8 @@
                         }
                         break;
                     case CMD_UPSTREAM_CHANGED:
-                        mTryCell = WAIT_FOR_NETWORK_TO_SETTLE;
+                        // need to try DUN immediately if Wifi goes down
+                        mTryCell = !WAIT_FOR_NETWORK_TO_SETTLE;
                         chooseUpstreamType(mTryCell);
                         mTryCell = !mTryCell;
                         break;
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 694af70..291ebc5 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -2170,8 +2170,6 @@
 
     GLenum status = glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES);
 
-    LOGD("screenshot: FBO created, status=0x%x", status);
-
     if (status == GL_FRAMEBUFFER_COMPLETE_OES) {
 
         // invert everything, b/c glReadPixel() below will invert the FB
@@ -2187,8 +2185,6 @@
         glClearColor(0,0,0,1);
         glClear(GL_COLOR_BUFFER_BIT);
 
-        LOGD("screenshot: glClear() issued");
-
         const Vector< sp<LayerBase> >& layers(mVisibleLayersSortedByZ);
         const size_t count = layers.size();
         for (size_t i=0 ; i<count ; ++i) {
@@ -2199,8 +2195,6 @@
             }
         }
 
-        LOGD("screenshot: All layers rendered");
-
         // XXX: this is needed on tegra
         glScissor(0, 0, sw, sh);
 
@@ -2215,10 +2209,6 @@
                     new MemoryHeapBase(size, 0, "screen-capture") );
             void* const ptr = base->getBase();
             if (ptr) {
-
-                LOGD("screenshot: about to call glReadPixels(0,0,%d,%d,...,%p)",
-                        sw, sh, ptr);
-
                 // capture the screen with glReadPixels()
                 glReadPixels(0, 0, sw, sh, GL_RGBA, GL_UNSIGNED_BYTE, ptr);
                 if (glGetError() == GL_NO_ERROR) {
@@ -2231,9 +2221,6 @@
             } else {
                 result = NO_MEMORY;
             }
-
-            LOGD("screenshot: glReadPixels() returned %s", strerror(result));
-
         }
         glEnable(GL_SCISSOR_TEST);
         glViewport(0, 0, hw_w, hw_h);
@@ -2244,18 +2231,14 @@
         result = BAD_VALUE;
     }
 
-    LOGD("screenshot: about to release FBO resources");
-
     // release FBO resources
     glBindFramebufferOES(GL_FRAMEBUFFER_OES, 0);
     glDeleteRenderbuffersOES(1, &tname);
     glDeleteFramebuffersOES(1, &name);
 
-    LOGD("screenshot: about to call compositionComplete()");
-
     hw.compositionComplete();
 
-    LOGD("screenshot: result = %s", strerror(result));
+    LOGD("screenshot: result = %s", result<0 ? strerror(result) : "OK");
 
     return result;
 }
diff --git a/telephony/java/com/android/internal/telephony/CallManager.java b/telephony/java/com/android/internal/telephony/CallManager.java
index 719e5b4..43fae69 100644
--- a/telephony/java/com/android/internal/telephony/CallManager.java
+++ b/telephony/java/com/android/internal/telephony/CallManager.java
@@ -774,13 +774,23 @@
         boolean allLinesTaken = hasActiveCall && hasHoldingCall;
         Call.State fgCallState = getActiveFgCallState();
 
-        return (serviceState != ServiceState.STATE_POWER_OFF
+        boolean result = (serviceState != ServiceState.STATE_POWER_OFF
                 && !hasRingingCall
                 && !allLinesTaken
                 && ((fgCallState == Call.State.ACTIVE)
                     || (fgCallState == Call.State.IDLE)
                     || (fgCallState == Call.State.DISCONNECTED)));
-            }
+
+        if (result == false) {
+            Log.d(LOG_TAG, "canDial serviceState=" + serviceState
+                            + " hasRingingCall=" + hasRingingCall
+                            + " hasActiveCall=" + hasActiveCall
+                            + " hasHoldingCall=" + hasHoldingCall
+                            + " allLinesTaken=" + allLinesTaken
+                            + " fgCallState=" + fgCallState);
+        }
+        return result;
+    }
 
     /**
      * Whether or not the phone can do explicit call transfer in the current
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/LoadTestsAutoTest.java b/tests/DumpRenderTree/src/com/android/dumprendertree/LoadTestsAutoTest.java
index 5bcf727..622fb0e 100644
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/LoadTestsAutoTest.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/LoadTestsAutoTest.java
@@ -16,8 +16,6 @@
 
 package com.android.dumprendertree;
 
-import dalvik.system.VMRuntime;
-
 import android.app.Instrumentation;
 import android.content.Context;
 import android.content.Intent;
@@ -34,12 +32,15 @@
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.PrintStream;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
 
 public class LoadTestsAutoTest extends ActivityInstrumentationTestCase2<TestShellActivity> {
 
     private final static String LOGTAG = "LoadTest";
     private final static String LOAD_TEST_RESULT =
         Environment.getExternalStorageDirectory() + "/load_test_result.txt";
+    private final static int MAX_GC_WAIT_SEC = 10;
     private boolean mFinished;
     static final String LOAD_TEST_RUNNER_FILES[] = {
         "run_page_cycler.py"
@@ -90,14 +91,23 @@
 
     private void freeMem() {
         Log.v(LOGTAG, "freeMem: calling gc...");
-        final VMRuntime runtime = VMRuntime.getRuntime();
-
-        runtime.gcSoftReferences();
-        runtime.gcSoftReferences();
-        runtime.gcSoftReferences();
-        Runtime.getRuntime().gc();
-        Runtime.getRuntime().gc();
-
+        final CountDownLatch latch = new CountDownLatch(1);
+        Object dummy = new Object() {
+            @Override
+            protected void finalize() throws Throwable {
+                latch.countDown();
+                super.finalize();
+            }
+        };
+        dummy = null;
+        System.gc();
+        try {
+            if (!latch.await(MAX_GC_WAIT_SEC, TimeUnit.SECONDS)) {
+                Log.w(LOGTAG, "gc did not happen in 10s");
+            }
+        } catch (InterruptedException e) {
+            //ignore
+        }
     }
 
     private void printRow(PrintStream ps, String format, Object...objs) {
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java b/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java
index 9c4fa97..3ea4911 100644
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java
@@ -158,10 +158,6 @@
         // WebView::setJsFlags is noop in JSC build.
         mWebView.setJsFlags("--expose_gc");
 
-        // Always send multitouch events to Webkit since the layout test
-        // is only for the Webkit not the browser's UI.
-        mWebView.setDeferMultiTouch(true);
-
         mHandler = new AsyncHandler();
 
         Intent intent = getIntent();
diff --git a/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java b/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java
index ce546ec..d9f5dd4 100644
--- a/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java
+++ b/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java
@@ -372,7 +372,6 @@
         webView.setTouchInterval(-1);
 
         webView.clearCache(true);
-        webView.setDeferMultiTouch(true);
 
         WebSettings webViewSettings = webView.getSettings();
         webViewSettings.setAppCacheEnabled(true);
diff --git a/tests/HwAccelerationTest/AndroidManifest.xml b/tests/HwAccelerationTest/AndroidManifest.xml
index 61f8e1a..2895b69 100644
--- a/tests/HwAccelerationTest/AndroidManifest.xml
+++ b/tests/HwAccelerationTest/AndroidManifest.xml
@@ -18,7 +18,7 @@
     package="com.android.test.hwui">
 
     <uses-permission android:name="android.permission.INTERNET" />
-    <uses-sdk android:minSdkVersion="Honeycomb" />
+    <uses-sdk android:minSdkVersion="11" />
     
     <application
         android:label="HwUi"
diff --git a/tests/HwAccelerationTest/default.properties b/tests/HwAccelerationTest/default.properties
index 5a8ea50..da2dcdd 100644
--- a/tests/HwAccelerationTest/default.properties
+++ b/tests/HwAccelerationTest/default.properties
@@ -8,4 +8,4 @@
 # project structure.
 
 # Project target.
-target=android-Froyo
+target=android-Honeycomb
diff --git a/tools/layoutlib/bridge/src/android/graphics/Region_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Region_Delegate.java
index 9b6fb82..d2b6b27 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Region_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Region_Delegate.java
@@ -446,6 +446,15 @@
         return region1.mArea.equals(region2.mArea);
     }
 
+    /*package*/ static String nativeToString(int native_region) {
+        Region_Delegate region = sManager.getDelegate(native_region);
+        if (region == null) {
+            return "not found";
+        }
+
+        return region.mArea.toString();
+    }
+
     // ---- Private delegate/helper methods ----
 
 }
diff --git a/tools/layoutlib/bridge/src/android/os/Build_Delegate.java b/tools/layoutlib/bridge/src/android/os/Build_Delegate.java
new file mode 100644
index 0000000..f71860f
--- /dev/null
+++ b/tools/layoutlib/bridge/src/android/os/Build_Delegate.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.os;
+
+import com.android.layoutlib.bridge.Bridge;
+import com.android.layoutlib.bridge.impl.DelegateManager;
+
+import java.util.Map;
+
+/**
+ * Delegate implementing the native methods of android.os.Build
+ *
+ * Through the layoutlib_create tool, the original native methods of Build have been replaced
+ * by calls to methods of the same name in this delegate class.
+ *
+ * Because it's a stateless class to start with, there's no need to keep a {@link DelegateManager}
+ * around to map int to instance of the delegate.
+ *
+ */
+public class Build_Delegate {
+
+    /*package*/ static String getString(String property) {
+        Map<String, String> properties = Bridge.getPlatformProperties();
+        String value = properties.get(property);
+        if (value != null) {
+            return value;
+        }
+
+        return Build.UNKNOWN;
+    }
+
+}
diff --git a/tools/layoutlib/bridge/src/android/view/LayoutInflater_Delegate.java b/tools/layoutlib/bridge/src/android/view/LayoutInflater_Delegate.java
new file mode 100644
index 0000000..3946a2f5
--- /dev/null
+++ b/tools/layoutlib/bridge/src/android/view/LayoutInflater_Delegate.java
@@ -0,0 +1,95 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.view;
+
+import com.android.layoutlib.bridge.android.BridgeInflater;
+
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import android.util.AttributeSet;
+
+import java.io.IOException;
+
+/**
+ * Delegate used to provide new implementation of a select few methods of {@link LayoutInflater}
+ *
+ * Through the layoutlib_create tool, the original  methods of LayoutInflater have been replaced
+ * by calls to methods of the same name in this delegate class.
+ *
+ */
+public class LayoutInflater_Delegate {
+
+    /**
+     * Recursive method used to descend down the xml hierarchy and instantiate
+     * views, instantiate their children, and then call onFinishInflate().
+     */
+    /*package*/ static void rInflate(LayoutInflater thisInflater,
+            XmlPullParser parser, View parent, final AttributeSet attrs,
+            boolean finishInflate) throws XmlPullParserException, IOException {
+
+        if (finishInflate == false) {
+            // this is a merge rInflate!
+            if (thisInflater instanceof BridgeInflater) {
+                ((BridgeInflater) thisInflater).setIsInMerge(true);
+            }
+        }
+
+        // ---- START DEFAULT IMPLEMENTATION.
+
+        final int depth = parser.getDepth();
+        int type;
+
+        while (((type = parser.next()) != XmlPullParser.END_TAG ||
+                parser.getDepth() > depth) && type != XmlPullParser.END_DOCUMENT) {
+
+            if (type != XmlPullParser.START_TAG) {
+                continue;
+            }
+
+            final String name = parser.getName();
+
+            if (LayoutInflater.TAG_REQUEST_FOCUS.equals(name)) {
+                thisInflater.parseRequestFocus(parser, parent);
+            } else if (LayoutInflater.TAG_INCLUDE.equals(name)) {
+                if (parser.getDepth() == 0) {
+                    throw new InflateException("<include /> cannot be the root element");
+                }
+                thisInflater.parseInclude(parser, parent, attrs);
+            } else if (LayoutInflater.TAG_MERGE.equals(name)) {
+                throw new InflateException("<merge /> must be the root element");
+            } else {
+                final View view = thisInflater.createViewFromTag(parent, name, attrs);
+                final ViewGroup viewGroup = (ViewGroup) parent;
+                final ViewGroup.LayoutParams params = viewGroup.generateLayoutParams(attrs);
+                thisInflater.rInflate(parser, view, attrs, true);
+                viewGroup.addView(view, params);
+            }
+        }
+
+        if (finishInflate) parent.onFinishInflate();
+
+        // ---- END DEFAULT IMPLEMENTATION.
+
+        if (finishInflate == false) {
+            // this is a merge rInflate!
+            if (thisInflater instanceof BridgeInflater) {
+                ((BridgeInflater) thisInflater).setIsInMerge(false);
+            }
+        }
+    }
+}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
index 37576b4..0c3aef4 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
@@ -93,6 +93,7 @@
         new HashMap<String, SoftReference<NinePatchChunk>>();
 
     private static Map<String, Map<String, Integer>> sEnumValueMap;
+    private static Map<String, String> sPlatformProperties;
 
     /**
      * int[] wrapper to use as keys in maps.
@@ -157,10 +158,8 @@
      */
     private static LayoutLog sCurrentLog = sDefaultLog;
 
-
     private EnumSet<Capability> mCapabilities;
 
-
     @Override
     public int getApiLevel() {
         return com.android.ide.common.rendering.api.Bridge.API_CURRENT;
@@ -172,8 +171,11 @@
     }
 
     @Override
-    public boolean init(File fontLocation, Map<String, Map<String, Integer>> enumValueMap,
+    public boolean init(Map<String,String> platformProperties,
+            File fontLocation,
+            Map<String, Map<String, Integer>> enumValueMap,
             LayoutLog log) {
+        sPlatformProperties = platformProperties;
         sEnumValueMap = enumValueMap;
 
         // don't use EnumSet.allOf(), because the bridge doesn't come with its specific version
@@ -429,6 +431,13 @@
     }
 
     /**
+     * Returns the platform build properties.
+     */
+    public static Map<String, String> getPlatformProperties() {
+        return sPlatformProperties;
+    }
+
+    /**
      * Returns the bitmap for a specific path, from a specific project cache, or from the
      * framework cache.
      * @param value the path of the bitmap
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeRenderSession.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeRenderSession.java
index bc2301d..3bc0202 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeRenderSession.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeRenderSession.java
@@ -30,6 +30,7 @@
 import android.view.ViewParent;
 
 import java.awt.image.BufferedImage;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -55,8 +56,8 @@
     }
 
     @Override
-    public ViewInfo getRootView() {
-        return mSession.getViewInfo();
+    public List<ViewInfo> getRootViews() {
+        return mSession.getViewInfos();
     }
 
     @Override
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeInflater.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeInflater.java
index 7fa6fdf..465bf1d9 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeInflater.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeInflater.java
@@ -18,6 +18,7 @@
 
 import com.android.ide.common.rendering.api.IProjectCallback;
 import com.android.ide.common.rendering.api.LayoutLog;
+import com.android.ide.common.rendering.api.MergeCookie;
 import com.android.ide.common.rendering.api.RenderResources;
 import com.android.ide.common.rendering.api.ResourceValue;
 import com.android.layoutlib.bridge.Bridge;
@@ -41,6 +42,7 @@
 public final class BridgeInflater extends LayoutInflater {
 
     private final IProjectCallback mProjectCallback;
+    private boolean mIsInMerge = false;
 
     /**
      * List of class prefixes which are tried first by default.
@@ -211,8 +213,6 @@
         return null;
     }
 
-
-
     private void setupViewInContext(View view, AttributeSet attrs) {
         if (getContext() instanceof BridgeContext) {
             BridgeContext bc = (BridgeContext) getContext();
@@ -222,9 +222,11 @@
                 // get the view key
                 Object viewKey = parser.getViewCookie();
 
-                // if there's no view key and the depth is 1 (ie this is the first tag),
+                // if there's no view key and the depth is 1 (ie this is the first tag), or 2
+                // (this is first item in included merge layout)
                 // look for a previous parser in the context, and check if this one has a viewkey.
-                if (viewKey == null && parser.getDepth() == 1) {
+                int testDepth = mIsInMerge ? 2 : 1;
+                if (viewKey == null && parser.getDepth() == testDepth) {
                     BridgeXmlBlockParser previousParser = bc.getPreviousParser();
                     if (previousParser != null) {
                         viewKey = previousParser.getViewCookie();
@@ -232,12 +234,21 @@
                 }
 
                 if (viewKey != null) {
+                    if (testDepth == 2) {
+                        // include-merge case
+                        viewKey = new MergeCookie(viewKey);
+                    }
+
                     bc.addViewKey(view, viewKey);
                 }
             }
         }
     }
 
+    public void setIsInMerge(boolean isInMerge) {
+        mIsInMerge = isInMerge;
+    }
+
     @Override
     public LayoutInflater cloneInContext(Context newContext) {
         return new BridgeInflater(this, newContext);
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java
index 63d52e9..d7b7009 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java
@@ -116,7 +116,7 @@
 
     // information being returned through the API
     private BufferedImage mImage;
-    private ViewInfo mViewInfo;
+    private List<ViewInfo> mViewInfoList;
 
     private static final class PostInflateException extends Exception {
         private static final long serialVersionUID = 1L;
@@ -478,7 +478,7 @@
 
             mViewRoot.draw(mCanvas);
 
-            mViewInfo = visit(((ViewGroup)mViewRoot).getChildAt(0), mContext);
+            mViewInfoList = visitAllChildren((ViewGroup)mViewRoot, mContext);
 
             // success!
             return SUCCESS.createResult();
@@ -1101,16 +1101,25 @@
 
         if (view instanceof ViewGroup) {
             ViewGroup group = ((ViewGroup) view);
-            List<ViewInfo> children = new ArrayList<ViewInfo>();
-            for (int i = 0; i < group.getChildCount(); i++) {
-                children.add(visit(group.getChildAt(i), context));
-            }
-            result.setChildren(children);
+            result.setChildren(visitAllChildren(group, context));
         }
 
         return result;
     }
 
+    private List<ViewInfo> visitAllChildren(ViewGroup viewGroup, BridgeContext context) {
+        if (viewGroup == null) {
+            return null;
+        }
+
+        List<ViewInfo> children = new ArrayList<ViewInfo>();
+        for (int i = 0; i < viewGroup.getChildCount(); i++) {
+            children.add(visit(viewGroup.getChildAt(i), context));
+        }
+        return children;
+    }
+
+
     private void invalidateRenderingSize() {
         mMeasuredScreenWidth = mMeasuredScreenHeight = -1;
     }
@@ -1119,8 +1128,8 @@
         return mImage;
     }
 
-    public ViewInfo getViewInfo() {
-        return mViewInfo;
+    public List<ViewInfo> getViewInfos() {
+        return mViewInfoList;
     }
 
     public Map<String, String> getDefaultProperties(Object viewObject) {
diff --git a/tools/layoutlib/bridge/tests/com/android/layoutlib/bridge/TestDelegates.java b/tools/layoutlib/bridge/tests/com/android/layoutlib/bridge/TestDelegates.java
index 23b7e94..0ff1925 100644
--- a/tools/layoutlib/bridge/tests/com/android/layoutlib/bridge/TestDelegates.java
+++ b/tools/layoutlib/bridge/tests/com/android/layoutlib/bridge/TestDelegates.java
@@ -104,7 +104,12 @@
                         parameters);
 
                 // check that the method is static
-                assertTrue((delegateMethod.getModifiers() & Modifier.STATIC) == Modifier.STATIC);
+                assertTrue(
+                        String.format(
+                                "Delegate method %1$s for class %2$s is not static",
+                                delegateMethod.getName(),
+                                originalClass.getName()),
+                        (delegateMethod.getModifiers() & Modifier.STATIC) == Modifier.STATIC);
             } catch (NoSuchMethodException e) {
                 // compute a full class name that's long but not too long.
                 StringBuilder sb = new StringBuilder(originalMethod.getName() + "(");
diff --git a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java
index 4198006..55e9e48 100644
--- a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java
+++ b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java
@@ -96,8 +96,10 @@
     private final static String[] DELEGATE_METHODS = new String[] {
         "android.app.Fragment#instantiate", //(Landroid/content/Context;Ljava/lang/String;Landroid/os/Bundle;)Landroid/app/Fragment;",
         "android.os.Handler#sendMessageAtTime",
+        "android.os.Build#getString",
+        "android.view.LayoutInflater#rInflate",
         "android.view.View#isInEditMode",
-        "com.android.internal.util.XmlUtils#convertValueToInt"
+        "com.android.internal.util.XmlUtils#convertValueToInt",
         // TODO: comment out once DelegateClass is working
         // "android.content.res.Resources$Theme#obtainStyledAttributes",
     };
diff --git a/tools/orientationplot/README.txt b/tools/orientationplot/README.txt
new file mode 100644
index 0000000..0143510
--- /dev/null
+++ b/tools/orientationplot/README.txt
@@ -0,0 +1,87 @@
+This directory contains a simple python script for visualizing
+the behavior of the WindowOrientationListener.
+
+
+PREREQUISITES
+-------------
+
+1. Python 2.6
+2. numpy
+3. matplotlib
+
+
+USAGE
+-----
+
+The tool works by scaping the debug log output from WindowOrientationListener
+for interesting data and then plotting it.
+
+1. Enable the Window Orientation Listener debugging data log using the
+   Development Settings in the Dev Tools application (Development.apk).
+
+2. Plug in the device.  Ensure that it is the only device plugged in
+   since this script is of very little brain and will get confused otherwise.
+
+3. Run "orientationplot.py".
+
+4. When finished, remember to disable the debug log output since it is quite verbose!
+
+
+WHAT IT ALL MEANS
+-----------------
+
+The tool displays several time series graphs that plot the output of the
+WindowOrientationListener.  Here you can see the raw accelerometer data,
+filtered accelerometer data, measured tilt and orientation angle, confidence
+intervals for the proposed orientation and accelerometer latency.
+
+Things to look for:
+
+1. Ensure the filtering is not too aggressive.  If the filter cut-off frequency is
+   less than about 1Hz, then the filtered accelorometer data becomes too smooth
+   and the latency for orientation detection goes up.  One way to observe this
+   is by holding the device vertically in one orientation then sharply turning
+   it 90 degrees to a different orientation.  Compared the rapid changes in the
+   raw accelerometer data with the smoothed out filtered data.  If the filtering
+   is too aggressive, the filter response may lag by hundreds of milliseconds.
+
+2. Ensure that there is an appropriate gap between adjacent orientation angles
+   for hysteresis.  Try holding the device in one orientation and slowly turning
+   it 90 degrees.  Note that the confidence intervals will all drop to 0 at some
+   point in between the two orientations; that is the gap.  The gap should be
+   observed between all adjacent pairs of orientations when turning the device
+   in either direction.
+
+   Next try holding the device in one orientation and rapidly turning it end
+   over end to a midpoint about 45 degrees between two opposing orientations.
+   There should be no gap observed initially.  The algorithm should pick one
+   of the orientations and settle into it (since it is obviously quite
+   different from the original orientation of the device).  However, once it
+   settles, the confidence values should start trending to 0 again because
+   the measured orientation angle is now within the gap between the new
+   orientation and the adjacent orientation.
+
+   In other words, the hysteresis gap applies only when the measured orientation
+   angle (say, 45 degrees) is between the current orientation's ideal angle
+   (say, 0 degrees) and an adjacent orientation's ideal angle (say, 90 degrees).
+
+3. Accelerometer jitter.  The accelerometer latency graph displays the interval
+   between sensor events as reported by the SensorEvent.timestamp field.  It
+   should be a fairly constant 60ms.  If the latency jumps around wildly or
+   greatly exceeds 60ms then there is a problem with the accelerometer or the
+   sensor manager.
+
+4. The orientation angle is not measured when the tilt is too close to 90 or -90
+   degrees (refer to MAX_TILT constant).  Consequently, you should expect there
+   to be no data.  Likewise, all dependent calculations are suppressed in this case
+   so there will be no orientation proposal either.
+
+5. Each orientation has its own bound on allowable tilt angles.  It's a good idea to
+   verify that these limits are being enforced by gradually varying the tilt of
+   the device until it is inside/outside the limit for each orientation.
+
+6. Orientation changes should be significantly harder when the device is held
+   overhead.  People reading on tablets in bed often have their head turned
+   a little to the side, or they hold the device loosely so its orientation
+   can be a bit unusual.  The tilt is a good indicator of whether the device is
+   overhead.
diff --git a/tools/orientationplot/orientationplot.py b/tools/orientationplot/orientationplot.py
new file mode 100755
index 0000000..07449d4
--- /dev/null
+++ b/tools/orientationplot/orientationplot.py
@@ -0,0 +1,451 @@
+#!/usr/bin/env python2.6
+#
+# Copyright (C) 2011 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+#
+# Plots debug log output from WindowOrientationListener.
+# See README.txt for details.
+#
+
+import numpy as np
+import matplotlib.pyplot as plot
+import subprocess
+import re
+import fcntl
+import os
+import errno
+import bisect
+from datetime import datetime, timedelta
+
+# Parameters.
+timespan = 15 # seconds total span shown
+scrolljump = 5 # seconds jump when scrolling
+timeticks = 1 # seconds between each time tick
+
+# Non-blocking stream wrapper.
+class NonBlockingStream:
+  def __init__(self, stream):
+    fcntl.fcntl(stream, fcntl.F_SETFL, os.O_NONBLOCK)
+    self.stream = stream
+    self.buffer = ''
+    self.pos = 0
+
+  def readline(self):
+    while True:
+      index = self.buffer.find('\n', self.pos)
+      if index != -1:
+        result = self.buffer[self.pos:index]
+        self.pos = index + 1
+        return result
+
+      self.buffer = self.buffer[self.pos:]
+      self.pos = 0
+      try:
+        chunk = os.read(self.stream.fileno(), 4096)
+      except OSError, e:
+        if e.errno == errno.EAGAIN:
+          return None
+        raise e
+      if len(chunk) == 0:
+        if len(self.buffer) == 0:
+          raise(EOFError)
+        else:
+          result = self.buffer
+          self.buffer = ''
+          self.pos = 0
+          return result
+      self.buffer += chunk
+
+# Plotter
+class Plotter:
+  def __init__(self, adbout):
+    self.adbout = adbout
+
+    self.fig = plot.figure(1)
+    self.fig.suptitle('Window Orientation Listener', fontsize=12)
+    self.fig.set_dpi(96)
+    self.fig.set_size_inches(16, 12, forward=True)
+
+    self.raw_acceleration_x = self._make_timeseries()
+    self.raw_acceleration_y = self._make_timeseries()
+    self.raw_acceleration_z = self._make_timeseries()
+    self.raw_acceleration_axes = self._add_timeseries_axes(
+        1, 'Raw Acceleration', 'm/s^2', [-20, 20],
+        yticks=range(-15, 16, 5))
+    self.raw_acceleration_line_x = self._add_timeseries_line(
+        self.raw_acceleration_axes, 'x', 'red')
+    self.raw_acceleration_line_y = self._add_timeseries_line(
+        self.raw_acceleration_axes, 'y', 'green')
+    self.raw_acceleration_line_z = self._add_timeseries_line(
+        self.raw_acceleration_axes, 'z', 'blue')
+    self._add_timeseries_legend(self.raw_acceleration_axes)
+
+    shared_axis = self.raw_acceleration_axes
+
+    self.filtered_acceleration_x = self._make_timeseries()
+    self.filtered_acceleration_y = self._make_timeseries()
+    self.filtered_acceleration_z = self._make_timeseries()
+    self.magnitude = self._make_timeseries()
+    self.filtered_acceleration_axes = self._add_timeseries_axes(
+        2, 'Filtered Acceleration', 'm/s^2', [-20, 20],
+        sharex=shared_axis,
+        yticks=range(-15, 16, 5))
+    self.filtered_acceleration_line_x = self._add_timeseries_line(
+        self.filtered_acceleration_axes, 'x', 'red')
+    self.filtered_acceleration_line_y = self._add_timeseries_line(
+        self.filtered_acceleration_axes, 'y', 'green')
+    self.filtered_acceleration_line_z = self._add_timeseries_line(
+        self.filtered_acceleration_axes, 'z', 'blue')
+    self.magnitude_line = self._add_timeseries_line(
+        self.filtered_acceleration_axes, 'magnitude', 'orange', linewidth=2)
+    self._add_timeseries_legend(self.filtered_acceleration_axes)
+
+    self.tilt_angle = self._make_timeseries()
+    self.tilt_angle_axes = self._add_timeseries_axes(
+        3, 'Tilt Angle', 'degrees', [-105, 105],
+        sharex=shared_axis,
+        yticks=range(-90, 91, 30))
+    self.tilt_angle_line = self._add_timeseries_line(
+        self.tilt_angle_axes, 'tilt', 'black')
+    self._add_timeseries_legend(self.tilt_angle_axes)
+
+    self.orientation_angle = self._make_timeseries()
+    self.orientation_angle_axes = self._add_timeseries_axes(
+        4, 'Orientation Angle', 'degrees', [-25, 375],
+        sharex=shared_axis,
+        yticks=range(0, 361, 45))
+    self.orientation_angle_line = self._add_timeseries_line(
+        self.orientation_angle_axes, 'orientation', 'black')
+    self._add_timeseries_legend(self.orientation_angle_axes)
+
+    self.actual_orientation = self._make_timeseries()
+    self.proposed_orientation = self._make_timeseries()
+    self.orientation_axes = self._add_timeseries_axes(
+        5, 'Actual / Proposed Orientation and Confidence', 'rotation', [-1, 4],
+        sharex=shared_axis,
+        yticks=range(0, 4))
+    self.actual_orientation_line = self._add_timeseries_line(
+        self.orientation_axes, 'actual', 'black', linewidth=2)
+    self.proposed_orientation_line = self._add_timeseries_line(
+        self.orientation_axes, 'proposed', 'purple', linewidth=3)
+    self._add_timeseries_legend(self.orientation_axes)
+
+    self.confidence = [[self._make_timeseries(), self._make_timeseries()] for i in range(0, 4)]
+    self.confidence_polys = []
+
+    self.combined_confidence = self._make_timeseries()
+    self.orientation_confidence = self._make_timeseries()
+    self.tilt_confidence = self._make_timeseries()
+    self.magnitude_confidence = self._make_timeseries()
+    self.confidence_axes = self._add_timeseries_axes(
+        6, 'Proposed Orientation Confidence Factors', 'confidence', [-0.1, 1.1],
+        sharex=shared_axis,
+        yticks=[0.0, 0.2, 0.4, 0.6, 0.8, 1.0])
+    self.combined_confidence_line = self._add_timeseries_line(
+        self.confidence_axes, 'combined', 'purple', linewidth=2)
+    self.orientation_confidence_line = self._add_timeseries_line(
+        self.confidence_axes, 'orientation', 'black')
+    self.tilt_confidence_line = self._add_timeseries_line(
+        self.confidence_axes, 'tilt', 'brown')
+    self.magnitude_confidence_line = self._add_timeseries_line(
+        self.confidence_axes, 'magnitude', 'orange')
+    self._add_timeseries_legend(self.confidence_axes)
+
+    self.sample_latency = self._make_timeseries()
+    self.sample_latency_axes = self._add_timeseries_axes(
+        7, 'Accelerometer Sampling Latency', 'ms', [-10, 500],
+        sharex=shared_axis,
+        yticks=range(0, 500, 100))
+    self.sample_latency_line = self._add_timeseries_line(
+        self.sample_latency_axes, 'latency', 'black')
+    self._add_timeseries_legend(self.sample_latency_axes)
+
+    self.timer = self.fig.canvas.new_timer(interval=100)
+    self.timer.add_callback(lambda: self.update())
+    self.timer.start()
+
+    self.timebase = None
+    self._reset_parse_state()
+
+  # Initialize a time series.
+  def _make_timeseries(self):
+    return [[], []]
+
+  # Add a subplot to the figure for a time series.
+  def _add_timeseries_axes(self, index, title, ylabel, ylim, yticks, sharex=None):
+    num_graphs = 7
+    height = 0.9 / num_graphs
+    top = 0.95 - height * index
+    axes = self.fig.add_axes([0.1, top, 0.8, height],
+        xscale='linear',
+        xlim=[0, timespan],
+        ylabel=ylabel,
+        yscale='linear',
+        ylim=ylim,
+        sharex=sharex)
+    axes.text(0.02, 0.02, title, transform=axes.transAxes, fontsize=10, fontweight='bold')
+    axes.set_xlabel('time (s)', fontsize=10, fontweight='bold')
+    axes.set_ylabel(ylabel, fontsize=10, fontweight='bold')
+    axes.set_xticks(range(0, timespan + 1, timeticks))
+    axes.set_yticks(yticks)
+    axes.grid(True)
+
+    for label in axes.get_xticklabels():
+      label.set_fontsize(9)
+    for label in axes.get_yticklabels():
+      label.set_fontsize(9)
+
+    return axes
+
+  # Add a line to the axes for a time series.
+  def _add_timeseries_line(self, axes, label, color, linewidth=1):
+    return axes.plot([], label=label, color=color, linewidth=linewidth)[0]
+
+  # Add a legend to a time series.
+  def _add_timeseries_legend(self, axes):
+    axes.legend(
+        loc='upper left',
+        bbox_to_anchor=(1.01, 1),
+        borderpad=0.1,
+        borderaxespad=0.1,
+        prop={'size': 10})
+
+  # Resets the parse state.
+  def _reset_parse_state(self):
+    self.parse_raw_acceleration_x = None
+    self.parse_raw_acceleration_y = None
+    self.parse_raw_acceleration_z = None
+    self.parse_filtered_acceleration_x = None
+    self.parse_filtered_acceleration_y = None
+    self.parse_filtered_acceleration_z = None
+    self.parse_magnitude = None
+    self.parse_tilt_angle = None
+    self.parse_orientation_angle = None
+    self.parse_proposed_orientation = None
+    self.parse_combined_confidence = None
+    self.parse_orientation_confidence = None
+    self.parse_tilt_confidence = None
+    self.parse_magnitude_confidence = None
+    self.parse_actual_orientation = None
+    self.parse_confidence = None
+    self.parse_sample_latency = None
+
+  # Update samples.
+  def update(self):
+    timeindex = 0
+    while True:
+      try:
+        line = self.adbout.readline()
+      except EOFError:
+        plot.close()
+        return
+      if line is None:
+        break
+      print line
+
+      try:
+        timestamp = self._parse_timestamp(line)
+      except ValueError, e:
+        continue
+      if self.timebase is None:
+        self.timebase = timestamp
+      delta = timestamp - self.timebase
+      timeindex = delta.seconds + delta.microseconds * 0.000001
+
+      if line.find('Raw acceleration vector:') != -1:
+        self.parse_raw_acceleration_x = self._get_following_number(line, 'x=')
+        self.parse_raw_acceleration_y = self._get_following_number(line, 'y=')
+        self.parse_raw_acceleration_z = self._get_following_number(line, 'z=')
+
+      if line.find('Filtered acceleration vector:') != -1:
+        self.parse_filtered_acceleration_x = self._get_following_number(line, 'x=')
+        self.parse_filtered_acceleration_y = self._get_following_number(line, 'y=')
+        self.parse_filtered_acceleration_z = self._get_following_number(line, 'z=')
+
+      if line.find('magnitude=') != -1:
+        self.parse_magnitude = self._get_following_number(line, 'magnitude=')
+
+      if line.find('tiltAngle=') != -1:
+        self.parse_tilt_angle = self._get_following_number(line, 'tiltAngle=')
+
+      if line.find('orientationAngle=') != -1:
+        self.parse_orientation_angle = self._get_following_number(line, 'orientationAngle=')
+
+      if line.find('Proposal:') != -1:
+        self.parse_proposed_orientation = self._get_following_number(line, 'proposedOrientation=')
+        self.parse_combined_confidence = self._get_following_number(line, 'combinedConfidence=')
+        self.parse_orientation_confidence = self._get_following_number(line, 'orientationConfidence=')
+        self.parse_tilt_confidence = self._get_following_number(line, 'tiltConfidence=')
+        self.parse_magnitude_confidence = self._get_following_number(line, 'magnitudeConfidence=')
+
+      if line.find('Result:') != -1:
+        self.parse_actual_orientation = self._get_following_number(line, 'rotation=')
+        self.parse_confidence = self._get_following_array_of_numbers(line, 'confidence=')
+        self.parse_sample_latency = self._get_following_number(line, 'timeDeltaMS=')
+
+        for i in range(0, 4):
+          if self.parse_confidence is not None:
+            self._append(self.confidence[i][0], timeindex, i)
+            self._append(self.confidence[i][1], timeindex, i + self.parse_confidence[i])
+          else:
+            self._append(self.confidence[i][0], timeindex, None)
+            self._append(self.confidence[i][1], timeindex, None)
+
+        self._append(self.raw_acceleration_x, timeindex, self.parse_raw_acceleration_x)
+        self._append(self.raw_acceleration_y, timeindex, self.parse_raw_acceleration_y)
+        self._append(self.raw_acceleration_z, timeindex, self.parse_raw_acceleration_z)
+        self._append(self.filtered_acceleration_x, timeindex, self.parse_filtered_acceleration_x)
+        self._append(self.filtered_acceleration_y, timeindex, self.parse_filtered_acceleration_y)
+        self._append(self.filtered_acceleration_z, timeindex, self.parse_filtered_acceleration_z)
+        self._append(self.magnitude, timeindex, self.parse_magnitude)
+        self._append(self.tilt_angle, timeindex, self.parse_tilt_angle)
+        self._append(self.orientation_angle, timeindex, self.parse_orientation_angle)
+        self._append(self.actual_orientation, timeindex, self.parse_actual_orientation)
+        self._append(self.proposed_orientation, timeindex, self.parse_proposed_orientation)
+        self._append(self.combined_confidence, timeindex, self.parse_combined_confidence)
+        self._append(self.orientation_confidence, timeindex, self.parse_orientation_confidence)
+        self._append(self.tilt_confidence, timeindex, self.parse_tilt_confidence)
+        self._append(self.magnitude_confidence, timeindex, self.parse_magnitude_confidence)
+        self._append(self.sample_latency, timeindex, self.parse_sample_latency)
+        self._reset_parse_state()
+
+    # Scroll the plots.
+    if timeindex > timespan:
+      bottom = int(timeindex) - timespan + scrolljump
+      self.timebase += timedelta(seconds=bottom)
+      self._scroll(self.raw_acceleration_x, bottom)
+      self._scroll(self.raw_acceleration_y, bottom)
+      self._scroll(self.raw_acceleration_z, bottom)
+      self._scroll(self.filtered_acceleration_x, bottom)
+      self._scroll(self.filtered_acceleration_y, bottom)
+      self._scroll(self.filtered_acceleration_z, bottom)
+      self._scroll(self.magnitude, bottom)
+      self._scroll(self.tilt_angle, bottom)
+      self._scroll(self.orientation_angle, bottom)
+      self._scroll(self.actual_orientation, bottom)
+      self._scroll(self.proposed_orientation, bottom)
+      self._scroll(self.combined_confidence, bottom)
+      self._scroll(self.orientation_confidence, bottom)
+      self._scroll(self.tilt_confidence, bottom)
+      self._scroll(self.magnitude_confidence, bottom)
+      self._scroll(self.sample_latency, bottom)
+      for i in range(0, 4):
+        self._scroll(self.confidence[i][0], bottom)
+        self._scroll(self.confidence[i][1], bottom)
+
+    # Redraw the plots.
+    self.raw_acceleration_line_x.set_data(self.raw_acceleration_x)
+    self.raw_acceleration_line_y.set_data(self.raw_acceleration_y)
+    self.raw_acceleration_line_z.set_data(self.raw_acceleration_z)
+    self.filtered_acceleration_line_x.set_data(self.filtered_acceleration_x)
+    self.filtered_acceleration_line_y.set_data(self.filtered_acceleration_y)
+    self.filtered_acceleration_line_z.set_data(self.filtered_acceleration_z)
+    self.magnitude_line.set_data(self.magnitude)
+    self.tilt_angle_line.set_data(self.tilt_angle)
+    self.orientation_angle_line.set_data(self.orientation_angle)
+    self.actual_orientation_line.set_data(self.actual_orientation)
+    self.proposed_orientation_line.set_data(self.proposed_orientation)
+    self.combined_confidence_line.set_data(self.combined_confidence)
+    self.orientation_confidence_line.set_data(self.orientation_confidence)
+    self.tilt_confidence_line.set_data(self.tilt_confidence)
+    self.magnitude_confidence_line.set_data(self.magnitude_confidence)
+    self.sample_latency_line.set_data(self.sample_latency)
+
+    for poly in self.confidence_polys:
+      poly.remove()
+    self.confidence_polys = []
+    for i in range(0, 4):
+      self.confidence_polys.append(self.orientation_axes.fill_between(self.confidence[i][0][0],
+        self.confidence[i][0][1], self.confidence[i][1][1],
+        facecolor='goldenrod', edgecolor='goldenrod'))
+
+    self.fig.canvas.draw_idle()
+
+  # Scroll a time series.
+  def _scroll(self, timeseries, bottom):
+    bottom_index = bisect.bisect_left(timeseries[0], bottom)
+    del timeseries[0][:bottom_index]
+    del timeseries[1][:bottom_index]
+    for i, timeindex in enumerate(timeseries[0]):
+      timeseries[0][i] = timeindex - bottom
+
+  # Extract a word following the specified prefix.
+  def _get_following_word(self, line, prefix):
+    prefix_index = line.find(prefix)
+    if prefix_index == -1:
+      return None
+    start_index = prefix_index + len(prefix)
+    delim_index = line.find(',', start_index)
+    if delim_index == -1:
+      return line[start_index:]
+    else:
+      return line[start_index:delim_index]
+
+  # Extract a number following the specified prefix.
+  def _get_following_number(self, line, prefix):
+    word = self._get_following_word(line, prefix)
+    if word is None:
+      return None
+    return float(word)
+
+  # Extract an array of numbers following the specified prefix.
+  def _get_following_array_of_numbers(self, line, prefix):
+    prefix_index = line.find(prefix + '[')
+    if prefix_index == -1:
+      return None
+    start_index = prefix_index + len(prefix) + 1
+    delim_index = line.find(']', start_index)
+    if delim_index == -1:
+      return None
+
+    result = []
+    while start_index < delim_index:
+      comma_index = line.find(', ', start_index, delim_index)
+      if comma_index == -1:
+        result.append(float(line[start_index:delim_index]))
+        break;
+      result.append(float(line[start_index:comma_index]))
+      start_index = comma_index + 2
+    return result
+
+  # Add a value to a time series.
+  def _append(self, timeseries, timeindex, number):
+    timeseries[0].append(timeindex)
+    timeseries[1].append(number)
+
+  # Parse the logcat timestamp.
+  # Timestamp has the form '01-21 20:42:42.930'
+  def _parse_timestamp(self, line):
+    return datetime.strptime(line[0:18], '%m-%d %H:%M:%S.%f')
+
+# Notice
+print "Window Orientation Listener plotting tool"
+print "-----------------------------------------\n"
+print "Please turn on the Window Orientation Listener logging in Development Settings."
+
+# Start adb.
+print "Starting adb logcat.\n"
+
+adb = subprocess.Popen(['adb', 'logcat', '-s', '-v', 'time', 'WindowOrientationListener:V'],
+    stdout=subprocess.PIPE)
+adbout = NonBlockingStream(adb.stdout)
+
+# Prepare plotter.
+plotter = Plotter(adbout)
+plotter.update()
+
+# Main loop.
+plot.show()