Merge into jb-mr1-dev

Change-Id: I4696f4336d79ca199f2358bfb3ed5fc7e6c51732
diff --git a/api/current.txt b/api/current.txt
index 2edaf6d..14ad113 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -5440,8 +5440,8 @@
     field public static final int MODE_ENABLE_WRITE_AHEAD_LOGGING = 8; // 0x8
     field public static final int MODE_MULTI_PROCESS = 4; // 0x4
     field public static final int MODE_PRIVATE = 0; // 0x0
-    field public static final int MODE_WORLD_READABLE = 1; // 0x1
-    field public static final int MODE_WORLD_WRITEABLE = 2; // 0x2
+    field public static final deprecated int MODE_WORLD_READABLE = 1; // 0x1
+    field public static final deprecated int MODE_WORLD_WRITEABLE = 2; // 0x2
     field public static final java.lang.String NFC_SERVICE = "nfc";
     field public static final java.lang.String NOTIFICATION_SERVICE = "notification";
     field public static final java.lang.String NSD_SERVICE = "servicediscovery";
@@ -13948,6 +13948,14 @@
     method public byte[] transceive(byte[]) throws java.io.IOException;
   }
 
+  public final class NfcBarcode extends android.nfc.tech.BasicTagTechnology {
+    method public static android.nfc.tech.NfcBarcode get(android.nfc.Tag);
+    method public byte[] getBarcode();
+    method public int getType();
+    field public static final int TYPE_KOVIO = 1; // 0x1
+    field public static final int TYPE_UNKNOWN = -1; // 0xffffffff
+  }
+
   public final class NfcF extends android.nfc.tech.BasicTagTechnology {
     method public static android.nfc.tech.NfcF get(android.nfc.Tag);
     method public byte[] getManufacturer();
@@ -17179,6 +17187,7 @@
     field public static final int CAL_ACCESS_ROOT = 800; // 0x320
     field public static final java.lang.String CAN_MODIFY_TIME_ZONE = "canModifyTimeZone";
     field public static final java.lang.String CAN_ORGANIZER_RESPOND = "canOrganizerRespond";
+    field public static final java.lang.String IS_PRIMARY = "isPrimary";
     field public static final java.lang.String MAX_REMINDERS = "maxReminders";
     field public static final java.lang.String OWNER_ACCOUNT = "ownerAccount";
     field public static final java.lang.String SYNC_EVENTS = "sync_events";
@@ -17270,6 +17279,7 @@
     field public static final java.lang.String HAS_ALARM = "hasAlarm";
     field public static final java.lang.String HAS_ATTENDEE_DATA = "hasAttendeeData";
     field public static final java.lang.String HAS_EXTENDED_PROPERTIES = "hasExtendedProperties";
+    field public static final java.lang.String IS_ORGANIZER = "isOrganizer";
     field public static final java.lang.String LAST_DATE = "lastDate";
     field public static final java.lang.String LAST_SYNCED = "lastSynced";
     field public static final java.lang.String ORGANIZER = "organizer";
@@ -17295,6 +17305,7 @@
     field public static final java.lang.String SYNC_DATA8 = "sync_data8";
     field public static final java.lang.String SYNC_DATA9 = "sync_data9";
     field public static final java.lang.String TITLE = "title";
+    field public static final java.lang.String UID_2445 = "uid2445";
   }
 
   public static final class CalendarContract.EventsEntity implements android.provider.BaseColumns android.provider.CalendarContract.EventsColumns android.provider.CalendarContract.SyncColumns {
@@ -18787,7 +18798,7 @@
     method public static int getInt(android.content.ContentResolver, java.lang.String) throws android.provider.Settings.SettingNotFoundException;
     method public static long getLong(android.content.ContentResolver, java.lang.String, long);
     method public static long getLong(android.content.ContentResolver, java.lang.String) throws android.provider.Settings.SettingNotFoundException;
-    method public static synchronized java.lang.String getString(android.content.ContentResolver, java.lang.String);
+    method public static java.lang.String getString(android.content.ContentResolver, java.lang.String);
     method public static android.net.Uri getUriFor(java.lang.String);
     method public static boolean putFloat(android.content.ContentResolver, java.lang.String, float);
     method public static boolean putInt(android.content.ContentResolver, java.lang.String, int);
@@ -18843,7 +18854,7 @@
     method public static int getInt(android.content.ContentResolver, java.lang.String) throws android.provider.Settings.SettingNotFoundException;
     method public static long getLong(android.content.ContentResolver, java.lang.String, long);
     method public static long getLong(android.content.ContentResolver, java.lang.String) throws android.provider.Settings.SettingNotFoundException;
-    method public static synchronized java.lang.String getString(android.content.ContentResolver, java.lang.String);
+    method public static java.lang.String getString(android.content.ContentResolver, java.lang.String);
     method public static android.net.Uri getUriFor(java.lang.String);
     method public static final boolean isLocationProviderEnabled(android.content.ContentResolver, java.lang.String);
     method public static boolean putFloat(android.content.ContentResolver, java.lang.String, float);
@@ -18926,7 +18937,7 @@
     method public static long getLong(android.content.ContentResolver, java.lang.String, long);
     method public static long getLong(android.content.ContentResolver, java.lang.String) throws android.provider.Settings.SettingNotFoundException;
     method public static deprecated boolean getShowGTalkServiceStatus(android.content.ContentResolver);
-    method public static synchronized java.lang.String getString(android.content.ContentResolver, java.lang.String);
+    method public static java.lang.String getString(android.content.ContentResolver, java.lang.String);
     method public static android.net.Uri getUriFor(java.lang.String);
     method public static boolean putConfiguration(android.content.ContentResolver, android.content.res.Configuration);
     method public static boolean putFloat(android.content.ContentResolver, java.lang.String, float);
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c
index 2934261..a9945b7 100644
--- a/cmds/installd/commands.c
+++ b/cmds/installd/commands.c
@@ -338,13 +338,32 @@
         closedir(d);
     }
 
-    // Collect cache files on external storage (if it is mounted as part
+    // Collect cache files on external storage for all users (if it is mounted as part
     // of the internal storage).
     strcpy(tmpdir, android_media_dir.path);
-    if (lookup_media_dir(tmpdir, "Android") == 0
-            && lookup_media_dir(tmpdir, "data") == 0) {
-        //ALOGI("adding cache files from %s\n", tmpdir);
-        add_cache_files(cache, tmpdir, "cache");
+    dirpos = tmpdir + strlen(tmpdir);
+    d = opendir(tmpdir);
+    if (d != NULL) {
+        while ((de = readdir(d))) {
+            if (de->d_type == DT_DIR) {
+                const char *name = de->d_name;
+                    /* skip any dir that doesn't start with a number, so not a user */
+                if (name[0] < '0' || name[0] > '9') {
+                    continue;
+                }
+                if ((strlen(name)+(dirpos-tmpdir)) < (sizeof(tmpdir)-1)) {
+                    strcpy(dirpos, name);
+                    if (lookup_media_dir(tmpdir, "Android") == 0
+                            && lookup_media_dir(tmpdir, "data") == 0) {
+                        //ALOGI("adding cache files from %s\n", tmpdir);
+                        add_cache_files(cache, tmpdir, "cache");
+                    }
+                } else {
+                    ALOGW("Path exceeds limit: %s%s", tmpdir, name);
+                }
+            }
+        }
+        closedir(d);
     }
 
     clear_cache_files(cache, free_size);
diff --git a/core/java/android/accounts/AccountManagerService.java b/core/java/android/accounts/AccountManagerService.java
index 9caf84f..fc569e0 100644
--- a/core/java/android/accounts/AccountManagerService.java
+++ b/core/java/android/accounts/AccountManagerService.java
@@ -647,16 +647,17 @@
         if (response == null) throw new IllegalArgumentException("response is null");
         if (account == null) throw new IllegalArgumentException("account is null");
         checkManageAccountsPermission();
+        UserHandle user = Binder.getCallingUserHandle();
         UserAccounts accounts = getUserAccountsForCaller();
         long identityToken = clearCallingIdentity();
 
-        cancelNotification(getSigninRequiredNotificationId(accounts, account));
+        cancelNotification(getSigninRequiredNotificationId(accounts, account), user);
         synchronized(accounts.credentialsPermissionNotificationIds) {
             for (Pair<Pair<Account, String>, Integer> pair:
                 accounts.credentialsPermissionNotificationIds.keySet()) {
                 if (account.equals(pair.first.first)) {
                     int id = accounts.credentialsPermissionNotificationIds.get(pair);
-                    cancelNotification(id);
+                    cancelNotification(id, user);
                 }
             }
         }
@@ -789,7 +790,8 @@
         if (account == null || type == null) {
             return false;
         }
-        cancelNotification(getSigninRequiredNotificationId(accounts, account));
+        cancelNotification(getSigninRequiredNotificationId(accounts, account),
+                new UserHandle(accounts.userId));
         synchronized (accounts.cacheLock) {
             final SQLiteDatabase db = accounts.openHelper.getWritableDatabase();
             db.beginTransaction();
@@ -1173,11 +1175,12 @@
             title = titleAndSubtitle.substring(0, index);
             subtitle = titleAndSubtitle.substring(index + 1);            
         }
+        UserHandle user = new UserHandle(userId);
         n.setLatestEventInfo(mContext, title, subtitle,
                 PendingIntent.getActivityAsUser(mContext, 0, intent,
-                        PendingIntent.FLAG_CANCEL_CURRENT,
-                        null, new UserHandle(userId)));
-        installNotification(getCredentialPermissionNotificationId(account, authTokenType, uid), n);
+                        PendingIntent.FLAG_CANCEL_CURRENT, null, user));
+        installNotification(getCredentialPermissionNotificationId(
+                account, authTokenType, uid), n, user);
     }
 
     String getAccountLabel(String accountType) {
@@ -1763,7 +1766,8 @@
                 String accountType = result.getString(AccountManager.KEY_ACCOUNT_TYPE);
                 if (!TextUtils.isEmpty(accountName) && !TextUtils.isEmpty(accountType)) {
                     Account account = new Account(accountName, accountType);
-                    cancelNotification(getSigninRequiredNotificationId(mAccounts, account));
+                    cancelNotification(getSigninRequiredNotificationId(mAccounts, account),
+                            new UserHandle(mAccounts.userId));
                 }
             }
             IAccountManagerResponse response;
@@ -2101,30 +2105,32 @@
                 intent.addCategory(String.valueOf(notificationId));
                 Notification n = new Notification(android.R.drawable.stat_sys_warning, null,
                         0 /* when */);
+                UserHandle user = new UserHandle(userId);
                 final String notificationTitleFormat =
                         mContext.getText(R.string.notification_title).toString();
                 n.setLatestEventInfo(mContext,
                         String.format(notificationTitleFormat, account.name),
                         message, PendingIntent.getActivityAsUser(
                         mContext, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT,
-                        null, new UserHandle(userId)));
-                installNotification(notificationId, n);
+                        null, user));
+                installNotification(notificationId, n, user);
             }
         } finally {
             restoreCallingIdentity(identityToken);
         }
     }
 
-    protected void installNotification(final int notificationId, final Notification n) {
+    protected void installNotification(final int notificationId, final Notification n,
+            UserHandle user) {
         ((NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE))
-                .notify(notificationId, n);
+                .notifyAsUser(null, notificationId, n, user);
     }
 
-    protected void cancelNotification(int id) {
+    protected void cancelNotification(int id, UserHandle user) {
         long identityToken = clearCallingIdentity();
         try {
             ((NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE))
-                .cancel(id);
+                .cancelAsUser(null, id, user);
         } finally {
             restoreCallingIdentity(identityToken);
         }
@@ -2289,7 +2295,8 @@
             } finally {
                 db.endTransaction();
             }
-            cancelNotification(getCredentialPermissionNotificationId(account, authTokenType, uid));
+            cancelNotification(getCredentialPermissionNotificationId(account, authTokenType, uid),
+                    new UserHandle(accounts.userId));
         }
     }
 
@@ -2323,7 +2330,8 @@
             } finally {
                 db.endTransaction();
             }
-            cancelNotification(getCredentialPermissionNotificationId(account, authTokenType, uid));
+            cancelNotification(getCredentialPermissionNotificationId(account, authTokenType, uid),
+                    new UserHandle(accounts.userId));
         }
     }
 
diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java
index c3f57e8..9b08493 100644
--- a/core/java/android/app/ActivityManagerNative.java
+++ b/core/java/android/app/ActivityManagerNative.java
@@ -1530,8 +1530,9 @@
             IBinder resultTo = data.readStrongBinder();
             Bundle options = data.readInt() != 0
                     ? Bundle.CREATOR.createFromParcel(data) : null;
+            int userId = data.readInt();
             int result = startActivities(app, intents, resolvedTypes, resultTo,
-                    options);
+                    options, userId);
             reply.writeNoException();
             reply.writeInt(result);
             return true;
@@ -3708,7 +3709,7 @@
     
     public int startActivities(IApplicationThread caller,
             Intent[] intents, String[] resolvedTypes, IBinder resultTo,
-            Bundle options) throws RemoteException {
+            Bundle options, int userId) throws RemoteException {
         Parcel data = Parcel.obtain();
         Parcel reply = Parcel.obtain();
         data.writeInterfaceToken(IActivityManager.descriptor);
@@ -3722,6 +3723,7 @@
         } else {
             data.writeInt(0);
         }
+        data.writeInt(userId);
         mRemote.transact(START_ACTIVITIES_TRANSACTION, data, reply, 0);
         reply.readException();
         int result = reply.readInt();
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index aa8ef21..e613e04 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -65,6 +65,7 @@
 import android.os.ServiceManager;
 import android.os.StrictMode;
 import android.os.SystemClock;
+import android.os.SystemProperties;
 import android.os.Trace;
 import android.os.UserHandle;
 import android.util.AndroidRuntimeException;
@@ -2114,9 +2115,7 @@
                     + ", dir=" + r.packageInfo.getAppDir());
 
             if (activity != null) {
-                ContextImpl appContext = new ContextImpl();
-                appContext.init(r.packageInfo, r.token, this);
-                appContext.setOuterContext(activity);
+                Context appContext = createBaseContextForActivity(r, activity);
                 CharSequence title = r.activityInfo.loadLabel(appContext.getPackageManager());
                 Configuration config = new Configuration(mCompatConfiguration);
                 if (DEBUG_CONFIGURATION) Slog.v(TAG, "Launching activity "
@@ -2181,6 +2180,31 @@
         return activity;
     }
 
+    private Context createBaseContextForActivity(ActivityClientRecord r,
+            final Activity activity) {
+        ContextImpl appContext = new ContextImpl();
+        appContext.init(r.packageInfo, r.token, this);
+        appContext.setOuterContext(activity);
+
+        // For debugging purposes, if the activity's package name contains the value of
+        // the "debug.use-second-display" system property as a substring, then show
+        // its content on a secondary display if there is one.
+        Context baseContext = appContext;
+        String pkgName = SystemProperties.get("debug.second-display.pkg");
+        if (pkgName != null && !pkgName.isEmpty()
+                && r.packageInfo.mPackageName.contains(pkgName)) {
+            DisplayManagerGlobal dm = DisplayManagerGlobal.getInstance();
+            for (int displayId : dm.getDisplayIds()) {
+                if (displayId != Display.DEFAULT_DISPLAY) {
+                    Display display = dm.getRealDisplay(displayId);
+                    baseContext = appContext.createDisplayContext(display);
+                    break;
+                }
+            }
+        }
+        return baseContext;
+    }
+
     private void handleLaunchActivity(ActivityClientRecord r, Intent customIntent) {
         // If we are getting ready to gc after going to the background, well
         // we are back active so skip it.
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index a6ec9b6..6df0c37 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -965,6 +965,20 @@
         startActivities(intents, null);
     }
 
+    /** @hide */
+    @Override
+    public void startActivitiesAsUser(Intent[] intents, Bundle options, UserHandle userHandle) {
+        if ((intents[0].getFlags()&Intent.FLAG_ACTIVITY_NEW_TASK) == 0) {
+            throw new AndroidRuntimeException(
+                    "Calling startActivities() from outside of an Activity "
+                    + " context requires the FLAG_ACTIVITY_NEW_TASK flag on first Intent."
+                    + " Is this really what you want?");
+        }
+        mMainThread.getInstrumentation().execStartActivitiesAsUser(
+            getOuterContext(), mMainThread.getApplicationThread(), null,
+            (Activity)null, intents, options, userHandle.getIdentifier());
+    }
+
     @Override
     public void startActivities(Intent[] intents, Bundle options) {
         if ((intents[0].getFlags()&Intent.FLAG_ACTIVITY_NEW_TASK) == 0) {
diff --git a/core/java/android/app/IActivityManager.java b/core/java/android/app/IActivityManager.java
index 2b2679e..9454636 100644
--- a/core/java/android/app/IActivityManager.java
+++ b/core/java/android/app/IActivityManager.java
@@ -311,7 +311,7 @@
 
     public int startActivities(IApplicationThread caller,
             Intent[] intents, String[] resolvedTypes, IBinder resultTo,
-            Bundle options) throws RemoteException;
+            Bundle options, int userId) throws RemoteException;
 
     public int getFrontActivityScreenCompatMode() throws RemoteException;
     public void setFrontActivityScreenCompatMode(int mode) throws RemoteException;
diff --git a/core/java/android/app/Instrumentation.java b/core/java/android/app/Instrumentation.java
index ee4e964..e0856ae 100644
--- a/core/java/android/app/Instrumentation.java
+++ b/core/java/android/app/Instrumentation.java
@@ -1430,6 +1430,21 @@
      */
     public void execStartActivities(Context who, IBinder contextThread,
             IBinder token, Activity target, Intent[] intents, Bundle options) {
+        execStartActivitiesAsUser(who, contextThread, token, target, intents, options,
+                UserHandle.myUserId());
+    }
+
+    /**
+     * Like {@link #execStartActivity(Context, IBinder, IBinder, Activity, Intent, int)},
+     * but accepts an array of activities to be started.  Note that active
+     * {@link ActivityMonitor} objects only match against the first activity in
+     * the array.
+     *
+     * {@hide}
+     */
+    public void execStartActivitiesAsUser(Context who, IBinder contextThread,
+            IBinder token, Activity target, Intent[] intents, Bundle options,
+            int userId) {
         IApplicationThread whoThread = (IApplicationThread) contextThread;
         if (mActivityMonitors != null) {
             synchronized (mSync) {
@@ -1453,7 +1468,8 @@
                 resolvedTypes[i] = intents[i].resolveTypeIfNeeded(who.getContentResolver());
             }
             int result = ActivityManagerNative.getDefault()
-                .startActivities(whoThread, intents, resolvedTypes, token, options);
+                .startActivities(whoThread, intents, resolvedTypes, token, options,
+                        userId);
             checkStartActivityResult(result, intents[0]);
         } catch (RemoteException e) {
         }
diff --git a/core/java/android/app/PendingIntent.java b/core/java/android/app/PendingIntent.java
index 8fb6948..9d57467 100644
--- a/core/java/android/app/PendingIntent.java
+++ b/core/java/android/app/PendingIntent.java
@@ -265,6 +265,8 @@
 
     /**
      * @hide
+     * Note that UserHandle.CURRENT will be interpreted at the time the
+     * activity is started, not when the pending intent is created.
      */
     public static PendingIntent getActivityAsUser(Context context, int requestCode,
             Intent intent, int flags, Bundle options, UserHandle user) {
@@ -417,7 +419,11 @@
                 new UserHandle(UserHandle.myUserId()));
     }
 
-    /** @hide */
+    /**
+     * @hide
+     * Note that UserHandle.CURRENT will be interpreted at the time the
+     * broadcast is sent, not when the pending intent is created.
+     */
     public static PendingIntent getBroadcastAsUser(Context context, int requestCode,
             Intent intent, int flags, UserHandle userHandle) {
         String packageName = context.getPackageName();
diff --git a/core/java/android/app/TaskStackBuilder.java b/core/java/android/app/TaskStackBuilder.java
index cadf5e4..9d5bcc6 100644
--- a/core/java/android/app/TaskStackBuilder.java
+++ b/core/java/android/app/TaskStackBuilder.java
@@ -23,6 +23,7 @@
 import android.content.pm.PackageManager;
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.os.Bundle;
+import android.os.UserHandle;
 import android.util.Log;
 
 import java.util.ArrayList;
@@ -128,7 +129,11 @@
         if (parent != null) {
             // We have the actual parent intent, build the rest from static metadata
             // then add the direct parent intent to the end.
-            addParentStack(parent.getComponent());
+            ComponentName target = parent.getComponent();
+            if (target == null) {
+                target = parent.resolveActivity(mSourceContext.getPackageManager());
+            }
+            addParentStack(target);
             addNextIntent(parent);
         }
         return this;
@@ -205,18 +210,26 @@
 
     /**
      * Start the task stack constructed by this builder.
+     * @hide
+     */
+    public void startActivities(Bundle options, UserHandle userHandle) {
+        if (mIntents.isEmpty()) {
+            throw new IllegalStateException(
+                    "No intents added to TaskStackBuilder; cannot startActivities");
+        }
+
+        mSourceContext.startActivitiesAsUser(getIntents(), options, userHandle);
+    }
+
+    /**
+     * Start the task stack constructed by this builder.
      *
      * @param options Additional options for how the Activity should be started.
      * See {@link android.content.Context#startActivity(Intent, Bundle)
      * Context.startActivity(Intent, Bundle)} for more details.
      */
     public void startActivities(Bundle options) {
-        if (mIntents.isEmpty()) {
-            throw new IllegalStateException(
-                    "No intents added to TaskStackBuilder; cannot startActivities");
-        }
-
-        mSourceContext.startActivities(getIntents(), options);
+        startActivities(options, new UserHandle(UserHandle.myUserId()));
     }
 
     /**
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index 524962cb..ac36cf7 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -63,18 +63,34 @@
      */
     public static final int MODE_PRIVATE = 0x0000;
     /**
+     * @deprecated Creating world-readable files is very dangerous, and likely
+     * to cause security holes in applications.  It is strongly discouraged;
+     * instead, applications should use more formal mechanism for interactions
+     * such as {@link ContentProvider}, {@link BroadcastReceiver}, and
+     * {@link android.app.Service}.  There are no guarantees that this
+     * access mode will remain on a file, such as when it goes through a
+     * backup and restore.
      * File creation mode: allow all other applications to have read access
      * to the created file.
      * @see #MODE_PRIVATE
      * @see #MODE_WORLD_WRITEABLE
      */
+    @Deprecated
     public static final int MODE_WORLD_READABLE = 0x0001;
     /**
+     * @deprecated Creating world-writable files is very dangerous, and likely
+     * to cause security holes in applications.  It is strongly discouraged;
+     * instead, applications should use more formal mechanism for interactions
+     * such as {@link ContentProvider}, {@link BroadcastReceiver}, and
+     * {@link android.app.Service}.  There are no guarantees that this
+     * access mode will remain on a file, such as when it goes through a
+     * backup and restore.
      * File creation mode: allow all other applications to have write access
      * to the created file.
      * @see #MODE_PRIVATE
      * @see #MODE_WORLD_READABLE
      */
+    @Deprecated
     public static final int MODE_WORLD_WRITEABLE = 0x0002;
     /**
      * File creation mode: for use with {@link #openFileOutput}, if the file
@@ -645,8 +661,12 @@
      * are some important differences:
      *
      * <ul>
-     * <li>The platform does not monitor the space available in external storage,
-     * and thus will not automatically delete these files.  Note that you should
+     * <li>The platform does not always monitor the space available in external
+     * storage, and thus may not automatically delete these files.  Currently
+     * the only time files here will be deleted by the platform is when running
+     * on {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} or later and
+     * {@link android.os.Environment#isExternalStorageEmulated()
+     * Environment.isExternalStorageEmulated()} returns true.  Note that you should
      * be managing the maximum space you will use for these anyway, just like
      * with {@link #getCacheDir()}.
      * <li>External files are not always available: they will disappear if the
@@ -954,6 +974,36 @@
     public abstract void startActivities(Intent[] intents, Bundle options);
 
     /**
+     * @hide
+     * Launch multiple new activities.  This is generally the same as calling
+     * {@link #startActivity(Intent)} for the first Intent in the array,
+     * that activity during its creation calling {@link #startActivity(Intent)}
+     * for the second entry, etc.  Note that unlike that approach, generally
+     * none of the activities except the last in the array will be created
+     * at this point, but rather will be created when the user first visits
+     * them (due to pressing back from the activity on top).
+     *
+     * <p>This method throws {@link ActivityNotFoundException}
+     * if there was no Activity found for <em>any</em> given Intent.  In this
+     * case the state of the activity stack is undefined (some Intents in the
+     * list may be on it, some not), so you probably want to avoid such situations.
+     *
+     * @param intents An array of Intents to be started.
+     * @param options Additional options for how the Activity should be started.
+     * @param userHandle The user for whom to launch the activities
+     * See {@link android.content.Context#startActivity(Intent, Bundle)
+     * Context.startActivity(Intent, Bundle)} for more details.
+     *
+     * @throws ActivityNotFoundException
+     *
+     * @see {@link #startActivities(Intent[])}
+     * @see PackageManager#resolveActivity
+     */
+    public void startActivitiesAsUser(Intent[] intents, Bundle options, UserHandle userHandle) {
+        throw new RuntimeException("Not implemented. Must override in a subclass.");
+    }
+
+    /**
      * Same as {@link #startIntentSender(IntentSender, Intent, int, int, int, Bundle)}
      * with no options specified.
      *
diff --git a/core/java/android/content/ContextWrapper.java b/core/java/android/content/ContextWrapper.java
index d824f1e..84ad667 100644
--- a/core/java/android/content/ContextWrapper.java
+++ b/core/java/android/content/ContextWrapper.java
@@ -311,6 +311,12 @@
         mBase.startActivities(intents, options);
     }
 
+    /** @hide */
+    @Override
+    public void startActivitiesAsUser(Intent[] intents, Bundle options, UserHandle userHandle) {
+        mBase.startActivitiesAsUser(intents, options, userHandle);
+    }
+
     @Override
     public void startIntentSender(IntentSender intent,
             Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags)
diff --git a/core/java/android/content/SyncManager.java b/core/java/android/content/SyncManager.java
index 6b5e6e2..4257e0e 100644
--- a/core/java/android/content/SyncManager.java
+++ b/core/java/android/content/SyncManager.java
@@ -16,10 +16,6 @@
 
 package android.content;
 
-import com.android.internal.R;
-import com.google.android.collect.Lists;
-import com.google.android.collect.Maps;
-
 import android.accounts.Account;
 import android.accounts.AccountAndUser;
 import android.accounts.AccountManager;
@@ -27,7 +23,6 @@
 import android.accounts.OnAccountsUpdateListener;
 import android.app.ActivityManager;
 import android.app.AlarmManager;
-import android.app.AppGlobals;
 import android.app.Notification;
 import android.app.NotificationManager;
 import android.app.PendingIntent;
@@ -62,6 +57,11 @@
 import android.util.Log;
 import android.util.Pair;
 
+import com.android.internal.R;
+import com.google.android.collect.Lists;
+import com.google.android.collect.Maps;
+import com.google.android.collect.Sets;
+
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
 import java.util.ArrayList;
@@ -75,6 +75,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Random;
+import java.util.Set;
 import java.util.concurrent.CountDownLatch;
 
 /**
@@ -151,7 +152,7 @@
     private AlarmManager mAlarmService = null;
 
     private SyncStorageEngine mSyncStorageEngine;
-    public SyncQueue mSyncQueue;
+    final public SyncQueue mSyncQueue;
 
     protected final ArrayList<ActiveSyncContext> mActiveSyncContexts = Lists.newArrayList();
 
@@ -328,7 +329,21 @@
     private BroadcastReceiver mUserIntentReceiver = new BroadcastReceiver() {
         @Override
         public void onReceive(Context context, Intent intent) {
-            onUserRemoved(intent);
+            String action = intent.getAction();
+            final int userId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, -1);
+            if (Intent.ACTION_USER_REMOVED.equals(action)) {
+                Log.i(TAG, "User removed - cleanup: u" + userId);
+                onUserRemoved(intent);
+            } else if (Intent.ACTION_USER_STARTED.equals(action)) {
+                Log.i(TAG, "User started - check alarms: u" + userId);
+                sendCheckAlarmsMessage();
+            } else if (Intent.ACTION_USER_STOPPED.equals(action)) {
+                Log.i(TAG, "User stopped - stop syncs: u" + userId);
+                cancelActiveSync(
+                        null /* any account */,
+                        userId,
+                        null /* any authority */);
+            }
         }
     };
 
@@ -401,7 +416,9 @@
 
         intentFilter = new IntentFilter();
         intentFilter.addAction(Intent.ACTION_USER_REMOVED);
-        mContext.registerReceiver(mUserIntentReceiver, intentFilter);
+        intentFilter.addAction(Intent.ACTION_USER_STARTED);
+        mContext.registerReceiverAsUser(
+                mUserIntentReceiver, UserHandle.ALL, intentFilter, null, null);
 
         if (!factoryTest) {
             mNotificationMgr = (NotificationManager)
@@ -897,7 +914,10 @@
     private void onUserRemoved(Intent intent) {
         int userId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, -1);
         if (userId == -1) return;
+        removeUser(userId);
+    }
 
+    private void removeUser(int userId) {
         // Clean up the storage engine database
         mSyncStorageEngine.doDatabaseCleanup(new Account[0], userId);
         onAccountsUpdated(null);
@@ -1267,7 +1287,8 @@
                 final String accountKey;
                 if (authority != null) {
                     authorityName = authority.authority;
-                    accountKey = authority.account.name + "/" + authority.account.type;
+                    accountKey = authority.account.name + "/" + authority.account.type
+                            + " u" + authority.userId;
                 } else {
                     authorityName = "Unknown";
                     accountKey = "Unknown";
@@ -1394,7 +1415,8 @@
                 final String accountKey;
                 if (authority != null) {
                     authorityName = authority.authority;
-                    accountKey = authority.account.name + "/" + authority.account.type;
+                    accountKey = authority.account.name + "/" + authority.account.type
+                            + " u" + authority.userId;
                 } else {
                     authorityName = "Unknown";
                     accountKey = "Unknown";
@@ -1924,6 +1946,10 @@
                 }
                 Iterator<SyncOperation> operationIterator =
                         mSyncQueue.mOperationsMap.values().iterator();
+
+                final ActivityManager activityManager
+                        = (ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE);
+                final Set<Integer> removedUsers = Sets.newHashSet();
                 while (operationIterator.hasNext()) {
                     final SyncOperation op = operationIterator.next();
 
@@ -1943,6 +1969,15 @@
                         continue;
                     }
 
+                    // if the user in not running, drop the request
+                    if (!activityManager.isUserRunning(op.userId)) {
+                        final UserInfo userInfo = mUserManager.getUserInfo(op.userId);
+                        if (userInfo == null) {
+                            removedUsers.add(op.userId);
+                        }
+                        continue;
+                    }
+
                     // if the next run time is in the future, meaning there are no syncs ready
                     // to run, return the time
                     if (op.effectiveRunTime > now) {
@@ -1983,6 +2018,12 @@
 
                     operations.add(op);
                 }
+                for (Integer user : removedUsers) {
+                    // if it's still removed
+                    if (mUserManager.getUserInfo(user) == null) {
+                        removeUser(user);
+                    }
+                }
             }
 
             // find the next operation to dispatch, if one is ready
@@ -2168,13 +2209,13 @@
                     new ArrayList<ActiveSyncContext>(mActiveSyncContexts);
             for (ActiveSyncContext activeSyncContext : activeSyncs) {
                 if (activeSyncContext != null) {
-                    // if an authority was specified then only cancel the sync if it matches
+                    // if an account was specified then only cancel the sync if it matches
                     if (account != null) {
                         if (!account.equals(activeSyncContext.mSyncOperation.account)) {
                             continue;
                         }
                     }
-                    // if an account was specified then only cancel the sync if it matches
+                    // if an authority was specified then only cancel the sync if it matches
                     if (authority != null) {
                         if (!authority.equals(activeSyncContext.mSyncOperation.authority)) {
                             continue;
diff --git a/core/java/android/content/SyncOperation.java b/core/java/android/content/SyncOperation.java
index 9fcc22d..6611fcd 100644
--- a/core/java/android/content/SyncOperation.java
+++ b/core/java/android/content/SyncOperation.java
@@ -95,13 +95,18 @@
     }
 
     public String dump(boolean useOneLine) {
-        StringBuilder sb = new StringBuilder();
-        sb.append(account.name);
-        sb.append(" (" + account.type + ")");
-        sb.append(", " + authority);
-        sb.append(", ");
-        sb.append(SyncStorageEngine.SOURCES[syncSource]);
-        sb.append(", earliestRunTime " + earliestRunTime);
+        StringBuilder sb = new StringBuilder()
+                .append(account.name)
+                .append(" u")
+                .append(userId).append(" (")
+                .append(account.type)
+                .append(")")
+                .append(", ")
+                .append(authority)
+                .append(", ")
+                .append(SyncStorageEngine.SOURCES[syncSource])
+                .append(", earliestRunTime ")
+                .append(earliestRunTime);
         if (expedited) {
             sb.append(", EXPEDITED");
         }
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java
index 375d788..1e8671b 100644
--- a/core/java/android/hardware/Camera.java
+++ b/core/java/android/hardware/Camera.java
@@ -1161,25 +1161,28 @@
     public native final void setDisplayOrientation(int degrees);
 
     /**
-     * Enable or disable the default shutter sound when taking a picture.
+     * <p>Enable or disable the default shutter sound when taking a picture.</p>
      *
-     * By default, the camera plays the system-defined camera shutter sound when
-     * {@link #takePicture} is called. Using this method, the shutter sound can
-     * be disabled. It is strongly recommended that an alternative shutter sound
-     * is played in the {@link ShutterCallback} when the system shutter sound is
-     * disabled.
+     * <p>By default, the camera plays the system-defined camera shutter sound
+     * when {@link #takePicture} is called. Using this method, the shutter sound
+     * can be disabled. It is strongly recommended that an alternative shutter
+     * sound is played in the {@link ShutterCallback} when the system shutter
+     * sound is disabled.</p>
      *
-     * Note that devices may not always allow control of the camera shutter
-     * sound. If the shutter sound cannot be controlled, this method will return
-     * false.
+     * <p>Note that devices may not always allow disabling the camera shutter
+     * sound. If the shutter sound state cannot be set to the desired value,
+     * this method will return false. {@link CameraInfo#canDisableShutterSound}
+     * can be used to determine whether the device will allow the shutter sound
+     * to be disabled.</p>
      *
      * @param enabled whether the camera should play the system shutter sound
      *                when {@link #takePicture takePicture} is called.
-     * @return true if the shutter sound state was successfully changed. False
-     *         if the shutter sound cannot be controlled; in this case, the
-     *         application should not play its own shutter sound since the
-     *         system shutter sound will play when a picture is taken.
+     * @return {@code true} if the shutter sound state was successfully
+     *         changed. {@code false} if the shutter sound state could not be
+     *         changed. {@code true} is also returned if shutter sound playback
+     *         is already set to the requested state.
      * @see #takePicture
+     * @see CameraInfo#canDisableShutterSound
      * @see ShutterCallback
      */
     public native final boolean enableShutterSound(boolean enabled);
diff --git a/core/java/android/nfc/Tag.java b/core/java/android/nfc/Tag.java
index f9b765cb..f2cd232 100644
--- a/core/java/android/nfc/Tag.java
+++ b/core/java/android/nfc/Tag.java
@@ -24,6 +24,7 @@
 import android.nfc.tech.NdefFormatable;
 import android.nfc.tech.NfcA;
 import android.nfc.tech.NfcB;
+import android.nfc.tech.NfcBarcode;
 import android.nfc.tech.NfcF;
 import android.nfc.tech.NfcV;
 import android.nfc.tech.TagTechnology;
@@ -184,6 +185,9 @@
                 case TagTechnology.NFC_V:
                     strings[i] = NfcV.class.getName();
                     break;
+                case TagTechnology.NFC_BARCODE:
+                    strings[i] = NfcBarcode.class.getName();
+                    break;
                 default:
                     throw new IllegalArgumentException("Unknown tech type " + techList[i]);
             }
diff --git a/core/java/android/nfc/tech/Ndef.java b/core/java/android/nfc/tech/Ndef.java
index a31cb9c..64aa2996 100644
--- a/core/java/android/nfc/tech/Ndef.java
+++ b/core/java/android/nfc/tech/Ndef.java
@@ -140,8 +140,8 @@
      *
      * <p>Does not cause any RF activity and does not block.
      *
-     * @param tag an MIFARE Classic compatible tag
-     * @return MIFARE Classic object
+     * @param tag an NDEF compatible tag
+     * @return Ndef object
      */
     public static Ndef get(Tag tag) {
         if (!tag.hasTech(TagTechnology.NDEF)) return null;
diff --git a/core/java/android/nfc/tech/NfcBarcode.java b/core/java/android/nfc/tech/NfcBarcode.java
new file mode 100644
index 0000000..3149857
--- /dev/null
+++ b/core/java/android/nfc/tech/NfcBarcode.java
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 2012 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.nfc.tech;
+
+import android.nfc.Tag;
+import android.os.Bundle;
+import android.os.RemoteException;
+
+/**
+ * Provides access to tags containing just a barcode.
+ *
+ * <p>Acquire an {@link NfcBarcode} object using {@link #get}.
+ *
+ */
+public final class NfcBarcode extends BasicTagTechnology {
+
+    /** Kovio Tags */
+    public static final int TYPE_KOVIO = 1;
+    public static final int TYPE_UNKNOWN = -1;
+
+    /** @hide */
+    public static final String EXTRA_BARCODE_TYPE = "barcodetype";
+
+    private int mType;
+
+    /**
+     * Get an instance of {@link NfcBarcode} for the given tag.
+     *
+     * <p>Returns null if {@link NfcBarcode} was not enumerated in {@link Tag#getTechList}.
+     *
+     * <p>Does not cause any RF activity and does not block.
+     *
+     * @param tag an NfcBarcode compatible tag
+     * @return NfcBarcode object
+     */
+    public static NfcBarcode get(Tag tag) {
+        if (!tag.hasTech(TagTechnology.NFC_BARCODE)) return null;
+        try {
+            return new NfcBarcode(tag);
+        } catch (RemoteException e) {
+            return null;
+        }
+    }
+
+    /**
+     * Internal constructor, to be used by NfcAdapter
+     * @hide
+     */
+    public NfcBarcode(Tag tag) throws RemoteException {
+        super(tag, TagTechnology.NFC_BARCODE);
+        Bundle extras = tag.getTechExtras(TagTechnology.NFC_BARCODE);
+        if (extras != null) {
+            mType = extras.getInt(EXTRA_BARCODE_TYPE);
+        } else {
+            throw new NullPointerException("NfcBarcode tech extras are null.");
+        }
+    }
+
+    /**
+     * Returns the NFC Barcode tag type.
+     *
+     * <p>Currently only one of {@link #TYPE_KOVIO} or {@link #TYPE_UNKNOWN}.
+     *
+     * <p>Does not cause any RF activity and does not block.
+     *
+     * @return the NFC Barcode tag type
+     */
+    public int getType() {
+        return mType;
+    }
+
+    /**
+     * Returns the barcode of an NfcBarcode tag.
+     *
+     * <p>Does not cause any RF activity and does not block.
+     *
+     * @return a byte array containing the barcode
+     */
+    public byte[] getBarcode() {
+        switch (mType) {
+            case TYPE_KOVIO:
+                // For Kovio tags the barcode matches the ID
+                return mTag.getId();
+            default:
+                return null;
+        }
+    }
+}
diff --git a/core/java/android/nfc/tech/TagTechnology.java b/core/java/android/nfc/tech/TagTechnology.java
index be5cbd2..3493ea7 100644
--- a/core/java/android/nfc/tech/TagTechnology.java
+++ b/core/java/android/nfc/tech/TagTechnology.java
@@ -148,6 +148,15 @@
     public static final int MIFARE_ULTRALIGHT = 9;
 
     /**
+     * This technology is an instance of {@link NfcBarcode}.
+     * <p>Support for this technology type is optional. If a stack doesn't support this technology
+     * type tags using it must still be discovered and present the lower level radio interface
+     * technologies in use.
+     * @hide
+     */
+    public static final int NFC_BARCODE = 10;
+
+    /**
      * Get the {@link Tag} object backing this {@link TagTechnology} object.
      * @return the {@link Tag} backing this {@link TagTechnology} object.
      */
diff --git a/core/java/android/os/Environment.java b/core/java/android/os/Environment.java
index 364004b..5c4c036 100644
--- a/core/java/android/os/Environment.java
+++ b/core/java/android/os/Environment.java
@@ -109,8 +109,6 @@
 
                 // /storage/emulated/0
                 mExternalStorage = buildPath(emulatedBase, rawUserId);
-                // /storage/emulated/obb
-                mExternalStorageAndroidObb = buildPath(emulatedBase, "obb");
                 // /data/media/0
                 mMediaStorage = buildPath(mediaBase, rawUserId);
 
@@ -123,12 +121,11 @@
 
                 // /storage/sdcard0
                 mExternalStorage = new File(rawExternalStorage);
-                // /storage/sdcard0/Android/obb
-                mExternalStorageAndroidObb = buildPath(mExternalStorage, DIRECTORY_ANDROID, "obb");
                 // /data/media
                 mMediaStorage = new File(rawMediaStorage);
             }
 
+            mExternalStorageAndroidObb = buildPath(mExternalStorage, DIRECTORY_ANDROID, "obb");
             mExternalStorageAndroidData = buildPath(mExternalStorage, DIRECTORY_ANDROID, "data");
             mExternalStorageAndroidMedia = buildPath(mExternalStorage, DIRECTORY_ANDROID, "media");
         }
diff --git a/core/java/android/provider/CalendarContract.java b/core/java/android/provider/CalendarContract.java
index a28585c..af6e88e9 100644
--- a/core/java/android/provider/CalendarContract.java
+++ b/core/java/android/provider/CalendarContract.java
@@ -467,6 +467,13 @@
          *
          */
         public static final String ALLOWED_ATTENDEE_TYPES = "allowedAttendeeTypes";
+
+        /**
+         * Is this the primary calendar for this account. If this column is not explicitly set, the
+         * provider will return 1 if {@link Calendars#ACCOUNT_NAME} is equal to
+         * {@link Calendars#OWNER_ACCOUNT}.
+         */
+        public static final String IS_PRIMARY = "isPrimary";
     }
 
     /**
@@ -1206,6 +1213,14 @@
         public static final String ORGANIZER = "organizer";
 
         /**
+         * Are we the organizer of this event. If this column is not explicitly set, the provider
+         * will return 1 if {@link #ORGANIZER} is equal to {@link Calendars#OWNER_ACCOUNT}.
+         * Column name.
+         * <P>Type: STRING</P>
+         */
+        public static final String IS_ORGANIZER = "isOrganizer";
+
+        /**
          * Whether the user can invite others to the event. The
          * GUESTS_CAN_INVITE_OTHERS is a setting that applies to an arbitrary
          * guest, while CAN_INVITE_OTHERS indicates if the user can invite
@@ -1230,6 +1245,12 @@
          */
         public static final String CUSTOM_APP_URI = "customAppUri";
 
+        /**
+         * The UID for events added from the RFC 2445 iCalendar format.
+         * Column name.
+         * <P>Type: TEXT</P>
+         */
+        public static final String UID_2445 = "uid2445";
     }
 
     /**
@@ -1367,7 +1388,9 @@
                 DatabaseUtils.cursorIntToContentValuesIfPresent(cursor, cv, GUESTS_CAN_SEE_GUESTS);
                 DatabaseUtils.cursorStringToContentValuesIfPresent(cursor, cv, CUSTOM_APP_PACKAGE);
                 DatabaseUtils.cursorStringToContentValuesIfPresent(cursor, cv, CUSTOM_APP_URI);
+                DatabaseUtils.cursorStringToContentValuesIfPresent(cursor, cv, UID_2445);
                 DatabaseUtils.cursorStringToContentValuesIfPresent(cursor, cv, ORGANIZER);
+                DatabaseUtils.cursorStringToContentValuesIfPresent(cursor, cv, IS_ORGANIZER);
                 DatabaseUtils.cursorStringToContentValuesIfPresent(cursor, cv, _SYNC_ID);
                 DatabaseUtils.cursorLongToContentValuesIfPresent(cursor, cv, DIRTY);
                 DatabaseUtils.cursorLongToContentValuesIfPresent(cursor, cv, LAST_SYNCED);
@@ -1571,6 +1594,7 @@
      * <li>{@link #GUESTS_CAN_SEE_GUESTS}</li>
      * <li>{@link #CUSTOM_APP_PACKAGE}</li>
      * <li>{@link #CUSTOM_APP_URI}</li>
+     * <li>{@link #UID_2445}</li>
      * </ul>
      * The following Events columns are writable only by a sync adapter
      * <ul>
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 7864302..9aae1ec 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -764,10 +764,6 @@
             return true;
         }
 
-        public boolean putString(ContentResolver cr, String name, String value) {
-            return putStringForUser(cr, name, value, UserHandle.myUserId());
-        }
-
         public String getStringForUser(ContentResolver cr, String name, final int userHandle) {
             final boolean isSelf = (userHandle == UserHandle.myUserId());
             if (isSelf) {
@@ -855,10 +851,6 @@
                 if (c != null) c.close();
             }
         }
-
-        public String getString(ContentResolver cr, String name) {
-            return getStringForUser(cr, name, UserHandle.myUserId());
-        }
     }
 
     /**
@@ -869,8 +861,17 @@
     public static final class System extends NameValueTable {
         public static final String SYS_PROP_SETTING_VERSION = "sys.settings_system_version";
 
-        // Populated lazily, guarded by class object:
-        private static NameValueCache sNameValueCache = null;
+        /**
+         * The content:// style URL for this table
+         */
+        public static final Uri CONTENT_URI =
+            Uri.parse("content://" + AUTHORITY + "/system");
+
+        private static final NameValueCache sNameValueCache = new NameValueCache(
+                SYS_PROP_SETTING_VERSION,
+                CONTENT_URI,
+                CALL_METHOD_GET_SYSTEM,
+                CALL_METHOD_PUT_SYSTEM);
 
         private static final HashSet<String> MOVED_TO_SECURE;
         static {
@@ -937,28 +938,18 @@
             MOVED_TO_GLOBAL.add(Settings.Global.MODE_RINGER);
         }
 
-        private static void lazyInitCache() {
-            if (sNameValueCache == null) {
-                sNameValueCache = new NameValueCache(
-                        SYS_PROP_SETTING_VERSION + '_' + UserHandle.myUserId(),
-                        CONTENT_URI,
-                        CALL_METHOD_GET_SYSTEM,
-                        CALL_METHOD_PUT_SYSTEM);
-            }
-        }
-
         /**
          * Look up a name in the database.
          * @param resolver to access the database with
          * @param name to look up in the table
          * @return the corresponding value, or null if not present
          */
-        public synchronized static String getString(ContentResolver resolver, String name) {
+        public static String getString(ContentResolver resolver, String name) {
             return getStringForUser(resolver, name, UserHandle.myUserId());
         }
 
         /** @hide */
-        public synchronized static String getStringForUser(ContentResolver resolver, String name,
+        public static String getStringForUser(ContentResolver resolver, String name,
                 int userHandle) {
             if (MOVED_TO_SECURE.contains(name)) {
                 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
@@ -970,7 +961,6 @@
                         + " to android.provider.Settings.Global, returning read-only value.");
                 return Global.getStringForUser(resolver, name, userHandle);
             }
-            lazyInitCache();
             return sNameValueCache.getStringForUser(resolver, name, userHandle);
         }
 
@@ -998,7 +988,6 @@
                         + " to android.provider.Settings.Global, value is unchanged.");
                 return false;
             }
-            lazyInitCache();
             return sNameValueCache.putStringForUser(resolver, name, value, userHandle);
         }
 
@@ -1368,12 +1357,6 @@
         }
 
         /**
-         * The content:// style URL for this table
-         */
-        public static final Uri CONTENT_URI =
-            Uri.parse("content://" + AUTHORITY + "/system");
-
-        /**
          * @deprecated Use {@link android.provider.Settings.Global#STAY_ON_WHILE_PLUGGED_IN} instead
          */
         @Deprecated
@@ -2549,8 +2532,18 @@
     public static final class Secure extends NameValueTable {
         public static final String SYS_PROP_SETTING_VERSION = "sys.settings_secure_version";
 
+        /**
+         * The content:// style URL for this table
+         */
+        public static final Uri CONTENT_URI =
+            Uri.parse("content://" + AUTHORITY + "/secure");
+
         // Populated lazily, guarded by class object:
-        private static NameValueCache sNameValueCache = null;
+        private static final NameValueCache sNameValueCache = new NameValueCache(
+                SYS_PROP_SETTING_VERSION,
+                CONTENT_URI,
+                CALL_METHOD_GET_SECURE,
+                CALL_METHOD_PUT_SECURE);
 
         private static ILockSettings sLockSettings = null;
 
@@ -2654,28 +2647,18 @@
             MOVED_TO_GLOBAL.add(Settings.Global.WTF_IS_FATAL);
         }
 
-        private static void lazyInitCache() {
-            if (sNameValueCache == null) {
-                sNameValueCache = new NameValueCache(
-                        SYS_PROP_SETTING_VERSION + '_' + UserHandle.myUserId(),
-                        CONTENT_URI,
-                        CALL_METHOD_GET_SECURE,
-                        CALL_METHOD_PUT_SECURE);
-            }
-        }
-
         /**
          * Look up a name in the database.
          * @param resolver to access the database with
          * @param name to look up in the table
          * @return the corresponding value, or null if not present
          */
-        public synchronized static String getString(ContentResolver resolver, String name) {
+        public static String getString(ContentResolver resolver, String name) {
             return getStringForUser(resolver, name, UserHandle.myUserId());
         }
 
         /** @hide */
-        public synchronized static String getStringForUser(ContentResolver resolver, String name,
+        public static String getStringForUser(ContentResolver resolver, String name,
                 int userHandle) {
             if (MOVED_TO_GLOBAL.contains(name)) {
                 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Secure"
@@ -2683,21 +2666,23 @@
                 return Global.getStringForUser(resolver, name, userHandle);
             }
 
-            if (sLockSettings == null) {
-                sLockSettings = ILockSettings.Stub.asInterface(
-                        (IBinder) ServiceManager.getService("lock_settings"));
-                sIsSystemProcess = Process.myUid() == Process.SYSTEM_UID;
-            }
-            if (sLockSettings != null && !sIsSystemProcess
-                    && MOVED_TO_LOCK_SETTINGS.contains(name)) {
-                try {
-                    return sLockSettings.getString(name, "0", userHandle);
-                } catch (RemoteException re) {
-                    // Fall through
+            if (MOVED_TO_LOCK_SETTINGS.contains(name)) {
+                synchronized (Secure.class) {
+                    if (sLockSettings == null) {
+                        sLockSettings = ILockSettings.Stub.asInterface(
+                                (IBinder) ServiceManager.getService("lock_settings"));
+                        sIsSystemProcess = Process.myUid() == Process.SYSTEM_UID;
+                    }
+                }
+                if (sLockSettings != null && !sIsSystemProcess) {
+                    try {
+                        return sLockSettings.getString(name, "0", userHandle);
+                    } catch (RemoteException re) {
+                        // Fall through
+                    }
                 }
             }
 
-            lazyInitCache();
             return sNameValueCache.getStringForUser(resolver, name, userHandle);
         }
 
@@ -2720,7 +2705,6 @@
                         + " to android.provider.Settings.Global");
                 return Global.putStringForUser(resolver, name, value, userHandle);
             }
-            lazyInitCache();
             return sNameValueCache.putStringForUser(resolver, name, value, userHandle);
         }
 
@@ -3001,12 +2985,6 @@
         }
 
         /**
-         * The content:// style URL for this table
-         */
-        public static final Uri CONTENT_URI =
-            Uri.parse("content://" + AUTHORITY + "/secure");
-
-        /**
          * @deprecated Use {@link android.provider.Settings.Global#DEVELOPMENT_SETTINGS_ENABLED}
          * instead
          */
@@ -5467,11 +5445,21 @@
 
        /**
         * Used to disable SMS short code confirmation - defaults to true.
+        * True indcates we will do the check, etc.  Set to false to disable.
         * @see com.android.internal.telephony.SmsUsageMonitor
         * @hide
         */
        public static final String SMS_SHORT_CODE_CONFIRMATION = "sms_short_code_confirmation";
 
+        /**
+         * Used to select which country we use to determine premium sms codes.
+         * One of com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_SIM,
+         * com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_NETWORK,
+         * or com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_BOTH.
+         * @hide
+         */
+        public static final String SMS_SHORT_CODE_RULE = "sms_short_code_rule";
+
        /**
         * Prefix for SMS short code regex patterns (country code is appended).
         * @see com.android.internal.telephony.SmsUsageMonitor
@@ -5755,17 +5743,11 @@
 
 
         // Populated lazily, guarded by class object:
-        private static NameValueCache sNameValueCache = null;
-
-        private static void lazyInitCache() {
-            if (sNameValueCache == null) {
-                sNameValueCache = new NameValueCache(
-                        SYS_PROP_SETTING_VERSION,
-                        CONTENT_URI,
-                        CALL_METHOD_GET_GLOBAL,
-                        CALL_METHOD_PUT_GLOBAL);
-            }
-        }
+        private static NameValueCache sNameValueCache = new NameValueCache(
+                    SYS_PROP_SETTING_VERSION,
+                    CONTENT_URI,
+                    CALL_METHOD_GET_GLOBAL,
+                    CALL_METHOD_PUT_GLOBAL);
 
         /**
          * Look up a name in the database.
@@ -5773,14 +5755,13 @@
          * @param name to look up in the table
          * @return the corresponding value, or null if not present
          */
-        public synchronized static String getString(ContentResolver resolver, String name) {
+        public static String getString(ContentResolver resolver, String name) {
             return getStringForUser(resolver, name, UserHandle.myUserId());
         }
 
         /** @hide */
-        public synchronized static String getStringForUser(ContentResolver resolver, String name,
+        public static String getStringForUser(ContentResolver resolver, String name,
                 int userHandle) {
-            lazyInitCache();
             return sNameValueCache.getStringForUser(resolver, name, userHandle);
         }
 
@@ -5799,7 +5780,6 @@
         /** @hide */
         public static boolean putStringForUser(ContentResolver resolver,
                 String name, String value, int userHandle) {
-            lazyInitCache();
             if (LOCAL_LOGV) {
                 Log.v(TAG, "Global.putString(name=" + name + ", value=" + value
                         + " for " + userHandle);
diff --git a/core/java/android/view/HardwareRenderer.java b/core/java/android/view/HardwareRenderer.java
index bafab21..da925c7 100644
--- a/core/java/android/view/HardwareRenderer.java
+++ b/core/java/android/view/HardwareRenderer.java
@@ -992,8 +992,15 @@
         EGLContext createContext(EGL10 egl, EGLDisplay eglDisplay, EGLConfig eglConfig) {
             int[] attribs = { EGL_CONTEXT_CLIENT_VERSION, mGlVersion, EGL_NONE };
 
-            return egl.eglCreateContext(eglDisplay, eglConfig, EGL_NO_CONTEXT,
-                    mGlVersion != 0 ? attribs : null);            
+            EGLContext context = egl.eglCreateContext(eglDisplay, eglConfig, EGL_NO_CONTEXT,
+                    mGlVersion != 0 ? attribs : null);
+            if (context == null || context == EGL_NO_CONTEXT) {
+                //noinspection ConstantConditions
+                throw new IllegalStateException(
+                        "Could not create an EGL context. eglCreateContext failed with error: " +
+                        GLUtils.getEGLErrorString(sEgl.eglGetError()));
+            }
+            return context;
         }
 
         @Override
diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java
index 973c7f6..3be63d5 100644
--- a/core/java/android/view/SurfaceView.java
+++ b/core/java/android/view/SurfaceView.java
@@ -456,11 +456,12 @@
                 }
 
                 if (mWindow == null) {
+                    Display display = getDisplay();
                     mWindow = new MyWindow(this);
                     mLayout.type = mWindowType;
                     mLayout.gravity = Gravity.START|Gravity.TOP;
                     mSession.addToDisplayWithoutInputChannel(mWindow, mWindow.mSeq, mLayout,
-                            mVisible ? VISIBLE : GONE, Display.DEFAULT_DISPLAY, mContentInsets);
+                            mVisible ? VISIBLE : GONE, display.getDisplayId(), mContentInsets);
                 }
                 
                 boolean realSizeChanged;
diff --git a/core/java/com/android/internal/statusbar/StatusBarNotification.java b/core/java/com/android/internal/statusbar/StatusBarNotification.java
index f9a38a5..a91aa3c 100644
--- a/core/java/com/android/internal/statusbar/StatusBarNotification.java
+++ b/core/java/com/android/internal/statusbar/StatusBarNotification.java
@@ -48,6 +48,7 @@
     public final int score;
     public final UserHandle user;
 
+    /** This is temporarily needed for the JB MR1 PDK. */
     @Deprecated
     public StatusBarNotification(String pkg, int id, String tag, int uid, int initialPid, int score,
             Notification notification) {
@@ -143,6 +144,6 @@
 
     /** Returns a userHandle for the instance of the app that posted this notification. */
     public int getUserId() {
-        return UserHandle.getUserId(this.uid);
+        return this.user.getIdentifier();
     }
 }
diff --git a/core/jni/android_view_GLES20Canvas.cpp b/core/jni/android_view_GLES20Canvas.cpp
index b91eb28..a3834ac 100644
--- a/core/jni/android_view_GLES20Canvas.cpp
+++ b/core/jni/android_view_GLES20Canvas.cpp
@@ -116,7 +116,9 @@
 
 static OpenGLRenderer* android_view_GLES20Canvas_createRenderer(JNIEnv* env, jobject clazz) {
     RENDERER_LOGD("Create OpenGLRenderer");
-    return new OpenGLRenderer;
+    OpenGLRenderer* renderer = new OpenGLRenderer();
+    renderer->initProperties();
+    return renderer;
 }
 
 static void android_view_GLES20Canvas_destroyRenderer(JNIEnv* env, jobject clazz,
@@ -734,7 +736,9 @@
 static OpenGLRenderer* android_view_GLES20Canvas_createLayerRenderer(JNIEnv* env,
         jobject clazz, Layer* layer) {
     if (layer) {
-        return new LayerRenderer(layer);
+        OpenGLRenderer* renderer = new LayerRenderer(layer);
+        renderer->initProperties();
+        return renderer;
     }
     return NULL;
 }
diff --git a/core/tests/coretests/src/android/accounts/AccountManagerServiceTest.java b/core/tests/coretests/src/android/accounts/AccountManagerServiceTest.java
index 33a73b5..1d7576f 100644
--- a/core/tests/coretests/src/android/accounts/AccountManagerServiceTest.java
+++ b/core/tests/coretests/src/android/accounts/AccountManagerServiceTest.java
@@ -23,6 +23,7 @@
 import android.content.pm.RegisteredServicesCacheListener;
 import android.os.Bundle;
 import android.os.Handler;
+import android.os.UserHandle;
 import android.test.AndroidTestCase;
 import android.test.IsolatedContext;
 import android.test.RenamingDelegatingContext;
@@ -243,11 +244,11 @@
         }
 
         @Override
-        protected void installNotification(final int notificationId, final Notification n) {
+        protected void installNotification(final int notificationId, final Notification n, UserHandle user) {
         }
 
         @Override
-        protected void cancelNotification(final int id) {
+        protected void cancelNotification(final int id, UserHandle user) {
         }
     }
 }
diff --git a/data/fonts/DroidSansFallback.ttf b/data/fonts/DroidSansFallback.ttf
index cfbc66a..2b75113 100644
--- a/data/fonts/DroidSansFallback.ttf
+++ b/data/fonts/DroidSansFallback.ttf
Binary files differ
diff --git a/data/fonts/DroidSansFallbackFull.ttf b/data/fonts/DroidSansFallbackFull.ttf
index 0cacabe..a9df005 100644
--- a/data/fonts/DroidSansFallbackFull.ttf
+++ b/data/fonts/DroidSansFallbackFull.ttf
Binary files differ
diff --git a/data/fonts/fallback_fonts.xml b/data/fonts/fallback_fonts.xml
index 2c9a0c8..50ff437 100644
--- a/data/fonts/fallback_fonts.xml
+++ b/data/fonts/fallback_fonts.xml
@@ -93,6 +93,11 @@
     </family>
     <family>
         <fileset>
+            <file>NanumGothic.ttf</file>
+        </fileset>
+    </family>
+    <family>
+        <fileset>
             <file>AndroidEmoji.ttf</file>
         </fileset>
     </family>
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index a4403c8..d0d1d93 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -34,6 +34,7 @@
 #include "OpenGLRenderer.h"
 #include "DisplayListRenderer.h"
 #include "PathRenderer.h"
+#include "Properties.h"
 #include "Vector.h"
 
 namespace android {
@@ -117,6 +118,8 @@
     memcpy(mMeshVertices, gMeshVertices, sizeof(gMeshVertices));
 
     mFirstSnapshot = new Snapshot;
+
+    mScissorOptimizationDisabled = false;
 }
 
 OpenGLRenderer::~OpenGLRenderer() {
@@ -124,16 +127,15 @@
     // GL APIs. All GL state should be kept in Caches.h
 }
 
-///////////////////////////////////////////////////////////////////////////////
-// Debug
-///////////////////////////////////////////////////////////////////////////////
-
-void OpenGLRenderer::startMark(const char* name) const {
-    mCaches.startMark(0, name);
-}
-
-void OpenGLRenderer::endMark() const {
-    mCaches.endMark();
+void OpenGLRenderer::initProperties() {
+    char property[PROPERTY_VALUE_MAX];
+    if (property_get(PROPERTY_DISABLE_SCISSOR_OPTIMIZATION, property, "false")) {
+        mScissorOptimizationDisabled = !strcasecmp(property, "true");
+        INIT_LOGD("  Scissor optimization %s",
+                mScissorOptimizationDisabled ? "disabled" : "enabled");
+    } else {
+        INIT_LOGD("  Scissor optimization enabled");
+    }
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -268,40 +270,6 @@
     }
 }
 
-void OpenGLRenderer::debugOverdraw(bool enable, bool clear) {
-    if (mCaches.debugOverdraw && getTargetFbo() == 0) {
-        if (clear) {
-            mCaches.disableScissor();
-            mCaches.stencil.clear();
-        }
-        if (enable) {
-            mCaches.stencil.enableDebugWrite();
-        } else {
-            mCaches.stencil.disable();
-        }
-    }
-}
-
-void OpenGLRenderer::renderOverdraw() {
-    if (mCaches.debugOverdraw && getTargetFbo() == 0) {
-        const Rect* clip = mTilingSnapshot->clipRect;
-
-        mCaches.enableScissor();
-        mCaches.setScissor(clip->left, mTilingSnapshot->height - clip->bottom,
-                clip->right - clip->left, clip->bottom - clip->top);
-
-        mCaches.stencil.enableDebugTest(2);
-        drawColor(0x2f0000ff, SkXfermode::kSrcOver_Mode);
-        mCaches.stencil.enableDebugTest(3);
-        drawColor(0x2f00ff00, SkXfermode::kSrcOver_Mode);
-        mCaches.stencil.enableDebugTest(4);
-        drawColor(0x3fff0000, SkXfermode::kSrcOver_Mode);
-        mCaches.stencil.enableDebugTest(4, true);
-        drawColor(0x7fff0000, SkXfermode::kSrcOver_Mode);
-        mCaches.stencil.disable();
-    }
-}
-
 void OpenGLRenderer::interrupt() {
     if (mCaches.currentProgram) {
         if (mCaches.currentProgram->isInUse()) {
@@ -439,6 +407,52 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
+// Debug
+///////////////////////////////////////////////////////////////////////////////
+
+void OpenGLRenderer::startMark(const char* name) const {
+    mCaches.startMark(0, name);
+}
+
+void OpenGLRenderer::endMark() const {
+    mCaches.endMark();
+}
+
+void OpenGLRenderer::debugOverdraw(bool enable, bool clear) {
+    if (mCaches.debugOverdraw && getTargetFbo() == 0) {
+        if (clear) {
+            mCaches.disableScissor();
+            mCaches.stencil.clear();
+        }
+        if (enable) {
+            mCaches.stencil.enableDebugWrite();
+        } else {
+            mCaches.stencil.disable();
+        }
+    }
+}
+
+void OpenGLRenderer::renderOverdraw() {
+    if (mCaches.debugOverdraw && getTargetFbo() == 0) {
+        const Rect* clip = mTilingSnapshot->clipRect;
+
+        mCaches.enableScissor();
+        mCaches.setScissor(clip->left, mTilingSnapshot->height - clip->bottom,
+                clip->right - clip->left, clip->bottom - clip->top);
+
+        mCaches.stencil.enableDebugTest(2);
+        drawColor(0x2f0000ff, SkXfermode::kSrcOver_Mode);
+        mCaches.stencil.enableDebugTest(3);
+        drawColor(0x2f00ff00, SkXfermode::kSrcOver_Mode);
+        mCaches.stencil.enableDebugTest(4);
+        drawColor(0x3fff0000, SkXfermode::kSrcOver_Mode);
+        mCaches.stencil.enableDebugTest(4, true);
+        drawColor(0x7fff0000, SkXfermode::kSrcOver_Mode);
+        mCaches.stencil.disable();
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
 // Layers
 ///////////////////////////////////////////////////////////////////////////////
 
@@ -1248,7 +1262,7 @@
 
     bool rejected = !clipRect.intersects(r);
     if (!isDeferred() && !rejected) {
-        mCaches.setScissorEnabled(!clipRect.contains(r));
+        mCaches.setScissorEnabled(mScissorOptimizationDisabled || !clipRect.contains(r));
     }
 
     return rejected;
@@ -1384,8 +1398,8 @@
     // When the blending mode is kClear_Mode, we need to use a modulate color
     // argb=1,0,0,0
     accountForClear(mode);
-    chooseBlending(blend || (mColorSet && mColorA < 1.0f) || (mShader && mShader->blend()), mode,
-            mDescription, swapSrcDst);
+    chooseBlending(blend || (mColorSet && mColorA < 1.0f) || (mShader && mShader->blend()) ||
+            (mColorFilter && mColorFilter->blend()), mode, mDescription, swapSrcDst);
 }
 
 void OpenGLRenderer::setupDrawProgram() {
@@ -2711,7 +2725,7 @@
         debugLayerUpdate = mCaches.debugLayersUpdates;
     }
 
-    mCaches.setScissorEnabled(!clip.contains(transformed));
+    mCaches.setScissorEnabled(mScissorOptimizationDisabled || !clip.contains(transformed));
     mCaches.activeTexture(0);
 
     if (CC_LIKELY(!layer->region.isEmpty())) {
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index 46e66cb..c29e3fb 100644
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -64,6 +64,12 @@
     virtual ~OpenGLRenderer();
 
     /**
+     * Read externally defined properties to control the behavior
+     * of the renderer.
+     */
+    ANDROID_API void initProperties();
+
+    /**
      * Indicates whether this renderer executes drawing commands immediately.
      * If this method returns true, the drawing commands will be executed
      * later.
@@ -804,6 +810,10 @@
     // Indicate whether we are drawing an opaque frame
     bool mOpaqueFrame;
 
+    // See PROPERTY_DISABLE_SCISSOR_OPTIMIZATION in
+    // Properties.h
+    bool mScissorOptimizationDisabled;
+
     friend class DisplayListRenderer;
 
 }; // class OpenGLRenderer
diff --git a/libs/hwui/ProgramCache.cpp b/libs/hwui/ProgramCache.cpp
index c81319e..7bc2b37 100644
--- a/libs/hwui/ProgramCache.cpp
+++ b/libs/hwui/ProgramCache.cpp
@@ -347,7 +347,6 @@
         // None
         "",
         // Matrix
-        // TODO: Fix premultiplied alpha computations for color matrix
         "    fragColor *= colorMatrix;\n"
         "    fragColor += colorMatrixVector;\n"
         "    fragColor.rgb *= fragColor.a;\n",
diff --git a/libs/hwui/Properties.h b/libs/hwui/Properties.h
index 31e60e44..1e8765b 100644
--- a/libs/hwui/Properties.h
+++ b/libs/hwui/Properties.h
@@ -67,6 +67,21 @@
  */
 #define PROPERTY_DEBUG_OVERDRAW "debug.hwui.show_overdraw"
 
+/**
+ * Used to enable/disable scissor optimization. The accepted values are
+ * "true" and "false". The default value is "false".
+ *
+ * When scissor optimization is enabled, OpenGLRenderer will attempt to
+ * minimize the use of scissor by selectively enabling and disabling the
+ * GL scissor test.
+ * When the optimization is disabled, OpenGLRenderer will keep the GL
+ * scissor test enabled and change the scissor rect as needed.
+ * Some GPUs (for instance the SGX 540) perform better when changing
+ * the scissor rect often than when enabling/disabling the scissor test
+ * often.
+ */
+#define PROPERTY_DISABLE_SCISSOR_OPTIMIZATION "ro.hwui.disable_scissor_opt"
+
 // These properties are defined in mega-bytes
 #define PROPERTY_TEXTURE_CACHE_SIZE "ro.hwui.texture_cache_size"
 #define PROPERTY_LAYER_CACHE_SIZE "ro.hwui.layer_cache_size"
diff --git a/libs/hwui/SkiaColorFilter.cpp b/libs/hwui/SkiaColorFilter.cpp
index b86bbc5..f754388 100644
--- a/libs/hwui/SkiaColorFilter.cpp
+++ b/libs/hwui/SkiaColorFilter.cpp
@@ -34,13 +34,10 @@
 // Color matrix filter
 ///////////////////////////////////////////////////////////////////////////////
 
-SkiaColorMatrixFilter::SkiaColorMatrixFilter(SkColorFilter *skFilter, float* matrix, float* vector):
+SkiaColorMatrixFilter::SkiaColorMatrixFilter(SkColorFilter* skFilter, float* matrix, float* vector):
         SkiaColorFilter(skFilter, kColorMatrix, true), mMatrix(matrix), mVector(vector) {
-    // Skia uses the range [0..255] for the addition vector, but we need
-    // the [0..1] range to apply the vector in GLSL
-    for (int i = 0; i < 4; i++) {
-        mVector[i] /= 255.0f;
-    }
+    // TODO: We should be smarter about this
+    mBlend = true;
 }
 
 SkiaColorMatrixFilter::~SkiaColorMatrixFilter() {
@@ -62,7 +59,7 @@
 // Lighting color filter
 ///////////////////////////////////////////////////////////////////////////////
 
-SkiaLightingFilter::SkiaLightingFilter(SkColorFilter *skFilter, int multiply, int add):
+SkiaLightingFilter::SkiaLightingFilter(SkColorFilter* skFilter, int multiply, int add):
         SkiaColorFilter(skFilter, kLighting, true) {
     mMulR = ((multiply >> 16) & 0xFF) / 255.0f;
     mMulG = ((multiply >>  8) & 0xFF) / 255.0f;
@@ -71,6 +68,9 @@
     mAddR = ((add >> 16) & 0xFF) / 255.0f;
     mAddG = ((add >>  8) & 0xFF) / 255.0f;
     mAddB = ((add      ) & 0xFF) / 255.0f;
+
+    // A lighting filter always ignores alpha
+    mBlend = false;
 }
 
 void SkiaLightingFilter::describe(ProgramDescription& description, const Extensions& extensions) {
@@ -86,13 +86,16 @@
 // Blend color filter
 ///////////////////////////////////////////////////////////////////////////////
 
-SkiaBlendFilter::SkiaBlendFilter(SkColorFilter *skFilter, int color, SkXfermode::Mode mode):
+SkiaBlendFilter::SkiaBlendFilter(SkColorFilter* skFilter, int color, SkXfermode::Mode mode):
         SkiaColorFilter(skFilter, kBlend, true), mMode(mode) {
     const int alpha = (color >> 24) & 0xFF;
     mA = alpha / 255.0f;
     mR = mA * ((color >> 16) & 0xFF) / 255.0f;
     mG = mA * ((color >>  8) & 0xFF) / 255.0f;
     mB = mA * ((color      ) & 0xFF) / 255.0f;
+
+    // TODO: We should do something smarter here
+    mBlend = true;
 }
 
 void SkiaBlendFilter::describe(ProgramDescription& description, const Extensions& extensions) {
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index cee8da8..94b510f 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -154,6 +154,7 @@
     private static final int MSG_SET_RSX_CONNECTION_STATE = 23; // change remote submix connection
     private static final int MSG_SET_FORCE_RSX_USE = 24;        // force remote submix audio routing
     private static final int MSG_CHECK_MUSIC_ACTIVE = 25;
+    private static final int MSG_BROADCAST_AUDIO_BECOMING_NOISY = 26;
 
     // flags for MSG_PERSIST_VOLUME indicating if current and/or last audible volume should be
     // persisted
@@ -387,9 +388,11 @@
     private Looper mSoundPoolLooper = null;
     // volume applied to sound played with playSoundEffect()
     private static int sSoundEffectVolumeDb;
-    // getActiveStreamType() will return STREAM_NOTIFICATION during this period after a notification
+    // getActiveStreamType() will return:
+    // - STREAM_NOTIFICATION on tablets during this period after a notification stopped
+    // - STREAM_MUSIC on phones during this period after music or talkback/voice search prompt
     // stopped
-    private static final int NOTIFICATION_VOLUME_DELAY_MS = 5000;
+    private static final int DEFAULT_STREAM_TYPE_OVERRIDE_DELAY_MS = 5000;
     // previous volume adjustment direction received by checkForRingerModeChange()
     private int mPrevVolDirection = AudioManager.ADJUST_SAME;
     // Keyguard manager proxy
@@ -2340,7 +2343,8 @@
                     if (DEBUG_VOL)
                         Log.v(TAG, "getActiveStreamType: Forcing STREAM_REMOTE_MUSIC");
                     return STREAM_REMOTE_MUSIC;
-                } else if (AudioSystem.isStreamActive(AudioSystem.STREAM_MUSIC, 0)) {
+                } else if (AudioSystem.isStreamActive(AudioSystem.STREAM_MUSIC,
+                            DEFAULT_STREAM_TYPE_OVERRIDE_DELAY_MS)) {
                     if (DEBUG_VOL)
                         Log.v(TAG, "getActiveStreamType: Forcing STREAM_MUSIC stream active");
                     return AudioSystem.STREAM_MUSIC;
@@ -2369,9 +2373,9 @@
                     return AudioSystem.STREAM_VOICE_CALL;
                 }
             } else if (AudioSystem.isStreamActive(AudioSystem.STREAM_NOTIFICATION,
-                    NOTIFICATION_VOLUME_DELAY_MS) ||
+                    DEFAULT_STREAM_TYPE_OVERRIDE_DELAY_MS) ||
                     AudioSystem.isStreamActive(AudioSystem.STREAM_RING,
-                            NOTIFICATION_VOLUME_DELAY_MS)) {
+                            DEFAULT_STREAM_TYPE_OVERRIDE_DELAY_MS)) {
                 if (DEBUG_VOL) Log.v(TAG, "getActiveStreamType: Forcing STREAM_NOTIFICATION");
                 return AudioSystem.STREAM_NOTIFICATION;
             } else if (suggestedStreamType == AudioManager.USE_DEFAULT_STREAM_TYPE) {
@@ -3252,6 +3256,10 @@
                 case MSG_CHECK_MUSIC_ACTIVE:
                     onCheckMusicActive();
                     break;
+
+                case MSG_BROADCAST_AUDIO_BECOMING_NOISY:
+                    onSendBecomingNoisyIntent();
+                    break;
             }
         }
     }
@@ -3308,7 +3316,7 @@
                 address);
     }
 
-    private void sendBecomingNoisyIntent() {
+    private void onSendBecomingNoisyIntent() {
         sendBroadcastToAll(new Intent(AudioManager.ACTION_AUDIO_BECOMING_NOISY));
     }
 
@@ -3443,8 +3451,14 @@
                 }
             }
             if (devices == device) {
+                sendMsg(mAudioHandler,
+                        MSG_BROADCAST_AUDIO_BECOMING_NOISY,
+                        SENDMSG_REPLACE,
+                        0,
+                        0,
+                        null,
+                        0);
                 delay = 1000;
-                sendBecomingNoisyIntent();
             }
         }
 
@@ -3710,6 +3724,15 @@
             } else if (action.equalsIgnoreCase(Intent.ACTION_CONFIGURATION_CHANGED)) {
                 handleConfigurationChanged(context);
             } else if (action.equals(Intent.ACTION_USER_SWITCHED)) {
+                // attempt to stop music playabck for background user
+                sendMsg(mAudioHandler,
+                        MSG_BROADCAST_AUDIO_BECOMING_NOISY,
+                        SENDMSG_REPLACE,
+                        0,
+                        0,
+                        null,
+                        0);
+                // load volume settings for new user
                 readAudioSettings(true /*userSwitch*/);
                 // preserve STREAM_MUSIC volume from one user to the next.
                 sendMsg(mAudioHandler,
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
index f0b8812..6d8b08f 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
@@ -252,7 +252,8 @@
                 if (!DatabaseHelper.isValidTable(this.table)) {
                     throw new IllegalArgumentException("Bad root path: " + this.table);
                 }
-                if (TABLE_SYSTEM.equals(this.table) || TABLE_SECURE.equals(this.table)) {
+                if (TABLE_SYSTEM.equals(this.table) || TABLE_SECURE.equals(this.table) ||
+                    TABLE_GLOBAL.equals(this.table)) {
                     this.where = Settings.NameValueTable.NAME + "=?";
                     this.args = new String[] { url.getPathSegments().get(1) };
                 } else {
@@ -315,10 +316,10 @@
         String property = null, table = uri.getPathSegments().get(0);
         final boolean isGlobal = table.equals(TABLE_GLOBAL);
         if (table.equals(TABLE_SYSTEM)) {
-            property = Settings.System.SYS_PROP_SETTING_VERSION + '_' + userHandle;
+            property = Settings.System.SYS_PROP_SETTING_VERSION;
             backedUpDataChanged = true;
         } else if (table.equals(TABLE_SECURE)) {
-            property = Settings.Secure.SYS_PROP_SETTING_VERSION + '_' + userHandle;
+            property = Settings.Secure.SYS_PROP_SETTING_VERSION;
             backedUpDataChanged = true;
         } else if (isGlobal) {
             property = Settings.Global.SYS_PROP_SETTING_VERSION;    // this one is global
@@ -447,11 +448,6 @@
             sSystemCaches.delete(userHandle);
             sSecureCaches.delete(userHandle);
             sKnownMutationsInFlight.delete(userHandle);
-
-            String property = Settings.System.SYS_PROP_SETTING_VERSION + '_' + userHandle;
-            SystemProperties.set(property, "");
-            property = Settings.Secure.SYS_PROP_SETTING_VERSION + '_' + userHandle;
-            SystemProperties.set(property, "");
         }
     }
 
diff --git a/packages/SystemUI/res/layout-land/status_bar_recent_panel.xml b/packages/SystemUI/res/layout-land/status_bar_recent_panel.xml
index 2df9f6c..7c50409 100644
--- a/packages/SystemUI/res/layout-land/status_bar_recent_panel.xml
+++ b/packages/SystemUI/res/layout-land/status_bar_recent_panel.xml
@@ -36,25 +36,16 @@
         android:clipChildren="false">
 
         <com.android.systemui.recent.RecentsHorizontalScrollView android:id="@+id/recents_container"
-            android:layout_width="wrap_content"
+            android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:layout_marginRight="@dimen/status_bar_recents_right_glow_margin"
-            android:divider="@null"
-            android:stackFromBottom="true"
             android:fadingEdge="horizontal"
             android:scrollbars="none"
-            android:fadingEdgeLength="@dimen/status_bar_recents_scroll_fading_edge_length"
-            android:layout_gravity="bottom|right"
-            android:orientation="horizontal"
-            android:clipToPadding="false"
-            android:clipChildren="false">
+            android:fadingEdgeLength="@dimen/status_bar_recents_scroll_fading_edge_length">
 
             <LinearLayout android:id="@+id/recents_linear_layout"
                 android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:orientation="horizontal"
-                android:clipToPadding="false"
-                android:clipChildren="false">
+                android:orientation="horizontal">
             </LinearLayout>
 
         </com.android.systemui.recent.RecentsHorizontalScrollView>
diff --git a/packages/SystemUI/res/layout/status_bar_expanded.xml b/packages/SystemUI/res/layout/status_bar_expanded.xml
index f2e83d8..6436a7f 100644
--- a/packages/SystemUI/res/layout/status_bar_expanded.xml
+++ b/packages/SystemUI/res/layout/status_bar_expanded.xml
@@ -33,6 +33,8 @@
         layout="@layout/carrier_label"
         android:layout_height="@dimen/carrier_label_height"
         android:layout_width="match_parent"
+        android:layout_marginBottom="@dimen/close_handle_height"
+        android:layout_gravity="bottom"
         />
 
     <LinearLayout
diff --git a/packages/SystemUI/res/values-af/strings.xml b/packages/SystemUI/res/values-af/strings.xml
index d46ac60..1b81202 100644
--- a/packages/SystemUI/res/values-af/strings.xml
+++ b/packages/SystemUI/res/values-af/strings.xml
@@ -157,6 +157,8 @@
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Gehef"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> toestelle)"</string>
+    <!-- no translation found for quick_settings_bluetooth_off_label (8159652146149219937) -->
+    <skip />
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Helderheid"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Outoroteer"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Rotasie gesluit"</string>
@@ -170,6 +172,8 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Ek"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wi-Fi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Geen netwerk nie"</string>
+    <!-- no translation found for quick_settings_wifi_off_label (3343111275022978538) -->
+    <skip />
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Wi-Fi-skerm"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Geen Wi-Fi-skerm-verbinding nie"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Helderheid"</string>
diff --git a/packages/SystemUI/res/values-am/strings.xml b/packages/SystemUI/res/values-am/strings.xml
index 641a5e8..2e220ec 100644
--- a/packages/SystemUI/res/values-am/strings.xml
+++ b/packages/SystemUI/res/values-am/strings.xml
@@ -150,13 +150,13 @@
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"ማያ ገጽ በቁም ገፅ አቀማመጥ ተቆልፏል።"</string>
     <string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
     <string name="start_dreams" msgid="870400522982252717">"ህልሞችን ጀምር"</string>
-    <!-- no translation found for ethernet_label (7967563676324087464) -->
-    <skip />
+    <string name="ethernet_label" msgid="7967563676324087464">"ኤተርኔት"</string>
     <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"የአውሮፕላን ሁነታ"</string>
     <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"ባትሪ በመሙላት ላይ፣ <xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"ባትሪ ሞልቷል።"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"ብሉቱዝ"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"ብሉቱዝ (<xliff:g id="NUMBER">%d</xliff:g> መሣሪያዎች)"</string>
+    <string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"ብሉቱዝ ጠፍቷል"</string>
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"ብሩህነት"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"ራስ-አዙር"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"አዙሪት ተቆልፏል"</string>
@@ -170,6 +170,7 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"እኔ"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wifi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"ምንም አውታረ መረብ የለም"</string>
+    <string name="quick_settings_wifi_off_label" msgid="3343111275022978538">"Wifi ጠፍቷል"</string>
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"የWifi ማሳያ"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"ምንም የWifi ማሳያ ግንኙነት የለም"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"ብሩህነት"</string>
diff --git a/packages/SystemUI/res/values-ar/strings.xml b/packages/SystemUI/res/values-ar/strings.xml
index 1f62e2c..e2ba1c3 100644
--- a/packages/SystemUI/res/values-ar/strings.xml
+++ b/packages/SystemUI/res/values-ar/strings.xml
@@ -150,13 +150,14 @@
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"تم تأمين الشاشة في الاتجاه العمودي."</string>
     <string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
     <string name="start_dreams" msgid="870400522982252717">"بدء Dreams"</string>
-    <!-- no translation found for ethernet_label (7967563676324087464) -->
-    <skip />
+    <string name="ethernet_label" msgid="7967563676324087464">"Ethernet"</string>
     <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"وضع الطائرة"</string>
     <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"جارٍ الشحن، <xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"تم الشحن"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"بلوتوث"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"بلوتوث (<xliff:g id="NUMBER">%d</xliff:g> من الأجهزة)"</string>
+    <!-- no translation found for quick_settings_bluetooth_off_label (8159652146149219937) -->
+    <skip />
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"السطوع"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"تدوير تلقائي"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"تم قفل التدوير"</string>
@@ -170,6 +171,8 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"أنا"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wifi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"لا تتوفر شبكة"</string>
+    <!-- no translation found for quick_settings_wifi_off_label (3343111275022978538) -->
+    <skip />
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"شاشة Wifi"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"لا يتوفر اتصال بشاشة Wifi"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"السطوع"</string>
diff --git a/packages/SystemUI/res/values-be/strings.xml b/packages/SystemUI/res/values-be/strings.xml
index 50d39d8..3b8866d 100644
--- a/packages/SystemUI/res/values-be/strings.xml
+++ b/packages/SystemUI/res/values-be/strings.xml
@@ -159,6 +159,8 @@
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Зараджана"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (прылады: <xliff:g id="NUMBER">%d</xliff:g>)"</string>
+    <!-- no translation found for quick_settings_bluetooth_off_label (8159652146149219937) -->
+    <skip />
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Яркасць"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Аўтапаварот"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Паварот забаронены"</string>
@@ -172,6 +174,8 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Я"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wi-Fi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Няма сеткi"</string>
+    <!-- no translation found for quick_settings_wifi_off_label (3343111275022978538) -->
+    <skip />
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Дысплей Wi-Fi"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Няма падключэння да дысплея Wi-Fi"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Яркасць"</string>
diff --git a/packages/SystemUI/res/values-bg/strings.xml b/packages/SystemUI/res/values-bg/strings.xml
index 298c1ae..47be8c8 100644
--- a/packages/SystemUI/res/values-bg/strings.xml
+++ b/packages/SystemUI/res/values-bg/strings.xml
@@ -150,13 +150,14 @@
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Екранът е заключен във вертикална ориентация."</string>
     <string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
     <string name="start_dreams" msgid="870400522982252717">"Начало на „Сънища“"</string>
-    <!-- no translation found for ethernet_label (7967563676324087464) -->
-    <skip />
+    <string name="ethernet_label" msgid="7967563676324087464">"Ethernet"</string>
     <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Самолетен режим"</string>
     <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Зарежда се, <xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Заредена"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> устройства)"</string>
+    <!-- no translation found for quick_settings_bluetooth_off_label (8159652146149219937) -->
+    <skip />
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Яркост"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Автоматична ориентация"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Ориентацията е заключена"</string>
@@ -170,6 +171,8 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Аз"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"WiFi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Няма мрежа"</string>
+    <!-- no translation found for quick_settings_wifi_off_label (3343111275022978538) -->
+    <skip />
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Дисплей през WiFi"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Няма връзка с дисплея през WiFi"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Яркост"</string>
diff --git a/packages/SystemUI/res/values-ca/strings.xml b/packages/SystemUI/res/values-ca/strings.xml
index fbc8b13..c25e77e 100644
--- a/packages/SystemUI/res/values-ca/strings.xml
+++ b/packages/SystemUI/res/values-ca/strings.xml
@@ -44,9 +44,9 @@
     <string name="status_bar_settings_airplane" msgid="4879879698500955300">"Mode d\'avió"</string>
     <string name="status_bar_settings_auto_rotation" msgid="3790482541357798421">"Gira pantalla automàticament"</string>
     <string name="status_bar_settings_mute_label" msgid="554682549917429396">"Silen."</string>
-    <string name="status_bar_settings_auto_brightness_label" msgid="511453614962324674">"AUTOM."</string>
+    <string name="status_bar_settings_auto_brightness_label" msgid="511453614962324674">"AUTO."</string>
     <string name="status_bar_settings_notifications" msgid="397146176280905137">"Notificacions"</string>
-    <string name="bluetooth_tethered" msgid="7094101612161133267">"Bluetooth sense fil"</string>
+    <string name="bluetooth_tethered" msgid="7094101612161133267">"Bluetooth ancorat"</string>
     <string name="status_bar_input_method_settings_configure_input_methods" msgid="3504292471512317827">"Configura els mètodes d\'entrada"</string>
     <string name="status_bar_use_physical_keyboard" msgid="7551903084416057810">"Teclat físic"</string>
     <string name="usb_device_permission_prompt" msgid="834698001271562057">"Vols permetre que l\'aplicació <xliff:g id="APPLICATION">%1$s</xliff:g> accedeixi al dispositiu USB?"</string>
@@ -118,7 +118,7 @@
     <string name="accessibility_data_connection_edge" msgid="4477457051631979278">"Vora"</string>
     <string name="accessibility_data_connection_wifi" msgid="2324496756590645221">"Wi-Fi"</string>
     <string name="accessibility_no_sim" msgid="8274017118472455155">"No hi ha cap targeta SIM."</string>
-    <string name="accessibility_bluetooth_tether" msgid="4102784498140271969">"Connexió Bluetooth mitjançant dispositiu portàtil"</string>
+    <string name="accessibility_bluetooth_tether" msgid="4102784498140271969">"Ancoratge de Bluetooth"</string>
     <string name="accessibility_airplane_mode" msgid="834748999790763092">"Mode d\'avió."</string>
     <!-- String.format failed for translation -->
     <!-- no translation found for accessibility_battery_level (7451474187113371965) -->
@@ -152,13 +152,13 @@
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"La pantalla està bloquejada en orientació vertical."</string>
     <string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
     <string name="start_dreams" msgid="870400522982252717">"Comença els somnis"</string>
-    <!-- no translation found for ethernet_label (7967563676324087464) -->
-    <skip />
+    <string name="ethernet_label" msgid="7967563676324087464">"Ethernet"</string>
     <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Mode d\'avió"</string>
     <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"S\'està carregant, <xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Carregada"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> dispositius)"</string>
+    <string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth desactivat"</string>
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Brillantor"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Rotació automàtica"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Rotació bloquejada"</string>
@@ -172,8 +172,9 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Jo"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wi-Fi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"No hi ha cap xarxa"</string>
+    <string name="quick_settings_wifi_off_label" msgid="3343111275022978538">"Wi-Fi desactivada"</string>
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Pantalla Wi-Fi"</string>
-    <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"No hi ha cap connexió de pantalla Wi-Fi"</string>
+    <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Sense connexió a pantalla Wi-Fi"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Brillantor"</string>
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMÀTICA"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-cs/strings.xml b/packages/SystemUI/res/values-cs/strings.xml
index 80ba620..70e3c64b 100644
--- a/packages/SystemUI/res/values-cs/strings.xml
+++ b/packages/SystemUI/res/values-cs/strings.xml
@@ -152,13 +152,14 @@
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Obrazovka je uzamčena v orientaci na výšku."</string>
     <string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
     <string name="start_dreams" msgid="870400522982252717">"Spustit sny"</string>
-    <!-- no translation found for ethernet_label (7967563676324087464) -->
-    <skip />
+    <string name="ethernet_label" msgid="7967563676324087464">"Ethernet"</string>
     <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Režim V letadle"</string>
     <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Nabíjení, <xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string>
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Nabito"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> zařízení)"</string>
+    <!-- no translation found for quick_settings_bluetooth_off_label (8159652146149219937) -->
+    <skip />
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Jas"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Automatické otáčení"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Otáčení je uzamčeno"</string>
@@ -172,6 +173,8 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Já"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wi-Fi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Žádná síť"</string>
+    <!-- no translation found for quick_settings_wifi_off_label (3343111275022978538) -->
+    <skip />
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Displej přes Wi-Fi"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Žádné připojení k displeji přes Wi-Fi"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Jas"</string>
diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml
index e39cb58..47a5c5b 100644
--- a/packages/SystemUI/res/values-da/strings.xml
+++ b/packages/SystemUI/res/values-da/strings.xml
@@ -150,13 +150,13 @@
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Skærmen er nu låst i stående retning."</string>
     <string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
     <string name="start_dreams" msgid="870400522982252717">"Start Dreams"</string>
-    <!-- no translation found for ethernet_label (7967563676324087464) -->
-    <skip />
+    <string name="ethernet_label" msgid="7967563676324087464">"Ethernet"</string>
     <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Flytilstand"</string>
     <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Oplader, <xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Opladet"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> enheder)"</string>
+    <string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth slået fra"</string>
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Lysstyrke"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Automatisk rotation"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Rotation er låst"</string>
@@ -170,6 +170,7 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Mig"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wi-Fi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Intet netværk"</string>
+    <string name="quick_settings_wifi_off_label" msgid="3343111275022978538">"Wi-Fi slået fra"</string>
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Wi-Fi-skærm"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Ingen forbindelse til Wi-Fi-skærm"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Lysstyrke"</string>
diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml
index e9eb46f..8948495 100644
--- a/packages/SystemUI/res/values-de/strings.xml
+++ b/packages/SystemUI/res/values-de/strings.xml
@@ -152,13 +152,13 @@
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Bildschirm bleibt im Hochformat."</string>
     <string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
     <string name="start_dreams" msgid="870400522982252717">"Träume starten"</string>
-    <!-- no translation found for ethernet_label (7967563676324087464) -->
-    <skip />
+    <string name="ethernet_label" msgid="7967563676324087464">"Ethernet"</string>
     <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Flugmodus"</string>
     <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Akku wird aufgeladen (<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>)"</string>
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Aufgeladen"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> Geräte)"</string>
+    <string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth aus"</string>
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Helligkeit"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Automatisch drehen"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Drehung gesperrt"</string>
@@ -172,6 +172,7 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Ich"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"WLAN"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Kein Netzwerk"</string>
+    <string name="quick_settings_wifi_off_label" msgid="3343111275022978538">"WLAN aus"</string>
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"WLAN-Anzeige"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Keine Verbindung zur WLAN-Anzeige"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Helligkeit"</string>
diff --git a/packages/SystemUI/res/values-el/strings.xml b/packages/SystemUI/res/values-el/strings.xml
index c012d3c..afce212 100644
--- a/packages/SystemUI/res/values-el/strings.xml
+++ b/packages/SystemUI/res/values-el/strings.xml
@@ -152,13 +152,13 @@
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Η οθόνη έχει κλειδωθεί σε κατακόρυφο προσανατολισμό."</string>
     <string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
     <string name="start_dreams" msgid="870400522982252717">"Ενεργ. λειτ. dreams"</string>
-    <!-- no translation found for ethernet_label (7967563676324087464) -->
-    <skip />
+    <string name="ethernet_label" msgid="7967563676324087464">"Ethernet"</string>
     <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Λειτουργία πτήσης"</string>
     <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Φόρτιση, <xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Χρεώθηκε"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> συσκευές)"</string>
+    <string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Απενεργοποιημένο Bluetooth"</string>
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Φωτεινότητα"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Αυτόματη περιστροφή"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Η περιστροφή είναι κλειδωμένη"</string>
@@ -172,6 +172,7 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Εγώ"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wifi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Κανένα δίκτυο"</string>
+    <string name="quick_settings_wifi_off_label" msgid="3343111275022978538">"Απενεργοποιημένο Wifi"</string>
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Οθόνη Wifi"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Δεν υπάρχει σύνδεση οθόνης Wifi"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Φωτεινότητα"</string>
diff --git a/packages/SystemUI/res/values-en-rGB/strings.xml b/packages/SystemUI/res/values-en-rGB/strings.xml
index 4b3682a..a356b84 100644
--- a/packages/SystemUI/res/values-en-rGB/strings.xml
+++ b/packages/SystemUI/res/values-en-rGB/strings.xml
@@ -150,13 +150,13 @@
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Screen is locked in portrait orientation."</string>
     <string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
     <string name="start_dreams" msgid="870400522982252717">"Start dreams"</string>
-    <!-- no translation found for ethernet_label (7967563676324087464) -->
-    <skip />
+    <string name="ethernet_label" msgid="7967563676324087464">"Ethernet"</string>
     <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Aeroplane mode"</string>
     <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Charging, <xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Charged"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> Devices)"</string>
+    <string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth Off"</string>
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Brightness"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Auto Rotate"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Rotation Locked"</string>
@@ -170,6 +170,7 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Me"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wifi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"No Network"</string>
+    <string name="quick_settings_wifi_off_label" msgid="3343111275022978538">"Wifi Off"</string>
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Wifi Display"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"No Wifi Display Connection"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Brightness"</string>
diff --git a/packages/SystemUI/res/values-es-rUS/strings.xml b/packages/SystemUI/res/values-es-rUS/strings.xml
index d914904..ec85309 100644
--- a/packages/SystemUI/res/values-es-rUS/strings.xml
+++ b/packages/SystemUI/res/values-es-rUS/strings.xml
@@ -152,13 +152,13 @@
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"La pantalla está bloqueada en modo vertical."</string>
     <string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
     <string name="start_dreams" msgid="870400522982252717">"Iniciar Dreams"</string>
-    <!-- no translation found for ethernet_label (7967563676324087464) -->
-    <skip />
+    <string name="ethernet_label" msgid="7967563676324087464">"Ethernet"</string>
     <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Modo de avión"</string>
     <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Cargando <xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Cobrado"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> dispositivos)"</string>
+    <string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth desactivado"</string>
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Brillo"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Girar automáticamente"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Rotación bloqueada"</string>
@@ -172,6 +172,7 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Yo"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wi-Fi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Sin red"</string>
+    <string name="quick_settings_wifi_off_label" msgid="3343111275022978538">"Wi-Fi desactivado"</string>
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Pantalla Wi-Fi"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Sin conexión con pantalla Wi-Fi"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Brillo"</string>
diff --git a/packages/SystemUI/res/values-es/strings.xml b/packages/SystemUI/res/values-es/strings.xml
index 268e934..a82bc03 100644
--- a/packages/SystemUI/res/values-es/strings.xml
+++ b/packages/SystemUI/res/values-es/strings.xml
@@ -150,13 +150,13 @@
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"La pantalla está bloqueada en modo vertical."</string>
     <string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
     <string name="start_dreams" msgid="870400522982252717">"Iniciar Dreams"</string>
-    <!-- no translation found for ethernet_label (7967563676324087464) -->
-    <skip />
+    <string name="ethernet_label" msgid="7967563676324087464">"Ethernet"</string>
     <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Modo avión"</string>
     <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Cargando (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Cargada"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> dispositivos)"</string>
+    <string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth desactivado"</string>
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Brillo"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Girar automáticamente"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Rotación bloqueada"</string>
@@ -170,6 +170,7 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Yo"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wi-Fi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"No hay red."</string>
+    <string name="quick_settings_wifi_off_label" msgid="3343111275022978538">"Wi-Fi desactivado"</string>
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Pantalla Wi-Fi"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Sin conexión a pantalla Wi-Fi"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Brillo"</string>
diff --git a/packages/SystemUI/res/values-et/strings.xml b/packages/SystemUI/res/values-et/strings.xml
index 7318dcb..9abd6e8 100644
--- a/packages/SystemUI/res/values-et/strings.xml
+++ b/packages/SystemUI/res/values-et/strings.xml
@@ -157,6 +157,7 @@
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Arve esitamine"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> seadet)"</string>
+    <string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth on väljas"</string>
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Heledus"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Automaatne pööramine"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Pööramine lukus"</string>
@@ -170,6 +171,7 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Mina"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"WiFi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Võrku pole"</string>
+    <string name="quick_settings_wifi_off_label" msgid="3343111275022978538">"WiFi on väljas"</string>
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"WiFi-ekraan"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"WiFi-ekraani ühendus puudub"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Heledus"</string>
diff --git a/packages/SystemUI/res/values-fa/strings.xml b/packages/SystemUI/res/values-fa/strings.xml
index ec3fcca..4379dcb 100644
--- a/packages/SystemUI/res/values-fa/strings.xml
+++ b/packages/SystemUI/res/values-fa/strings.xml
@@ -150,13 +150,13 @@
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"صفحه اکنون در جهت عمودی قفل است."</string>
     <string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
     <string name="start_dreams" msgid="870400522982252717">"شروع رؤیاها"</string>
-    <!-- no translation found for ethernet_label (7967563676324087464) -->
-    <skip />
+    <string name="ethernet_label" msgid="7967563676324087464">"اترنت"</string>
     <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"حالت هواپیما"</string>
     <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"در حال شارژ، <xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"شارژ شد"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"بلوتوث"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"بلوتوث ( <xliff:g id="NUMBER">%d</xliff:g> دستگاه)"</string>
+    <string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"بلوتوث خاموش"</string>
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"روشنایی"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"چرخش خودکار"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"چرخش قفل شد"</string>
@@ -170,6 +170,7 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"من"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wifi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"شبکه‌ای موجود نیست"</string>
+    <string name="quick_settings_wifi_off_label" msgid="3343111275022978538">"Wifi خاموش"</string>
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"صفحه نمایش Wifi"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"اتصال صفحه نمایش Wifi وجود ندارد"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"روشنایی"</string>
diff --git a/packages/SystemUI/res/values-fi/strings.xml b/packages/SystemUI/res/values-fi/strings.xml
index 7b65a38..38eec20 100644
--- a/packages/SystemUI/res/values-fi/strings.xml
+++ b/packages/SystemUI/res/values-fi/strings.xml
@@ -150,13 +150,14 @@
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Ruutu on lukittu pystysuuntaan."</string>
     <string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
     <string name="start_dreams" msgid="870400522982252717">"Aloita unelmointi"</string>
-    <!-- no translation found for ethernet_label (7967563676324087464) -->
-    <skip />
+    <string name="ethernet_label" msgid="7967563676324087464">"Ethernet"</string>
     <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Lentokonetila"</string>
     <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Ladataan (<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>)"</string>
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Täynnä"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> laitetta)"</string>
+    <!-- no translation found for quick_settings_bluetooth_off_label (8159652146149219937) -->
+    <skip />
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Kirkkaus"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Automaattinen kääntö"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Kääntö lukittu"</string>
@@ -170,6 +171,8 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Minä"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wifi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Ei verkkoa"</string>
+    <!-- no translation found for quick_settings_wifi_off_label (3343111275022978538) -->
+    <skip />
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Wifi-näyttö"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Ei yhteyttä wifi-näyttöön"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Kirkkaus"</string>
diff --git a/packages/SystemUI/res/values-fr/strings.xml b/packages/SystemUI/res/values-fr/strings.xml
index d9b31ec..821ebff 100644
--- a/packages/SystemUI/res/values-fr/strings.xml
+++ b/packages/SystemUI/res/values-fr/strings.xml
@@ -159,6 +159,8 @@
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Chargée"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> appareils)"</string>
+    <!-- no translation found for quick_settings_bluetooth_off_label (8159652146149219937) -->
+    <skip />
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Luminosité"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Rotation automatique"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Rotation verrouillée"</string>
@@ -172,6 +174,8 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Moi"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wi-Fi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Aucun réseau"</string>
+    <!-- no translation found for quick_settings_wifi_off_label (3343111275022978538) -->
+    <skip />
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Écran Wi-Fi"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Aucune connexion à un écran Wi-Fi"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Luminosité"</string>
diff --git a/packages/SystemUI/res/values-hi/strings.xml b/packages/SystemUI/res/values-hi/strings.xml
index 391162b..cc81b26 100644
--- a/packages/SystemUI/res/values-hi/strings.xml
+++ b/packages/SystemUI/res/values-hi/strings.xml
@@ -157,6 +157,8 @@
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"चार्ज हो गई है"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> उपकरण)"</string>
+    <!-- no translation found for quick_settings_bluetooth_off_label (8159652146149219937) -->
+    <skip />
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"चमक"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"स्वत: रोटेट"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"रोटेशन लॉक किया गया"</string>
@@ -170,6 +172,8 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"मुझे"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wifi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"कोई नेटवर्क नहीं"</string>
+    <!-- no translation found for quick_settings_wifi_off_label (3343111275022978538) -->
+    <skip />
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Wifi डिस्प्ले"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"कोई Wifi डिस्प्ले कनेक्शन नहीं"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"चमक"</string>
diff --git a/packages/SystemUI/res/values-hr/strings.xml b/packages/SystemUI/res/values-hr/strings.xml
index 0a8155e1..36ae475 100644
--- a/packages/SystemUI/res/values-hr/strings.xml
+++ b/packages/SystemUI/res/values-hr/strings.xml
@@ -157,6 +157,8 @@
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Napunjena"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (broj uređaja: <xliff:g id="NUMBER">%d</xliff:g>)"</string>
+    <!-- no translation found for quick_settings_bluetooth_off_label (8159652146149219937) -->
+    <skip />
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Svjetlina"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Automatska rotacija"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Rotacija zaključana"</string>
@@ -170,6 +172,8 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Ja"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wifi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Nema mreže"</string>
+    <!-- no translation found for quick_settings_wifi_off_label (3343111275022978538) -->
+    <skip />
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"WiFi zaslon"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Nema veze s Wifi zaslonom"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Svjetlina"</string>
diff --git a/packages/SystemUI/res/values-hu/strings.xml b/packages/SystemUI/res/values-hu/strings.xml
index 33020e3..48932b6 100644
--- a/packages/SystemUI/res/values-hu/strings.xml
+++ b/packages/SystemUI/res/values-hu/strings.xml
@@ -150,13 +150,13 @@
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"A képernyő zárolva van álló tájolásban."</string>
     <string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
     <string name="start_dreams" msgid="870400522982252717">"Álmok indítása"</string>
-    <!-- no translation found for ethernet_label (7967563676324087464) -->
-    <skip />
+    <string name="ethernet_label" msgid="7967563676324087464">"Ethernet"</string>
     <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Repülőgép üzemmód"</string>
     <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Töltés (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Feltöltve"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> eszköz)"</string>
+    <string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth kikapcsolva"</string>
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Fényerő"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Automatikus forgatás"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Forgatás zárolva"</string>
@@ -170,6 +170,7 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Én"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wi-Fi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Nincs hálózat"</string>
+    <string name="quick_settings_wifi_off_label" msgid="3343111275022978538">"Wi-Fi kikapcsolva"</string>
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Wi-Fi kijelző"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Nincs kapcsolat Wi-Fi kijelzővel"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Fényerő"</string>
diff --git a/packages/SystemUI/res/values-in/strings.xml b/packages/SystemUI/res/values-in/strings.xml
index cdd50a7..b3c31e5 100644
--- a/packages/SystemUI/res/values-in/strings.xml
+++ b/packages/SystemUI/res/values-in/strings.xml
@@ -157,6 +157,8 @@
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Ditagih"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> Perangkat)"</string>
+    <!-- no translation found for quick_settings_bluetooth_off_label (8159652146149219937) -->
+    <skip />
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Kecerahan"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Rotasi Otomatis"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Rotasi Dikunci"</string>
@@ -170,6 +172,8 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Saya"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wifi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Tidak Ada Jaringan"</string>
+    <!-- no translation found for quick_settings_wifi_off_label (3343111275022978538) -->
+    <skip />
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Tampilan Wifi"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Tidak Ada Koneksi Tampilan Wifi"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Kecerahan"</string>
diff --git a/packages/SystemUI/res/values-it/strings.xml b/packages/SystemUI/res/values-it/strings.xml
index 816840e..050d775 100644
--- a/packages/SystemUI/res/values-it/strings.xml
+++ b/packages/SystemUI/res/values-it/strings.xml
@@ -159,6 +159,7 @@
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Carica"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> dispositivi)"</string>
+    <string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth non attivo"</string>
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Luminosità"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Rotazione automatica"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Rotazione bloccata"</string>
@@ -172,6 +173,7 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Io"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wi-Fi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Nessuna rete"</string>
+    <string name="quick_settings_wifi_off_label" msgid="3343111275022978538">"Wi-Fi non attivo"</string>
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Schermo Wi-Fi"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Nessun collegamento a schermi Wi-Fi"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Luminosità"</string>
diff --git a/packages/SystemUI/res/values-iw/strings.xml b/packages/SystemUI/res/values-iw/strings.xml
index cf3cacb..150faaf 100644
--- a/packages/SystemUI/res/values-iw/strings.xml
+++ b/packages/SystemUI/res/values-iw/strings.xml
@@ -150,13 +150,13 @@
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"המסך נעול כעת לאורך."</string>
     <string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
     <string name="start_dreams" msgid="870400522982252717">"הפעל את Dreams"</string>
-    <!-- no translation found for ethernet_label (7967563676324087464) -->
-    <skip />
+    <string name="ethernet_label" msgid="7967563676324087464">"Ethernet"</string>
     <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"מצב טיסה"</string>
     <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"טוען (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"מלאה"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth ‏(<xliff:g id="NUMBER">%d</xliff:g> מכשירים)"</string>
+    <string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth מופסק"</string>
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"בהירות"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"סיבוב אוטומטי"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"סיבוב נעול"</string>
@@ -170,6 +170,7 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"אני"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wifi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"אין רשת"</string>
+    <string name="quick_settings_wifi_off_label" msgid="3343111275022978538">"Wifi מופסק"</string>
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"תצוגת Wifi"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"אין חיבור תצוגת Wifi"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"בהירות"</string>
diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml
index b48f118..c3c3e8d 100644
--- a/packages/SystemUI/res/values-ja/strings.xml
+++ b/packages/SystemUI/res/values-ja/strings.xml
@@ -159,6 +159,8 @@
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"充電完了"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth(端末数<xliff:g id="NUMBER">%d</xliff:g>)"</string>
+    <!-- no translation found for quick_settings_bluetooth_off_label (8159652146149219937) -->
+    <skip />
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"画面の明るさ"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"自動回転"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"画面の向きをロック"</string>
@@ -172,6 +174,8 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"このユーザー"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wi-Fi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"ネットワークなし"</string>
+    <!-- no translation found for quick_settings_wifi_off_label (3343111275022978538) -->
+    <skip />
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Wi-Fiディスプレイ"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Wi-Fiディスプレイ接続なし"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"画面の明るさ"</string>
diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml
index 44e3eb5..8ae89bb 100644
--- a/packages/SystemUI/res/values-ko/strings.xml
+++ b/packages/SystemUI/res/values-ko/strings.xml
@@ -157,6 +157,8 @@
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"충전됨"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"블루투스"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"블루투스(<xliff:g id="NUMBER">%d</xliff:g>개의 기기)"</string>
+    <!-- no translation found for quick_settings_bluetooth_off_label (8159652146149219937) -->
+    <skip />
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"밝기"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"자동 회전"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"회전 잠금"</string>
@@ -170,6 +172,8 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"나"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wi-Fi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"네트워크가 연결되지 않음"</string>
+    <!-- no translation found for quick_settings_wifi_off_label (3343111275022978538) -->
+    <skip />
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Wi-Fi 디스플레이"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Wi-Fi 디스플레이가 연결되지 않음"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"밝기"</string>
diff --git a/packages/SystemUI/res/values-lt/strings.xml b/packages/SystemUI/res/values-lt/strings.xml
index cb12c93..65cf268 100644
--- a/packages/SystemUI/res/values-lt/strings.xml
+++ b/packages/SystemUI/res/values-lt/strings.xml
@@ -150,13 +150,13 @@
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Užrakintas ekranas yra vertikalios orientacijos."</string>
     <string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
     <string name="start_dreams" msgid="870400522982252717">"Paleisti vizijas"</string>
-    <!-- no translation found for ethernet_label (7967563676324087464) -->
-    <skip />
+    <string name="ethernet_label" msgid="7967563676324087464">"Eternetas"</string>
     <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Lėktuvo režimas"</string>
     <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Įkraunama, <xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string>
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Įkrauta"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"„Bluetooth“ (<xliff:g id="NUMBER">%d</xliff:g> įreng.)"</string>
+    <string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"„Bluetooth“ išjungta"</string>
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Skaistis"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Automatiškai sukti"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Sukimas užrakintas"</string>
@@ -170,6 +170,7 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Aš"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wi-Fi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Tinklo nėra"</string>
+    <string name="quick_settings_wifi_off_label" msgid="3343111275022978538">"„Wi-Fi“ išjungta"</string>
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"„Wi-Fi“ pateiktis"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Nėra „Wi-Fi“ pateikties ryšio"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Skaistis"</string>
diff --git a/packages/SystemUI/res/values-lv/strings.xml b/packages/SystemUI/res/values-lv/strings.xml
index c013958..575beed 100644
--- a/packages/SystemUI/res/values-lv/strings.xml
+++ b/packages/SystemUI/res/values-lv/strings.xml
@@ -157,6 +157,7 @@
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Uzlādēts"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> ierīce(-es))"</string>
+    <string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth savienojums ir izslēgts."</string>
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Spilgtums"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Automātiska pagriešana"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Pagriešana bloķēta"</string>
@@ -170,6 +171,7 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Es"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wi-Fi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Nav tīkla"</string>
+    <string name="quick_settings_wifi_off_label" msgid="3343111275022978538">"Wi-Fi savienojums ir izslēgts."</string>
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Wi-Fi displejs"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Nav Wi-Fi displeja savienojuma"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Spilgtums"</string>
diff --git a/packages/SystemUI/res/values-ms/strings.xml b/packages/SystemUI/res/values-ms/strings.xml
index a457573..9b2cd10 100644
--- a/packages/SystemUI/res/values-ms/strings.xml
+++ b/packages/SystemUI/res/values-ms/strings.xml
@@ -150,8 +150,7 @@
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Skrin dikunci dalam orientasi potret."</string>
     <string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
     <string name="start_dreams" msgid="870400522982252717">"Mulakan mimpi"</string>
-    <!-- no translation found for ethernet_label (7967563676324087464) -->
-    <skip />
+    <string name="ethernet_label" msgid="7967563676324087464">"Ethernet"</string>
     <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Mod kapal terbang"</string>
     <!-- no translation found for quick_settings_battery_charging_label (490074774465309209) -->
     <skip />
@@ -160,6 +159,8 @@
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <!-- no translation found for quick_settings_bluetooth_multiple_devices_label (3912245565613684735) -->
     <skip />
+    <!-- no translation found for quick_settings_bluetooth_off_label (8159652146149219937) -->
+    <skip />
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Kecerahan"</string>
     <!-- no translation found for quick_settings_rotation_unlocked_label (336054930362580584) -->
     <skip />
@@ -175,6 +176,8 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Saya"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wifi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Tiada Rangkaian"</string>
+    <!-- no translation found for quick_settings_wifi_off_label (3343111275022978538) -->
+    <skip />
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Paparan Wifi"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Tiada Sambungan Paparan Wifi"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Kecerahan"</string>
diff --git a/packages/SystemUI/res/values-nb/strings.xml b/packages/SystemUI/res/values-nb/strings.xml
index 2505fe4..cb8e555 100644
--- a/packages/SystemUI/res/values-nb/strings.xml
+++ b/packages/SystemUI/res/values-nb/strings.xml
@@ -150,13 +150,13 @@
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Skjermen er låst i stående retning."</string>
     <string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
     <string name="start_dreams" msgid="870400522982252717">"Start drømmemodus"</string>
-    <!-- no translation found for ethernet_label (7967563676324087464) -->
-    <skip />
+    <string name="ethernet_label" msgid="7967563676324087464">"Ethernet"</string>
     <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Flymodus"</string>
     <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Lader: <xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string>
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Oppladet"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> enheter)"</string>
+    <string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth er slått av"</string>
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Lysstyrke"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Automatisk rotasjon"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Rotasjon er låst"</string>
@@ -170,6 +170,7 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Meg"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wi-Fi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Ingen nettverk"</string>
+    <string name="quick_settings_wifi_off_label" msgid="3343111275022978538">"Wi-Fi er slått av"</string>
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Wi-Fi-skjermer"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Ingen tilkobling for Wi-Fi-skjermer"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Lysstyrke"</string>
diff --git a/packages/SystemUI/res/values-nl/strings.xml b/packages/SystemUI/res/values-nl/strings.xml
index 4db97fb..0ec9c44 100644
--- a/packages/SystemUI/res/values-nl/strings.xml
+++ b/packages/SystemUI/res/values-nl/strings.xml
@@ -150,13 +150,13 @@
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Het scherm is nu vergrendeld in staande stand."</string>
     <string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
     <string name="start_dreams" msgid="870400522982252717">"Dromen starten"</string>
-    <!-- no translation found for ethernet_label (7967563676324087464) -->
-    <skip />
+    <string name="ethernet_label" msgid="7967563676324087464">"Ethernet"</string>
     <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Vliegmodus"</string>
     <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Opladen, <xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Opgeladen"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> apparaten)"</string>
+    <string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth uit"</string>
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Helderheid"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Automatische rotatie"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Rotatie vergrendeld"</string>
@@ -170,6 +170,7 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Ik"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wifi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Geen netwerk"</string>
+    <string name="quick_settings_wifi_off_label" msgid="3343111275022978538">"Wifi uit"</string>
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Wifi-display"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Geen wifi-displayverbinding"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Helderheid"</string>
diff --git a/packages/SystemUI/res/values-pl/strings.xml b/packages/SystemUI/res/values-pl/strings.xml
index 1fcf6a8..09e32e1 100644
--- a/packages/SystemUI/res/values-pl/strings.xml
+++ b/packages/SystemUI/res/values-pl/strings.xml
@@ -149,14 +149,14 @@
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Ekran jest zablokowany w orientacji poziomej."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Ekran jest zablokowany w orientacji pionowej."</string>
     <string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
-    <string name="start_dreams" msgid="870400522982252717">"Zacznij śnić"</string>
-    <!-- no translation found for ethernet_label (7967563676324087464) -->
-    <skip />
+    <string name="start_dreams" msgid="870400522982252717">"Włącz wygaszacz"</string>
+    <string name="ethernet_label" msgid="7967563676324087464">"Ethernet"</string>
     <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Tryb samolotowy"</string>
     <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Ładowanie (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Naładowana"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (urządzenia: <xliff:g id="NUMBER">%d</xliff:g>)"</string>
+    <string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth wyłączony"</string>
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Jasność"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Autoobracanie"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Obracanie jest zablokowane"</string>
@@ -170,6 +170,7 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Ja"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wi-Fi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Brak sieci"</string>
+    <string name="quick_settings_wifi_off_label" msgid="3343111275022978538">"Wi-Fi wyłączone"</string>
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Wyświetlacz Wi-Fi"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Brak połączenia z wyświetlaczem Wi-Fi"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Jasność"</string>
diff --git a/packages/SystemUI/res/values-pt-rPT/strings.xml b/packages/SystemUI/res/values-pt-rPT/strings.xml
index 9adc435..5b362a7 100644
--- a/packages/SystemUI/res/values-pt-rPT/strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT/strings.xml
@@ -150,13 +150,13 @@
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"O ecrã está bloqueado na orientação vertical."</string>
     <string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
     <string name="start_dreams" msgid="870400522982252717">"Iniciar sonhos"</string>
-    <!-- no translation found for ethernet_label (7967563676324087464) -->
-    <skip />
+    <string name="ethernet_label" msgid="7967563676324087464">"Ethernet"</string>
     <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Modo de avião"</string>
     <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"A carregar, <xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Carregada"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> Dispositivos)"</string>
+    <string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth Desativado"</string>
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Brilho"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Rodar Automaticamente"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Rotação Bloqueada"</string>
@@ -170,6 +170,7 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Eu"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wi-Fi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Sem Rede"</string>
+    <string name="quick_settings_wifi_off_label" msgid="3343111275022978538">"Wi-Fi Desativado"</string>
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Visor Wi-Fi"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Sem Ligação ao Visor Wi-Fi"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Brilho"</string>
diff --git a/packages/SystemUI/res/values-pt/strings.xml b/packages/SystemUI/res/values-pt/strings.xml
index 3f86560..e2e5cd4 100644
--- a/packages/SystemUI/res/values-pt/strings.xml
+++ b/packages/SystemUI/res/values-pt/strings.xml
@@ -152,13 +152,14 @@
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"A tela está bloqueada na orientação retrato."</string>
     <string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
     <string name="start_dreams" msgid="870400522982252717">"Iniciar o Dreams"</string>
-    <!-- no translation found for ethernet_label (7967563676324087464) -->
-    <skip />
+    <string name="ethernet_label" msgid="7967563676324087464">"Ethernet"</string>
     <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Modo para avião"</string>
     <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Carregando, <xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Carregado"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> dispositivos)"</string>
+    <!-- no translation found for quick_settings_bluetooth_off_label (8159652146149219937) -->
+    <skip />
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Brilho"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Girar automaticamente"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Rotação bloqueada"</string>
@@ -172,6 +173,8 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Eu"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wi-Fi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Sem rede"</string>
+    <!-- no translation found for quick_settings_wifi_off_label (3343111275022978538) -->
+    <skip />
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Wi-Fi Display"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Sem conexão Wi-Fi Display"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Brilho"</string>
diff --git a/packages/SystemUI/res/values-rm/strings.xml b/packages/SystemUI/res/values-rm/strings.xml
index 2f3e114..ed3d869 100644
--- a/packages/SystemUI/res/values-rm/strings.xml
+++ b/packages/SystemUI/res/values-rm/strings.xml
@@ -282,6 +282,8 @@
     <skip />
     <!-- no translation found for quick_settings_bluetooth_multiple_devices_label (3912245565613684735) -->
     <skip />
+    <!-- no translation found for quick_settings_bluetooth_off_label (8159652146149219937) -->
+    <skip />
     <!-- no translation found for quick_settings_brightness_label (6968372297018755815) -->
     <skip />
     <!-- no translation found for quick_settings_rotation_unlocked_label (336054930362580584) -->
@@ -308,6 +310,8 @@
     <skip />
     <!-- no translation found for quick_settings_wifi_no_network (2221993077220856376) -->
     <skip />
+    <!-- no translation found for quick_settings_wifi_off_label (3343111275022978538) -->
+    <skip />
     <!-- no translation found for quick_settings_wifi_display_label (6653501376641018614) -->
     <skip />
     <!-- no translation found for quick_settings_wifi_display_no_connection_label (6255615315258869136) -->
diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml
index 8bb1089..5750227 100644
--- a/packages/SystemUI/res/values-ro/strings.xml
+++ b/packages/SystemUI/res/values-ro/strings.xml
@@ -157,6 +157,8 @@
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Încărcată"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> dispozitive)"</string>
+    <!-- no translation found for quick_settings_bluetooth_off_label (8159652146149219937) -->
+    <skip />
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Luminozitate"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Rotire automată"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Rotire blocată"</string>
@@ -170,6 +172,8 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Eu"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wi-Fi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Nicio reţea"</string>
+    <!-- no translation found for quick_settings_wifi_off_label (3343111275022978538) -->
+    <skip />
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Afişaj Wi-Fi"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Nu există conexiune pentru afişajul Wi-Fi"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Luminozitate"</string>
diff --git a/packages/SystemUI/res/values-ru/strings.xml b/packages/SystemUI/res/values-ru/strings.xml
index 584a7ec..14de049 100644
--- a/packages/SystemUI/res/values-ru/strings.xml
+++ b/packages/SystemUI/res/values-ru/strings.xml
@@ -159,6 +159,8 @@
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Заряжено"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Устройства Bluetooth (<xliff:g id="NUMBER">%d</xliff:g>)"</string>
+    <!-- no translation found for quick_settings_bluetooth_off_label (8159652146149219937) -->
+    <skip />
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Яркость"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Автоповорот"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Поворот экрана заблокирован"</string>
@@ -172,6 +174,8 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Пользователь"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wi-Fi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Нет сети"</string>
+    <!-- no translation found for quick_settings_wifi_off_label (3343111275022978538) -->
+    <skip />
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Экраны, подключенные через Wi-Fi"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Экран не подключен"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Яркость"</string>
diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml
index fd4fed7a..1c4b1cd 100644
--- a/packages/SystemUI/res/values-sk/strings.xml
+++ b/packages/SystemUI/res/values-sk/strings.xml
@@ -159,6 +159,8 @@
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Nabité"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Rozhranie Bluetooth (počet zariadení: <xliff:g id="NUMBER">%d</xliff:g>)"</string>
+    <!-- no translation found for quick_settings_bluetooth_off_label (8159652146149219937) -->
+    <skip />
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Jas"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Automatické otáčanie"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Otáčanie uzamknuté"</string>
@@ -172,6 +174,8 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Ja"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wi-Fi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Žiadna sieť"</string>
+    <!-- no translation found for quick_settings_wifi_off_label (3343111275022978538) -->
+    <skip />
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Displej cez sieť Wi-Fi"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Žiadne pripojenie k displeju cez sieť Wi-Fi"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Jas"</string>
diff --git a/packages/SystemUI/res/values-sl/strings.xml b/packages/SystemUI/res/values-sl/strings.xml
index 9ade3e6..216b9d4 100644
--- a/packages/SystemUI/res/values-sl/strings.xml
+++ b/packages/SystemUI/res/values-sl/strings.xml
@@ -150,13 +150,13 @@
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Zaslon je zaklenjen v pokončni usmerjenosti."</string>
     <string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
     <string name="start_dreams" msgid="870400522982252717">"Začni sanje"</string>
-    <!-- no translation found for ethernet_label (7967563676324087464) -->
-    <skip />
+    <string name="ethernet_label" msgid="7967563676324087464">"Ethernet"</string>
     <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Način za letalo"</string>
     <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Polnjenje, <xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Napolnjeno"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (št. naprav: <xliff:g id="NUMBER">%d</xliff:g>)"</string>
+    <string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth izklopljen"</string>
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Svetlost"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Samodejno vrtenje"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Zaklenjeno vrtenje"</string>
@@ -170,6 +170,7 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Jaz"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wi-Fi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Ni omrežja"</string>
+    <string name="quick_settings_wifi_off_label" msgid="3343111275022978538">"Wi-Fi izklopljen"</string>
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Zaslon Wi-Fi"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Ni povezav z zaslonom Wi-Fi"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Svetlost"</string>
diff --git a/packages/SystemUI/res/values-sr/strings.xml b/packages/SystemUI/res/values-sr/strings.xml
index 67001b2..d4740fb 100644
--- a/packages/SystemUI/res/values-sr/strings.xml
+++ b/packages/SystemUI/res/values-sr/strings.xml
@@ -157,6 +157,8 @@
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Напуњено"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> уређаја)"</string>
+    <!-- no translation found for quick_settings_bluetooth_off_label (8159652146149219937) -->
+    <skip />
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Осветљеност"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Аутоматско ротирање"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Ротирање је закључано"</string>
@@ -170,6 +172,8 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Ја"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wi-Fi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Нема мреже"</string>
+    <!-- no translation found for quick_settings_wifi_off_label (3343111275022978538) -->
+    <skip />
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Wi-Fi екран"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Нема везе са Wi-Fi екраном"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Осветљеност"</string>
diff --git a/packages/SystemUI/res/values-sv/strings.xml b/packages/SystemUI/res/values-sv/strings.xml
index fff3633..e6a8d5f 100644
--- a/packages/SystemUI/res/values-sv/strings.xml
+++ b/packages/SystemUI/res/values-sv/strings.xml
@@ -157,6 +157,7 @@
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Laddat"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> enheter)"</string>
+    <string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Inaktivera Bluetooth"</string>
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Ljusstyrka"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Rotera automatiskt"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Rotationen har låsts"</string>
@@ -170,6 +171,7 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Jag"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wi-Fi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Inget nätverk"</string>
+    <string name="quick_settings_wifi_off_label" msgid="3343111275022978538">"Inaktivera Wi-Fi"</string>
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Wi-Fi-skärm"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Ingen anslutning till Wi-Fi-skärm"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Ljusstyrka"</string>
diff --git a/packages/SystemUI/res/values-sw/strings.xml b/packages/SystemUI/res/values-sw/strings.xml
index dfbe5e8..e29a085 100644
--- a/packages/SystemUI/res/values-sw/strings.xml
+++ b/packages/SystemUI/res/values-sw/strings.xml
@@ -148,13 +148,13 @@
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Skrini imefungwa katika uelekeo wa picha."</string>
     <string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
     <string name="start_dreams" msgid="870400522982252717">"Anza ndoto"</string>
-    <!-- no translation found for ethernet_label (7967563676324087464) -->
-    <skip />
+    <string name="ethernet_label" msgid="7967563676324087464">"Ethernet"</string>
     <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Modi ya ndege"</string>
     <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Inachaji, <xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Imechajiwa"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (Vifaa <xliff:g id="NUMBER">%d</xliff:g>)"</string>
+    <string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth Imezimwa"</string>
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Ung\'avu"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Zungusha Otomatiki"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Mzunguko Umefungwa"</string>
@@ -168,6 +168,7 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Mimi"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wifi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Hakuna Mtandao"</string>
+    <string name="quick_settings_wifi_off_label" msgid="3343111275022978538">"Wifi Imezimwa"</string>
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Onyesho la Wifi"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Hakuna Muunganisho wa Onyesho la Wifi"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Ung\'avu"</string>
diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml
index b6faff3..a6875718 100644
--- a/packages/SystemUI/res/values-sw600dp/dimens.xml
+++ b/packages/SystemUI/res/values-sw600dp/dimens.xml
@@ -40,4 +40,8 @@
     <!-- Size of application thumbnail -->
     <dimen name="status_bar_recents_thumbnail_width">200dp</dimen>
     <dimen name="status_bar_recents_thumbnail_height">177dp</dimen>
+
+    <!-- On tablet-sized devices, we allocate the rightmost third(ish) of the draggable status bar
+         to quick settings. -->
+    <item type="dimen" name="settings_panel_dragzone_fraction">35%</item>
 </resources>
diff --git a/packages/SystemUI/res/values-th/strings.xml b/packages/SystemUI/res/values-th/strings.xml
index 7f8fe51..2ab28f5 100644
--- a/packages/SystemUI/res/values-th/strings.xml
+++ b/packages/SystemUI/res/values-th/strings.xml
@@ -157,6 +157,8 @@
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"ชาร์จแล้ว"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"บลูทูธ"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"บลูทูธ (<xliff:g id="NUMBER">%d</xliff:g> อุปกรณ์)"</string>
+    <!-- no translation found for quick_settings_bluetooth_off_label (8159652146149219937) -->
+    <skip />
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"ความสว่าง"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"หมุนอัตโนมัติ"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"ล็อกการหมุนแล้ว"</string>
@@ -170,6 +172,8 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"ฉัน"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"WiFi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"ไม่มีเครือข่าย"</string>
+    <!-- no translation found for quick_settings_wifi_off_label (3343111275022978538) -->
+    <skip />
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"การแสดงผลด้วย WiFi"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"ไม่มีการเชื่อมต่อการแสดงผลด้วย WiFi"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"ความสว่าง"</string>
diff --git a/packages/SystemUI/res/values-tl/strings.xml b/packages/SystemUI/res/values-tl/strings.xml
index 29e8d14..4e96157 100644
--- a/packages/SystemUI/res/values-tl/strings.xml
+++ b/packages/SystemUI/res/values-tl/strings.xml
@@ -157,6 +157,8 @@
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Na-charge"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> (na) Device)"</string>
+    <!-- no translation found for quick_settings_bluetooth_off_label (8159652146149219937) -->
+    <skip />
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Brightness"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"I-auto Rotate"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Naka-lock ang Pag-rotate"</string>
@@ -170,6 +172,8 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Ako"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wifi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Walang Network"</string>
+    <!-- no translation found for quick_settings_wifi_off_label (3343111275022978538) -->
+    <skip />
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Wifi Display"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Walang Koneksyon sa Wifi Display"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Brightness"</string>
diff --git a/packages/SystemUI/res/values-tr/strings.xml b/packages/SystemUI/res/values-tr/strings.xml
index df144af..178b3de 100644
--- a/packages/SystemUI/res/values-tr/strings.xml
+++ b/packages/SystemUI/res/values-tr/strings.xml
@@ -157,6 +157,8 @@
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Şarj oldu"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> Cihaz)"</string>
+    <!-- no translation found for quick_settings_bluetooth_off_label (8159652146149219937) -->
+    <skip />
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Parlaklık"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Otomatik Döndür"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Dönme Kilitlendi"</string>
@@ -170,6 +172,8 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Ben"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Kablosuz"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Ağ yok"</string>
+    <!-- no translation found for quick_settings_wifi_off_label (3343111275022978538) -->
+    <skip />
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Kablosuz Ekran"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Kablosuz Ekran Bağlantısı Yok"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Parlaklık"</string>
diff --git a/packages/SystemUI/res/values-uk/strings.xml b/packages/SystemUI/res/values-uk/strings.xml
index efc7ea6..a6cef76 100644
--- a/packages/SystemUI/res/values-uk/strings.xml
+++ b/packages/SystemUI/res/values-uk/strings.xml
@@ -150,13 +150,13 @@
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Екран заблоковано в книжковій орієнтації."</string>
     <string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
     <string name="start_dreams" msgid="870400522982252717">"Увімкнути Dreams"</string>
-    <!-- no translation found for ethernet_label (7967563676324087464) -->
-    <skip />
+    <string name="ethernet_label" msgid="7967563676324087464">"Ethernet"</string>
     <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Режим польоту"</string>
     <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Заряджається, <xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Заряджено"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (пристроїв: <xliff:g id="NUMBER">%d</xliff:g>)"</string>
+    <string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth вимкнено"</string>
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Яскравість"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Обертати автоматично"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Обертання заблоковано"</string>
@@ -170,6 +170,7 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Я"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wi-Fi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Немає мережі"</string>
+    <string name="quick_settings_wifi_off_label" msgid="3343111275022978538">"Wi-Fi вимкнено"</string>
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Екран Wi-Fi"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Немає з’єднання з екраном Wi-Fi"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Яскравість"</string>
diff --git a/packages/SystemUI/res/values-vi/strings.xml b/packages/SystemUI/res/values-vi/strings.xml
index 8e70ac3..f2f5a0f 100644
--- a/packages/SystemUI/res/values-vi/strings.xml
+++ b/packages/SystemUI/res/values-vi/strings.xml
@@ -157,6 +157,8 @@
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Đã sạc"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> thiết bị)"</string>
+    <!-- no translation found for quick_settings_bluetooth_off_label (8159652146149219937) -->
+    <skip />
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Độ sáng"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Tự động xoay"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Khóa xoay"</string>
@@ -170,6 +172,8 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Tôi"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wifi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Không có mạng nào"</string>
+    <!-- no translation found for quick_settings_wifi_off_label (3343111275022978538) -->
+    <skip />
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Màn hình Wifi"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Không kết nối màn hình Wifi"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Độ sáng"</string>
diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml
index cede04cf..aa0f06c 100644
--- a/packages/SystemUI/res/values-zh-rCN/strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN/strings.xml
@@ -152,13 +152,14 @@
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"屏幕锁定为纵向模式。"</string>
     <string name="jelly_bean_dream_name" msgid="5992026543636816792">"果冻豆大乱舞"</string>
     <string name="start_dreams" msgid="870400522982252717">"入梦"</string>
-    <!-- no translation found for ethernet_label (7967563676324087464) -->
-    <skip />
+    <string name="ethernet_label" msgid="7967563676324087464">"以太网"</string>
     <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"飞行模式"</string>
     <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"正在充电 (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"充电完成"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"蓝牙"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"蓝牙(<xliff:g id="NUMBER">%d</xliff:g> 台设备)"</string>
+    <!-- no translation found for quick_settings_bluetooth_off_label (8159652146149219937) -->
+    <skip />
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"亮度"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"自动旋转"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"已锁定旋转功能"</string>
@@ -172,6 +173,8 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"我"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"Wi-Fi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"无网络"</string>
+    <!-- no translation found for quick_settings_wifi_off_label (3343111275022978538) -->
+    <skip />
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"W-Fi 显示设备"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"没有 Wi-Fi 显示设备连接"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"亮度"</string>
diff --git a/packages/SystemUI/res/values-zh-rTW/strings.xml b/packages/SystemUI/res/values-zh-rTW/strings.xml
index e593a35..3ffb673 100644
--- a/packages/SystemUI/res/values-zh-rTW/strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW/strings.xml
@@ -152,13 +152,14 @@
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"螢幕已鎖定為垂直模式。"</string>
     <string name="jelly_bean_dream_name" msgid="5992026543636816792">"BeanFlinger"</string>
     <string name="start_dreams" msgid="870400522982252717">"啟動 Dream"</string>
-    <!-- no translation found for ethernet_label (7967563676324087464) -->
-    <skip />
+    <string name="ethernet_label" msgid="7967563676324087464">"乙太網路"</string>
     <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"飛航模式"</string>
     <string name="quick_settings_battery_charging_label" msgid="490074774465309209">"充電中 (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"充電完成"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"藍牙"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"藍牙 (<xliff:g id="NUMBER">%d</xliff:g> 個裝置)"</string>
+    <!-- no translation found for quick_settings_bluetooth_off_label (8159652146149219937) -->
+    <skip />
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"亮度"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"自動旋轉"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"已鎖定螢幕旋轉功能"</string>
@@ -172,6 +173,8 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"我"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"WiFi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"沒有網路"</string>
+    <!-- no translation found for quick_settings_wifi_off_label (3343111275022978538) -->
+    <skip />
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"WiFi 顯示裝置"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"未連接 WiFi 顯示裝置"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"亮度"</string>
diff --git a/packages/SystemUI/res/values-zu/strings.xml b/packages/SystemUI/res/values-zu/strings.xml
index d998bfb..e6f3a03 100644
--- a/packages/SystemUI/res/values-zu/strings.xml
+++ b/packages/SystemUI/res/values-zu/strings.xml
@@ -157,6 +157,8 @@
     <string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Kushajiwe"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"I-Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"I-Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> amadivayisi)"</string>
+    <!-- no translation found for quick_settings_bluetooth_off_label (8159652146149219937) -->
+    <skip />
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Ukugqama"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Ukuphendula ngokuzenzakalela"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Ukuphendula kukhiyiwe"</string>
@@ -170,6 +172,8 @@
     <string name="quick_settings_user_label" msgid="5238995632130897840">"Mina"</string>
     <string name="quick_settings_wifi_label" msgid="4393429107095001520">"I-WiFi"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Ayikho inethiwekhi"</string>
+    <!-- no translation found for quick_settings_wifi_off_label (3343111275022978538) -->
+    <skip />
     <string name="quick_settings_wifi_display_label" msgid="6653501376641018614">"Ukubuka kwe-Wifi"</string>
     <string name="quick_settings_wifi_display_no_connection_label" msgid="6255615315258869136">"Alukho uxhumo lokubonisa le-Wifi"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Ukugqama"</string>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index e93e857..13cda3a 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -166,8 +166,13 @@
     <integer name="notification_panel_layout_gravity">0x37</integer>
     <integer name="settings_panel_layout_gravity">0x37</integer>
 
-    <!-- Quick settings panels minimum fling open target width. -->
-    <dimen name="settings_panel_fling_gutter">90dp</dimen>
+    <!-- Fraction of the status bar that, when dragged, will produce the quick settings panel
+         instead of the notification panel. See also @dimen/settings_panel_dragzone_min.
+         If zero, the settings panel will not be directly draggable from the status bar. -->
+    <item type="dimen" name="settings_panel_dragzone_fraction">0%</item>
+
+    <!-- Quick settings dragzone, if used, should be at least this big (may be zero). -->
+    <dimen name="settings_panel_dragzone_min">100dp</dimen>
 
     <!-- Height of the carrier/wifi name label -->
     <dimen name="carrier_label_height">24dp</dimen>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index ecb8fed..8cf4445 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -143,7 +143,7 @@
         return mBarService;
     }
 
-    protected boolean isDeviceProvisioned() {
+    public boolean isDeviceProvisioned() {
         return mDeviceProvisioned;
     }
 
@@ -293,7 +293,8 @@
             Slog.v(TAG, String.format("%s: current userid: %d, notification userid: %d",
                     n, thisUserId, notificationUserId));
         }
-        return thisUserId == notificationUserId;
+        return notificationUserId == UserHandle.USER_ALL
+                || thisUserId == notificationUserId;
     }
 
     protected View updateNotificationVetoButton(View row, StatusBarNotification n) {
@@ -341,7 +342,8 @@
         Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
                 Uri.fromParts("package", packageName, null));
         intent.setComponent(intent.resolveActivity(mContext.getPackageManager()));
-        TaskStackBuilder.create(mContext).addNextIntentWithParentStack(intent).startActivities();
+        TaskStackBuilder.create(mContext).addNextIntentWithParentStack(intent).startActivities(
+                null, UserHandle.CURRENT);
     }
 
     protected View.OnLongClickListener getNotificationLongClicker() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
index a4a3a6a..57528a5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -381,15 +381,6 @@
         mBar = panelBar;
     }
 
-    public void setImeWindowStatus(boolean visible) {
-        // To be implemented by classes extending PanelView
-    }
-
-    public void setup(NetworkController network, BluetoothController bt, BatteryController batt,
-            LocationController location) {
-        // To be implemented by classes extending PanelView
-    }
-
     public void collapse() {
         // TODO: abort animation or ongoing touch
         if (!isFullyCollapsed()) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index c55da5d..7e44b16 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -171,7 +171,7 @@
     TextView mNotificationPanelDebugText;
 
     // settings
-    PanelView mSettingsPanel;
+    SettingsPanelView mSettingsPanel;
     int mSettingsPanelGravity;
 
     // top bar
@@ -426,8 +426,9 @@
         }
 
         // Quick Settings (WIP)
-        mSettingsPanel = (PanelView) mStatusBarWindow.findViewById(R.id.settings_panel);
+        mSettingsPanel = (SettingsPanelView) mStatusBarWindow.findViewById(R.id.settings_panel);
         mSettingsPanel.setBar(mStatusBarView);
+        mSettingsPanel.setService(this);
         mSettingsPanel.setup(mNetworkController, mBluetoothController, mBatteryController,
                 mLocationController);
 
@@ -1854,7 +1855,7 @@
         }
 
         // Update the QuickSettings container
-        ((SettingsPanelView) mSettingsPanel).updateResources();
+        mSettingsPanel.updateResources();
 
         loadDimens();
     }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
index 95b618a..6517e7c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
@@ -21,6 +21,7 @@
 import android.content.Context;
 import android.content.res.Configuration;
 import android.content.res.Resources;
+import android.content.res.Resources.NotFoundException;
 import android.graphics.Canvas;
 import android.graphics.Color;
 import android.graphics.Rect;
@@ -46,8 +47,9 @@
 
     PhoneStatusBar mBar;
     int mScrimColor;
-    float mMinFlingGutter;
-    float mNotificationWidth;
+    float mSettingsPanelDragzoneFrac;
+    float mSettingsPanelDragzoneMin;
+
     boolean mFullWidthNotifications;
     PanelView mFadingPanel = null;
     PanelView mNotificationPanel, mSettingsPanel;
@@ -64,13 +66,14 @@
     public void onAttachedToWindow() {
         Resources res = getContext().getResources();
         mScrimColor = res.getColor(R.color.notification_panel_scrim_color);
-        mMinFlingGutter = res.getDimension(R.dimen.settings_panel_fling_gutter);
-        mFullWidthNotifications = false;
+        mSettingsPanelDragzoneMin = res.getDimension(R.dimen.settings_panel_dragzone_min);
         try {
-            mNotificationWidth = res.getDimension(R.dimen.notification_panel_width);
-        } catch (Resources.NotFoundException ex) {
-            mFullWidthNotifications = true;
+            mSettingsPanelDragzoneFrac = res.getFraction(R.dimen.settings_panel_dragzone_fraction, 1, 1);
+        } catch (NotFoundException ex) {
+            mSettingsPanelDragzoneFrac = 0f;
         }
+
+        mFullWidthNotifications = mSettingsPanelDragzoneFrac <= 0f;
     }
 
     @Override
@@ -105,19 +108,30 @@
 
     @Override
     public PanelView selectPanelForTouchX(float x) {
-        // We split the status bar into thirds: the left 2/3 are for notifications, and the 
+        if (mFullWidthNotifications) {
+            if (DEBUG) {
+                Slog.v(TAG, "notif frac=" + mNotificationPanel.getExpandedFraction());
+            }
+            return (mNotificationPanel.getExpandedFraction() == 1.0f)
+                ? mSettingsPanel : mNotificationPanel;
+        }
+
+        // We split the status bar into thirds: the left 2/3 are for notifications, and the
         // right 1/3 for quick settings. If you pull the status bar down a second time you'll
         // toggle panels no matter where you pull it down.
+
         final float w = (float) getMeasuredWidth();
-        final float gutter = w - mNotificationWidth;
-        final boolean useGutter = !mFullWidthNotifications && gutter > mMinFlingGutter;
-        final float threshold = 1.0f - (gutter / w);
-        final float f = x / w;
-        if ((useGutter && f > threshold && mSettingsPanel.getExpandedFraction() != 1.0f) ||
-            mNotificationPanel.getExpandedFraction() == 1.0f) {
-            return mSettingsPanel;
+        float region = (w * mSettingsPanelDragzoneFrac);
+
+        if (DEBUG) {
+            Slog.v(TAG, String.format(
+                "w=%.1f frac=%.3f region=%.1f min=%.1f x=%.1f w-x=%.1f",
+                w, mSettingsPanelDragzoneFrac, region, mSettingsPanelDragzoneMin, x, (w-x)));
         }
-        return mNotificationPanel;
+
+        if (region < mSettingsPanelDragzoneMin) region = mSettingsPanelDragzoneMin;
+
+        return (w - x < region) ? mSettingsPanel : mNotificationPanel;
     }
 
     @Override
@@ -159,7 +173,7 @@
             Slog.v(TAG, "panelExpansionChanged: f=" + frac);
         }
 
-        if (mFadingPanel == pv 
+        if (mFadingPanel == pv
                 && mScrimColor != 0 && ActivityManager.isHighEndGfx()) {
             // woo, special effects
             final float k = (float)(1f-0.5f*(1f-Math.cos(3.14159f * Math.pow(1f-frac, 2.2f))));
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
index 37fa524..160cf8f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
@@ -16,6 +16,7 @@
 
 package com.android.systemui.statusbar.phone;
 
+import android.app.ActivityManagerNative;
 import android.app.AlertDialog;
 import android.app.Dialog;
 import android.app.PendingIntent;
@@ -36,6 +37,7 @@
 import android.hardware.display.WifiDisplayStatus;
 import android.net.Uri;
 import android.os.Handler;
+import android.os.RemoteException;
 import android.os.SystemProperties;
 import android.os.UserHandle;
 import android.provider.ContactsContract;
@@ -75,6 +77,7 @@
 
     private DisplayManager mDisplayManager;
     private WifiDisplayStatus mWifiDisplayStatus;
+    private PhoneStatusBar mStatusBarService;
 
     private BrightnessController mBrightnessController;
     private BluetoothController mBluetoothController;
@@ -129,6 +132,14 @@
         mBar = bar;
     }
 
+    public void setService(PhoneStatusBar phoneStatusBar) {
+        mStatusBarService = phoneStatusBar;
+    }
+
+    public PhoneStatusBar getService() {
+        return mStatusBarService;
+    }
+
     public void setImeWindowStatus(boolean visible) {
         mModel.onImeWindowStatusChanged(visible);
     }
@@ -203,10 +214,21 @@
         Intent intent = new Intent(action);
         startSettingsActivity(intent);
     }
+
     private void startSettingsActivity(Intent intent) {
+        startSettingsActivity(intent, true);
+    }
+
+    private void startSettingsActivity(Intent intent, boolean onlyProvisioned) {
+        if (onlyProvisioned && !getService().isDeviceProvisioned()) return;
+        try {
+            // Dismiss the lock screen when Settings starts.
+            ActivityManagerNative.getDefault().dismissKeyguardOnNextActivity();
+        } catch (RemoteException e) {
+        }
         intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
-        mBar.collapseAllPanels(true);
-        mContext.startActivityAsUser(intent, UserHandle.CURRENT);
+        mContext.startActivityAsUser(intent, new UserHandle(UserHandle.USER_CURRENT));
+        getService().animateCollapse();
     }
 
     private void addUserTiles(ViewGroup parent, LayoutInflater inflater) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/SettingsPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/SettingsPanelView.java
index 4a7a424..2ed450dd 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/SettingsPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/SettingsPanelView.java
@@ -58,18 +58,14 @@
         }
     }
 
-    @Override
     public void setImeWindowStatus(boolean visible) {
         if (mQS != null) {
             mQS.setImeWindowStatus(visible);
         }
     }
 
-    @Override
     public void setup(NetworkController networkController, BluetoothController bluetoothController,
             BatteryController batteryController, LocationController locationController) {
-        super.setup(networkController, bluetoothController, batteryController, locationController);
-
         if (mQS != null) {
             mQS.setup(networkController, bluetoothController, batteryController,
                     locationController);
@@ -93,4 +89,10 @@
             "settings,v=" + vel);
         super.fling(vel, always);
     }
+
+    public void setService(PhoneStatusBar phoneStatusBar) {
+        if (mQS != null) {
+            mQS.setService(phoneStatusBar);
+        }
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
index 7dff549..c55b5bc 100644
--- a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
+++ b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
@@ -25,6 +25,7 @@
 import android.os.Environment;
 import android.os.Handler;
 import android.os.HandlerThread;
+import android.os.UserHandle;
 import android.os.storage.StorageEventListener;
 import android.os.storage.StorageManager;
 import android.provider.Settings;
@@ -311,7 +312,8 @@
             mUsbStorageNotification.tickerText = title;
             if (pi == null) {
                 Intent intent = new Intent();
-                pi = PendingIntent.getBroadcast(mContext, 0, intent, 0);
+                pi = PendingIntent.getBroadcastAsUser(mContext, 0, intent, 0,
+                        UserHandle.CURRENT);
             }
 
             mUsbStorageNotification.setLatestEventInfo(mContext, title, message, pi);
@@ -336,9 +338,10 @@
     
         final int notificationId = mUsbStorageNotification.icon;
         if (visible) {
-            notificationManager.notify(notificationId, mUsbStorageNotification);
+            notificationManager.notifyAsUser(null, notificationId, mUsbStorageNotification,
+                    UserHandle.ALL);
         } else {
-            notificationManager.cancel(notificationId);
+            notificationManager.cancelAsUser(null, notificationId, UserHandle.ALL);
         }
     }
 
@@ -398,7 +401,8 @@
             mMediaStorageNotification.tickerText = title;
             if (pi == null) {
                 Intent intent = new Intent();
-                pi = PendingIntent.getBroadcast(mContext, 0, intent, 0);
+                pi = PendingIntent.getBroadcastAsUser(mContext, 0, intent, 0,
+                        UserHandle.CURRENT);
             }
 
             mMediaStorageNotification.icon = icon;
@@ -407,9 +411,10 @@
     
         final int notificationId = mMediaStorageNotification.icon;
         if (visible) {
-            notificationManager.notify(notificationId, mMediaStorageNotification);
+            notificationManager.notifyAsUser(null, notificationId,
+                    mMediaStorageNotification, UserHandle.ALL);
         } else {
-            notificationManager.cancel(notificationId);
+            notificationManager.cancelAsUser(null, notificationId, UserHandle.ALL);
         }
     }
 }
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java
index 1a4eeb2..2e7228c 100644
--- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java
+++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java
@@ -243,11 +243,15 @@
 
         public void reportSuccessfulUnlockAttempt() {
             KeyguardUpdateMonitor.getInstance(mContext).clearFailedUnlockAttempts();
+            mLockPatternUtils.reportSuccessfulPasswordAttempt();
         }
 
         public void reportFailedUnlockAttempt() {
-            // TODO: handle biometric attempt differently.
-            KeyguardHostView.this.reportFailedUnlockAttempt();
+            if (mCurrentSecuritySelection == SecurityMode.Biometric) {
+                KeyguardUpdateMonitor.getInstance(mContext).reportFailedBiometricUnlockAttempt();
+            } else {
+                KeyguardHostView.this.reportFailedUnlockAttempt();
+            }
         }
 
         public int getFailedAttempts() {
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardPasswordView.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardPasswordView.java
index 01f7af3..92bc93c 100644
--- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardPasswordView.java
+++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardPasswordView.java
@@ -32,7 +32,6 @@
 
 import android.os.CountDownTimer;
 import android.os.SystemClock;
-import android.security.KeyStore;
 import android.text.Editable;
 import android.text.InputType;
 import android.text.TextWatcher;
@@ -270,7 +269,6 @@
         String entry = mPasswordEntry.getText().toString();
         if (mLockPatternUtils.checkPassword(entry)) {
             mCallback.reportSuccessfulUnlockAttempt();
-            KeyStore.getInstance().password(entry);
             mCallback.dismiss(true);
         } else if (entry.length() > MINIMUM_PASSWORD_LENGTH_BEFORE_REPORT ) {
             // to avoid accidental lockout, only count attempts that are long enough to be a
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardPatternView.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardPatternView.java
index 6e16bb4..780f117 100644
--- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardPatternView.java
+++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardPatternView.java
@@ -26,7 +26,6 @@
 import android.os.Bundle;
 import android.os.CountDownTimer;
 import android.os.SystemClock;
-import android.security.KeyStore;
 import android.util.AttributeSet;
 import android.util.Log;
 import android.view.MotionEvent;
@@ -239,7 +238,6 @@
             if (mLockPatternUtils.checkPattern(pattern)) {
                 mCallback.reportSuccessfulUnlockAttempt();
                 mLockPatternView.setDisplayMode(LockPatternView.DisplayMode.Correct);
-                KeyStore.getInstance().password(LockPatternUtils.patternToString(pattern));
                 mTotalFailedPatternAttempts = 0;
                 mCallback.dismiss(true);
             } else {
diff --git a/preloaded-classes b/preloaded-classes
index b505dbd..10c5c9e 100644
--- a/preloaded-classes
+++ b/preloaded-classes
@@ -568,7 +568,6 @@
 android.media.MediaScanner
 android.media.RemoteDisplay
 android.media.ToneGenerator
-android.media.videoeditor.MediaArtistNativeHelper
 android.net.ConnectivityManager
 android.net.Credentials
 android.net.DhcpInfoInternal
diff --git a/services/java/com/android/server/AppWidgetServiceImpl.java b/services/java/com/android/server/AppWidgetServiceImpl.java
index fcc8a06..fa8f4b4 100644
--- a/services/java/com/android/server/AppWidgetServiceImpl.java
+++ b/services/java/com/android/server/AppWidgetServiceImpl.java
@@ -1398,8 +1398,7 @@
 
     int enforceSystemOrCallingUid(String packageName) throws IllegalArgumentException {
         int callingUid = Binder.getCallingUid();
-        int uid = Process.myUid();
-        if (UserHandle.getAppId(uid) == Process.SYSTEM_UID || uid == 0) {
+        if (UserHandle.getAppId(callingUid) == Process.SYSTEM_UID || callingUid == 0) {
             return callingUid;
         }
         return enforceCallingUid(packageName);
diff --git a/services/java/com/android/server/DeviceStorageMonitorService.java b/services/java/com/android/server/DeviceStorageMonitorService.java
index c919595..750a2fb 100644
--- a/services/java/com/android/server/DeviceStorageMonitorService.java
+++ b/services/java/com/android/server/DeviceStorageMonitorService.java
@@ -396,13 +396,15 @@
                 com.android.internal.R.string.low_internal_storage_view_title);
         CharSequence details = mContext.getText(
                 com.android.internal.R.string.low_internal_storage_view_text);
-        PendingIntent intent = PendingIntent.getActivity(mContext, 0,  lowMemIntent, 0);
+        PendingIntent intent = PendingIntent.getActivityAsUser(mContext, 0,  lowMemIntent, 0,
+                null, UserHandle.CURRENT);
         Notification notification = new Notification();
         notification.icon = com.android.internal.R.drawable.stat_notify_disk_full;
         notification.tickerText = title;
         notification.flags |= Notification.FLAG_NO_CLEAR;
         notification.setLatestEventInfo(mContext, title, details, intent);
-        mNotificationMgr.notify(LOW_MEMORY_NOTIFICATION_ID, notification);
+        mNotificationMgr.notifyAsUser(null, LOW_MEMORY_NOTIFICATION_ID, notification,
+                UserHandle.ALL);
         mContext.sendStickyBroadcast(mStorageLowIntent);
     }
 
@@ -415,7 +417,7 @@
                 (NotificationManager)mContext.getSystemService(
                         Context.NOTIFICATION_SERVICE);
         //cancel notification since memory has been freed
-        mNotificationMgr.cancel(LOW_MEMORY_NOTIFICATION_ID);
+        mNotificationMgr.cancelAsUser(null, LOW_MEMORY_NOTIFICATION_ID, UserHandle.ALL);
 
         mContext.removeStickyBroadcastAsUser(mStorageLowIntent, UserHandle.ALL);
         mContext.sendBroadcastAsUser(mStorageOkIntent, UserHandle.ALL);
diff --git a/services/java/com/android/server/LocationManagerService.java b/services/java/com/android/server/LocationManagerService.java
index 840d432..b834a84 100644
--- a/services/java/com/android/server/LocationManagerService.java
+++ b/services/java/com/android/server/LocationManagerService.java
@@ -601,6 +601,23 @@
         }
     }
 
+    private boolean isAllowedProviderSafe(String provider) {
+        if (LocationManager.GPS_PROVIDER.equals(provider) ||
+                LocationManager.PASSIVE_PROVIDER.equals(provider)) {
+            // gps and passive providers require FINE permission
+            return mContext.checkCallingOrSelfPermission(ACCESS_FINE_LOCATION)
+                    == PackageManager.PERMISSION_GRANTED;
+        } else if (LocationManager.NETWORK_PROVIDER.equals(provider) ||
+                LocationManager.FUSED_PROVIDER.equals(provider)) {
+            // network and fused providers are ok with COARSE or FINE
+            return (mContext.checkCallingOrSelfPermission(ACCESS_FINE_LOCATION)
+                    == PackageManager.PERMISSION_GRANTED) ||
+                    (mContext.checkCallingOrSelfPermission(ACCESS_COARSE_LOCATION)
+                    == PackageManager.PERMISSION_GRANTED);
+        }
+        return false;
+    }
+
     /**
      * Returns all providers by name, including passive, but excluding
      * fused.
@@ -632,8 +649,6 @@
      */
     @Override
     public List<String> getProviders(Criteria criteria, boolean enabledOnly) {
-        checkPermission();
-
         ArrayList<String> out;
         synchronized (mLock) {
             out = new ArrayList<String>(mProviders.size());
@@ -642,14 +657,16 @@
                 if (LocationManager.FUSED_PROVIDER.equals(name)) {
                     continue;
                 }
-                if (enabledOnly && !isAllowedBySettingsLocked(name)) {
-                    continue;
+                if (isAllowedProviderSafe(name)) {
+                    if (enabledOnly && !isAllowedBySettingsLocked(name)) {
+                        continue;
+                    }
+                    if (criteria != null && !LocationProvider.propertiesMeetCriteria(
+                            name, provider.getProperties(), criteria)) {
+                        continue;
+                    }
+                    out.add(name);
                 }
-                if (criteria != null && !LocationProvider.propertiesMeetCriteria(
-                        name, provider.getProperties(), criteria)) {
-                    continue;
-                }
-                out.add(name);
             }
         }
 
@@ -660,23 +677,22 @@
     /**
      * Return the name of the best provider given a Criteria object.
      * This method has been deprecated from the public API,
-     * and the whole LoactionProvider (including #meetsCriteria)
+     * and the whole LocationProvider (including #meetsCriteria)
      * has been deprecated as well. So this method now uses
      * some simplified logic.
      */
     @Override
     public String getBestProvider(Criteria criteria, boolean enabledOnly) {
         String result = null;
-        checkPermission();
 
         List<String> providers = getProviders(criteria, enabledOnly);
-        if (providers.size() < 1) {
+        if (!providers.isEmpty()) {
             result = pickBest(providers);
             if (D) Log.d(TAG, "getBestProvider(" + criteria + ", " + enabledOnly + ")=" + result);
             return result;
         }
         providers = getProviders(null, enabledOnly);
-        if (providers.size() >= 1) {
+        if (!providers.isEmpty()) {
             result = pickBest(providers);
             if (D) Log.d(TAG, "getBestProvider(" + criteria + ", " + enabledOnly + ")=" + result);
             return result;
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java
index 71e6e66..bab4f7a 100755
--- a/services/java/com/android/server/NotificationManagerService.java
+++ b/services/java/com/android/server/NotificationManagerService.java
@@ -53,7 +53,6 @@
 import android.os.UserHandle;
 import android.os.Vibrator;
 import android.provider.Settings;
-import android.service.dreams.IDreamManager;
 import android.telephony.TelephonyManager;
 import android.text.TextUtils;
 import android.util.AtomicFile;
@@ -890,7 +889,7 @@
         final boolean isSystemNotification = ("android".equals(pkg));
 
         userId = ActivityManager.handleIncomingUser(callingPid,
-                callingUid, userId, false, true, "enqueueNotification", pkg);
+                callingUid, userId, true, true, "enqueueNotification", pkg);
 
         // Limit the number of notifications that any given package except the android
         // package can enqueue.  Prevents DOS attacks and deals with leaks.
@@ -900,7 +899,7 @@
                 final int N = mNotificationList.size();
                 for (int i=0; i<N; i++) {
                     final NotificationRecord r = mNotificationList.get(i);
-                    if (r.pkg.equals(pkg)) {
+                    if (r.pkg.equals(pkg) && r.userId == userId) {
                         count++;
                         if (count >= MAX_PACKAGE_NOTIFICATIONS) {
                             Slog.e(TAG, "Package has already posted " + count
@@ -1261,7 +1260,7 @@
     public void cancelNotificationWithTag(String pkg, String tag, int id, int userId) {
         checkCallerIsSystemOrSameApp(pkg);
         userId = ActivityManager.handleIncomingUser(Binder.getCallingPid(),
-                Binder.getCallingUid(), userId, false, true, "cancelNotificationWithTag", pkg);
+                Binder.getCallingUid(), userId, true, true, "cancelNotificationWithTag", pkg);
         // Don't allow client applications to cancel foreground service notis.
         cancelNotification(pkg, tag, id, 0,
                 Binder.getCallingUid() == Process.SYSTEM_UID
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index fb1d530..eeab757 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -768,6 +768,12 @@
             reportWtf("making Vibrator Service ready", e);
         }
 
+        try {
+            lockSettings.systemReady();
+        } catch (Throwable e) {
+            reportWtf("making Lock Settings Service ready", e);
+        }
+
         if (devicePolicy != null) {
             try {
                 devicePolicy.systemReady();
@@ -785,12 +791,6 @@
         }
 
         try {
-            lockSettings.systemReady();
-        } catch (Throwable e) {
-            reportWtf("making Lock Settings Service ready", e);
-        }
-
-        try {
             wm.systemReady();
         } catch (Throwable e) {
             reportWtf("making Window Manager Service ready", e);
diff --git a/services/java/com/android/server/ThrottleService.java b/services/java/com/android/server/ThrottleService.java
index 49f39fe..f36d73a 100644
--- a/services/java/com/android/server/ThrottleService.java
+++ b/services/java/com/android/server/ThrottleService.java
@@ -670,7 +670,8 @@
             intent.setClassName("com.android.phone", "com.android.phone.DataUsage");
             intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
 
-            PendingIntent pi = PendingIntent.getActivity(mContext, 0, intent, 0);
+            PendingIntent pi = PendingIntent.getActivityAsUser(mContext, 0, intent, 0,
+                    null, UserHandle.CURRENT);
 
             Resources r = Resources.getSystem();
             CharSequence title = r.getText(titleInt);
@@ -686,7 +687,8 @@
             mThrottlingNotification.tickerText = title;
             mThrottlingNotification.setLatestEventInfo(mContext, title, message, pi);
 
-            mNotificationManager.notify(mThrottlingNotification.icon, mThrottlingNotification);
+            mNotificationManager.notifyAsUser(null, mThrottlingNotification.icon,
+                    mThrottlingNotification, UserHandle.ALL);
         }
 
 
@@ -701,7 +703,8 @@
                 Intent broadcast = new Intent(ThrottleManager.THROTTLE_ACTION);
                 broadcast.putExtra(ThrottleManager.EXTRA_THROTTLE_LEVEL, -1);
                 mContext.sendStickyBroadcastAsUser(broadcast, UserHandle.ALL);
-                mNotificationManager.cancel(R.drawable.stat_sys_throttled);
+                mNotificationManager.cancelAsUser(null, R.drawable.stat_sys_throttled,
+                        UserHandle.ALL);
                 mWarningNotificationSent = false;
             }
         }
diff --git a/services/java/com/android/server/UiModeManagerService.java b/services/java/com/android/server/UiModeManagerService.java
index 3e83baa..85a6e41 100644
--- a/services/java/com/android/server/UiModeManagerService.java
+++ b/services/java/com/android/server/UiModeManagerService.java
@@ -521,10 +521,13 @@
                         mContext,
                         mContext.getString(R.string.car_mode_disable_notification_title),
                         mContext.getString(R.string.car_mode_disable_notification_message),
-                        PendingIntent.getActivity(mContext, 0, carModeOffIntent, 0));
-                mNotificationManager.notify(0, n);
+                        PendingIntent.getActivityAsUser(mContext, 0, carModeOffIntent, 0,
+                                null, UserHandle.CURRENT));
+                mNotificationManager.notifyAsUser(null,
+                        R.string.car_mode_disable_notification_title, n, UserHandle.ALL);
             } else {
-                mNotificationManager.cancel(0);
+                mNotificationManager.cancelAsUser(null,
+                        R.string.car_mode_disable_notification_title, UserHandle.ALL);
             }
         }
     }
diff --git a/services/java/com/android/server/WifiService.java b/services/java/com/android/server/WifiService.java
index 5c38e63..adb63f9 100644
--- a/services/java/com/android/server/WifiService.java
+++ b/services/java/com/android/server/WifiService.java
@@ -1090,14 +1090,14 @@
          */
         private boolean shouldWifiStayAwake(int stayAwakeConditions, int pluggedType) {
             //Never sleep as long as the user has not changed the settings
-            int wifiSleepPolicy = Settings.System.getInt(mContext.getContentResolver(),
-                    Settings.System.WIFI_SLEEP_POLICY,
-                    Settings.System.WIFI_SLEEP_POLICY_NEVER);
+            int wifiSleepPolicy = Settings.Global.getInt(mContext.getContentResolver(),
+                    Settings.Global.WIFI_SLEEP_POLICY,
+                    Settings.Global.WIFI_SLEEP_POLICY_NEVER);
 
-            if (wifiSleepPolicy == Settings.System.WIFI_SLEEP_POLICY_NEVER) {
+            if (wifiSleepPolicy == Settings.Global.WIFI_SLEEP_POLICY_NEVER) {
                 // Never sleep
                 return true;
-            } else if ((wifiSleepPolicy == Settings.System.WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED) &&
+            } else if ((wifiSleepPolicy == Settings.Global.WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED) &&
                     (pluggedType != 0)) {
                 // Never sleep while plugged, and we're plugged
                 return true;
@@ -1766,8 +1766,9 @@
                 mNotification.when = 0;
                 mNotification.icon = ICON_NETWORKS_AVAILABLE;
                 mNotification.flags = Notification.FLAG_AUTO_CANCEL;
-                mNotification.contentIntent = PendingIntent.getActivity(mContext, 0,
-                        new Intent(WifiManager.ACTION_PICK_WIFI_NETWORK), 0);
+                mNotification.contentIntent = PendingIntent.getActivityAsUser(mContext, 0,
+                        new Intent(WifiManager.ACTION_PICK_WIFI_NETWORK), 0,
+                        null, UserHandle.CURRENT);
             }
 
             CharSequence title = mContext.getResources().getQuantityText(
@@ -1779,9 +1780,10 @@
 
             mNotificationRepeatTime = System.currentTimeMillis() + NOTIFICATION_REPEAT_DELAY_MS;
 
-            notificationManager.notify(ICON_NETWORKS_AVAILABLE, mNotification);
+            notificationManager.notifyAsUser(null, ICON_NETWORKS_AVAILABLE, mNotification,
+                    UserHandle.ALL);
         } else {
-            notificationManager.cancel(ICON_NETWORKS_AVAILABLE);
+            notificationManager.cancelAsUser(null, ICON_NETWORKS_AVAILABLE, UserHandle.ALL);
         }
 
         mNotificationShown = visible;
diff --git a/services/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/java/com/android/server/accessibility/AccessibilityManagerService.java
index 20c89ad..0e101e1 100644
--- a/services/java/com/android/server/accessibility/AccessibilityManagerService.java
+++ b/services/java/com/android/server/accessibility/AccessibilityManagerService.java
@@ -79,7 +79,6 @@
 
 import com.android.internal.R;
 import com.android.internal.content.PackageMonitor;
-import com.android.internal.os.SomeArgs;
 import com.android.internal.statusbar.IStatusBarService;
 
 import org.xmlpull.v1.XmlPullParserException;
@@ -472,13 +471,18 @@
             // If necessary enable accessibility and announce that.
             if (!userState.mIsAccessibilityEnabled) {
                 userState.mIsAccessibilityEnabled = true;
-                scheduleSendStateToClientsLocked(userState);
             }
+            // No touch exploration.
+            userState.mIsTouchExplorationEnabled = false;
+
+            // Hook the automation service up.
+            mUiAutomationService = new Service(mCurrentUserId, componentName,
+                    accessibilityServiceInfo, true);
+            mUiAutomationService.onServiceConnected(componentName, serviceClient.asBinder());
+
+            updateInputFilterLocked(userState);
+            scheduleSendStateToClientsLocked(userState);
         }
-        // Hook the automation service up.
-        mUiAutomationService = new Service(mCurrentUserId, componentName,
-                accessibilityServiceInfo, true);
-        mUiAutomationService.onServiceConnected(componentName, serviceClient.asBinder());
     }
 
     public void unregisterUiTestAutomationService(IAccessibilityServiceClient serviceClient) {
@@ -591,16 +595,6 @@
             // Recreate the internal state for the new user.
             mMainHandler.obtainMessage(MainHandler.MSG_SEND_RECREATE_INTERNAL_STATE,
                     mCurrentUserId, 0).sendToTarget();
-
-            // Re-register the test automation service after the new state is recreated.
-            if (mUiAutomationService != null) {
-                unregisterUiTestAutomationService(mUiAutomationService.mServiceInterface);
-                SomeArgs args = SomeArgs.obtain();
-                args.arg1 = mUiAutomationService.mServiceInterface;
-                args.arg2 = mUiAutomationService.mAccessibilityServiceInfo;
-                mMainHandler.obtainMessage(MainHandler.MSG_REGISTER_UI_TEST_AUTOMATION_SERVICE,
-                        args).sendToTarget();
-            }
         }
     }
 
@@ -1166,7 +1160,6 @@
         public static final int MSG_SEND_STATE_TO_CLIENTS = 2;
         public static final int MSG_SEND_CLEARED_STATE_TO_CLIENTS_FOR_USER = 3;
         public static final int MSG_SEND_RECREATE_INTERNAL_STATE = 4;
-        public static final int MSG_REGISTER_UI_TEST_AUTOMATION_SERVICE = 5;
 
         public MainHandler(Looper looper) {
             super(looper);
@@ -1202,17 +1195,6 @@
                         recreateInternalStateLocked(userState);
                     }
                 } break;
-                case MSG_REGISTER_UI_TEST_AUTOMATION_SERVICE: {
-                    SomeArgs args = (SomeArgs) msg.obj;
-                    try {
-                        IAccessibilityServiceClient client =
-                                (IAccessibilityServiceClient) args.arg1;
-                        AccessibilityServiceInfo info = (AccessibilityServiceInfo) args.arg2;
-                        registerUiTestAutomationService(client, info);
-                    } finally {
-                        args.recycle();
-                    }
-                } break;
             }
         }
 
diff --git a/services/java/com/android/server/accessibility/ScreenMagnifier.java b/services/java/com/android/server/accessibility/ScreenMagnifier.java
index 48781ac..b7327080 100644
--- a/services/java/com/android/server/accessibility/ScreenMagnifier.java
+++ b/services/java/com/android/server/accessibility/ScreenMagnifier.java
@@ -869,8 +869,22 @@
             mDisplayContentChangeListener = new IDisplayContentChangeListener.Stub() {
                 @Override
                 public void onWindowTransition(int displayId, int transition, WindowInfo info) {
-                    mHandler.obtainMessage(MESSAGE_ON_WINDOW_TRANSITION, transition, 0,
-                            WindowInfo.obtain(info)).sendToTarget();
+                    Message message = mHandler.obtainMessage(MESSAGE_ON_WINDOW_TRANSITION,
+                            transition, 0, WindowInfo.obtain(info));
+                    // TODO: This makes me quite unhappy but for the time being the
+                    //       least risky fix for cases where the keyguard is removed but
+                    //       the windows it force hides are not made visible yet. Hence,
+                    //       we would compute the magnified frame before we have a stable
+                    //       state. One more reason to move the magnified frame computation
+                    //       in the window manager!
+                    if (info.type == WindowManager.LayoutParams.TYPE_KEYGUARD
+                                || info.type == WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG
+                            && (transition == WindowManagerPolicy.TRANSIT_EXIT
+                                || transition == WindowManagerPolicy.TRANSIT_HIDE)) {
+                        mHandler.sendMessageDelayed(message, mLongAnimationDuration);
+                    } else {
+                        message.sendToTarget();
+                    }
                 }
 
                 @Override
diff --git a/services/java/com/android/server/accessibility/TouchExplorer.java b/services/java/com/android/server/accessibility/TouchExplorer.java
index c84f988..0468b4d 100644
--- a/services/java/com/android/server/accessibility/TouchExplorer.java
+++ b/services/java/com/android/server/accessibility/TouchExplorer.java
@@ -25,7 +25,6 @@
 import android.gesture.GestureStroke;
 import android.gesture.Prediction;
 import android.graphics.Rect;
-import android.os.Build;
 import android.os.Handler;
 import android.os.SystemClock;
 import android.util.Slog;
@@ -687,15 +686,10 @@
                 }
             } break;
             case MotionEvent.ACTION_POINTER_UP: {
-                final int activePointerCount = mReceivedPointerTracker.getActivePointerCount();
-                switch (activePointerCount) {
-                    case 1: {
-                        // Send an event to the end of the drag gesture.
-                        sendMotionEvent(event, MotionEvent.ACTION_UP, pointerIdBits, policyFlags);
-                    } break;
-                    default: {
-                        mCurrentState = STATE_TOUCH_EXPLORING;
-                    }
+                final int pointerId = event.getPointerId(event.getActionIndex());
+                if (mReceivedPointerTracker.isActiveOrWasLastActiveUpPointer(pointerId)) {
+                    sendUpForInjectedDownPointers(event, policyFlags);
+                    mCurrentState = STATE_TOUCH_EXPLORING;
                 }
              } break;
             case MotionEvent.ACTION_UP: {
diff --git a/services/java/com/android/server/am/ActiveServices.java b/services/java/com/android/server/am/ActiveServices.java
index aefc264..0c0f00c 100644
--- a/services/java/com/android/server/am/ActiveServices.java
+++ b/services/java/com/android/server/am/ActiveServices.java
@@ -706,7 +706,7 @@
         if (DEBUG_SERVICE) Slog.v(TAG, "retrieveServiceLocked: " + service
                 + " type=" + resolvedType + " callingUid=" + callingUid);
 
-        userId = mAm.handleIncomingUserLocked(callingPid, callingUid, userId,
+        userId = mAm.handleIncomingUser(callingPid, callingUid, userId,
                 false, true, "service", null);
 
         if (service.getComponent() != null) {
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index a6f2974..3427699 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -2448,7 +2448,7 @@
             String resultWho, int requestCode, int startFlags,
             String profileFile, ParcelFileDescriptor profileFd, Bundle options, int userId) {
         enforceNotIsolatedCaller("startActivity");
-        userId = handleIncomingUserLocked(Binder.getCallingPid(), Binder.getCallingUid(), userId,
+        userId = handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), userId,
                 false, true, "startActivity", null);
         return mMainStack.startActivityMayWait(caller, -1, intent, resolvedType,
                 resultTo, resultWho, requestCode, startFlags, profileFile, profileFd,
@@ -2460,7 +2460,7 @@
             String resultWho, int requestCode, int startFlags, String profileFile,
             ParcelFileDescriptor profileFd, Bundle options, int userId) {
         enforceNotIsolatedCaller("startActivityAndWait");
-        userId = handleIncomingUserLocked(Binder.getCallingPid(), Binder.getCallingUid(), userId,
+        userId = handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), userId,
                 false, true, "startActivityAndWait", null);
         WaitResult res = new WaitResult();
         mMainStack.startActivityMayWait(caller, -1, intent, resolvedType,
@@ -2474,7 +2474,7 @@
             String resultWho, int requestCode, int startFlags, Configuration config,
             Bundle options, int userId) {
         enforceNotIsolatedCaller("startActivityWithConfig");
-        userId = handleIncomingUserLocked(Binder.getCallingPid(), Binder.getCallingUid(), userId,
+        userId = handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), userId,
                 false, true, "startActivityWithConfig", null);
         int ret = mMainStack.startActivityMayWait(caller, -1, intent, resolvedType,
                 resultTo, resultWho, requestCode, startFlags,
@@ -2613,7 +2613,7 @@
             Intent intent, String resolvedType, IBinder resultTo,
             String resultWho, int requestCode, int startFlags, Bundle options, int userId) {
 
-        userId = handleIncomingUserLocked(Binder.getCallingPid(), Binder.getCallingUid(), userId,
+        userId = handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), userId,
                 false, true, "startActivityInPackage", null);
 
         int ret = mMainStack.startActivityMayWait(null, uid, intent, resolvedType,
@@ -2623,10 +2623,13 @@
     }
 
     public final int startActivities(IApplicationThread caller,
-            Intent[] intents, String[] resolvedTypes, IBinder resultTo, Bundle options) {
+            Intent[] intents, String[] resolvedTypes, IBinder resultTo, Bundle options,
+            int userId) {
         enforceNotIsolatedCaller("startActivities");
+        userId = handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), userId,
+                false, true, "startActivity", null);
         int ret = mMainStack.startActivities(caller, -1, intents, resolvedTypes, resultTo,
-                options, UserHandle.getCallingUserId());
+                options, userId);
         return ret;
     }
 
@@ -2634,7 +2637,7 @@
             Intent[] intents, String[] resolvedTypes, IBinder resultTo,
             Bundle options, int userId) {
 
-        userId = handleIncomingUserLocked(Binder.getCallingPid(), Binder.getCallingUid(), userId,
+        userId = handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), userId,
                 false, true, "startActivityInPackage", null);
         int ret = mMainStack.startActivities(null, uid, intents, resolvedTypes, resultTo,
                 options, userId);
@@ -3460,7 +3463,7 @@
         enforceNotIsolatedCaller("clearApplicationUserData");
         int uid = Binder.getCallingUid();
         int pid = Binder.getCallingPid();
-        userId = handleIncomingUserLocked(pid, uid,
+        userId = handleIncomingUser(pid, uid,
                 userId, false, true, "clearApplicationUserData", null);
         long callingId = Binder.clearCallingIdentity();
         try {
@@ -3516,7 +3519,7 @@
             throw new SecurityException(msg);
         }
 
-        userId = handleIncomingUserLocked(Binder.getCallingPid(), Binder.getCallingUid(),
+        userId = handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(),
                 userId, true, true, "killBackgroundProcesses", null);
         long callingId = Binder.clearCallingIdentity();
         try {
@@ -3591,7 +3594,7 @@
             Slog.w(TAG, msg);
             throw new SecurityException(msg);
         }
-        userId = handleIncomingUserLocked(Binder.getCallingPid(), Binder.getCallingUid(),
+        userId = handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(),
                 userId, true, true, "forceStopPackage", null);
         long callingId = Binder.clearCallingIdentity();
         try {
@@ -4595,8 +4598,16 @@
         
         synchronized(this) {
             int callingUid = Binder.getCallingUid();
-            userId = handleIncomingUserLocked(Binder.getCallingPid(), callingUid, userId,
-                    false, true, "getIntentSender", null);
+            int origUserId = userId;
+            userId = handleIncomingUser(Binder.getCallingPid(), callingUid, userId,
+                    type == ActivityManager.INTENT_SENDER_BROADCAST, true,
+                    "getIntentSender", null);
+            if (origUserId == UserHandle.USER_CURRENT) {
+                // We don't want to evaluate this until the pending intent is
+                // actually executed.  However, we do want to always do the
+                // security checking for it above.
+                userId = UserHandle.USER_CURRENT;
+            }
             try {
                 if (callingUid != 0 && callingUid != Process.SYSTEM_UID) {
                     int uid = AppGlobals.getPackageManager()
@@ -5748,26 +5759,8 @@
 
     public List<ActivityManager.RecentTaskInfo> getRecentTasks(int maxNum,
             int flags, int userId) {
-        final int callingUid = Binder.getCallingUid();
-        if (userId != UserHandle.getCallingUserId()) {
-            // Check if the caller is holding permissions for cross-user requests.
-            if (checkComponentPermission(
-                    android.Manifest.permission.INTERACT_ACROSS_USERS_FULL,
-                    Binder.getCallingPid(), callingUid, -1, true)
-                    != PackageManager.PERMISSION_GRANTED) {
-                String msg = "Permission Denial: "
-                        + "Request to get recent tasks for user " + userId
-                        + " but is calling from user " + UserHandle.getUserId(callingUid)
-                        + "; this requires "
-                        + android.Manifest.permission.INTERACT_ACROSS_USERS_FULL;
-                Slog.w(TAG, msg);
-                throw new SecurityException(msg);
-            } else {
-                if (userId == UserHandle.USER_CURRENT) {
-                    userId = mCurrentUserId;
-                }
-            }
-        }
+        userId = handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), userId,
+                false, true, "getRecentTasks", null);
 
         synchronized (this) {
             enforceCallingPermission(android.Manifest.permission.GET_TASKS,
@@ -6671,7 +6664,7 @@
             throw new SecurityException(msg);
         }
 
-        userId = handleIncomingUserLocked(Binder.getCallingPid(), Binder.getCallingUid(), userId,
+        userId = handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), userId,
                 false, true, "getContentProvider", null);
         return getContentProviderImpl(caller, name, null, stable, userId);
     }
@@ -6680,7 +6673,7 @@
             String name, int userId, IBinder token) {
         enforceCallingPermission(android.Manifest.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY,
             "Do not have permission in call getContentProviderExternal()");
-        userId = handleIncomingUserLocked(Binder.getCallingPid(), Binder.getCallingUid(), userId,
+        userId = handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), userId,
                 false, true, "getContentProvider", null);
         return getContentProviderExternalUnchecked(name, token, userId);
     }
@@ -6945,7 +6938,7 @@
      */
     public String getProviderMimeType(Uri uri, int userId) {
         enforceNotIsolatedCaller("getProviderMimeType");
-        userId = handleIncomingUserLocked(Binder.getCallingPid(), Binder.getCallingUid(),
+        userId = handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(),
                 userId, false, true, "getProviderMimeType", null);
         final String name = uri.getAuthority();
         final long ident = Binder.clearCallingIdentity();
@@ -10918,14 +10911,6 @@
 
     public int handleIncomingUser(int callingPid, int callingUid, int userId, boolean allowAll,
             boolean requireFull, String name, String callerPackage) {
-        synchronized(this) {
-            return handleIncomingUserLocked(callingPid, callingUid, userId, allowAll,
-                    requireFull, name, callerPackage);
-        }        
-    }
-
-    int handleIncomingUserLocked(int callingPid, int callingUid, int userId, boolean allowAll,
-            boolean requireFull, String name, String callerPackage) {
         final int callingUserId = UserHandle.getUserId(callingUid);
         if (callingUserId != userId) {
             if (callingUid != 0 && callingUid != Process.SYSTEM_UID) {
@@ -10966,6 +10951,10 @@
             }
             if (userId == UserHandle.USER_CURRENT
                     || userId == UserHandle.USER_CURRENT_OR_SELF) {
+                // Note that we may be accessing this outside of a lock...
+                // shouldn't be a big deal, if this is being called outside
+                // of a locked context there is intrinsically a race with
+                // the value the caller will receive and someone else changing it.
                 userId = mCurrentUserId;
             }
             if (!allowAll && userId < 0) {
@@ -11272,7 +11261,7 @@
                 callingPid = Binder.getCallingPid();
             }
 
-            userId = this.handleIncomingUserLocked(callingPid, callingUid, userId,
+            userId = this.handleIncomingUser(callingPid, callingUid, userId,
                     true, true, "registerReceiver", callerPackage);
 
             List allSticky = null;
@@ -11507,7 +11496,7 @@
             Slog.w(TAG, "Broadcast " + intent + " not ordered but result callback requested!");
         }
 
-        userId = handleIncomingUserLocked(callingPid, callingUid, userId,
+        userId = handleIncomingUser(callingPid, callingUid, userId,
                 true, false, "broadcast", callerPackage);
 
         // Make sure that the user who is receiving this broadcast is started.
@@ -11920,7 +11909,7 @@
             throw new IllegalArgumentException("File descriptors passed in Intent");
         }
 
-        userId = handleIncomingUserLocked(Binder.getCallingPid(),
+        userId = handleIncomingUser(Binder.getCallingPid(),
                 Binder.getCallingUid(), userId, true, false, "removeStickyBroadcast", null);
 
         synchronized(this) {
@@ -12008,7 +11997,7 @@
             String profileFile, int flags, Bundle arguments,
             IInstrumentationWatcher watcher, int userId) {
         enforceNotIsolatedCaller("startInstrumentation");
-        userId = handleIncomingUserLocked(Binder.getCallingPid(), Binder.getCallingUid(),
+        userId = handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(),
                 userId, false, true, "startInstrumentation", null);
         // Refuse possible leaked file descriptors
         if (arguments != null && arguments.hasFileDescriptors()) {
@@ -12426,7 +12415,7 @@
                 } else {
                     try {
                         ActivityInfo aInfo = AppGlobals.getPackageManager().getActivityInfo(
-                                destIntent.getComponent(), 0, UserHandle.getCallingUserId());
+                                destIntent.getComponent(), 0, srec.userId);
                         int res = mMainStack.startActivityLocked(srec.app.thread, destIntent,
                                 null, aInfo, parent.appToken, null,
                                 0, -1, parent.launchedFromUid, 0, null, true, null);
@@ -13854,7 +13843,7 @@
     }
 
     private ProcessRecord findProcessLocked(String process, int userId, String callName) {
-        userId = handleIncomingUserLocked(Binder.getCallingPid(), Binder.getCallingUid(),
+        userId = handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(),
                 userId, true, true, callName, null);
         ProcessRecord proc = null;
         try {
@@ -14303,6 +14292,10 @@
         }
     }
 
+    int getCurrentUserIdLocked() {
+        return mCurrentUserId;
+    }
+
     @Override
     public boolean isUserRunning(int userId) {
         if (checkCallingPermission(android.Manifest.permission.INTERACT_ACROSS_USERS)
diff --git a/services/java/com/android/server/am/PendingIntentRecord.java b/services/java/com/android/server/am/PendingIntentRecord.java
index c61f13c..8ee303f 100644
--- a/services/java/com/android/server/am/PendingIntentRecord.java
+++ b/services/java/com/android/server/am/PendingIntentRecord.java
@@ -25,6 +25,7 @@
 import android.os.Bundle;
 import android.os.IBinder;
 import android.os.RemoteException;
+import android.os.UserHandle;
 import android.util.Slog;
 
 import java.io.PrintWriter;
@@ -220,6 +221,10 @@
                 final long origId = Binder.clearCallingIdentity();
                 
                 boolean sendFinish = finishedReceiver != null;
+                int userId = key.userId;
+                if (userId == UserHandle.USER_CURRENT) {
+                    userId = owner.getCurrentUserIdLocked();
+                }
                 switch (key.type) {
                     case ActivityManager.INTENT_SENDER_ACTIVITY:
                         if (options == null) {
@@ -242,10 +247,10 @@
                                 allIntents[allIntents.length-1] = finalIntent;
                                 allResolvedTypes[allResolvedTypes.length-1] = resolvedType;
                                 owner.startActivitiesInPackage(uid, allIntents,
-                                        allResolvedTypes, resultTo, options, key.userId);
+                                        allResolvedTypes, resultTo, options, userId);
                             } else {
                                 owner.startActivityInPackage(uid, finalIntent, resolvedType,
-                                        resultTo, resultWho, requestCode, 0, options, key.userId);
+                                        resultTo, resultWho, requestCode, 0, options, userId);
                             }
                         } catch (RuntimeException e) {
                             Slog.w(ActivityManagerService.TAG,
@@ -263,7 +268,7 @@
                             owner.broadcastIntentInPackage(key.packageName, uid,
                                     finalIntent, resolvedType,
                                     finishedReceiver, code, null, null,
-                                requiredPermission, (finishedReceiver != null), false, key.userId);
+                                requiredPermission, (finishedReceiver != null), false, userId);
                             sendFinish = false;
                         } catch (RuntimeException e) {
                             Slog.w(ActivityManagerService.TAG,
@@ -273,7 +278,7 @@
                     case ActivityManager.INTENT_SENDER_SERVICE:
                         try {
                             owner.startServiceInPackage(uid,
-                                    finalIntent, resolvedType, key.userId);
+                                    finalIntent, resolvedType, userId);
                         } catch (RuntimeException e) {
                             Slog.w(ActivityManagerService.TAG,
                                     "Unable to send startService intent", e);
diff --git a/services/java/com/android/server/connectivity/Tethering.java b/services/java/com/android/server/connectivity/Tethering.java
index 79fb458..d8f3546 100644
--- a/services/java/com/android/server/connectivity/Tethering.java
+++ b/services/java/com/android/server/connectivity/Tethering.java
@@ -461,7 +461,8 @@
         intent.setClassName("com.android.settings", "com.android.settings.TetherSettings");
         intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
 
-        PendingIntent pi = PendingIntent.getActivity(mContext, 0, intent, 0);
+        PendingIntent pi = PendingIntent.getActivityAsUser(mContext, 0, intent, 0,
+                null, UserHandle.CURRENT);
 
         Resources r = Resources.getSystem();
         CharSequence title = r.getText(com.android.internal.R.string.tethered_notification_title);
@@ -478,14 +479,16 @@
         mTetheredNotification.tickerText = title;
         mTetheredNotification.setLatestEventInfo(mContext, title, message, pi);
 
-        notificationManager.notify(mTetheredNotification.icon, mTetheredNotification);
+        notificationManager.notifyAsUser(null, mTetheredNotification.icon,
+                mTetheredNotification, UserHandle.ALL);
     }
 
     private void clearTetheredNotification() {
         NotificationManager notificationManager =
             (NotificationManager)mContext.getSystemService(Context.NOTIFICATION_SERVICE);
         if (notificationManager != null && mTetheredNotification != null) {
-            notificationManager.cancel(mTetheredNotification.icon);
+            notificationManager.cancelAsUser(null, mTetheredNotification.icon,
+                    UserHandle.ALL);
             mTetheredNotification = null;
         }
     }
diff --git a/services/java/com/android/server/connectivity/Vpn.java b/services/java/com/android/server/connectivity/Vpn.java
index b3cbb84..03ff21f 100644
--- a/services/java/com/android/server/connectivity/Vpn.java
+++ b/services/java/com/android/server/connectivity/Vpn.java
@@ -50,6 +50,7 @@
 import android.os.RemoteException;
 import android.os.SystemClock;
 import android.os.SystemService;
+import android.os.UserHandle;
 import android.security.Credentials;
 import android.security.KeyStore;
 import android.util.Log;
@@ -421,7 +422,7 @@
                     .setDefaults(0)
                     .setOngoing(true)
                     .build();
-            nm.notify(R.drawable.vpn_connected, notification);
+            nm.notifyAsUser(null, R.drawable.vpn_connected, notification, UserHandle.ALL);
         }
     }
 
@@ -433,7 +434,7 @@
                 mContext.getSystemService(Context.NOTIFICATION_SERVICE);
 
         if (nm != null) {
-            nm.cancel(R.drawable.vpn_connected);
+            nm.cancelAsUser(null, R.drawable.vpn_connected, UserHandle.ALL);
         }
     }
 
diff --git a/services/java/com/android/server/input/InputManagerService.java b/services/java/com/android/server/input/InputManagerService.java
index 3709314..948c0e0 100644
--- a/services/java/com/android/server/input/InputManagerService.java
+++ b/services/java/com/android/server/input/InputManagerService.java
@@ -58,6 +58,7 @@
 import android.os.MessageQueue;
 import android.os.Process;
 import android.os.RemoteException;
+import android.os.UserHandle;
 import android.provider.Settings;
 import android.provider.Settings.SettingNotFoundException;
 import android.util.Log;
@@ -660,7 +661,8 @@
                 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
                         | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
                         | Intent.FLAG_ACTIVITY_CLEAR_TOP);
-                mKeyboardLayoutIntent = PendingIntent.getActivity(mContext, 0, intent, 0);
+                mKeyboardLayoutIntent = PendingIntent.getActivityAsUser(mContext, 0,
+                        intent, 0, null, UserHandle.CURRENT);
             }
 
             Resources r = mContext.getResources();
@@ -673,8 +675,9 @@
                     .setSmallIcon(R.drawable.ic_settings_language)
                     .setPriority(Notification.PRIORITY_LOW)
                     .build();
-            mNotificationManager.notify(R.string.select_keyboard_layout_notification_title,
-                    notification);
+            mNotificationManager.notifyAsUser(null,
+                    R.string.select_keyboard_layout_notification_title,
+                    notification, UserHandle.ALL);
             mKeyboardLayoutNotificationShown = true;
         }
     }
@@ -683,7 +686,9 @@
     private void hideMissingKeyboardLayoutNotification() {
         if (mKeyboardLayoutNotificationShown) {
             mKeyboardLayoutNotificationShown = false;
-            mNotificationManager.cancel(R.string.select_keyboard_layout_notification_title);
+            mNotificationManager.cancelAsUser(null,
+                    R.string.select_keyboard_layout_notification_title,
+                    UserHandle.ALL);
         }
     }
 
diff --git a/services/java/com/android/server/usb/UsbDeviceManager.java b/services/java/com/android/server/usb/UsbDeviceManager.java
index 392d5e7..8f13501 100644
--- a/services/java/com/android/server/usb/UsbDeviceManager.java
+++ b/services/java/com/android/server/usb/UsbDeviceManager.java
@@ -667,7 +667,8 @@
             if (id != mUsbNotificationId) {
                 // clear notification if title needs changing
                 if (mUsbNotificationId != 0) {
-                    mNotificationManager.cancel(mUsbNotificationId);
+                    mNotificationManager.cancelAsUser(null, mUsbNotificationId,
+                            UserHandle.ALL);
                     mUsbNotificationId = 0;
                 }
                 if (id != 0) {
@@ -688,10 +689,11 @@
                     Intent intent = Intent.makeRestartActivityTask(
                             new ComponentName("com.android.settings",
                                     "com.android.settings.UsbSettings"));
-                    PendingIntent pi = PendingIntent.getActivity(mContext, 0,
-                            intent, 0);
+                    PendingIntent pi = PendingIntent.getActivityAsUser(mContext, 0,
+                            intent, 0, null, UserHandle.CURRENT);
                     notification.setLatestEventInfo(mContext, title, message, pi);
-                    mNotificationManager.notify(id, notification);
+                    mNotificationManager.notifyAsUser(null, id, notification,
+                            UserHandle.ALL);
                     mUsbNotificationId = id;
                 }
             }
@@ -722,15 +724,16 @@
                     Intent intent = Intent.makeRestartActivityTask(
                             new ComponentName("com.android.settings",
                                     "com.android.settings.DevelopmentSettings"));
-                    PendingIntent pi = PendingIntent.getActivity(mContext, 0,
-                            intent, 0);
+                    PendingIntent pi = PendingIntent.getActivityAsUser(mContext, 0,
+                            intent, 0, null, UserHandle.CURRENT);
                     notification.setLatestEventInfo(mContext, title, message, pi);
                     mAdbNotificationShown = true;
-                    mNotificationManager.notify(id, notification);
+                    mNotificationManager.notifyAsUser(null, id, notification,
+                            UserHandle.ALL);
                 }
             } else if (mAdbNotificationShown) {
                 mAdbNotificationShown = false;
-                mNotificationManager.cancel(id);
+                mNotificationManager.cancelAsUser(null, id, UserHandle.ALL);
             }
         }
 
diff --git a/services/java/com/android/server/wm/Session.java b/services/java/com/android/server/wm/Session.java
index 16beeab..d84a52b 100644
--- a/services/java/com/android/server/wm/Session.java
+++ b/services/java/com/android/server/wm/Session.java
@@ -280,7 +280,8 @@
             // !!! FIXME: put all this heavy stuff onto the mH looper, as well as
             // the actual drag event dispatch stuff in the dragstate
 
-            mService.mDragState.register(callingWin.mDisplayContent.getDisplay());
+            Display display = callingWin.mDisplayContent.getDisplay();
+            mService.mDragState.register(display);
             mService.mInputMonitor.updateInputWindowsLw(true /*force*/);
             if (!mService.mInputManager.transferTouchFocus(callingWin.mInputChannel,
                     mService.mDragState.mServerChannel)) {
@@ -310,6 +311,7 @@
                         touchY - thumbCenterY);
                 surface.setAlpha(.7071f);
                 surface.setLayer(mService.mDragState.getDragLayerLw());
+                surface.setLayerStack(display.getLayerStack());
                 surface.show();
             } finally {
                 Surface.closeTransaction();
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index 5a6e010..c09c261 100755
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -9777,7 +9777,7 @@
                 if (moveInputMethodWindowsIfNeededLocked(
                         mode != UPDATE_FOCUS_WILL_ASSIGN_LAYERS &&
                         mode != UPDATE_FOCUS_WILL_PLACE_SURFACES)) {
-                    getDefaultDisplayContentLocked().layoutNeeded = true;
+                    displayContent.layoutNeeded = true;
                 }
                 if (mode == UPDATE_FOCUS_PLACING_SURFACES) {
                     performLayoutLockedInner(displayContent, true /*initial*/, updateInputWindows);
@@ -9791,7 +9791,7 @@
 
             if ((focusChanged & WindowManagerPolicy.FINISH_LAYOUT_REDO_LAYOUT) != 0) {
                 // The change in focus caused us to need to do a layout.  Okay.
-                getDefaultDisplayContentLocked().layoutNeeded = true;
+                displayContent.layoutNeeded = true;
                 if (mode == UPDATE_FOCUS_PLACING_SURFACES) {
                     performLayoutLockedInner(displayContent, true /*initial*/, updateInputWindows);
                 }
@@ -9814,22 +9814,29 @@
     }
 
     private WindowState computeFocusedWindowLocked() {
-        WindowState result = null;
-        WindowState win;
-
         if (mAnimator.mUniverseBackground != null
                 && mAnimator.mUniverseBackground.mWin.canReceiveKeys()) {
             return mAnimator.mUniverseBackground.mWin;
         }
 
-        int nextAppIndex = mAppTokens.size()-1;
-        WindowToken nextApp = nextAppIndex >= 0
-            ? mAppTokens.get(nextAppIndex) : null;
+        final int displayCount = mDisplayContents.size();
+        for (int i = 0; i < displayCount; i++) {
+            final DisplayContent displayContent = mDisplayContents.valueAt(i);
+            WindowState win = findFocusedWindowLocked(displayContent);
+            if (win != null) {
+                return win;
+            }
+        }
+        return null;
+    }
 
-        // TODO(multidisplay): IMEs are only supported on the default display.
-        WindowList windows = getDefaultWindowListLocked();
+    private WindowState findFocusedWindowLocked(DisplayContent displayContent) {
+        int nextAppIndex = mAppTokens.size()-1;
+        WindowToken nextApp = nextAppIndex >= 0 ? mAppTokens.get(nextAppIndex) : null;
+
+        final WindowList windows = displayContent.getWindowList();
         for (int i = windows.size() - 1; i >= 0; i--) {
-            win = windows.get(i);
+            final WindowState win = windows.get(i);
 
             if (localLOGV || DEBUG_FOCUS) Slog.v(
                 TAG, "Looking for focus: " + i
@@ -9879,12 +9886,10 @@
             if (win.canReceiveKeys()) {
                 if (DEBUG_FOCUS) Slog.v(
                         TAG, "Found focus @ " + i + " = " + win);
-                result = win;
-                break;
+                return win;
             }
         }
-
-        return result;
+        return null;
     }
 
     private void startFreezingDisplayLocked(boolean inTransaction,
diff --git a/services/java/com/android/server/wm/WindowStateAnimator.java b/services/java/com/android/server/wm/WindowStateAnimator.java
index 5f40709..b71e38e 100644
--- a/services/java/com/android/server/wm/WindowStateAnimator.java
+++ b/services/java/com/android/server/wm/WindowStateAnimator.java
@@ -1056,7 +1056,10 @@
             w.mSystemDecorRect.set(0, 0, w.mRequestedWidth, w.mRequestedHeight);
         } else if (!w.isDefaultDisplay()) {
             // On a different display is easy, just use the entire display.
-            w.mSystemDecorRect.set(0, 0, displayInfo.logicalWidth, displayInfo.logicalHeight);
+            w.mSystemDecorRect.set(0, 0, w.mCompatFrame.width(), w.mCompatFrame.height());
+            w.mSystemDecorRect.intersect(-w.mFrame.left, -w.mFrame.top,
+                    displayInfo.logicalWidth - w.mFrame.left,
+                    displayInfo.logicalHeight - w.mFrame.top);
         } else if (w.mLayer >= mService.mSystemDecorLayer) {
             // Above the decor layer is easy, just use the entire window.
             // Unless we have a universe background...  in which case all the
diff --git a/tests/RenderScriptTests/ImageProcessing/res/drawable-nodpi/img1600x1067b.jpg b/tests/RenderScriptTests/ImageProcessing/res/drawable-nodpi/img1600x1067b.jpg
new file mode 100644
index 0000000..aed0781
--- /dev/null
+++ b/tests/RenderScriptTests/ImageProcessing/res/drawable-nodpi/img1600x1067b.jpg
Binary files differ
diff --git a/tests/RenderScriptTests/ImageProcessing/res/drawable-nodpi/img640x427.jpg b/tests/RenderScriptTests/ImageProcessing/res/drawable-nodpi/img640x427.jpg
deleted file mode 100644
index 5bce392..0000000
--- a/tests/RenderScriptTests/ImageProcessing/res/drawable-nodpi/img640x427.jpg
+++ /dev/null
Binary files differ
diff --git a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/convolve3x3.rs b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/convolve3x3.rs
index 455fcc2..98128279 100644
--- a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/convolve3x3.rs
+++ b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/convolve3x3.rs
@@ -30,15 +30,15 @@
     uint32_t y1 = min((int32_t)y+1, gHeight-1);
     uint32_t y2 = max((int32_t)y-1, 0);
 
-    float4 p00 = convert_float4(((uchar4 *)rsGetElementAt(gIn, x1, y1))[0]);
-    float4 p01 = convert_float4(((uchar4 *)rsGetElementAt(gIn, x, y1))[0]);
-    float4 p02 = convert_float4(((uchar4 *)rsGetElementAt(gIn, x2, y1))[0]);
-    float4 p10 = convert_float4(((uchar4 *)rsGetElementAt(gIn, x1, y))[0]);
-    float4 p11 = convert_float4(((uchar4 *)rsGetElementAt(gIn, x, y))[0]);
-    float4 p12 = convert_float4(((uchar4 *)rsGetElementAt(gIn, x2, y))[0]);
-    float4 p20 = convert_float4(((uchar4 *)rsGetElementAt(gIn, x1, y2))[0]);
-    float4 p21 = convert_float4(((uchar4 *)rsGetElementAt(gIn, x, y2))[0]);
-    float4 p22 = convert_float4(((uchar4 *)rsGetElementAt(gIn, x2, y2))[0]);
+    float4 p00 = convert_float4(rsGetElementAt_uchar4(gIn, x1, y1));
+    float4 p01 = convert_float4(rsGetElementAt_uchar4(gIn, x, y1));
+    float4 p02 = convert_float4(rsGetElementAt_uchar4(gIn, x2, y1));
+    float4 p10 = convert_float4(rsGetElementAt_uchar4(gIn, x1, y));
+    float4 p11 = convert_float4(rsGetElementAt_uchar4(gIn, x, y));
+    float4 p12 = convert_float4(rsGetElementAt_uchar4(gIn, x2, y));
+    float4 p20 = convert_float4(rsGetElementAt_uchar4(gIn, x1, y2));
+    float4 p21 = convert_float4(rsGetElementAt_uchar4(gIn, x, y2));
+    float4 p22 = convert_float4(rsGetElementAt_uchar4(gIn, x2, y2));
     p00 *= gCoeffs[0];
     p01 *= gCoeffs[1];
     p02 *= gCoeffs[2];
diff --git a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/convolve5x5.rs b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/convolve5x5.rs
index fe6cf31..e6d03c9 100644
--- a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/convolve5x5.rs
+++ b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/convolve5x5.rs
@@ -37,35 +37,35 @@
     uint32_t y3 = min((int32_t)y+1, gHeight-1);
     uint32_t y4 = min((int32_t)y+2, gHeight-1);
 
-    float4 p0 = convert_float4(((uchar4 *)rsGetElementAt(gIn, x0, y0))[0]) * gCoeffs[0]
-              + convert_float4(((uchar4 *)rsGetElementAt(gIn, x1, y0))[0]) * gCoeffs[1]
-              + convert_float4(((uchar4 *)rsGetElementAt(gIn, x2, y0))[0]) * gCoeffs[2]
-              + convert_float4(((uchar4 *)rsGetElementAt(gIn, x3, y0))[0]) * gCoeffs[3]
-              + convert_float4(((uchar4 *)rsGetElementAt(gIn, x4, y0))[0]) * gCoeffs[4];
+    float4 p0 = convert_float4(rsGetElementAt_uchar4(gIn, x0, y0)) * gCoeffs[0]
+              + convert_float4(rsGetElementAt_uchar4(gIn, x1, y0)) * gCoeffs[1]
+              + convert_float4(rsGetElementAt_uchar4(gIn, x2, y0)) * gCoeffs[2]
+              + convert_float4(rsGetElementAt_uchar4(gIn, x3, y0)) * gCoeffs[3]
+              + convert_float4(rsGetElementAt_uchar4(gIn, x4, y0)) * gCoeffs[4];
 
-    float4 p1 = convert_float4(((uchar4 *)rsGetElementAt(gIn, x0, y1))[0]) * gCoeffs[5]
-              + convert_float4(((uchar4 *)rsGetElementAt(gIn, x1, y1))[0]) * gCoeffs[6]
-              + convert_float4(((uchar4 *)rsGetElementAt(gIn, x2, y1))[0]) * gCoeffs[7]
-              + convert_float4(((uchar4 *)rsGetElementAt(gIn, x3, y1))[0]) * gCoeffs[8]
-              + convert_float4(((uchar4 *)rsGetElementAt(gIn, x4, y1))[0]) * gCoeffs[9];
+    float4 p1 = convert_float4(rsGetElementAt_uchar4(gIn, x0, y1)) * gCoeffs[5]
+              + convert_float4(rsGetElementAt_uchar4(gIn, x1, y1)) * gCoeffs[6]
+              + convert_float4(rsGetElementAt_uchar4(gIn, x2, y1)) * gCoeffs[7]
+              + convert_float4(rsGetElementAt_uchar4(gIn, x3, y1)) * gCoeffs[8]
+              + convert_float4(rsGetElementAt_uchar4(gIn, x4, y1)) * gCoeffs[9];
 
-    float4 p2 = convert_float4(((uchar4 *)rsGetElementAt(gIn, x0, y2))[0]) * gCoeffs[10]
-              + convert_float4(((uchar4 *)rsGetElementAt(gIn, x1, y2))[0]) * gCoeffs[11]
-              + convert_float4(((uchar4 *)rsGetElementAt(gIn, x2, y2))[0]) * gCoeffs[12]
-              + convert_float4(((uchar4 *)rsGetElementAt(gIn, x3, y2))[0]) * gCoeffs[13]
-              + convert_float4(((uchar4 *)rsGetElementAt(gIn, x4, y2))[0]) * gCoeffs[14];
+    float4 p2 = convert_float4(rsGetElementAt_uchar4(gIn, x0, y2)) * gCoeffs[10]
+              + convert_float4(rsGetElementAt_uchar4(gIn, x1, y2)) * gCoeffs[11]
+              + convert_float4(rsGetElementAt_uchar4(gIn, x2, y2)) * gCoeffs[12]
+              + convert_float4(rsGetElementAt_uchar4(gIn, x3, y2)) * gCoeffs[13]
+              + convert_float4(rsGetElementAt_uchar4(gIn, x4, y2)) * gCoeffs[14];
 
-    float4 p3 = convert_float4(((uchar4 *)rsGetElementAt(gIn, x0, y3))[0]) * gCoeffs[15]
-              + convert_float4(((uchar4 *)rsGetElementAt(gIn, x1, y3))[0]) * gCoeffs[16]
-              + convert_float4(((uchar4 *)rsGetElementAt(gIn, x2, y3))[0]) * gCoeffs[17]
-              + convert_float4(((uchar4 *)rsGetElementAt(gIn, x3, y3))[0]) * gCoeffs[18]
-              + convert_float4(((uchar4 *)rsGetElementAt(gIn, x4, y3))[0]) * gCoeffs[19];
+    float4 p3 = convert_float4(rsGetElementAt_uchar4(gIn, x0, y3)) * gCoeffs[15]
+              + convert_float4(rsGetElementAt_uchar4(gIn, x1, y3)) * gCoeffs[16]
+              + convert_float4(rsGetElementAt_uchar4(gIn, x2, y3)) * gCoeffs[17]
+              + convert_float4(rsGetElementAt_uchar4(gIn, x3, y3)) * gCoeffs[18]
+              + convert_float4(rsGetElementAt_uchar4(gIn, x4, y3)) * gCoeffs[19];
 
-    float4 p4 = convert_float4(((uchar4 *)rsGetElementAt(gIn, x0, y4))[0]) * gCoeffs[20]
-              + convert_float4(((uchar4 *)rsGetElementAt(gIn, x1, y4))[0]) * gCoeffs[21]
-              + convert_float4(((uchar4 *)rsGetElementAt(gIn, x2, y4))[0]) * gCoeffs[22]
-              + convert_float4(((uchar4 *)rsGetElementAt(gIn, x3, y4))[0]) * gCoeffs[23]
-              + convert_float4(((uchar4 *)rsGetElementAt(gIn, x4, y4))[0]) * gCoeffs[24];
+    float4 p4 = convert_float4(rsGetElementAt_uchar4(gIn, x0, y4)) * gCoeffs[20]
+              + convert_float4(rsGetElementAt_uchar4(gIn, x1, y4)) * gCoeffs[21]
+              + convert_float4(rsGetElementAt_uchar4(gIn, x2, y4)) * gCoeffs[22]
+              + convert_float4(rsGetElementAt_uchar4(gIn, x3, y4)) * gCoeffs[23]
+              + convert_float4(rsGetElementAt_uchar4(gIn, x4, y4)) * gCoeffs[24];
 
     p0 = clamp(p0 + p1 + p2 + p3 + p4, 0.f, 255.f);
     *out = convert_uchar4(p0);
diff --git a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/grain.rs b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/grain.rs
index 783bc4a..ea42524 100644
--- a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/grain.rs
+++ b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/grain.rs
@@ -48,15 +48,15 @@
     uint32_t y1 = min((int32_t)y+1, (int32_t)(gHeight -1));
     uint32_t y2 = max((int32_t)y-1, (int32_t)0);
 
-    uint p00 = 56 *  ((uchar *)rsGetElementAt(gBlendSource, x1, y1))[0];
-    uint p01 = 114 * ((uchar *)rsGetElementAt(gBlendSource, x, y1))[0];
-    uint p02 = 56 *  ((uchar *)rsGetElementAt(gBlendSource, x2, y1))[0];
-    uint p10 = 114 * ((uchar *)rsGetElementAt(gBlendSource, x1, y))[0];
-    uint p11 = 230 * ((uchar *)rsGetElementAt(gBlendSource, x, y))[0];
-    uint p12 = 114 * ((uchar *)rsGetElementAt(gBlendSource, x2, y))[0];
-    uint p20 = 56 *  ((uchar *)rsGetElementAt(gBlendSource, x1, y2))[0];
-    uint p21 = 114 * ((uchar *)rsGetElementAt(gBlendSource, x, y2))[0];
-    uint p22 = 56 *  ((uchar *)rsGetElementAt(gBlendSource, x2, y2))[0];
+    uint p00 = 56 *  rsGetElementAt_uchar(gBlendSource, x1, y1);
+    uint p01 = 114 * rsGetElementAt_uchar(gBlendSource, x, y1);
+    uint p02 = 56 *  rsGetElementAt_uchar(gBlendSource, x2, y1);
+    uint p10 = 114 * rsGetElementAt_uchar(gBlendSource, x1, y);
+    uint p11 = 230 * rsGetElementAt_uchar(gBlendSource, x, y);
+    uint p12 = 114 * rsGetElementAt_uchar(gBlendSource, x2, y);
+    uint p20 = 56 *  rsGetElementAt_uchar(gBlendSource, x1, y2);
+    uint p21 = 114 * rsGetElementAt_uchar(gBlendSource, x, y2);
+    uint p22 = 56 *  rsGetElementAt_uchar(gBlendSource, x2, y2);
 
     p00 += p01;
     p02 += p10;
@@ -78,7 +78,7 @@
 rs_allocation gNoise;
 void root(const uchar4 *in, uchar4 *out, uint32_t x, uint32_t y) {
     float4 ip = convert_float4(*in);
-    float pnoise = (float) ((uchar *)rsGetElementAt(gNoise, x, y))[0];
+    float pnoise = (float) rsGetElementAt_uchar(gNoise, x, y);
 
     float energy_level = ip.r + ip.g + ip.b;
     float energy_mask = (28.f - sqrt(energy_level)) * 0.03571f;
diff --git a/tests/RenderScriptTests/tests/src/com/android/rs/test/RSTestCore.java b/tests/RenderScriptTests/tests/src/com/android/rs/test/RSTestCore.java
index 2a06491..83fadcb 100644
--- a/tests/RenderScriptTests/tests/src/com/android/rs/test/RSTestCore.java
+++ b/tests/RenderScriptTests/tests/src/com/android/rs/test/RSTestCore.java
@@ -76,6 +76,7 @@
         unitTests.add(new UT_clamp_relaxed(this, mRes, mCtx));
         unitTests.add(new UT_convert(this, mRes, mCtx));
         unitTests.add(new UT_convert_relaxed(this, mRes, mCtx));
+        unitTests.add(new UT_copy_test(this, mRes, mCtx));
         unitTests.add(new UT_rsdebug(this, mRes, mCtx));
         unitTests.add(new UT_rstime(this, mRes, mCtx));
         unitTests.add(new UT_rstypes(this, mRes, mCtx));
diff --git a/tests/RenderScriptTests/tests/src/com/android/rs/test/UT_copy_test.java b/tests/RenderScriptTests/tests/src/com/android/rs/test/UT_copy_test.java
new file mode 100644
index 0000000..380f6ec
--- /dev/null
+++ b/tests/RenderScriptTests/tests/src/com/android/rs/test/UT_copy_test.java
@@ -0,0 +1,120 @@
+/*
+ * Copyright (C) 2012 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 com.android.rs.test;
+
+import android.content.Context;
+import android.content.res.Resources;
+import android.renderscript.*;
+import android.util.Log;
+
+public class UT_copy_test extends UnitTest {
+    private Resources mRes;
+    boolean pass = true;
+
+    protected UT_copy_test(RSTestCore rstc, Resources res, Context ctx) {
+        super(rstc, "Copy", ctx);
+        mRes = res;
+    }
+
+    void testFloat2(RenderScript rs, ScriptC_copy_test s) {
+        Allocation a1 = Allocation.createSized(rs, Element.F32_2(rs), 1024);
+        Allocation a2 = Allocation.createSized(rs, Element.F32_2(rs), 1024);
+
+        float[] f1 = new float[1024 * 2];
+        float[] f2 = new float[1024 * 2];
+        for (int ct=0; ct < f1.length; ct++) {
+            f1[ct] = (float)ct;
+        }
+        a1.copyFrom(f1);
+
+        s.forEach_copyFloat2(a1, a2);
+
+        a2.copyTo(f2);
+        for (int ct=0; ct < f1.length; ct++) {
+            if (f1[ct] != f2[ct]) {
+                failTest();
+                Log.v("RS Test", "Compare failed at " + ct + ", " + f1[ct] + ", " + f2[ct]);
+            }
+        }
+        a1.destroy();
+        a2.destroy();
+    }
+
+    void testFloat3(RenderScript rs, ScriptC_copy_test s) {
+        Allocation a1 = Allocation.createSized(rs, Element.F32_3(rs), 1024);
+        Allocation a2 = Allocation.createSized(rs, Element.F32_3(rs), 1024);
+
+        float[] f1 = new float[1024 * 4];
+        float[] f2 = new float[1024 * 4];
+        for (int ct=0; ct < f1.length; ct++) {
+            f1[ct] = (float)ct;
+        }
+        a1.copyFrom(f1);
+
+        s.forEach_copyFloat3(a1, a2);
+
+        a2.copyTo(f2);
+        for (int ct=0; ct < f1.length; ct++) {
+            if ((f1[ct] != f2[ct]) && ((ct&3) != 3)) {
+                failTest();
+                Log.v("RS Test", "Compare failed at " + ct + ", " + f1[ct] + ", " + f2[ct]);
+            }
+        }
+        a1.destroy();
+        a2.destroy();
+    }
+
+    void testFloat4(RenderScript rs, ScriptC_copy_test s) {
+        Allocation a1 = Allocation.createSized(rs, Element.F32_4(rs), 1024);
+        Allocation a2 = Allocation.createSized(rs, Element.F32_4(rs), 1024);
+
+        float[] f1 = new float[1024 * 4];
+        float[] f2 = new float[1024 * 4];
+        for (int ct=0; ct < f1.length; ct++) {
+            f1[ct] = (float)ct;
+        }
+        a1.copyFrom(f1);
+
+        s.forEach_copyFloat4(a1, a2);
+
+        a2.copyTo(f2);
+        for (int ct=0; ct < f1.length; ct++) {
+            if (f1[ct] != f2[ct]) {
+                failTest();
+                Log.v("RS Test", "Compare failed at " + ct + ", " + f1[ct] + ", " + f2[ct]);
+            }
+        }
+        a1.destroy();
+        a2.destroy();
+    }
+
+    public void run() {
+        RenderScript pRS = RenderScript.create(mCtx);
+        ScriptC_copy_test s = new ScriptC_copy_test(pRS);
+        pRS.setMessageHandler(mRsMessage);
+
+        testFloat2(pRS, s);
+        testFloat3(pRS, s);
+        testFloat4(pRS, s);
+        s.invoke_sendResult(true);
+
+        pRS.finish();
+        waitForMessage();
+        pRS.destroy();
+    }
+}
+
diff --git a/tests/RenderScriptTests/tests/src/com/android/rs/test/copy_test.rs b/tests/RenderScriptTests/tests/src/com/android/rs/test/copy_test.rs
new file mode 100644
index 0000000..f4243eb
--- /dev/null
+++ b/tests/RenderScriptTests/tests/src/com/android/rs/test/copy_test.rs
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2012 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.
+ */
+
+#include "shared.rsh"
+
+void sendResult(bool pass) {
+    if (pass) {
+        rsSendToClientBlocking(RS_MSG_TEST_PASSED);
+    }
+    else {
+        rsSendToClientBlocking(RS_MSG_TEST_FAILED);
+    }
+}
+
+
+float2 __attribute((kernel)) copyFloat2(float2 i) {
+    return i;
+}
+
+float3 __attribute((kernel)) copyFloat3(float3 i) {
+    return i;
+}
+
+float4 __attribute((kernel)) copyFloat4(float4 i) {
+    return i;
+}
+
+
diff --git a/tools/aidl/aidl.cpp b/tools/aidl/aidl.cpp
index 8dbbf50..0728246 100644
--- a/tools/aidl/aidl.cpp
+++ b/tools/aidl/aidl.cpp
@@ -590,7 +590,8 @@
     }
 
     const document_item_type* next = items->next;
-    if (items->next != NULL) {
+    // Allow parcelables to skip the "one-only" rule.
+    if (items->next != NULL && next->item_type != USER_DATA_TYPE) {
         int lineno = -1;
         if (next->item_type == INTERFACE_TYPE_BINDER) {
             lineno = ((interface_type*)next)->interface_token.lineno;
@@ -598,9 +599,6 @@
         else if (next->item_type == INTERFACE_TYPE_RPC) {
             lineno = ((interface_type*)next)->interface_token.lineno;
         }
-        else if (next->item_type == USER_DATA_TYPE) {
-            lineno = ((user_data_type*)next)->keyword_token.lineno;
-        }
         fprintf(stderr, "%s:%d aidl can only handle one interface per file\n",
                             filename, lineno);
         return 1;