Merge "Content description for clear all notifications" into lmp-dev
diff --git a/Android.mk b/Android.mk
index 6280332..3edaefc 100644
--- a/Android.mk
+++ b/Android.mk
@@ -376,7 +376,6 @@
 	telephony/java/com/android/internal/telephony/ISub.aidl \
 	telephony/java/com/android/internal/telephony/IMms.aidl \
 	wifi/java/android/net/wifi/IWifiManager.aidl \
-	wifi/java/android/net/wifi/passpoint/IWifiPasspointManager.aidl \
 	wifi/java/android/net/wifi/p2p/IWifiP2pManager.aidl \
 	wifi/java/android/net/wifi/IWifiScanner.aidl \
 	wifi/java/android/net/wifi/IRttManager.aidl \
diff --git a/api/current.txt b/api/current.txt
index 85a3fc5..8236f38 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -327,6 +327,7 @@
     field public static final int alwaysRetainTaskState = 16843267; // 0x1010203
     field public static final int amPmBackgroundColor = 16843942; // 0x10104a6
     field public static final int amPmTextColor = 16843941; // 0x10104a5
+    field public static final int ambientShadowAlpha = 16843967; // 0x10104bf
     field public static final int angle = 16843168; // 0x10101a0
     field public static final int animateFirstView = 16843477; // 0x10102d5
     field public static final int animateLayoutChanges = 16843506; // 0x10102f2
@@ -1147,6 +1148,7 @@
     field public static final int spinnersShown = 16843595; // 0x101034b
     field public static final int splitMotionEvents = 16843503; // 0x10102ef
     field public static final int splitTrack = 16843852; // 0x101044c
+    field public static final int spotShadowAlpha = 16843968; // 0x10104c0
     field public static final int src = 16843033; // 0x1010119
     field public static final int ssp = 16843747; // 0x10103e3
     field public static final int sspPattern = 16843749; // 0x10103e5
@@ -3517,6 +3519,7 @@
     method public void postponeEnterTransition();
     method public void recreate();
     method public void registerForContextMenu(android.view.View);
+    method public boolean releaseInstance();
     method public final deprecated void removeDialog(int);
     method public void reportFullyDrawn();
     method public boolean requestVisibleBehind(boolean);
@@ -3636,7 +3639,9 @@
   public static class ActivityManager.AppTask {
     method public void finishAndRemoveTask();
     method public android.app.ActivityManager.RecentTaskInfo getTaskInfo();
+    method public void moveToFront();
     method public void setExcludeFromRecents(boolean);
+    method public void startActivity(android.content.Context, android.content.Intent, android.os.Bundle);
   }
 
   public static class ActivityManager.MemoryInfo implements android.os.Parcelable {
@@ -5511,8 +5516,8 @@
     field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM = "android.app.extra.DEVICE_ADMIN_PACKAGE_CHECKSUM";
     field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADER = "android.app.extra.DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADER";
     field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION = "android.app.extra.DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION";
-    field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME = "android.app.extra.DEVICE_ADMIN_PACKAGE_NAME";
-    field public static final java.lang.String EXTRA_PROVISIONING_EMAIL_ADDRESS = "android.app.extra.MANAGED_PROFILE_EMAIL_ADDRESS";
+    field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME = "android.app.extra.deviceAdminPackageName";
+    field public static final java.lang.String EXTRA_PROVISIONING_EMAIL_ADDRESS = "android.app.extra.ManagedProfileEmailAddress";
     field public static final java.lang.String EXTRA_PROVISIONING_LOCALE = "android.app.extra.LOCALE";
     field public static final java.lang.String EXTRA_PROVISIONING_LOCAL_TIME = "android.app.extra.LOCAL_TIME";
     field public static final java.lang.String EXTRA_PROVISIONING_TIME_ZONE = "android.app.extra.TIME_ZONE";
@@ -5716,8 +5721,9 @@
 
   public static final class UsageEvents.Event {
     ctor public UsageEvents.Event();
-    method public android.content.ComponentName getComponent();
+    method public java.lang.String getClassName();
     method public int getEventType();
+    method public java.lang.String getPackageName();
     method public long getTimeStamp();
     field public static final int MOVE_TO_BACKGROUND = 2; // 0x2
     field public static final int MOVE_TO_FOREGROUND = 1; // 0x1
@@ -7334,7 +7340,6 @@
     field public static final java.lang.String DISPLAY_SERVICE = "display";
     field public static final java.lang.String DOWNLOAD_SERVICE = "download";
     field public static final java.lang.String DROPBOX_SERVICE = "dropbox";
-    field public static final java.lang.String FINGERPRINT_SERVICE = "fingerprint";
     field public static final java.lang.String INPUT_METHOD_SERVICE = "input_method";
     field public static final java.lang.String INPUT_SERVICE = "input";
     field public static final java.lang.String JOB_SCHEDULER_SERVICE = "jobscheduler";
@@ -8666,6 +8671,7 @@
   }
 
   public class PackageInstaller {
+    method public void abandonSession(int);
     method public void addSessionCallback(android.content.pm.PackageInstaller.SessionCallback);
     method public void addSessionCallback(android.content.pm.PackageInstaller.SessionCallback, android.os.Handler);
     method public int createSession(android.content.pm.PackageInstaller.SessionParams) throws java.io.IOException;
@@ -8902,6 +8908,7 @@
     field public static final java.lang.String FEATURE_SENSOR_COMPASS = "android.hardware.sensor.compass";
     field public static final java.lang.String FEATURE_SENSOR_GYROSCOPE = "android.hardware.sensor.gyroscope";
     field public static final java.lang.String FEATURE_SENSOR_HEART_RATE = "android.hardware.sensor.heartrate";
+    field public static final java.lang.String FEATURE_SENSOR_HEART_RATE_ECG = "android.hardware.sensor.heartrate.ecg";
     field public static final java.lang.String FEATURE_SENSOR_LIGHT = "android.hardware.sensor.light";
     field public static final java.lang.String FEATURE_SENSOR_PROXIMITY = "android.hardware.sensor.proximity";
     field public static final java.lang.String FEATURE_SENSOR_RELATIVE_HUMIDITY = "android.hardware.sensor.relative_humidity";
@@ -17988,7 +17995,6 @@
     field public java.lang.String capabilities;
     field public int frequency;
     field public int level;
-    field public android.net.wifi.passpoint.WifiPasspointInfo passpoint;
     field public long timestamp;
   }
 
@@ -18467,185 +18473,6 @@
 
 }
 
-package android.net.wifi.passpoint {
-
-  public abstract interface IWifiPasspointManager implements android.os.IInterface {
-    method public abstract android.os.Messenger getMessenger() throws android.os.RemoteException;
-    method public abstract int getPasspointState() throws android.os.RemoteException;
-  }
-
-  public class WifiPasspointInfo implements android.os.Parcelable {
-    ctor public WifiPasspointInfo();
-    method public int describeContents();
-    method public void writeToParcel(android.os.Parcel, int);
-    field public static final int ANQP_CAPABILITY = 1; // 0x1
-    field public static final int CELLULAR_NETWORK = 64; // 0x40
-    field public static final int CONNECTION_CAPABILITY = 2048; // 0x800
-    field public static final int DOMAIN_NAME = 128; // 0x80
-    field public static final int HOTSPOT_CAPABILITY = 256; // 0x100
-    field public static final int IP_ADDR_TYPE_AVAILABILITY = 16; // 0x10
-    field public static final int NAI_REALM = 32; // 0x20
-    field public static final int NETWORK_AUTH_TYPE = 4; // 0x4
-    field public static final int OPERATOR_FRIENDLY_NAME = 512; // 0x200
-    field public static final int OSU_PROVIDER = 4096; // 0x1000
-    field public static final int PRESET_ALL = 8191; // 0x1fff
-    field public static final int PRESET_CRED_MATCH = 481; // 0x1e1
-    field public static final int ROAMING_CONSORTIUM = 8; // 0x8
-    field public static final int VENUE_NAME = 2; // 0x2
-    field public static final int WAN_METRICS = 1024; // 0x400
-    field public java.lang.String bssid;
-    field public java.util.List cellularNetworkList;
-    field public java.util.List connectionCapabilityList;
-    field public java.util.List domainNameList;
-    field public android.net.wifi.passpoint.WifiPasspointInfo.IpAddressType ipAddrTypeAvailability;
-    field public java.util.List naiRealmList;
-    field public java.util.List networkAuthTypeList;
-    field public java.lang.String operatorFriendlyName;
-    field public java.util.List osuProviderList;
-    field public java.util.List roamingConsortiumList;
-    field public java.lang.String venueName;
-    field public android.net.wifi.passpoint.WifiPasspointInfo.WanMetrics wanMetrics;
-  }
-
-  public static class WifiPasspointInfo.CellularNetwork {
-    ctor public WifiPasspointInfo.CellularNetwork();
-    field public java.lang.String mcc;
-    field public java.lang.String mnc;
-  }
-
-  public static class WifiPasspointInfo.IpAddressType {
-    ctor public WifiPasspointInfo.IpAddressType();
-    method public int getIpv4Availability();
-    method public int getIpv6Availability();
-    field public static final int IPV4_DOUBLE_NAT = 4; // 0x4
-    field public static final int IPV4_NOT_AVAILABLE = 0; // 0x0
-    field public static final int IPV4_PORT_RESTRICTED = 2; // 0x2
-    field public static final int IPV4_PORT_RESTRICTED_DOUBLE_NAT = 6; // 0x6
-    field public static final int IPV4_PORT_RESTRICTED_SINGLE_NAT = 5; // 0x5
-    field public static final int IPV4_PORT_UNKNOWN = 7; // 0x7
-    field public static final int IPV4_PUBLIC = 1; // 0x1
-    field public static final int IPV4_SINGLE_NAT = 3; // 0x3
-    field public static final int IPV6_AVAILABLE = 1; // 0x1
-    field public static final int IPV6_NOT_AVAILABLE = 0; // 0x0
-    field public static final int IPV6_UNKNOWN = 2; // 0x2
-    field public int availability;
-  }
-
-  public static class WifiPasspointInfo.IpProtoPort {
-    ctor public WifiPasspointInfo.IpProtoPort();
-    field public static final int STATUS_CLOSED = 0; // 0x0
-    field public static final int STATUS_OPEN = 1; // 0x1
-    field public static final int STATUS_UNKNOWN = 2; // 0x2
-    field public int port;
-    field public int proto;
-    field public int status;
-  }
-
-  public static class WifiPasspointInfo.NaiRealm {
-    ctor public WifiPasspointInfo.NaiRealm();
-    field public static final int ENCODING_RFC4282 = 0; // 0x0
-    field public static final int ENCODING_UTF8 = 1; // 0x1
-    field public int encoding;
-    field public java.lang.String realm;
-  }
-
-  public static class WifiPasspointInfo.NetworkAuthType {
-    ctor public WifiPasspointInfo.NetworkAuthType();
-    field public static final int TYPE_DNS_REDIRECTION = 3; // 0x3
-    field public static final int TYPE_HTTP_REDIRECTION = 2; // 0x2
-    field public static final int TYPE_ONLINE_ENROLLMENT = 1; // 0x1
-    field public static final int TYPE_TERMS_AND_CONDITION = 0; // 0x0
-    field public java.lang.String redirectUrl;
-    field public int type;
-  }
-
-  public static class WifiPasspointInfo.WanMetrics {
-    ctor public WifiPasspointInfo.WanMetrics();
-    method public boolean getAtCapacity();
-    method public int getLinkStatus();
-    method public boolean getSymmetricLink();
-    field public static final int STATUS_DOWN = 2; // 0x2
-    field public static final int STATUS_RESERVED = 0; // 0x0
-    field public static final int STATUS_TEST = 3; // 0x3
-    field public static final int STATUS_UP = 1; // 0x1
-    field public int downlinkLoad;
-    field public long downlinkSpeed;
-    field public int lmd;
-    field public int uplinkLoad;
-    field public long uplinkSpeed;
-    field public int wanInfo;
-  }
-
-  public class WifiPasspointManager {
-    ctor public WifiPasspointManager(android.content.Context, android.net.wifi.passpoint.IWifiPasspointManager);
-    method public android.os.Messenger getMessenger();
-    method public android.net.wifi.passpoint.WifiPasspointManager.Channel initialize(android.content.Context, android.os.Looper, android.net.wifi.passpoint.WifiPasspointManager.ChannelListener);
-    method public void requestAnqpInfo(android.net.wifi.passpoint.WifiPasspointManager.Channel, java.util.List<android.net.wifi.ScanResult>, int, android.net.wifi.passpoint.WifiPasspointManager.ActionListener);
-    field public static final java.lang.String PASSPOINT_CRED_CHANGED_ACTION = "android.net.wifi.passpoint.CRED_CHANGE";
-    field public static final java.lang.String PASSPOINT_OSU_AVAILABLE_ACTION = "android.net.wifi.passpoint.OSU_AVAILABLE";
-    field public static final int PASSPOINT_STATE_ACCESS = 3; // 0x3
-    field public static final java.lang.String PASSPOINT_STATE_CHANGED_ACTION = "android.net.wifi.passpoint.STATE_CHANGE";
-    field public static final int PASSPOINT_STATE_DISABLED = 1; // 0x1
-    field public static final int PASSPOINT_STATE_DISCOVERY = 2; // 0x2
-    field public static final int PASSPOINT_STATE_PROVISION = 4; // 0x4
-    field public static final int PASSPOINT_STATE_UNKNOWN = 0; // 0x0
-    field public static final java.lang.String PASSPOINT_USER_REM_REQ_ACTION = "android.net.wifi.passpoint.USER_REM_REQ";
-    field public static final java.lang.String PROTOCOL_DM = "OMA-DM-ClientInitiated";
-    field public static final java.lang.String PROTOCOL_SOAP = "SPP-ClientInitiated";
-    field public static final int REASON_BUSY = 2; // 0x2
-    field public static final int REASON_ERROR = 0; // 0x0
-    field public static final int REASON_INVALID_PARAMETER = 3; // 0x3
-    field public static final int REASON_NOT_TRUSTED = 4; // 0x4
-    field public static final int REASON_WIFI_DISABLED = 1; // 0x1
-    field public static final int REQUEST_ANQP_INFO = 163841; // 0x28001
-    field public static final int REQUEST_ANQP_INFO_FAILED = 163842; // 0x28002
-    field public static final int REQUEST_ANQP_INFO_SUCCEEDED = 163843; // 0x28003
-    field public static final int REQUEST_OSU_ICON = 163844; // 0x28004
-    field public static final int REQUEST_OSU_ICON_FAILED = 163845; // 0x28005
-    field public static final int REQUEST_OSU_ICON_SUCCEEDED = 163846; // 0x28006
-    field public static final int START_OSU = 163847; // 0x28007
-    field public static final int START_OSU_BROWSER = 163848; // 0x28008
-    field public static final int START_OSU_FAILED = 163849; // 0x28009
-    field public static final int START_OSU_SUCCEEDED = 163850; // 0x2800a
-  }
-
-  public static abstract interface WifiPasspointManager.ActionListener {
-    method public abstract void onFailure(int);
-    method public abstract void onSuccess();
-  }
-
-  public static class WifiPasspointManager.Channel {
-  }
-
-  public static abstract interface WifiPasspointManager.ChannelListener {
-    method public abstract void onChannelDisconnected();
-  }
-
-  public static class WifiPasspointManager.ParcelableString implements android.os.Parcelable {
-    ctor public WifiPasspointManager.ParcelableString();
-    method public int describeContents();
-    method public void writeToParcel(android.os.Parcel, int);
-    field public static final android.os.Parcelable.Creator CREATOR;
-    field public java.lang.String string;
-  }
-
-  public class WifiPasspointOsuProvider implements android.os.Parcelable {
-    method public int describeContents();
-    method public void writeToParcel(android.os.Parcel, int);
-    field public static final android.os.Parcelable.Creator CREATOR;
-    field public java.lang.String friendlyName;
-    field public java.lang.Object icon;
-    field public java.lang.String iconFileName;
-    field public int iconHeight;
-    field public java.lang.String iconType;
-    field public int iconWidth;
-    field public java.lang.String osuNai;
-    field public java.lang.String osuService;
-    field public java.lang.String ssid;
-  }
-
-}
-
 package android.nfc {
 
   public class FormatException extends java.lang.Exception {
@@ -24849,6 +24676,7 @@
 
   public static final class ContactsContract.PinnedPositions {
     ctor public ContactsContract.PinnedPositions();
+    method public static void pin(android.content.ContentResolver, long, int);
     method public static void undemote(android.content.ContentResolver, long);
     field public static final int DEMOTED = -1; // 0xffffffff
     field public static final int UNPINNED = 0; // 0x0
@@ -24928,7 +24756,6 @@
     field public static final java.lang.String CONTACT_ID = "contact_id";
     field public static final java.lang.String DATA_SET = "data_set";
     field public static final java.lang.String DELETED = "deleted";
-    field public static final java.lang.String NAME_VERIFIED = "name_verified";
     field public static final java.lang.String RAW_CONTACT_IS_READ_ONLY = "raw_contact_is_read_only";
     field public static final java.lang.String RAW_CONTACT_IS_USER_PROFILE = "raw_contact_is_user_profile";
   }
@@ -27265,51 +27092,6 @@
 
 }
 
-package android.service.fingerprint {
-
-  public class FingerprintManager {
-    method public void enroll(long);
-    method public void enrollCancel();
-    method public boolean enrolledAndEnabled();
-    method public void remove(int);
-    method public void startListening(android.service.fingerprint.FingerprintManagerReceiver);
-    method public void stopListening();
-    field public static final int FINGERPRINT_ACQUIRED = 1; // 0x1
-    field public static final int FINGERPRINT_ACQUIRED_GOOD = 0; // 0x0
-    field public static final int FINGERPRINT_ACQUIRED_IMAGER_DIRTY = 4; // 0x4
-    field public static final int FINGERPRINT_ACQUIRED_INSUFFICIENT = 2; // 0x2
-    field public static final int FINGERPRINT_ACQUIRED_PARTIAL = 1; // 0x1
-    field public static final int FINGERPRINT_ACQUIRED_TOO_FAST = 16; // 0x10
-    field public static final int FINGERPRINT_ACQUIRED_TOO_SLOW = 8; // 0x8
-    field public static final int FINGERPRINT_ERROR = -1; // 0xffffffff
-    field public static final int FINGERPRINT_ERROR_HW_UNAVAILABLE = 1; // 0x1
-    field public static final int FINGERPRINT_ERROR_NO_RECEIVER = -10; // 0xfffffff6
-    field public static final int FINGERPRINT_ERROR_NO_SPACE = 4; // 0x4
-    field public static final int FINGERPRINT_ERROR_TIMEOUT = 3; // 0x3
-    field public static final int FINGERPRINT_ERROR_UNABLE_TO_PROCESS = 2; // 0x2
-    field public static final int FINGERPRINT_PROCESSED = 2; // 0x2
-    field public static final int FINGERPRINT_TEMPLATE_ENROLLING = 3; // 0x3
-    field public static final int FINGERPRINT_TEMPLATE_REMOVED = 4; // 0x4
-  }
-
-  public class FingerprintManagerReceiver {
-    ctor public FingerprintManagerReceiver();
-    method public void onAcquired(int);
-    method public void onEnrollResult(int, int);
-    method public void onError(int);
-    method public void onProcessed(int);
-    method public void onRemoved(int);
-  }
-
-  public class FingerprintUtils {
-    ctor public FingerprintUtils();
-    method public static void addFingerprintIdForUser(int, android.content.ContentResolver, int);
-    method public static int[] getFingerprintIdsForUser(android.content.ContentResolver, int);
-    method public static boolean removeFingerprintIdForUser(int, android.content.ContentResolver, int);
-  }
-
-}
-
 package android.service.notification {
 
   public abstract class NotificationListenerService extends android.app.Service {
@@ -27345,7 +27127,7 @@
     method public java.lang.String getKey();
     method public int getRank();
     method public boolean isAmbient();
-    method public boolean meetsInterruptionFilter();
+    method public boolean matchesInterruptionFilter();
   }
 
   public static class NotificationListenerService.RankingMap implements android.os.Parcelable {
@@ -32011,6 +31793,7 @@
     method public void ensureCapacity(int);
     method public java.util.Set<java.util.Map.Entry<K, V>> entrySet();
     method public V get(java.lang.Object);
+    method public int indexOfKey(java.lang.Object);
     method public boolean isEmpty();
     method public K keyAt(int);
     method public java.util.Set<K> keySet();
@@ -35789,6 +35572,7 @@
     method public android.view.accessibility.AccessibilityWindowInfo getParent();
     method public android.view.accessibility.AccessibilityNodeInfo getRoot();
     method public int getType();
+    method public boolean isAccessibilityFocused();
     method public boolean isActive();
     method public boolean isFocused();
     method public static android.view.accessibility.AccessibilityWindowInfo obtain();
@@ -36615,7 +36399,7 @@
 
   public class CookieManager {
     method public synchronized boolean acceptCookie();
-    method public synchronized boolean acceptThirdPartyCookies(android.webkit.WebView);
+    method public boolean acceptThirdPartyCookies(android.webkit.WebView);
     method public static boolean allowFileSchemeCookies();
     method public void flush();
     method public java.lang.String getCookie(java.lang.String);
diff --git a/api/removed.txt b/api/removed.txt
index 93484de..1b8aef4 100644
--- a/api/removed.txt
+++ b/api/removed.txt
@@ -16,6 +16,14 @@
 
 }
 
+package android.service.notification {
+
+  public static class NotificationListenerService.Ranking {
+    method public boolean meetsInterruptionFilter();
+  }
+
+}
+
 package android.view {
 
   public static class WindowManager.LayoutParams extends android.view.ViewGroup.LayoutParams implements android.os.Parcelable {
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java
index fa59e4b..c06ef0d 100644
--- a/cmds/am/src/com/android/commands/am/Am.java
+++ b/cmds/am/src/com/android/commands/am/Am.java
@@ -26,6 +26,7 @@
 import android.app.IActivityManager;
 import android.app.IInstrumentationWatcher;
 import android.app.Instrumentation;
+import android.app.ProfilerInfo;
 import android.app.UiAutomationConnection;
 import android.content.ComponentName;
 import android.content.IIntentReceiver;
@@ -76,6 +77,8 @@
     private String mReceiverPermission;
 
     private String mProfileFile;
+    private int mSamplingInterval;
+    private boolean mAutoStop;
 
     /**
      * Command-line entry point.
@@ -91,7 +94,7 @@
         out.println(
                 "usage: am [subcommand] [options]\n" +
                 "usage: am start [-D] [-W] [-P <FILE>] [--start-profiler <FILE>]\n" +
-                "               [--R COUNT] [-S] [--opengl-trace]\n" +
+                "               [--sampling INTERVAL] [-R COUNT] [-S] [--opengl-trace]\n" +
                 "               [--user <USER_ID> | current] <INTENT>\n" +
                 "       am startservice [--user <USER_ID> | current] <INTENT>\n" +
                 "       am stopservice [--user <USER_ID> | current] <INTENT>\n" +
@@ -133,6 +136,8 @@
                 "    -D: enable debugging\n" +
                 "    -W: wait for launch to complete\n" +
                 "    --start-profiler <FILE>: start profiler and send results to <FILE>\n" +
+                "    --sampling INTERVAL: use sample profiling with INTERVAL microseconds\n" +
+                "        between samples (use with --start-profiler)\n" +
                 "    -P <FILE>: like above, but profiling stops when app goes idle\n" +
                 "    -R: repeat the activity launch <COUNT> times.  Prior to each repeat,\n" +
                 "        the top activity will be finished.\n" +
@@ -360,6 +365,8 @@
         mStopOption = false;
         mRepeat = 0;
         mProfileFile = null;
+        mSamplingInterval = 0;
+        mAutoStop = false;
         mUserId = defUser;
         Uri data = null;
         String type = null;
@@ -526,10 +533,12 @@
                 mWaitOption = true;
             } else if (opt.equals("-P")) {
                 mProfileFile = nextArgRequired();
-                mStartFlags |= ActivityManager.START_FLAG_AUTO_STOP_PROFILER;
+                mAutoStop = true;
             } else if (opt.equals("--start-profiler")) {
                 mProfileFile = nextArgRequired();
-                mStartFlags &= ~ActivityManager.START_FLAG_AUTO_STOP_PROFILER;
+                mAutoStop = false;
+            } else if (opt.equals("--sampling")) {
+                mSamplingInterval = Integer.parseInt(nextArgRequired());
             } else if (opt.equals("-R")) {
                 mRepeat = Integer.parseInt(nextArgRequired());
             } else if (opt.equals("-S")) {
@@ -685,12 +694,13 @@
                 mAm.forceStopPackage(packageName, mUserId);
                 Thread.sleep(250);
             }
-    
+
             System.out.println("Starting: " + intent);
             intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-    
+
             ParcelFileDescriptor fd = null;
-    
+            ProfilerInfo profilerInfo = null;
+
             if (mProfileFile != null) {
                 try {
                     fd = ParcelFileDescriptor.open(
@@ -702,17 +712,18 @@
                     System.err.println("Error: Unable to open file: " + mProfileFile);
                     return;
                 }
+                profilerInfo = new ProfilerInfo(mProfileFile, fd, mSamplingInterval, mAutoStop);
             }
 
             IActivityManager.WaitResult result = null;
             int res;
             if (mWaitOption) {
                 result = mAm.startActivityAndWait(null, null, intent, mimeType,
-                            null, null, 0, mStartFlags, mProfileFile, fd, null, mUserId);
+                            null, null, 0, mStartFlags, profilerInfo, null, mUserId);
                 res = result.result;
             } else {
                 res = mAm.startActivityAsUser(null, null, intent, mimeType,
-                        null, null, 0, mStartFlags, mProfileFile, fd, null, mUserId);
+                        null, null, 0, mStartFlags, profilerInfo, null, mUserId);
             }
             PrintStream out = mWaitOption ? System.out : System.err;
             boolean launched = false;
@@ -942,7 +953,7 @@
             SystemProperties.set("dalvik.vm.extra-opts", props);
         }
     }
-    
+
     private void runProfile() throws Exception {
         String profileFile = null;
         boolean start = false;
@@ -996,6 +1007,7 @@
         }
 
         ParcelFileDescriptor fd = null;
+        ProfilerInfo profilerInfo = null;
 
         if (start) {
             profileFile = nextArgRequired();
@@ -1009,6 +1021,7 @@
                 System.err.println("Error: Unable to open file: " + profileFile);
                 return;
             }
+            profilerInfo = new ProfilerInfo(profileFile, fd, 0, false);
         }
 
         try {
@@ -1022,7 +1035,7 @@
             } else if (start) {
                 //removeWallOption();
             }
-            if (!mAm.profileControl(process, userId, start, profileFile, fd, profileType)) {
+            if (!mAm.profileControl(process, userId, start, profilerInfo, profileType)) {
                 wall = false;
                 throw new AndroidException("PROFILE FAILED on process " + process);
             }
diff --git a/core/java/android/app/ActionBar.java b/core/java/android/app/ActionBar.java
index b74c824..014a7af 100644
--- a/core/java/android/app/ActionBar.java
+++ b/core/java/android/app/ActionBar.java
@@ -1061,6 +1061,10 @@
         return false;
     }
 
+    /** @hide */
+    public void setWindowTitle(CharSequence title) {
+    }
+
     /**
      * Listener interface for ActionBar navigation events.
      *
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 2e66a4c..c80eeb9 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -4145,10 +4145,9 @@
                 intent.prepareToLeaveProcess();
                 result = ActivityManagerNative.getDefault()
                     .startActivity(mMainThread.getApplicationThread(), getBasePackageName(),
-                            intent, intent.resolveTypeIfNeeded(getContentResolver()),
-                            mToken, mEmbeddedID, requestCode,
-                            ActivityManager.START_FLAG_ONLY_IF_NEEDED, null, null,
-                            options);
+                            intent, intent.resolveTypeIfNeeded(getContentResolver()), mToken,
+                            mEmbeddedID, requestCode, ActivityManager.START_FLAG_ONLY_IF_NEEDED,
+                            null, options);
             } catch (RemoteException e) {
                 // Empty
             }
@@ -4704,6 +4703,26 @@
     }
 
     /**
+     * Ask that the local app instance of this activity be released to free up its memory.
+     * This is asking for the activity to be destroyed, but does <b>not</b> finish the activity --
+     * a new instance of the activity will later be re-created if needed due to the user
+     * navigating back to it.
+     *
+     * @return Returns true if the activity was in a state that it has started the process
+     * of destroying its current instance; returns false if for any reason this could not
+     * be done: it is currently visible to the user, it is already being destroyed, it is
+     * being finished, it hasn't yet saved its state, etc.
+     */
+    public boolean releaseInstance() {
+        try {
+            return ActivityManagerNative.getDefault().releaseActivityInstance(mToken);
+        } catch (RemoteException e) {
+            // Empty
+        }
+        return false;
+    }
+
+    /**
      * Called when an activity you launched exits, giving you the requestCode
      * you started it with, the resultCode it returned, and any additional
      * data from it.  The <var>resultCode</var> will be
@@ -5019,9 +5038,9 @@
                     win.setTitleColor(color);
                 }
             }
-        }
-        if (mActionBar != null) {
-            mActionBar.setTitle(title);
+            if (mActionBar != null) {
+                mActionBar.setWindowTitle(title);
+            }
         }
     }
 
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java
index 2667bcd..ffb9c95 100644
--- a/core/java/android/app/ActivityManager.java
+++ b/core/java/android/app/ActivityManager.java
@@ -67,6 +67,8 @@
     private static String TAG = "ActivityManager";
     private static boolean localLOGV = false;
 
+    private static int gMaxRecentTasks = -1;
+
     private final Context mContext;
     private final Handler mHandler;
 
@@ -193,13 +195,6 @@
     public static final int START_FLAG_OPENGL_TRACES = 1<<2;
 
     /**
-     * Flag for IActivityManaqer.startActivity: if the app is being
-     * launched for profiling, automatically stop the profiler once done.
-     * @hide
-     */
-    public static final int START_FLAG_AUTO_STOP_PROFILER = 1<<3;
-
-    /**
      * Result for IActivityManaqer.broadcastIntent: success!
      * @hide
      */
@@ -449,7 +444,7 @@
         // Really brain dead right now -- just take this from the configured
         // vm heap size, and assume it is in megabytes and thus ends with "m".
         String vmHeapSize = SystemProperties.get("dalvik.vm.heapsize", "16m");
-        return Integer.parseInt(vmHeapSize.substring(0, vmHeapSize.length()-1));
+        return Integer.parseInt(vmHeapSize.substring(0, vmHeapSize.length() - 1));
     }
 
     /**
@@ -480,6 +475,33 @@
     }
 
     /**
+     * Return the maximum number of recents entries that we will maintain and show.
+     * @hide
+     */
+    static public int getMaxRecentTasksStatic() {
+        if (gMaxRecentTasks < 0) {
+            return gMaxRecentTasks = isLowRamDeviceStatic() ? 50 : 100;
+        }
+        return gMaxRecentTasks;
+    }
+
+    /**
+     * Return the default limit on the number of recents that an app can make.
+     * @hide
+     */
+    static public int getDefaultAppRecentsLimitStatic() {
+        return getMaxRecentTasksStatic() / 6;
+    }
+
+    /**
+     * Return the maximum limit on the number of recents that an app can make.
+     * @hide
+     */
+    static public int getMaxAppRecentsLimitStatic() {
+        return getMaxRecentTasksStatic() / 2;
+    }
+
+    /**
      * Information you can set and retrieve about the current activity within the recent task list.
      */
     public static class TaskDescription implements Parcelable {
@@ -796,6 +818,12 @@
     public static final int RECENT_INCLUDE_PROFILES = 0x0004;
 
     /**
+     * Ignores all tasks that are on the home stack.
+     * @hide
+     */
+    public static final int RECENT_IGNORE_HOME_STACK_TASKS = 0x0008;
+
+    /**
      * <p></p>Return a list of the tasks that the user has recently launched, with
      * the most recent being first and older ones after in order.
      *
@@ -1185,13 +1213,13 @@
         public void writeToParcel(Parcel dest, int flags) {
             if (mainThumbnail != null) {
                 dest.writeInt(1);
-                mainThumbnail.writeToParcel(dest, 0);
+                mainThumbnail.writeToParcel(dest, flags);
             } else {
                 dest.writeInt(0);
             }
             if (thumbnailFileDescriptor != null) {
                 dest.writeInt(1);
-                thumbnailFileDescriptor.writeToParcel(dest, 0);
+                thumbnailFileDescriptor.writeToParcel(dest, flags);
             } else {
                 dest.writeInt(0);
             }
@@ -2617,6 +2645,40 @@
         }
 
         /**
+         * Bring this task to the foreground.  If it contains activities, they will be
+         * brought to the foreground with it and their instances re-created if needed.
+         * If it doesn't contain activities, the root activity of the task will be
+         * re-launched.
+         */
+        public void moveToFront() {
+            try {
+                mAppTaskImpl.moveToFront();
+            } catch (RemoteException e) {
+                Slog.e(TAG, "Invalid AppTask", e);
+            }
+        }
+
+        /**
+         * Start an activity in this task.  Brings the task to the foreground.  If this task
+         * is not currently active (that is, its id < 0), then the activity being started
+         * needs to be started as a new task and the Intent's ComponentName must match the
+         * base ComponenentName of the recent task entry.  Otherwise, the activity being
+         * started must <b>not</b> be launched as a new task -- not through explicit intent
+         * flags nor implicitly as the singleTask or singleInstance launch modes.
+         *
+         * <p>See {@link Activity#startActivity(android.content.Intent, android.os.Bundle)
+         * Activity.startActivity} for more information.</p>
+         *
+         * @param intent The Intent describing the new activity to be launched on the task.
+         * @param options Optional launch options.
+         */
+        public void startActivity(Context context, Intent intent, Bundle options) {
+            ActivityThread thread = ActivityThread.currentActivityThread();
+            thread.getInstrumentation().execStartActivityFromAppTask(context,
+                    thread.getApplicationThread(), mAppTaskImpl, intent, options);
+        }
+
+        /**
          * Modify the {@link Intent#FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS} flag in the root
          * Intent of this AppTask.
          *
diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java
index 82af99b..1f7e450 100644
--- a/core/java/android/app/ActivityManagerNative.java
+++ b/core/java/android/app/ActivityManagerNative.java
@@ -17,6 +17,7 @@
 package android.app;
 
 import android.app.ActivityManager.StackInfo;
+import android.app.ProfilerInfo;
 import android.content.ComponentName;
 import android.content.IIntentReceiver;
 import android.content.IIntentSender;
@@ -132,14 +133,12 @@
             String resultWho = data.readString();
             int requestCode = data.readInt();
             int startFlags = data.readInt();
-            String profileFile = data.readString();
-            ParcelFileDescriptor profileFd = data.readInt() != 0
-                    ? data.readFileDescriptor() : null;
+            ProfilerInfo profilerInfo = data.readInt() != 0
+                    ? ProfilerInfo.CREATOR.createFromParcel(data) : null;
             Bundle options = data.readInt() != 0
                     ? Bundle.CREATOR.createFromParcel(data) : null;
             int result = startActivity(app, callingPackage, intent, resolvedType,
-                    resultTo, resultWho, requestCode, startFlags,
-                    profileFile, profileFd, options);
+                    resultTo, resultWho, requestCode, startFlags, profilerInfo, options);
             reply.writeNoException();
             reply.writeInt(result);
             return true;
@@ -157,15 +156,13 @@
             String resultWho = data.readString();
             int requestCode = data.readInt();
             int startFlags = data.readInt();
-            String profileFile = data.readString();
-            ParcelFileDescriptor profileFd = data.readInt() != 0
-                    ? ParcelFileDescriptor.CREATOR.createFromParcel(data) : null;
+            ProfilerInfo profilerInfo = data.readInt() != 0
+                    ? ProfilerInfo.CREATOR.createFromParcel(data) : null;
             Bundle options = data.readInt() != 0
                     ? Bundle.CREATOR.createFromParcel(data) : null;
             int userId = data.readInt();
             int result = startActivityAsUser(app, callingPackage, intent, resolvedType,
-                    resultTo, resultWho, requestCode, startFlags,
-                    profileFile, profileFd, options, userId);
+                    resultTo, resultWho, requestCode, startFlags, profilerInfo, options, userId);
             reply.writeNoException();
             reply.writeInt(result);
             return true;
@@ -183,14 +180,12 @@
             String resultWho = data.readString();
             int requestCode = data.readInt();
             int startFlags = data.readInt();
-            String profileFile = data.readString();
-            ParcelFileDescriptor profileFd = data.readInt() != 0
-                    ? data.readFileDescriptor() : null;
+            ProfilerInfo profilerInfo = data.readInt() != 0
+                    ? ProfilerInfo.CREATOR.createFromParcel(data) : null;
             Bundle options = data.readInt() != 0
                     ? Bundle.CREATOR.createFromParcel(data) : null;
             int result = startActivityAsCaller(app, callingPackage, intent, resolvedType,
-                    resultTo, resultWho, requestCode, startFlags,
-                    profileFile, profileFd, options);
+                    resultTo, resultWho, requestCode, startFlags, profilerInfo, options);
             reply.writeNoException();
             reply.writeInt(result);
             return true;
@@ -208,15 +203,13 @@
             String resultWho = data.readString();
             int requestCode = data.readInt();
             int startFlags = data.readInt();
-            String profileFile = data.readString();
-            ParcelFileDescriptor profileFd = data.readInt() != 0
-                    ? ParcelFileDescriptor.CREATOR.createFromParcel(data) : null;
+            ProfilerInfo profilerInfo = data.readInt() != 0
+                    ? ProfilerInfo.CREATOR.createFromParcel(data) : null;
             Bundle options = data.readInt() != 0
                     ? Bundle.CREATOR.createFromParcel(data) : null;
             int userId = data.readInt();
             WaitResult result = startActivityAndWait(app, callingPackage, intent, resolvedType,
-                    resultTo, resultWho, requestCode, startFlags,
-                    profileFile, profileFd, options, userId);
+                    resultTo, resultWho, requestCode, startFlags, profilerInfo, options, userId);
             reply.writeNoException();
             result.writeToParcel(reply, 0);
             return true;
@@ -284,15 +277,13 @@
             IVoiceInteractor interactor = IVoiceInteractor.Stub.asInterface(
                     data.readStrongBinder());
             int startFlags = data.readInt();
-            String profileFile = data.readString();
-            ParcelFileDescriptor profileFd = data.readInt() != 0
-                    ? ParcelFileDescriptor.CREATOR.createFromParcel(data) : null;
+            ProfilerInfo profilerInfo = data.readInt() != 0
+                    ? ProfilerInfo.CREATOR.createFromParcel(data) : null;
             Bundle options = data.readInt() != 0
                     ? Bundle.CREATOR.createFromParcel(data) : null;
             int userId = data.readInt();
-            int result = startVoiceActivity(callingPackage, callingPid, callingUid,
-                    intent, resolvedType, session, interactor, startFlags,
-                    profileFile, profileFd, options, userId);
+            int result = startVoiceActivity(callingPackage, callingPid, callingUid, intent,
+                    resolvedType, session, interactor, startFlags, profilerInfo, options, userId);
             reply.writeNoException();
             reply.writeInt(result);
             return true;
@@ -365,6 +356,23 @@
             return true;
         }
 
+        case RELEASE_ACTIVITY_INSTANCE_TRANSACTION: {
+            data.enforceInterface(IActivityManager.descriptor);
+            IBinder token = data.readStrongBinder();
+            boolean res = releaseActivityInstance(token);
+            reply.writeNoException();
+            reply.writeInt(res ? 1 : 0);
+            return true;
+        }
+
+        case RELEASE_SOME_ACTIVITIES_TRANSACTION: {
+            data.enforceInterface(IActivityManager.descriptor);
+            IApplicationThread app = ApplicationThreadNative.asInterface(data.readStrongBinder());
+            releaseSomeActivities(app);
+            reply.writeNoException();
+            return true;
+        }
+
         case WILL_ACTIVITY_BE_VISIBLE_TRANSACTION: {
             data.enforceInterface(IActivityManager.descriptor);
             IBinder token = data.readStrongBinder();
@@ -1384,8 +1392,9 @@
             data.enforceInterface(IActivityManager.descriptor);
             IBinder app = data.readStrongBinder();
             String tag = data.readString();
+            boolean system = data.readInt() != 0;
             ApplicationErrorReport.CrashInfo ci = new ApplicationErrorReport.CrashInfo(data);
-            boolean res = handleApplicationWtf(app, tag, ci);
+            boolean res = handleApplicationWtf(app, tag, system, ci);
             reply.writeNoException();
             reply.writeInt(res ? 1 : 0);
             return true;
@@ -1451,22 +1460,21 @@
             config.writeToParcel(reply, 0);
             return true;
         }
-        
+
         case PROFILE_CONTROL_TRANSACTION: {
             data.enforceInterface(IActivityManager.descriptor);
             String process = data.readString();
             int userId = data.readInt();
             boolean start = data.readInt() != 0;
             int profileType = data.readInt();
-            String path = data.readString();
-            ParcelFileDescriptor fd = data.readInt() != 0
-                    ? ParcelFileDescriptor.CREATOR.createFromParcel(data) : null;
-            boolean res = profileControl(process, userId, start, path, fd, profileType);
+            ProfilerInfo profilerInfo = data.readInt() != 0
+                    ? ProfilerInfo.CREATOR.createFromParcel(data) : null;
+            boolean res = profileControl(process, userId, start, profilerInfo, profileType);
             reply.writeNoException();
             reply.writeInt(res ? 1 : 0);
             return true;
         }
-        
+
         case SHUTDOWN_TRANSACTION: {
             data.enforceInterface(IActivityManager.descriptor);
             boolean res = shutdown(data.readInt());
@@ -2326,8 +2334,7 @@
 
     public int startActivity(IApplicationThread caller, String callingPackage, Intent intent,
             String resolvedType, IBinder resultTo, String resultWho, int requestCode,
-            int startFlags, String profileFile,
-            ParcelFileDescriptor profileFd, Bundle options) throws RemoteException {
+            int startFlags, ProfilerInfo profilerInfo, Bundle options) throws RemoteException {
         Parcel data = Parcel.obtain();
         Parcel reply = Parcel.obtain();
         data.writeInterfaceToken(IActivityManager.descriptor);
@@ -2339,10 +2346,9 @@
         data.writeString(resultWho);
         data.writeInt(requestCode);
         data.writeInt(startFlags);
-        data.writeString(profileFile);
-        if (profileFd != null) {
+        if (profilerInfo != null) {
             data.writeInt(1);
-            profileFd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
+            profilerInfo.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
         } else {
             data.writeInt(0);
         }
@@ -2362,8 +2368,8 @@
 
     public int startActivityAsUser(IApplicationThread caller, String callingPackage, Intent intent,
             String resolvedType, IBinder resultTo, String resultWho, int requestCode,
-            int startFlags, String profileFile,
-            ParcelFileDescriptor profileFd, Bundle options, int userId) throws RemoteException {
+            int startFlags, ProfilerInfo profilerInfo, Bundle options,
+            int userId) throws RemoteException {
         Parcel data = Parcel.obtain();
         Parcel reply = Parcel.obtain();
         data.writeInterfaceToken(IActivityManager.descriptor);
@@ -2375,10 +2381,9 @@
         data.writeString(resultWho);
         data.writeInt(requestCode);
         data.writeInt(startFlags);
-        data.writeString(profileFile);
-        if (profileFd != null) {
+        if (profilerInfo != null) {
             data.writeInt(1);
-            profileFd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
+            profilerInfo.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
         } else {
             data.writeInt(0);
         }
@@ -2398,8 +2403,7 @@
     }
     public int startActivityAsCaller(IApplicationThread caller, String callingPackage,
             Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode,
-            int startFlags, String profileFile,
-            ParcelFileDescriptor profileFd, Bundle options) throws RemoteException {
+            int startFlags, ProfilerInfo profilerInfo, Bundle options) throws RemoteException {
         Parcel data = Parcel.obtain();
         Parcel reply = Parcel.obtain();
         data.writeInterfaceToken(IActivityManager.descriptor);
@@ -2411,10 +2415,9 @@
         data.writeString(resultWho);
         data.writeInt(requestCode);
         data.writeInt(startFlags);
-        data.writeString(profileFile);
-        if (profileFd != null) {
+        if (profilerInfo != null) {
             data.writeInt(1);
-            profileFd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
+            profilerInfo.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
         } else {
             data.writeInt(0);
         }
@@ -2433,8 +2436,8 @@
     }
     public WaitResult startActivityAndWait(IApplicationThread caller, String callingPackage,
             Intent intent, String resolvedType, IBinder resultTo, String resultWho,
-            int requestCode, int startFlags, String profileFile,
-            ParcelFileDescriptor profileFd, Bundle options, int userId) throws RemoteException {
+            int requestCode, int startFlags, ProfilerInfo profilerInfo, Bundle options,
+            int userId) throws RemoteException {
         Parcel data = Parcel.obtain();
         Parcel reply = Parcel.obtain();
         data.writeInterfaceToken(IActivityManager.descriptor);
@@ -2446,10 +2449,9 @@
         data.writeString(resultWho);
         data.writeInt(requestCode);
         data.writeInt(startFlags);
-        data.writeString(profileFile);
-        if (profileFd != null) {
+        if (profilerInfo != null) {
             data.writeInt(1);
-            profileFd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
+            profilerInfo.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
         } else {
             data.writeInt(0);
         }
@@ -2533,8 +2535,8 @@
     }
     public int startVoiceActivity(String callingPackage, int callingPid, int callingUid,
             Intent intent, String resolvedType, IVoiceInteractionSession session,
-            IVoiceInteractor interactor, int startFlags, String profileFile,
-            ParcelFileDescriptor profileFd, Bundle options, int userId) throws RemoteException {
+            IVoiceInteractor interactor, int startFlags, ProfilerInfo profilerInfo,
+            Bundle options, int userId) throws RemoteException {
         Parcel data = Parcel.obtain();
         Parcel reply = Parcel.obtain();
         data.writeInterfaceToken(IActivityManager.descriptor);
@@ -2546,10 +2548,9 @@
         data.writeStrongBinder(session.asBinder());
         data.writeStrongBinder(interactor.asBinder());
         data.writeInt(startFlags);
-        data.writeString(profileFile);
-        if (profileFd != null) {
+        if (profilerInfo != null) {
             data.writeInt(1);
-            profileFd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
+            profilerInfo.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
         } else {
             data.writeInt(0);
         }
@@ -2661,6 +2662,28 @@
         data.recycle();
         reply.recycle();
     }
+    public boolean releaseActivityInstance(IBinder token) throws RemoteException {
+        Parcel data = Parcel.obtain();
+        Parcel reply = Parcel.obtain();
+        data.writeInterfaceToken(IActivityManager.descriptor);
+        data.writeStrongBinder(token);
+        mRemote.transact(RELEASE_ACTIVITY_INSTANCE_TRANSACTION, data, reply, 0);
+        reply.readException();
+        boolean res = reply.readInt() != 0;
+        data.recycle();
+        reply.recycle();
+        return res;
+    }
+    public void releaseSomeActivities(IApplicationThread app) throws RemoteException {
+        Parcel data = Parcel.obtain();
+        Parcel reply = Parcel.obtain();
+        data.writeInterfaceToken(IActivityManager.descriptor);
+        data.writeStrongBinder(app.asBinder());
+        mRemote.transact(RELEASE_SOME_ACTIVITIES_TRANSACTION, data, reply, 0);
+        reply.readException();
+        data.recycle();
+        reply.recycle();
+    }
     public boolean willActivityBeVisible(IBinder token) throws RemoteException {
         Parcel data = Parcel.obtain();
         Parcel reply = Parcel.obtain();
@@ -4047,7 +4070,7 @@
         data.recycle();
     }
 
-    public boolean handleApplicationWtf(IBinder app, String tag,
+    public boolean handleApplicationWtf(IBinder app, String tag, boolean system,
             ApplicationErrorReport.CrashInfo crashInfo) throws RemoteException
     {
         Parcel data = Parcel.obtain();
@@ -4055,6 +4078,7 @@
         data.writeInterfaceToken(IActivityManager.descriptor);
         data.writeStrongBinder(app);
         data.writeString(tag);
+        data.writeInt(system ? 1 : 0);
         crashInfo.writeToParcel(data, 0);
         mRemote.transact(HANDLE_APPLICATION_WTF_TRANSACTION, data, reply, 0);
         reply.readException();
@@ -4150,9 +4174,9 @@
         data.recycle();
         return res;
     }
-    
+
     public boolean profileControl(String process, int userId, boolean start,
-            String path, ParcelFileDescriptor fd, int profileType) throws RemoteException
+            ProfilerInfo profilerInfo, int profileType) throws RemoteException
     {
         Parcel data = Parcel.obtain();
         Parcel reply = Parcel.obtain();
@@ -4161,10 +4185,9 @@
         data.writeInt(userId);
         data.writeInt(start ? 1 : 0);
         data.writeInt(profileType);
-        data.writeString(path);
-        if (fd != null) {
+        if (profilerInfo != null) {
             data.writeInt(1);
-            fd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
+            profilerInfo.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
         } else {
             data.writeInt(0);
         }
@@ -4175,7 +4198,7 @@
         data.recycle();
         return res;
     }
-    
+
     public boolean shutdown(int timeout) throws RemoteException
     {
         Parcel data = Parcel.obtain();
diff --git a/core/java/android/app/ActivityOptions.java b/core/java/android/app/ActivityOptions.java
index 0653ca9d..9dd4605 100644
--- a/core/java/android/app/ActivityOptions.java
+++ b/core/java/android/app/ActivityOptions.java
@@ -128,6 +128,10 @@
     public static final int ANIM_DEFAULT = 6;
     /** @hide */
     public static final int ANIM_LAUNCH_TASK_BEHIND = 7;
+    /** @hide */
+    public static final int ANIM_THUMBNAIL_ASPECT_SCALE_UP = 8;
+    /** @hide */
+    public static final int ANIM_THUMBNAIL_ASPECT_SCALE_DOWN = 9;
 
     private String mPackageName;
     private int mAnimationType = ANIM_NONE;
@@ -338,6 +342,67 @@
     }
 
     /**
+     * Create an ActivityOptions specifying an animation where the new activity
+     * window and a thumbnail is aspect-scaled to a new location.
+     *
+     * @param source The View that this thumbnail is animating from.  This
+     * defines the coordinate space for <var>startX</var> and <var>startY</var>.
+     * @param thumbnail The bitmap that will be shown as the initial thumbnail
+     * of the animation.
+     * @param startX The x starting location of the bitmap, relative to <var>source</var>.
+     * @param startY The y starting location of the bitmap, relative to <var>source</var>.
+     * @param listener Optional OnAnimationStartedListener to find out when the
+     * requested animation has started running.  If for some reason the animation
+     * is not executed, the callback will happen immediately.
+     * @return Returns a new ActivityOptions object that you can use to
+     * supply these options as the options Bundle when starting an activity.
+     * @hide
+     */
+    public static ActivityOptions makeThumbnailAspectScaleUpAnimation(View source,
+            Bitmap thumbnail, int startX, int startY, OnAnimationStartedListener listener) {
+        return makeAspectScaledThumbnailAnimation(source, thumbnail, startX, startY, listener,
+                true);
+    }
+
+    /**
+     * Create an ActivityOptions specifying an animation where the new activity
+     * window and a thumbnail is aspect-scaled to a new location.
+     *
+     * @param source The View that this thumbnail is animating to.  This
+     * defines the coordinate space for <var>startX</var> and <var>startY</var>.
+     * @param thumbnail The bitmap that will be shown as the final thumbnail
+     * of the animation.
+     * @param startX The x end location of the bitmap, relative to <var>source</var>.
+     * @param startY The y end location of the bitmap, relative to <var>source</var>.
+     * @param listener Optional OnAnimationStartedListener to find out when the
+     * requested animation has started running.  If for some reason the animation
+     * is not executed, the callback will happen immediately.
+     * @return Returns a new ActivityOptions object that you can use to
+     * supply these options as the options Bundle when starting an activity.
+     * @hide
+     */
+    public static ActivityOptions makeThumbnailAspectScaleDownAnimation(View source,
+            Bitmap thumbnail, int startX, int startY, OnAnimationStartedListener listener) {
+        return makeAspectScaledThumbnailAnimation(source, thumbnail, startX, startY, listener,
+                false);
+    }
+
+    private static ActivityOptions makeAspectScaledThumbnailAnimation(View source, Bitmap thumbnail,
+            int startX, int startY, OnAnimationStartedListener listener, boolean scaleUp) {
+        ActivityOptions opts = new ActivityOptions();
+        opts.mPackageName = source.getContext().getPackageName();
+        opts.mAnimationType = scaleUp ? ANIM_THUMBNAIL_ASPECT_SCALE_UP :
+                ANIM_THUMBNAIL_ASPECT_SCALE_DOWN;
+        opts.mThumbnail = thumbnail;
+        int[] pts = new int[2];
+        source.getLocationOnScreen(pts);
+        opts.mStartX = pts[0] + startX;
+        opts.mStartY = pts[1] + startY;
+        opts.setOnAnimationStartedListener(source.getHandler(), listener);
+        return opts;
+    }
+
+    /**
      * Create an ActivityOptions to transition between Activities using cross-Activity scene
      * animations. This method carries the position of one shared element to the started Activity.
      * The position of <code>sharedElement</code> will be used as the epicenter for the
@@ -484,7 +549,9 @@
 
             case ANIM_THUMBNAIL_SCALE_UP:
             case ANIM_THUMBNAIL_SCALE_DOWN:
-                mThumbnail = (Bitmap)opts.getParcelable(KEY_ANIM_THUMBNAIL);
+            case ANIM_THUMBNAIL_ASPECT_SCALE_UP:
+            case ANIM_THUMBNAIL_ASPECT_SCALE_DOWN:
+                mThumbnail = (Bitmap) opts.getParcelable(KEY_ANIM_THUMBNAIL);
                 mStartX = opts.getInt(KEY_ANIM_START_X, 0);
                 mStartY = opts.getInt(KEY_ANIM_START_Y, 0);
                 mAnimationStartedListener = IRemoteCallback.Stub.asInterface(
@@ -635,6 +702,8 @@
                 break;
             case ANIM_THUMBNAIL_SCALE_UP:
             case ANIM_THUMBNAIL_SCALE_DOWN:
+            case ANIM_THUMBNAIL_ASPECT_SCALE_UP:
+            case ANIM_THUMBNAIL_ASPECT_SCALE_DOWN:
                 mThumbnail = otherOptions.mThumbnail;
                 mStartX = otherOptions.mStartX;
                 mStartY = otherOptions.mStartY;
@@ -691,6 +760,8 @@
                 break;
             case ANIM_THUMBNAIL_SCALE_UP:
             case ANIM_THUMBNAIL_SCALE_DOWN:
+            case ANIM_THUMBNAIL_ASPECT_SCALE_UP:
+            case ANIM_THUMBNAIL_ASPECT_SCALE_DOWN:
                 b.putParcelable(KEY_ANIM_THUMBNAIL, mThumbnail);
                 b.putInt(KEY_ANIM_START_X, mStartX);
                 b.putInt(KEY_ANIM_START_Y, mStartY);
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 2136209..d70e5df 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -102,8 +102,6 @@
 import com.android.org.conscrypt.TrustedCertificateStore;
 import com.google.android.collect.Lists;
 
-import dalvik.system.VMRuntime;
-
 import java.io.File;
 import java.io.FileDescriptor;
 import java.io.FileOutputStream;
@@ -126,6 +124,7 @@
 import libcore.io.IoUtils;
 
 import dalvik.system.CloseGuard;
+import dalvik.system.VMDebug;
 import dalvik.system.VMRuntime;
 
 final class RemoteServiceException extends AndroidRuntimeException {
@@ -201,6 +200,7 @@
     String mInstrumentedLibDir = null;
     boolean mSystemThread = false;
     boolean mJitEnabled = false;
+    boolean mSomeActivitiesChanged = false;
 
     // These can be accessed by multiple threads; mPackages is the lock.
     // XXX For now we keep around information about all packages we have
@@ -283,9 +283,7 @@
         Configuration createdConfig;
         ActivityClientRecord nextIdle;
 
-        String profileFile;
-        ParcelFileDescriptor profileFd;
-        boolean autoStopProfiler;
+        ProfilerInfo profilerInfo;
 
         ActivityInfo activityInfo;
         CompatibilityInfo compatInfo;
@@ -437,9 +435,7 @@
         CompatibilityInfo compatInfo;
 
         /** Initial values for {@link Profiler}. */
-        String initProfileFile;
-        ParcelFileDescriptor initProfileFd;
-        boolean initAutoStopProfiler;
+        ProfilerInfo initProfilerInfo;
 
         public String toString() {
             return "AppBindData{appInfo=" + appInfo + "}";
@@ -449,10 +445,12 @@
     static final class Profiler {
         String profileFile;
         ParcelFileDescriptor profileFd;
+        int samplingInterval;
         boolean autoStopProfiler;
         boolean profiling;
         boolean handlingProfiling;
-        public void setProfiler(String file, ParcelFileDescriptor fd) {
+        public void setProfiler(ProfilerInfo profilerInfo) {
+            ParcelFileDescriptor fd = profilerInfo.profileFd;
             if (profiling) {
                 if (fd != null) {
                     try {
@@ -470,16 +468,18 @@
                     // Ignore
                 }
             }
-            profileFile = file;
+            profileFile = profilerInfo.profileFile;
             profileFd = fd;
+            samplingInterval = profilerInfo.samplingInterval;
+            autoStopProfiler = profilerInfo.autoStopProfiler;
         }
         public void startProfiling() {
             if (profileFd == null || profiling) {
                 return;
             }
             try {
-                Debug.startMethodTracing(profileFile, profileFd.getFileDescriptor(),
-                        8 * 1024 * 1024, 0);
+                VMDebug.startMethodTracing(profileFile, profileFd.getFileDescriptor(),
+                        8 * 1024 * 1024, 0, samplingInterval != 0, samplingInterval);
                 profiling = true;
             } catch (RuntimeException e) {
                 Slog.w(TAG, "Profiling failed on path " + profileFile);
@@ -528,11 +528,6 @@
         String who;
     }
 
-    static final class ProfilerControlData {
-        String path;
-        ParcelFileDescriptor fd;
-    }
-
     static final class DumpHeapData {
         String path;
         ParcelFileDescriptor fd;
@@ -613,7 +608,7 @@
                 IVoiceInteractor voiceInteractor, int procState, Bundle state,
                 PersistableBundle persistentState, List<ResultInfo> pendingResults,
                 List<Intent> pendingNewIntents, boolean notResumed, boolean isForward,
-                String profileName, ParcelFileDescriptor profileFd, boolean autoStopProfiler) {
+                ProfilerInfo profilerInfo) {
 
             updateProcessState(procState, false);
 
@@ -634,9 +629,7 @@
             r.startsNotResumed = notResumed;
             r.isForward = isForward;
 
-            r.profileFile = profileName;
-            r.profileFd = profileFd;
-            r.autoStopProfiler = autoStopProfiler;
+            r.profilerInfo = profilerInfo;
 
             updatePendingConfiguration(curConfig);
 
@@ -743,11 +736,10 @@
             sendMessage(H.STOP_SERVICE, token);
         }
 
-        public final void bindApplication(String processName,
-                ApplicationInfo appInfo, List<ProviderInfo> providers,
-                ComponentName instrumentationName, String profileFile,
-                ParcelFileDescriptor profileFd, boolean autoStopProfiler,
-                Bundle instrumentationArgs, IInstrumentationWatcher instrumentationWatcher,
+        public final void bindApplication(String processName, ApplicationInfo appInfo,
+                List<ProviderInfo> providers, ComponentName instrumentationName,
+                ProfilerInfo profilerInfo, Bundle instrumentationArgs,
+                IInstrumentationWatcher instrumentationWatcher,
                 IUiAutomationConnection instrumentationUiConnection, int debugMode,
                 boolean enableOpenGlTrace, boolean isRestrictedBackupMode, boolean persistent,
                 Configuration config, CompatibilityInfo compatInfo, Map<String, IBinder> services,
@@ -811,9 +803,7 @@
             data.persistent = persistent;
             data.config = config;
             data.compatInfo = compatInfo;
-            data.initProfileFile = profileFile;
-            data.initProfileFd = profileFd;
-            data.initAutoStopProfiler = false;
+            data.initProfilerInfo = profilerInfo;
             sendMessage(H.BIND_APPLICATION, data);
         }
 
@@ -879,12 +869,8 @@
             sendMessage(H.ACTIVITY_CONFIGURATION_CHANGED, token);
         }
 
-        public void profilerControl(boolean start, String path, ParcelFileDescriptor fd,
-                int profileType) {
-            ProfilerControlData pcd = new ProfilerControlData();
-            pcd.path = path;
-            pcd.fd = fd;
-            sendMessage(H.PROFILER_CONTROL, pcd, start ? 1 : 0, profileType);
+        public void profilerControl(boolean start, ProfilerInfo profilerInfo, int profileType) {
+            sendMessage(H.PROFILER_CONTROL, profilerInfo, start ? 1 : 0, profileType);
         }
 
         public void dumpHeap(boolean managed, String path, ParcelFileDescriptor fd) {
@@ -1418,7 +1404,7 @@
                     Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
                     break;
                 case PROFILER_CONTROL:
-                    handleProfilerControl(msg.arg1 != 0, (ProfilerControlData)msg.obj, msg.arg2);
+                    handleProfilerControl(msg.arg1 != 0, (ProfilerInfo)msg.obj, msg.arg2);
                     break;
                 case CREATE_BACKUP_AGENT:
                     Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "backupCreateAgent");
@@ -2353,11 +2339,11 @@
         // If we are getting ready to gc after going to the background, well
         // we are back active so skip it.
         unscheduleGcIdler();
+        mSomeActivitiesChanged = true;
 
-        if (r.profileFd != null) {
-            mProfiler.setProfiler(r.profileFile, r.profileFd);
+        if (r.profilerInfo != null) {
+            mProfiler.setProfiler(r.profilerInfo);
             mProfiler.startProfiling();
-            mProfiler.autoStopProfiler = r.autoStopProfiler;
         }
 
         // Make sure we are running with the most recent config.
@@ -2495,6 +2481,7 @@
     public void handleCancelVisibleBehind(IBinder token) {
         ActivityClientRecord r = mActivities.get(token);
         if (r != null) {
+            mSomeActivitiesChanged = true;
             final Activity activity = r.activity;
             if (activity.mVisibleBehind) {
                 activity.mCalled = false;
@@ -2984,6 +2971,7 @@
         // If we are getting ready to gc after going to the background, well
         // we are back active so skip it.
         unscheduleGcIdler();
+        mSomeActivitiesChanged = true;
 
         // TODO Push resumeArgs into the activity for consideration
         ActivityClientRecord r = performResumeActivity(token, clearHide);
@@ -3175,6 +3163,7 @@
                 ActivityManagerNative.getDefault().activityPaused(token, r.persistentState);
             } catch (RemoteException ex) {
             }
+            mSomeActivitiesChanged = true;
         }
     }
 
@@ -3413,6 +3402,7 @@
         info.state = r.state;
         info.persistentState = r.persistentState;
         mH.post(info);
+        mSomeActivitiesChanged = true;
     }
 
     final void performRestartActivity(IBinder token) {
@@ -3446,6 +3436,7 @@
                 TAG, "Handle window " + r + " visibility: " + show);
             updateVisibility(r, show);
         }
+        mSomeActivitiesChanged = true;
     }
 
     private void handleSleeping(IBinder token, boolean sleeping) {
@@ -3743,6 +3734,7 @@
                 // If the system process has died, it's game over for everyone.
             }
         }
+        mSomeActivitiesChanged = true;
     }
 
     public final void requestRelaunchActivity(IBinder token,
@@ -3805,6 +3797,7 @@
         // If we are getting ready to gc after going to the background, well
         // we are back active so skip it.
         unscheduleGcIdler();
+        mSomeActivitiesChanged = true;
 
         Configuration changedConfig = null;
         int configChanges = 0;
@@ -4107,24 +4100,25 @@
         performConfigurationChanged(r.activity, mCompatConfiguration);
 
         freeTextLayoutCachesIfNeeded(r.activity.mCurrentConfig.diff(mCompatConfiguration));
+
+        mSomeActivitiesChanged = true;
     }
 
-    final void handleProfilerControl(boolean start, ProfilerControlData pcd, int profileType) {
+    final void handleProfilerControl(boolean start, ProfilerInfo profilerInfo, int profileType) {
         if (start) {
             try {
                 switch (profileType) {
-                    default:                        
-                        mProfiler.setProfiler(pcd.path, pcd.fd);
-                        mProfiler.autoStopProfiler = false;
+                    default:
+                        mProfiler.setProfiler(profilerInfo);
                         mProfiler.startProfiling();
                         break;
                 }
             } catch (RuntimeException e) {
-                Slog.w(TAG, "Profiling failed on path " + pcd.path
+                Slog.w(TAG, "Profiling failed on path " + profilerInfo.profileFile
                         + " -- can the process access this path?");
             } finally {
                 try {
-                    pcd.fd.close();
+                    profilerInfo.profileFd.close();
                 } catch (IOException e) {
                     Slog.w(TAG, "Failure closing profile fd", e);
                 }
@@ -4256,9 +4250,12 @@
         mCompatConfiguration = new Configuration(data.config);
 
         mProfiler = new Profiler();
-        mProfiler.profileFile = data.initProfileFile;
-        mProfiler.profileFd = data.initProfileFd;
-        mProfiler.autoStopProfiler = data.initAutoStopProfiler;
+        if (data.initProfilerInfo != null) {
+            mProfiler.profileFile = data.initProfilerInfo.profileFile;
+            mProfiler.profileFd = data.initProfilerInfo.profileFd;
+            mProfiler.samplingInterval = data.initProfilerInfo.samplingInterval;
+            mProfiler.autoStopProfiler = data.initProfilerInfo.autoStopProfiler;
+        }
 
         // send up app name; do this *before* waiting for debugger
         Process.setArgV0(data.processName);
@@ -4273,7 +4270,7 @@
                 HardwareRenderer.disable(false);
             }
         }
-        
+
         if (mProfiler.profileFd != null) {
             mProfiler.startProfiling();
         }
@@ -5045,17 +5042,38 @@
             android.ddm.DdmHandleAppName.setAppName("<pre-initialized>",
                                                     UserHandle.myUserId());
             RuntimeInit.setApplicationObject(mAppThread.asBinder());
-            IActivityManager mgr = ActivityManagerNative.getDefault();
+            final IActivityManager mgr = ActivityManagerNative.getDefault();
             try {
                 mgr.attachApplication(mAppThread);
             } catch (RemoteException ex) {
                 // Ignore
             }
+            // Watch for getting close to heap limit.
+            BinderInternal.addGcWatcher(new Runnable() {
+                @Override public void run() {
+                    if (!mSomeActivitiesChanged) {
+                        return;
+                    }
+                    Runtime runtime = Runtime.getRuntime();
+                    long dalvikMax = runtime.maxMemory();
+                    long dalvikUsed = runtime.totalMemory() - runtime.freeMemory();
+                    if (dalvikUsed > ((3*dalvikMax)/4)) {
+                        if (DEBUG_MEMORY_TRIM) Slog.d(TAG, "Dalvik max=" + (dalvikMax/1024)
+                                + " total=" + (runtime.totalMemory()/1024)
+                                + " used=" + (dalvikUsed/1024));
+                        mSomeActivitiesChanged = false;
+                        try {
+                            mgr.releaseSomeActivities(mAppThread);
+                        } catch (RemoteException e) {
+                        }
+                    }
+                }
+            });
         } else {
             // Don't set application object here -- if the system crashes,
             // we can't display an alert, we just want to die die die.
             android.ddm.DdmHandleAppName.setAppName("system_process",
-                                                    UserHandle.myUserId());
+                    UserHandle.myUserId());
             try {
                 mInstrumentation = new Instrumentation();
                 ContextImpl context = ContextImpl.createAppContext(
diff --git a/core/java/android/app/ApplicationThreadNative.java b/core/java/android/app/ApplicationThreadNative.java
index 52b69e1..63e8707 100644
--- a/core/java/android/app/ApplicationThreadNative.java
+++ b/core/java/android/app/ApplicationThreadNative.java
@@ -129,7 +129,7 @@
             scheduleSendResult(b, ri);
             return true;
         }
-        
+
         case SCHEDULE_LAUNCH_ACTIVITY_TRANSACTION:
         {
             data.enforceInterface(IApplicationThread.descriptor);
@@ -148,17 +148,13 @@
             List<Intent> pi = data.createTypedArrayList(Intent.CREATOR);
             boolean notResumed = data.readInt() != 0;
             boolean isForward = data.readInt() != 0;
-            String profileName = data.readString();
-            ParcelFileDescriptor profileFd = data.readInt() != 0
-                    ? ParcelFileDescriptor.CREATOR.createFromParcel(data) : null;
-            boolean autoStopProfiler = data.readInt() != 0;
-            scheduleLaunchActivity(intent, b, ident, info, curConfig, compatInfo,
-                    voiceInteractor, procState, state, persistentState,
-                    ri, pi, notResumed, isForward, profileName, profileFd,
-                    autoStopProfiler);
+            ProfilerInfo profilerInfo = data.readInt() != 0
+                    ? ProfilerInfo.CREATOR.createFromParcel(data) : null;
+            scheduleLaunchActivity(intent, b, ident, info, curConfig, compatInfo, voiceInteractor,
+                    procState, state, persistentState, ri, pi, notResumed, isForward, profilerInfo);
             return true;
         }
-        
+
         case SCHEDULE_RELAUNCH_ACTIVITY_TRANSACTION:
         {
             data.enforceInterface(IApplicationThread.descriptor);
@@ -274,10 +270,8 @@
                 data.createTypedArrayList(ProviderInfo.CREATOR);
             ComponentName testName = (data.readInt() != 0)
                 ? new ComponentName(data) : null;
-            String profileName = data.readString();
-            ParcelFileDescriptor profileFd = data.readInt() != 0
-                    ? ParcelFileDescriptor.CREATOR.createFromParcel(data) : null;
-            boolean autoStopProfiler = data.readInt() != 0;
+            ProfilerInfo profilerInfo = data.readInt() != 0
+                    ? ProfilerInfo.CREATOR.createFromParcel(data) : null;
             Bundle testArgs = data.readBundle();
             IBinder binder = data.readStrongBinder();
             IInstrumentationWatcher testWatcher = IInstrumentationWatcher.Stub.asInterface(binder);
@@ -292,11 +286,9 @@
             CompatibilityInfo compatInfo = CompatibilityInfo.CREATOR.createFromParcel(data);
             HashMap<String, IBinder> services = data.readHashMap(null);
             Bundle coreSettings = data.readBundle();
-            bindApplication(packageName, info,
-                            providers, testName, profileName, profileFd, autoStopProfiler,
-                            testArgs, testWatcher, uiAutomationConnection, testMode,
-                            openGlTrace, restrictedBackupMode, persistent, config, compatInfo,
-                            services, coreSettings);
+            bindApplication(packageName, info, providers, testName, profilerInfo, testArgs,
+                    testWatcher, uiAutomationConnection, testMode, openGlTrace,
+                    restrictedBackupMode, persistent, config, compatInfo, services, coreSettings);
             return true;
         }
 
@@ -403,7 +395,7 @@
             scheduleLowMemory();
             return true;
         }
-        
+
         case SCHEDULE_ACTIVITY_CONFIGURATION_CHANGED_TRANSACTION:
         {
             data.enforceInterface(IApplicationThread.descriptor);
@@ -411,19 +403,18 @@
             scheduleActivityConfigurationChanged(b);
             return true;
         }
-        
+
         case PROFILER_CONTROL_TRANSACTION:
         {
             data.enforceInterface(IApplicationThread.descriptor);
             boolean start = data.readInt() != 0;
             int profileType = data.readInt();
-            String path = data.readString();
-            ParcelFileDescriptor fd = data.readInt() != 0
-                    ? ParcelFileDescriptor.CREATOR.createFromParcel(data) : null;
-            profilerControl(start, path, fd, profileType);
+            ProfilerInfo profilerInfo = data.readInt() != 0
+                    ? ProfilerInfo.CREATOR.createFromParcel(data) : null;
+            profilerControl(start, profilerInfo, profileType);
             return true;
         }
-        
+
         case SET_SCHEDULING_GROUP_TRANSACTION:
         {
             data.enforceInterface(IApplicationThread.descriptor);
@@ -774,8 +765,7 @@
             IVoiceInteractor voiceInteractor, int procState, Bundle state,
             PersistableBundle persistentState, List<ResultInfo> pendingResults,
             List<Intent> pendingNewIntents, boolean notResumed, boolean isForward,
-            String profileName, ParcelFileDescriptor profileFd, boolean autoStopProfiler)
-            throws RemoteException {
+            ProfilerInfo profilerInfo) throws RemoteException {
         Parcel data = Parcel.obtain();
         data.writeInterfaceToken(IApplicationThread.descriptor);
         intent.writeToParcel(data, 0);
@@ -792,14 +782,12 @@
         data.writeTypedList(pendingNewIntents);
         data.writeInt(notResumed ? 1 : 0);
         data.writeInt(isForward ? 1 : 0);
-        data.writeString(profileName);
-        if (profileFd != null) {
+        if (profilerInfo != null) {
             data.writeInt(1);
-            profileFd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
+            profilerInfo.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
         } else {
             data.writeInt(0);
         }
-        data.writeInt(autoStopProfiler ? 1 : 0);
         mRemote.transact(SCHEDULE_LAUNCH_ACTIVITY_TRANSACTION, data, null,
                 IBinder.FLAG_ONEWAY);
         data.recycle();
@@ -959,9 +947,8 @@
     }
 
     public final void bindApplication(String packageName, ApplicationInfo info,
-            List<ProviderInfo> providers, ComponentName testName, String profileName,
-            ParcelFileDescriptor profileFd, boolean autoStopProfiler, Bundle testArgs,
-            IInstrumentationWatcher testWatcher,
+            List<ProviderInfo> providers, ComponentName testName, ProfilerInfo profilerInfo,
+            Bundle testArgs, IInstrumentationWatcher testWatcher,
             IUiAutomationConnection uiAutomationConnection, int debugMode,
             boolean openGlTrace, boolean restrictedBackupMode, boolean persistent,
             Configuration config, CompatibilityInfo compatInfo, Map<String, IBinder> services,
@@ -977,14 +964,12 @@
             data.writeInt(1);
             testName.writeToParcel(data, 0);
         }
-        data.writeString(profileName);
-        if (profileFd != null) {
+        if (profilerInfo != null) {
             data.writeInt(1);
-            profileFd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
+            profilerInfo.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
         } else {
             data.writeInt(0);
         }
-        data.writeInt(autoStopProfiler ? 1 : 0);
         data.writeBundle(testArgs);
         data.writeStrongInterface(testWatcher);
         data.writeStrongInterface(uiAutomationConnection);
@@ -1111,7 +1096,7 @@
                 IBinder.FLAG_ONEWAY);
         data.recycle();
     }
-    
+
     public final void scheduleActivityConfigurationChanged(
             IBinder token) throws RemoteException {
         Parcel data = Parcel.obtain();
@@ -1121,17 +1106,16 @@
                 IBinder.FLAG_ONEWAY);
         data.recycle();
     }
-    
-    public void profilerControl(boolean start, String path,
-            ParcelFileDescriptor fd, int profileType) throws RemoteException {
+
+    public void profilerControl(boolean start, ProfilerInfo profilerInfo, int profileType)
+            throws RemoteException {
         Parcel data = Parcel.obtain();
         data.writeInterfaceToken(IApplicationThread.descriptor);
         data.writeInt(start ? 1 : 0);
         data.writeInt(profileType);
-        data.writeString(path);
-        if (fd != null) {
+        if (profilerInfo != null) {
             data.writeInt(1);
-            fd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
+            profilerInfo.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
         } else {
             data.writeInt(0);
         }
@@ -1139,7 +1123,7 @@
                 IBinder.FLAG_ONEWAY);
         data.recycle();
     }
-    
+
     public void setSchedulingGroup(int group) throws RemoteException {
         Parcel data = Parcel.obtain();
         data.writeInterfaceToken(IApplicationThread.descriptor);
@@ -1148,7 +1132,7 @@
                 IBinder.FLAG_ONEWAY);
         data.recycle();
     }
-    
+
     public void dispatchPackageBroadcast(int cmd, String[] packages) throws RemoteException {
         Parcel data = Parcel.obtain();
         data.writeInterfaceToken(IApplicationThread.descriptor);
@@ -1157,9 +1141,8 @@
         mRemote.transact(DISPATCH_PACKAGE_BROADCAST_TRANSACTION, data, null,
                 IBinder.FLAG_ONEWAY);
         data.recycle();
-        
     }
-    
+
     public void scheduleCrash(String msg) throws RemoteException {
         Parcel data = Parcel.obtain();
         data.writeInterfaceToken(IApplicationThread.descriptor);
@@ -1167,7 +1150,6 @@
         mRemote.transact(SCHEDULE_CRASH_TRANSACTION, data, null,
                 IBinder.FLAG_ONEWAY);
         data.recycle();
-        
     }
 
     public void dumpHeap(boolean managed, String path,
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index 884b046..91a0aed 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -92,8 +92,6 @@
 import android.net.nsd.NsdManager;
 import android.net.wifi.IWifiManager;
 import android.net.wifi.WifiManager;
-import android.net.wifi.passpoint.IWifiPasspointManager;
-import android.net.wifi.passpoint.WifiPasspointManager;
 import android.net.wifi.p2p.IWifiP2pManager;
 import android.net.wifi.p2p.WifiP2pManager;
 import android.net.wifi.IWifiScanner;
@@ -600,13 +598,6 @@
                     return new WifiManager(ctx.getOuterContext(), service);
                 }});
 
-        registerService(WIFI_PASSPOINT_SERVICE, new ServiceFetcher() {
-                public Object createService(ContextImpl ctx) {
-                    IBinder b = ServiceManager.getService(WIFI_PASSPOINT_SERVICE);
-                    IWifiPasspointManager service = IWifiPasspointManager.Stub.asInterface(b);
-                    return new WifiPasspointManager(ctx.getOuterContext(), service);
-                }});
-
         registerService(WIFI_P2P_SERVICE, new ServiceFetcher() {
                 public Object createService(ContextImpl ctx) {
                     IBinder b = ServiceManager.getService(WIFI_P2P_SERVICE);
@@ -1256,7 +1247,7 @@
             ActivityManagerNative.getDefault().startActivityAsUser(
                 mMainThread.getApplicationThread(), getBasePackageName(), intent,
                 intent.resolveTypeIfNeeded(getContentResolver()),
-                null, null, 0, Intent.FLAG_ACTIVITY_NEW_TASK, null, null, options,
+                null, null, 0, Intent.FLAG_ACTIVITY_NEW_TASK, null, options,
                 user.getIdentifier());
         } catch (RemoteException re) {
         }
diff --git a/core/java/android/app/IActivityManager.java b/core/java/android/app/IActivityManager.java
index 69e1710..99428e8 100644
--- a/core/java/android/app/IActivityManager.java
+++ b/core/java/android/app/IActivityManager.java
@@ -61,22 +61,19 @@
  * {@hide}
  */
 public interface IActivityManager extends IInterface {
-    public int startActivity(IApplicationThread caller, String callingPackage,
-            Intent intent, String resolvedType, IBinder resultTo, String resultWho,
-            int requestCode, int flags, String profileFile,
-            ParcelFileDescriptor profileFd, Bundle options) throws RemoteException;
-    public int startActivityAsUser(IApplicationThread caller, String callingPackage,
-            Intent intent, String resolvedType, IBinder resultTo, String resultWho,
-            int requestCode, int flags, String profileFile,
-            ParcelFileDescriptor profileFd, Bundle options, int userId) throws RemoteException;
+    public int startActivity(IApplicationThread caller, String callingPackage, Intent intent,
+            String resolvedType, IBinder resultTo, String resultWho, int requestCode, int flags,
+            ProfilerInfo profilerInfo, Bundle options) throws RemoteException;
+    public int startActivityAsUser(IApplicationThread caller, String callingPackage, Intent intent,
+            String resolvedType, IBinder resultTo, String resultWho, int requestCode, int flags,
+            ProfilerInfo profilerInfo, Bundle options, int userId) throws RemoteException;
     public int startActivityAsCaller(IApplicationThread caller, String callingPackage,
-            Intent intent, String resolvedType, IBinder resultTo, String resultWho,
-            int requestCode, int flags, String profileFile,
-            ParcelFileDescriptor profileFd, Bundle options) throws RemoteException;
+            Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode,
+            int flags, ProfilerInfo profilerInfo, Bundle options) throws RemoteException;
     public WaitResult startActivityAndWait(IApplicationThread caller, String callingPackage,
             Intent intent, String resolvedType, IBinder resultTo, String resultWho,
-            int requestCode, int flags, String profileFile,
-            ParcelFileDescriptor profileFd, Bundle options, int userId) throws RemoteException;
+            int requestCode, int flags, ProfilerInfo profilerInfo, Bundle options,
+            int userId) throws RemoteException;
     public int startActivityWithConfig(IApplicationThread caller, String callingPackage,
             Intent intent, String resolvedType, IBinder resultTo, String resultWho,
             int requestCode, int startFlags, Configuration newConfig,
@@ -87,8 +84,8 @@
             int flagsMask, int flagsValues, Bundle options) throws RemoteException;
     public int startVoiceActivity(String callingPackage, int callingPid, int callingUid,
             Intent intent, String resolvedType, IVoiceInteractionSession session,
-            IVoiceInteractor interactor, int flags, String profileFile,
-            ParcelFileDescriptor profileFd, Bundle options, int userId) throws RemoteException;
+            IVoiceInteractor interactor, int flags, ProfilerInfo profilerInfo, Bundle options,
+            int userId) throws RemoteException;
     public boolean startNextMatchingActivity(IBinder callingActivity,
             Intent intent, Bundle options) throws RemoteException;
     public int startActivityFromRecents(int taskId, Bundle options) throws RemoteException;
@@ -97,6 +94,8 @@
     public void finishSubActivity(IBinder token, String resultWho, int requestCode) throws RemoteException;
     public boolean finishActivityAffinity(IBinder token) throws RemoteException;
     public void finishVoiceTask(IVoiceInteractionSession session) throws RemoteException;
+    public boolean releaseActivityInstance(IBinder token) throws RemoteException;
+    public void releaseSomeActivities(IApplicationThread app) throws RemoteException;
     public boolean willActivityBeVisible(IBinder token) throws RemoteException;
     public Intent registerReceiver(IApplicationThread caller, String callerPackage,
             IIntentReceiver receiver, IntentFilter filter,
@@ -267,7 +266,7 @@
     // Special low-level communication with activity manager.
     public void handleApplicationCrash(IBinder app,
             ApplicationErrorReport.CrashInfo crashInfo) throws RemoteException;
-    public boolean handleApplicationWtf(IBinder app, String tag,
+    public boolean handleApplicationWtf(IBinder app, String tag, boolean system,
             ApplicationErrorReport.CrashInfo crashInfo) throws RemoteException;
 
     // A StrictMode violation to be handled.  The violationMask is a
@@ -294,13 +293,13 @@
             throws RemoteException;
     // Get device configuration
     public ConfigurationInfo getDeviceConfigurationInfo() throws RemoteException;
-    
+
     // Turn on/off profiling in a particular process.
     public boolean profileControl(String process, int userId, boolean start,
-            String path, ParcelFileDescriptor fd, int profileType) throws RemoteException;
-    
+            ProfilerInfo profilerInfo, int profileType) throws RemoteException;
+
     public boolean shutdown(int timeout) throws RemoteException;
-    
+
     public void stopAppSwitches() throws RemoteException;
     public void resumeAppSwitches() throws RemoteException;
 
@@ -771,4 +770,6 @@
     int START_ACTIVITY_AS_CALLER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+232;
     int ADD_APP_TASK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+233;
     int GET_APP_TASK_THUMBNAIL_SIZE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+234;
+    int RELEASE_ACTIVITY_INSTANCE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+235;
+    int RELEASE_SOME_ACTIVITIES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+236;
 }
diff --git a/core/java/android/app/IAppTask.aidl b/core/java/android/app/IAppTask.aidl
index 4e38c36..37fead9 100644
--- a/core/java/android/app/IAppTask.aidl
+++ b/core/java/android/app/IAppTask.aidl
@@ -17,10 +17,15 @@
 package android.app;
 
 import android.app.ActivityManager;
+import android.content.Intent;
+import android.os.Bundle;
 
 /** @hide */
 interface IAppTask {
     void finishAndRemoveTask();
     ActivityManager.RecentTaskInfo getTaskInfo();
+    void moveToFront();
+    int startActivity(IBinder whoThread, String callingPackage,
+            in Intent intent, String resolvedType, in Bundle options);
     void setExcludeFromRecents(boolean exclude);
 }
diff --git a/core/java/android/app/IApplicationThread.java b/core/java/android/app/IApplicationThread.java
index 01b6fdf..a7546d9 100644
--- a/core/java/android/app/IApplicationThread.java
+++ b/core/java/android/app/IApplicationThread.java
@@ -62,8 +62,7 @@
             IVoiceInteractor voiceInteractor, int procState, Bundle state,
             PersistableBundle persistentState, List<ResultInfo> pendingResults,
             List<Intent> pendingNewIntents, boolean notResumed, boolean isForward,
-            String profileName, ParcelFileDescriptor profileFd, boolean autoStopProfiler)
-            throws RemoteException;
+            ProfilerInfo profilerInfo) throws RemoteException;
     void scheduleRelaunchActivity(IBinder token, List<ResultInfo> pendingResults,
             List<Intent> pendingNewIntents, int configChanges,
             boolean notResumed, Configuration config) throws RemoteException;
@@ -94,10 +93,9 @@
     static final int DEBUG_ON = 1;
     static final int DEBUG_WAIT = 2;
     void bindApplication(String packageName, ApplicationInfo info, List<ProviderInfo> providers,
-            ComponentName testName, String profileName, ParcelFileDescriptor profileFd,
-            boolean autoStopProfiler, Bundle testArguments, IInstrumentationWatcher testWatcher,
-            IUiAutomationConnection uiAutomationConnection, int debugMode,
-            boolean openGlTrace, boolean restrictedBackupMode, boolean persistent,
+            ComponentName testName, ProfilerInfo profilerInfo, Bundle testArguments,
+            IInstrumentationWatcher testWatcher, IUiAutomationConnection uiAutomationConnection,
+            int debugMode, boolean openGlTrace, boolean restrictedBackupMode, boolean persistent,
             Configuration config, CompatibilityInfo compatInfo, Map<String, IBinder> services,
             Bundle coreSettings) throws RemoteException;
     void scheduleExit() throws RemoteException;
@@ -117,7 +115,7 @@
             boolean sticky, int sendingUser, int processState) throws RemoteException;
     void scheduleLowMemory() throws RemoteException;
     void scheduleActivityConfigurationChanged(IBinder token) throws RemoteException;
-    void profilerControl(boolean start, String path, ParcelFileDescriptor fd, int profileType)
+    void profilerControl(boolean start, ProfilerInfo profilerInfo, int profileType)
             throws RemoteException;
     void dumpHeap(boolean managed, String path, ParcelFileDescriptor fd)
             throws RemoteException;
diff --git a/core/java/android/app/Instrumentation.java b/core/java/android/app/Instrumentation.java
index b28d7cc..ba3a234 100644
--- a/core/java/android/app/Instrumentation.java
+++ b/core/java/android/app/Instrumentation.java
@@ -1481,7 +1481,7 @@
                 .startActivity(whoThread, who.getBasePackageName(), intent,
                         intent.resolveTypeIfNeeded(who.getContentResolver()),
                         token, target != null ? target.mEmbeddedID : null,
-                        requestCode, 0, null, null, options);
+                        requestCode, 0, null, options);
             checkStartActivityResult(result, intent);
         } catch (RemoteException e) {
         }
@@ -1598,7 +1598,7 @@
                 .startActivity(whoThread, who.getBasePackageName(), intent,
                         intent.resolveTypeIfNeeded(who.getContentResolver()),
                         token, target != null ? target.mWho : null,
-                        requestCode, 0, null, null, options);
+                        requestCode, 0, null, options);
             checkStartActivityResult(result, intent);
         } catch (RemoteException e) {
         }
@@ -1658,7 +1658,7 @@
                 .startActivityAsUser(whoThread, who.getBasePackageName(), intent,
                         intent.resolveTypeIfNeeded(who.getContentResolver()),
                         token, target != null ? target.mEmbeddedID : null,
-                        requestCode, 0, null, null, options, user.getIdentifier());
+                        requestCode, 0, null, options, user.getIdentifier());
             checkStartActivityResult(result, intent);
         } catch (RemoteException e) {
         }
@@ -1695,13 +1695,47 @@
                 .startActivityAsCaller(whoThread, who.getBasePackageName(), intent,
                         intent.resolveTypeIfNeeded(who.getContentResolver()),
                         token, target != null ? target.mEmbeddedID : null,
-                        requestCode, 0, null, null, options);
+                        requestCode, 0, null, options);
             checkStartActivityResult(result, intent);
         } catch (RemoteException e) {
         }
         return null;
     }
 
+    /**
+     * Special version!
+     * @hide
+     */
+    public void execStartActivityFromAppTask(
+            Context who, IBinder contextThread, IAppTask appTask,
+            Intent intent, Bundle options) {
+        IApplicationThread whoThread = (IApplicationThread) contextThread;
+        if (mActivityMonitors != null) {
+            synchronized (mSync) {
+                final int N = mActivityMonitors.size();
+                for (int i=0; i<N; i++) {
+                    final ActivityMonitor am = mActivityMonitors.get(i);
+                    if (am.match(who, null, intent)) {
+                        am.mHits++;
+                        if (am.isBlocking()) {
+                            return;
+                        }
+                        break;
+                    }
+                }
+            }
+        }
+        try {
+            intent.migrateExtraStreamToClipData();
+            intent.prepareToLeaveProcess();
+            int result = appTask.startActivity(whoThread.asBinder(), who.getBasePackageName(),
+                    intent, intent.resolveTypeIfNeeded(who.getContentResolver()), options);
+            checkStartActivityResult(result, intent);
+        } catch (RemoteException e) {
+        }
+        return;
+    }
+
     /*package*/ final void init(ActivityThread thread,
             Context instrContext, Context appContext, ComponentName component, 
             IInstrumentationWatcher watcher, IUiAutomationConnection uiAutomationConnection) {
diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java
index e0c7816..d143b86 100644
--- a/core/java/android/app/LoadedApk.java
+++ b/core/java/android/app/LoadedApk.java
@@ -51,8 +51,8 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.lang.ref.WeakReference;
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -594,55 +594,6 @@
         return app;
     }
 
-    private void rewriteIntField(Field field, int packageId) throws IllegalAccessException {
-        int requiredModifiers = Modifier.STATIC | Modifier.PUBLIC;
-        int bannedModifiers = Modifier.FINAL;
-
-        int mod = field.getModifiers();
-        if ((mod & requiredModifiers) != requiredModifiers ||
-                (mod & bannedModifiers) != 0) {
-            throw new IllegalArgumentException("Field " + field.getName() +
-                    " is not rewritable");
-        }
-
-        if (field.getType() != int.class && field.getType() != Integer.class) {
-            throw new IllegalArgumentException("Field " + field.getName() +
-                    " is not an integer");
-        }
-
-        try {
-            int resId = field.getInt(null);
-            field.setInt(null, (resId & 0x00ffffff) | (packageId << 24));
-        } catch (IllegalAccessException e) {
-            // This should not occur (we check above if we can write to it)
-            throw new IllegalArgumentException(e);
-        }
-    }
-
-    private void rewriteIntArrayField(Field field, int packageId) {
-        int requiredModifiers = Modifier.STATIC | Modifier.PUBLIC;
-
-        if ((field.getModifiers() & requiredModifiers) != requiredModifiers) {
-            throw new IllegalArgumentException("Field " + field.getName() +
-                    " is not rewritable");
-        }
-
-        if (field.getType() != int[].class) {
-            throw new IllegalArgumentException("Field " + field.getName() +
-                    " is not an integer array");
-        }
-
-        try {
-            int[] array = (int[]) field.get(null);
-            for (int i = 0; i < array.length; i++) {
-                array[i] = (array[i] & 0x00ffffff) | (packageId << 24);
-            }
-        } catch (IllegalAccessException e) {
-            // This should not occur (we check above if we can write to it)
-            throw new IllegalArgumentException(e);
-        }
-    }
-
     private void rewriteRValues(ClassLoader cl, String packageName, int id) {
         final Class<?> rClazz;
         try {
@@ -650,35 +601,30 @@
         } catch (ClassNotFoundException e) {
             // This is not necessarily an error, as some packages do not ship with resources
             // (or they do not need rewriting).
-            Log.i(TAG, "Could not find R class for package '" + packageName + "'");
+            Log.i(TAG, "No resource references to update in package " + packageName);
             return;
         }
 
+        final Method callback;
         try {
-            Class<?>[] declaredClasses = rClazz.getDeclaredClasses();
-            for (Class<?> clazz : declaredClasses) {
-                try {
-                    if (clazz.getSimpleName().equals("styleable")) {
-                        for (Field field : clazz.getDeclaredFields()) {
-                            if (field.getType() == int[].class) {
-                                rewriteIntArrayField(field, id);
-                            }
-                        }
-
-                    } else {
-                        for (Field field : clazz.getDeclaredFields()) {
-                            rewriteIntField(field, id);
-                        }
-                    }
-                } catch (Exception e) {
-                    throw new IllegalArgumentException("Failed to rewrite R values for " +
-                            clazz.getName(), e);
-                }
-            }
-
-        } catch (Exception e) {
-            throw new IllegalArgumentException("Failed to rewrite R values", e);
+            callback = rClazz.getMethod("onResourcesLoaded", int.class);
+        } catch (NoSuchMethodException e) {
+            // No rewriting to be done.
+            return;
         }
+
+        Throwable cause;
+        try {
+            callback.invoke(null, id);
+            return;
+        } catch (IllegalAccessException e) {
+            cause = e;
+        } catch (InvocationTargetException e) {
+            cause = e.getCause();
+        }
+
+        throw new RuntimeException("Failed to rewrite resource references for " + packageName,
+                cause);
     }
 
     public void removeContextRegistrations(Context context,
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index f7300aa..e1dc8bf 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -32,6 +32,7 @@
 import android.media.session.MediaSession;
 import android.net.Uri;
 import android.os.BadParcelableException;
+import android.os.Build;
 import android.os.Bundle;
 import android.os.Parcel;
 import android.os.Parcelable;
@@ -1904,7 +1905,8 @@
             mPriority = PRIORITY_DEFAULT;
             mPeople = new ArrayList<String>();
 
-            mColorUtil = NotificationColorUtil.getInstance();
+            mColorUtil = context.getApplicationInfo().targetSdkVersion < Build.VERSION_CODES.L ?
+                    NotificationColorUtil.getInstance() : null;
         }
 
         /**
@@ -2610,7 +2612,7 @@
 
             if (mLargeIcon != null) {
                 contentView.setImageViewBitmap(R.id.icon, mLargeIcon);
-                processLargeIcon(mLargeIcon, contentView);
+                processLargeLegacyIcon(mLargeIcon, contentView);
                 contentView.setImageViewResource(R.id.right_icon, mSmallIcon);
                 contentView.setViewVisibility(R.id.right_icon, View.VISIBLE);
                 processSmallRightIcon(mSmallIcon, contentView);
@@ -2813,13 +2815,10 @@
         }
 
         private void processLegacyAction(Action action, RemoteViews button) {
-            if (isLegacy()) {
-                if (mColorUtil.isGrayscale(mContext, action.icon)) {
-                    button.setTextViewCompoundDrawablesRelativeColorFilter(R.id.action0, 0,
-                            mContext.getResources().getColor(
-                                    R.color.notification_action_legacy_color_filter),
-                            PorterDuff.Mode.MULTIPLY);
-                }
+            if (!isLegacy() || mColorUtil.isGrayscale(mContext, action.icon)) {
+                button.setTextViewCompoundDrawablesRelativeColorFilter(R.id.action0, 0,
+                        mContext.getResources().getColor(R.color.notification_action_color_filter),
+                        PorterDuff.Mode.MULTIPLY);
             }
         }
 
@@ -2845,8 +2844,8 @@
          * if it's grayscale).
          */
         // TODO: also check bounds, transparency, that sort of thing.
-        private void processLargeIcon(Bitmap largeIcon, RemoteViews contentView) {
-            if (!isLegacy() || mColorUtil.isGrayscale(largeIcon)) {
+        private void processLargeLegacyIcon(Bitmap largeIcon, RemoteViews contentView) {
+            if (isLegacy() && mColorUtil.isGrayscale(largeIcon)) {
                 applyLargeIconBackground(contentView);
             } else {
                 removeLargeIconBackground(contentView);
diff --git a/core/java/android/app/ProfilerInfo.java b/core/java/android/app/ProfilerInfo.java
new file mode 100644
index 0000000..cea7c3c
--- /dev/null
+++ b/core/java/android/app/ProfilerInfo.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2014 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.app;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.os.ParcelFileDescriptor;
+
+/**
+ * System private API for passing profiler settings.
+ *
+ * {@hide}
+ */
+public class ProfilerInfo implements Parcelable {
+
+    /* Name of profile output file. */
+    public final String profileFile;
+
+    /* File descriptor for profile output file, can be null. */
+    public ParcelFileDescriptor profileFd;
+
+    /* Indicates sample profiling when nonzero, interval in microseconds. */
+    public final int samplingInterval;
+
+    /* Automatically stop the profiler when the app goes idle. */
+    public final boolean autoStopProfiler;
+
+    public ProfilerInfo(String filename, ParcelFileDescriptor fd, int interval, boolean autoStop) {
+        profileFile = filename;
+        profileFd = fd;
+        samplingInterval = interval;
+        autoStopProfiler = autoStop;
+    }
+
+    public int describeContents() {
+        if (profileFd != null) {
+            return profileFd.describeContents();
+        } else {
+            return 0;
+        }
+    }
+
+    public void writeToParcel(Parcel out, int flags) {
+        out.writeString(profileFile);
+        if (profileFd != null) {
+            out.writeInt(1);
+            profileFd.writeToParcel(out, flags);
+        } else {
+            out.writeInt(0);
+        }
+        out.writeInt(samplingInterval);
+        out.writeInt(autoStopProfiler ? 1 : 0);
+    }
+
+    public static final Parcelable.Creator<ProfilerInfo> CREATOR =
+            new Parcelable.Creator<ProfilerInfo>() {
+        public ProfilerInfo createFromParcel(Parcel in) {
+            return new ProfilerInfo(in);
+        }
+
+        public ProfilerInfo[] newArray(int size) {
+            return new ProfilerInfo[size];
+        }
+    };
+
+    private ProfilerInfo(Parcel in) {
+        profileFile = in.readString();
+        profileFd = in.readInt() != 0 ? ParcelFileDescriptor.CREATOR.createFromParcel(in) : null;
+        samplingInterval = in.readInt();
+        autoStopProfiler = in.readInt() != 0;
+    }
+}
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index 41bbb87..5c24540 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -126,7 +126,7 @@
      * message containing an Nfc record with MIME type {@link #MIME_TYPE_PROVISIONING_NFC}.
      */
     public static final String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME
-        = "android.app.extra.DEVICE_ADMIN_PACKAGE_NAME";
+        = "android.app.extra.deviceAdminPackageName";
 
     /**
      * A String extra holding the default name of the profile that is created during managed profile
@@ -149,7 +149,7 @@
      * It is usually used to avoid that the user has to enter their email address twice.
      */
     public static final String EXTRA_PROVISIONING_EMAIL_ADDRESS
-        = "android.app.extra.MANAGED_PROFILE_EMAIL_ADDRESS";
+        = "android.app.extra.ManagedProfileEmailAddress";
 
     /**
      * A String extra holding the time zone {@link android.app.AlarmManager} that the device
@@ -1374,7 +1374,7 @@
      * @param admin The name of the admin component to check, or null to aggregate
      * all admins.
      * @return time in milliseconds for the given admin or the minimum value (strictest) of
-     * all admins if admin is null.
+     * all admins if admin is null. Returns 0 if there are no restrictions.
      */
     public long getMaximumTimeToLock(ComponentName admin) {
         return getMaximumTimeToLock(admin, UserHandle.myUserId());
diff --git a/core/java/android/app/backup/WallpaperBackupHelper.java b/core/java/android/app/backup/WallpaperBackupHelper.java
index 9e8ab2c..0567500 100644
--- a/core/java/android/app/backup/WallpaperBackupHelper.java
+++ b/core/java/android/app/backup/WallpaperBackupHelper.java
@@ -141,13 +141,13 @@
                     if (widthRatio > 0 && widthRatio < 1.33
                             && heightRatio > 0 && heightRatio < 1.33) {
                         // sufficiently close to our resolution; go ahead and use it
-                        if (DEBUG) Slog.d(TAG, "wallpaper dimension match; using");
+                        Slog.d(TAG, "Applying restored wallpaper image.");
                         f.renameTo(new File(WALLPAPER_IMAGE));
                         // TODO: spin a service to copy the restored image to sd/usb storage,
                         // since it does not exist anywhere other than the private wallpaper
                         // file.
                     } else {
-                        if (DEBUG) Slog.d(TAG, "dimensions too far off: wr=" + widthRatio
+                        Slog.i(TAG, "Dimensions too far off; using default wallpaper. wr=" + widthRatio
                                 + " hr=" + heightRatio);
                         f.delete();
                     }
diff --git a/core/java/android/app/usage/UsageEvents.java b/core/java/android/app/usage/UsageEvents.java
index d1ebc5f..2431ad0 100644
--- a/core/java/android/app/usage/UsageEvents.java
+++ b/core/java/android/app/usage/UsageEvents.java
@@ -65,7 +65,12 @@
         /**
          * {@hide}
          */
-        public ComponentName mComponent;
+        public String mPackage;
+
+        /**
+         * {@hide}
+         */
+        public String mClass;
 
         /**
          * {@hide}
@@ -78,10 +83,26 @@
         public int mEventType;
 
         /**
-         * The component this event represents.
+         * TODO(adamlesinski): Removed before release.
+         * {@hide}
          */
         public ComponentName getComponent() {
-            return mComponent;
+            return new ComponentName(mPackage, mClass);
+        }
+
+        /**
+         * The package name of the source of this event.
+         */
+        public String getPackageName() {
+            return mPackage;
+        }
+
+        /**
+         * The class name of the source of this event. This may be null for
+         * certain events.
+         */
+        public String getClassName() {
+            return mClass;
         }
 
         /**
@@ -115,7 +136,7 @@
      * In order to save space, since ComponentNames will be duplicated everywhere,
      * we use a map and index into it.
      */
-    private ComponentName[] mComponentNameTable;
+    private String[] mStringPool;
 
     /**
      * Construct the iterator from a parcel.
@@ -125,7 +146,7 @@
         mEventCount = in.readInt();
         mIndex = in.readInt();
         if (mEventCount > 0) {
-            mComponentNameTable = in.createTypedArray(ComponentName.CREATOR);
+            mStringPool = in.createStringArray();
 
             final int listByteLength = in.readInt();
             final int positionInParcel = in.readInt();
@@ -149,8 +170,8 @@
      * Construct the iterator in preparation for writing it to a parcel.
      * {@hide}
      */
-    public UsageEvents(List<Event> events, ComponentName[] nameTable) {
-        mComponentNameTable = nameTable;
+    public UsageEvents(List<Event> events, String[] stringPool) {
+        mStringPool = stringPool;
         mEventCount = events.size();
         mEventsToWrite = events;
     }
@@ -178,8 +199,19 @@
             return false;
         }
 
-        final int index = mParcel.readInt();
-        eventOut.mComponent = mComponentNameTable[index];
+        final int packageIndex = mParcel.readInt();
+        if (packageIndex >= 0) {
+            eventOut.mPackage = mStringPool[packageIndex];
+        } else {
+            eventOut.mPackage = null;
+        }
+
+        final int classIndex = mParcel.readInt();
+        if (classIndex >= 0) {
+            eventOut.mClass = mStringPool[classIndex];
+        } else {
+            eventOut.mClass = null;
+        }
         eventOut.mEventType = mParcel.readInt();
         eventOut.mTimeStamp = mParcel.readLong();
         mIndex++;
@@ -206,12 +238,20 @@
         return 0;
     }
 
+    private int findStringIndex(String str) {
+        final int index = Arrays.binarySearch(mStringPool, str);
+        if (index < 0) {
+            throw new IllegalStateException("String '" + str + "' is not in the string pool");
+        }
+        return index;
+    }
+
     @Override
     public void writeToParcel(Parcel dest, int flags) {
         dest.writeInt(mEventCount);
         dest.writeInt(mIndex);
         if (mEventCount > 0) {
-            dest.writeTypedArray(mComponentNameTable, flags);
+            dest.writeStringArray(mStringPool);
 
             if (mEventsToWrite != null) {
                 // Write out the events
@@ -221,12 +261,21 @@
                     for (int i = 0; i < mEventCount; i++) {
                         final Event event = mEventsToWrite.get(i);
 
-                        int index = Arrays.binarySearch(mComponentNameTable, event.getComponent());
-                        if (index < 0) {
-                            throw new IllegalStateException(event.getComponent().toShortString() +
-                                    " is not in the component name table");
+                        final int packageIndex;
+                        if (event.mPackage != null) {
+                            packageIndex = findStringIndex(event.mPackage);
+                        } else {
+                            packageIndex = -1;
                         }
-                        p.writeInt(index);
+
+                        final int classIndex;
+                        if (event.mClass != null) {
+                            classIndex = findStringIndex(event.mClass);
+                        } else {
+                            classIndex = -1;
+                        }
+                        p.writeInt(packageIndex);
+                        p.writeInt(classIndex);
                         p.writeInt(event.getEventType());
                         p.writeLong(event.getTimeStamp());
                     }
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index ebb1f77..b7d7c25 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -2512,6 +2512,7 @@
      *
      * @see #getSystemService
      * @see android.app.FingerprintManager
+     * @hide
      */
     public static final String FINGERPRINT_SERVICE = "fingerprint";
 
diff --git a/core/java/android/content/pm/IPackageInstaller.aidl b/core/java/android/content/pm/IPackageInstaller.aidl
index 97be8f0..c6c0ff6 100644
--- a/core/java/android/content/pm/IPackageInstaller.aidl
+++ b/core/java/android/content/pm/IPackageInstaller.aidl
@@ -25,6 +25,8 @@
 /** {@hide} */
 interface IPackageInstaller {
     int createSession(in PackageInstaller.SessionParams params, String installerPackageName, int userId);
+    void abandonSession(int sessionId);
+
     IPackageInstallerSession openSession(int sessionId);
 
     PackageInstaller.SessionInfo getSessionInfo(int sessionId);
diff --git a/core/java/android/content/pm/PackageInstaller.java b/core/java/android/content/pm/PackageInstaller.java
index 9afdbf7..c928a18 100644
--- a/core/java/android/content/pm/PackageInstaller.java
+++ b/core/java/android/content/pm/PackageInstaller.java
@@ -312,6 +312,14 @@
         }
     }
 
+    public void abandonSession(int sessionId) {
+        try {
+            mInstaller.abandonSession(sessionId);
+        } catch (RemoteException e) {
+            throw e.rethrowAsRuntimeException();
+        }
+    }
+
     /**
      * Return details for a specific session. To succeed, the caller must either
      * own this session, or be the current home app.
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index 56b7164..5492775 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -1217,6 +1217,14 @@
 
     /**
      * Feature for {@link #getSystemAvailableFeatures} and
+     * {@link #hasSystemFeature}: The heart rate sensor on this device is an Electrocargiogram.
+     */
+    @SdkConstant(SdkConstantType.FEATURE)
+    public static final String FEATURE_SENSOR_HEART_RATE_ECG =
+            "android.hardware.sensor.heartrate.ecg";
+
+    /**
+     * Feature for {@link #getSystemAvailableFeatures} and
      * {@link #hasSystemFeature}: The device includes a relative humidity sensor.
      */
     @SdkConstant(SdkConstantType.FEATURE)
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index b09d3ac..6d40dcf 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -25,6 +25,7 @@
 import static android.content.pm.PackageManager.INSTALL_PARSE_FAILED_NO_CERTIFICATES;
 import static android.content.pm.PackageManager.INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION;
 
+import android.app.ActivityManager;
 import android.content.ComponentName;
 import android.content.Intent;
 import android.content.IntentFilter;
@@ -3077,7 +3078,7 @@
                     ActivityInfo.DOCUMENT_LAUNCH_NONE);
             a.info.maxRecents = sa.getInt(
                     com.android.internal.R.styleable.AndroidManifestActivity_maxRecents,
-                    15);
+                    ActivityManager.getDefaultAppRecentsLimitStatic());
             a.info.screenOrientation = sa.getInt(
                     com.android.internal.R.styleable.AndroidManifestActivity_screenOrientation,
                     ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
diff --git a/core/java/android/content/res/Configuration.java b/core/java/android/content/res/Configuration.java
index d19418b..e63fd07 100644
--- a/core/java/android/content/res/Configuration.java
+++ b/core/java/android/content/res/Configuration.java
@@ -533,6 +533,18 @@
     public static final int DENSITY_DPI_UNDEFINED = 0;
 
     /**
+     * Value for {@link #densityDpi} for resources that scale to any density (vector drawables).
+     * {@hide}
+     */
+    public static final int DENSITY_DPI_ANY = 0xfffe;
+
+    /**
+     * Value for {@link #densityDpi} for resources that are not meant to be scaled.
+     * {@hide}
+     */
+    public static final int DENSITY_DPI_NONE = 0xffff;
+
+    /**
      * The target screen density being rendered to,
      * corresponding to
      * <a href="{@docRoot}guide/topics/resources/providing-resources.html#DensityQualifier">density</a>
@@ -1453,7 +1465,7 @@
         }
 
         switch (config.densityDpi) {
-            case 0:
+            case DENSITY_DPI_UNDEFINED:
                 break;
             case 120:
                 parts.add("ldpi");
@@ -1476,6 +1488,11 @@
             case 640:
                 parts.add("xxxhdpi");
                 break;
+            case DENSITY_DPI_ANY:
+                parts.add("anydpi");
+                break;
+            case DENSITY_DPI_NONE:
+                parts.add("nodpi");
             default:
                 parts.add(config.densityDpi + "dpi");
                 break;
diff --git a/core/java/android/database/ContentObserver.java b/core/java/android/database/ContentObserver.java
index e4fbc28..5f01e30 100644
--- a/core/java/android/database/ContentObserver.java
+++ b/core/java/android/database/ContentObserver.java
@@ -18,6 +18,7 @@
 
 import android.net.Uri;
 import android.os.Handler;
+import android.os.UserHandle;
 
 /**
  * Receives call backs for changes to content.
@@ -130,6 +131,21 @@
     }
 
     /**
+     * Dispatches a change notification to the observer. Includes the changed
+     * content Uri when available and also the user whose content changed.
+     *
+     * @param selfChange True if this is a self-change notification.
+     * @param uri The Uri of the changed content, or null if unknown.
+     * @param userId The user whose content changed. Can be either a specific
+     *         user or {@link UserHandle#USER_ALL}.
+     *
+     * @hide
+     */
+    public void onChange(boolean selfChange, Uri uri, int userId) {
+        onChange(selfChange, uri);
+    }
+
+    /**
      * Dispatches a change notification to the observer.
      * <p>
      * If a {@link Handler} was supplied to the {@link ContentObserver} constructor,
@@ -159,25 +175,45 @@
      * @param uri The Uri of the changed content, or null if unknown.
      */
     public final void dispatchChange(boolean selfChange, Uri uri) {
+        dispatchChange(selfChange, uri, UserHandle.getCallingUserId());
+    }
+
+    /**
+     * Dispatches a change notification to the observer. Includes the changed
+     * content Uri when available and also the user whose content changed.
+     * <p>
+     * If a {@link Handler} was supplied to the {@link ContentObserver} constructor,
+     * then a call to the {@link #onChange} method is posted to the handler's message queue.
+     * Otherwise, the {@link #onChange} method is invoked immediately on this thread.
+     * </p>
+     *
+     * @param selfChange True if this is a self-change notification.
+     * @param uri The Uri of the changed content, or null if unknown.
+     * @param userId The user whose content changed.
+     */
+    private void dispatchChange(boolean selfChange, Uri uri, int userId) {
         if (mHandler == null) {
-            onChange(selfChange, uri);
+            onChange(selfChange, uri, userId);
         } else {
-            mHandler.post(new NotificationRunnable(selfChange, uri));
+            mHandler.post(new NotificationRunnable(selfChange, uri, userId));
         }
     }
 
+
     private final class NotificationRunnable implements Runnable {
         private final boolean mSelfChange;
         private final Uri mUri;
+        private final int mUserId;
 
-        public NotificationRunnable(boolean selfChange, Uri uri) {
+        public NotificationRunnable(boolean selfChange, Uri uri, int userId) {
             mSelfChange = selfChange;
             mUri = uri;
+            mUserId = userId;
         }
 
         @Override
         public void run() {
-            ContentObserver.this.onChange(mSelfChange, mUri);
+            ContentObserver.this.onChange(mSelfChange, mUri, mUserId);
         }
     }
 
@@ -189,10 +225,10 @@
         }
 
         @Override
-        public void onChange(boolean selfChange, Uri uri) {
+        public void onChange(boolean selfChange, Uri uri, int userId) {
             ContentObserver contentObserver = mContentObserver;
             if (contentObserver != null) {
-                contentObserver.dispatchChange(selfChange, uri);
+                contentObserver.dispatchChange(selfChange, uri, userId);
             }
         }
 
diff --git a/core/java/android/database/CursorToBulkCursorAdaptor.java b/core/java/android/database/CursorToBulkCursorAdaptor.java
index 7dcfae2..02eddf2 100644
--- a/core/java/android/database/CursorToBulkCursorAdaptor.java
+++ b/core/java/android/database/CursorToBulkCursorAdaptor.java
@@ -17,9 +17,7 @@
 package android.database;
 
 import android.net.Uri;
-import android.os.Bundle;
-import android.os.IBinder;
-import android.os.RemoteException;
+import android.os.*;
 
 
 /**
@@ -33,7 +31,7 @@
  *
  * {@hide}
  */
-public final class CursorToBulkCursorAdaptor extends BulkCursorNative 
+public final class CursorToBulkCursorAdaptor extends BulkCursorNative
         implements IBinder.DeathRecipient {
     private static final String TAG = "Cursor";
 
@@ -66,7 +64,7 @@
                 // Do nothing, the far side is dead
             }
         }
-        
+
         public boolean unlinkToDeath(DeathRecipient recipient) {
             return mRemote.asBinder().unlinkToDeath(recipient, 0);
         }
@@ -80,7 +78,7 @@
         @Override
         public void onChange(boolean selfChange, Uri uri) {
             try {
-                mRemote.onChange(selfChange, uri);
+                mRemote.onChange(selfChange, uri, android.os.Process.myUid());
             } catch (RemoteException ex) {
                 // Do nothing, the far side is dead
             }
diff --git a/core/java/android/database/IContentObserver.aidl b/core/java/android/database/IContentObserver.aidl
index 13aff05..22dc9fe 100644
--- a/core/java/android/database/IContentObserver.aidl
+++ b/core/java/android/database/IContentObserver.aidl
@@ -2,16 +2,16 @@
 **
 ** Copyright 2007, 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 
+** 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 
+**     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 
+** 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.
 */
 
@@ -29,5 +29,5 @@
      * observed. selfUpdate is true if the update was caused by a call to
      * commit on the cursor that is being observed.
      */
-    oneway void onChange(boolean selfUpdate, in Uri uri);
+    oneway void onChange(boolean selfUpdate, in Uri uri, int userId);
 }
diff --git a/core/java/android/net/VpnService.java b/core/java/android/net/VpnService.java
index b023b0b..050be40 100644
--- a/core/java/android/net/VpnService.java
+++ b/core/java/android/net/VpnService.java
@@ -24,6 +24,7 @@
 import android.app.Service;
 import android.content.Context;
 import android.content.Intent;
+import android.content.pm.IPackageManager;
 import android.content.pm.PackageManager;
 import android.net.NetworkUtils;
 import android.os.Binder;
@@ -32,6 +33,7 @@
 import android.os.ParcelFileDescriptor;
 import android.os.RemoteException;
 import android.os.ServiceManager;
+import android.os.UserHandle;
 
 import com.android.internal.net.VpnConfig;
 
@@ -518,6 +520,16 @@
             return this;
         }
 
+        private void verifyApp(String packageName) throws PackageManager.NameNotFoundException {
+            IPackageManager pm = IPackageManager.Stub.asInterface(
+                    ServiceManager.getService("package"));
+            try {
+                pm.getApplicationInfo(packageName, 0, UserHandle.getCallingUserId());
+            } catch (RemoteException e) {
+                throw new IllegalStateException(e);
+            }
+        }
+
         /**
          * Adds an application that's allowed to access the VPN connection.
          *
@@ -541,7 +553,14 @@
          */
         public Builder addAllowedApplication(String packageName)
                 throws PackageManager.NameNotFoundException {
-            // TODO
+            if (mConfig.disallowedApplications != null) {
+                throw new UnsupportedOperationException("addDisallowedApplication already called");
+            }
+            verifyApp(packageName);
+            if (mConfig.allowedApplications == null) {
+                mConfig.allowedApplications = new ArrayList<String>();
+            }
+            mConfig.allowedApplications.add(packageName);
             return this;
         }
 
@@ -566,7 +585,14 @@
          */
         public Builder addDisallowedApplication(String packageName)
                 throws PackageManager.NameNotFoundException {
-            // TODO
+            if (mConfig.allowedApplications != null) {
+                throw new UnsupportedOperationException("addAllowedApplication already called");
+            }
+            verifyApp(packageName);
+            if (mConfig.disallowedApplications == null) {
+                mConfig.disallowedApplications = new ArrayList<String>();
+            }
+            mConfig.disallowedApplications.add(packageName);
             return this;
         }
 
diff --git a/core/java/android/os/FileBridge.java b/core/java/android/os/FileBridge.java
index afa5885..bf8d15c 100644
--- a/core/java/android/os/FileBridge.java
+++ b/core/java/android/os/FileBridge.java
@@ -119,9 +119,9 @@
             }
 
         } catch (ErrnoException e) {
-            Log.e(TAG, "Failed during bridge: ", e);
+            Log.wtf(TAG, "Failed during bridge", e);
         } catch (IOException e) {
-            Log.e(TAG, "Failed during bridge: ", e);
+            Log.wtf(TAG, "Failed during bridge", e);
         } finally {
             IoUtils.closeQuietly(mTarget);
             IoUtils.closeQuietly(mServer);
diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java
index 4f35b16..513e47e 100644
--- a/core/java/android/provider/ContactsContract.java
+++ b/core/java/android/provider/ContactsContract.java
@@ -2272,6 +2272,8 @@
          * The default value is "0"
          * </p>
          * <p>Type: INTEGER</p>
+         *
+         * @hide
          */
         public static final String NAME_VERIFIED = "name_verified";
 
@@ -8066,6 +8068,21 @@
         }
 
         /**
+         * Pins a contact at a provided position, or unpins a contact.
+         *
+         * @param contentResolver to perform the pinning operation on.
+         * @param pinnedPosition the position to pin the contact at. To unpin a contact, use
+         *         {@link PinnedPositions#UNPINNED}.
+         */
+        public static void pin(
+                ContentResolver contentResolver, long contactId, int pinnedPosition) {
+            final Uri uri = Uri.withAppendedPath(Contacts.CONTENT_URI, String.valueOf(contactId));
+            final ContentValues values = new ContentValues();
+            values.put(Contacts.PINNED, pinnedPosition);
+            contentResolver.update(uri, values, null, null);
+        }
+
+        /**
          * Default value for the pinned position of an unpinned contact.
          */
         public static final int UNPINNED = 0;
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 2241716..95d1351 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -6320,8 +6320,7 @@
          * processes as soon as they are no longer needed.  If 0, the normal
          * extended lifetime is used.
          */
-        public static final String ALWAYS_FINISH_ACTIVITIES =
-                "always_finish_activities";
+        public static final String ALWAYS_FINISH_ACTIVITIES = "always_finish_activities";
 
         /**
          * Use Dock audio output for media:
diff --git a/core/java/android/service/fingerprint/FingerprintManager.java b/core/java/android/service/fingerprint/FingerprintManager.java
index 5fd597b..178cc8b 100644
--- a/core/java/android/service/fingerprint/FingerprintManager.java
+++ b/core/java/android/service/fingerprint/FingerprintManager.java
@@ -33,6 +33,7 @@
 
 /**
  * A class that coordinates access to the fingerprint hardware.
+ * @hide
  */
 
 public class FingerprintManager {
diff --git a/core/java/android/service/fingerprint/FingerprintManagerReceiver.java b/core/java/android/service/fingerprint/FingerprintManagerReceiver.java
index e5193f5..85677ba 100644
--- a/core/java/android/service/fingerprint/FingerprintManagerReceiver.java
+++ b/core/java/android/service/fingerprint/FingerprintManagerReceiver.java
@@ -15,6 +15,9 @@
  * limitations under the License.
  */
 
+/**
+ * @hide
+ */
 public class FingerprintManagerReceiver {
     /**
      * Fingerprint enrollment progress update. Enrollment is considered complete if
diff --git a/core/java/android/service/fingerprint/FingerprintUtils.java b/core/java/android/service/fingerprint/FingerprintUtils.java
index f4b5526..a4caf8e 100644
--- a/core/java/android/service/fingerprint/FingerprintUtils.java
+++ b/core/java/android/service/fingerprint/FingerprintUtils.java
@@ -23,6 +23,10 @@
 
 import java.util.Arrays;
 
+/**
+ * Utility class for dealing with fingerprints and fingerprint settings.
+ * @hide
+ */
 public
 class FingerprintUtils {
     private static final boolean DEBUG = true;
diff --git a/core/java/android/service/notification/NotificationListenerService.java b/core/java/android/service/notification/NotificationListenerService.java
index 4651d7e..450b9a7 100644
--- a/core/java/android/service/notification/NotificationListenerService.java
+++ b/core/java/android/service/notification/NotificationListenerService.java
@@ -539,7 +539,7 @@
         private String mKey;
         private int mRank = -1;
         private boolean mIsAmbient;
-        private boolean mMeetsInterruptionFilter;
+        private boolean mMatchesInterruptionFilter;
 
         public Ranking() {}
 
@@ -571,17 +571,27 @@
         /**
          * Returns whether the notification meets the user's interruption
          * filter.
+         *
+         * @removed
          */
         public boolean meetsInterruptionFilter() {
-            return mMeetsInterruptionFilter;
+            return mMatchesInterruptionFilter;
+        }
+
+        /**
+         * Returns whether the notification matches the user's interruption
+         * filter.
+         */
+        public boolean matchesInterruptionFilter() {
+            return mMatchesInterruptionFilter;
         }
 
         private void populate(String key, int rank, boolean isAmbient,
-                boolean meetsInterruptionFilter) {
+                boolean matchesInterruptionFilter) {
             mKey = key;
             mRank = rank;
             mIsAmbient = isAmbient;
-            mMeetsInterruptionFilter = meetsInterruptionFilter;
+            mMatchesInterruptionFilter = matchesInterruptionFilter;
         }
     }
 
diff --git a/core/java/android/util/ArrayMap.java b/core/java/android/util/ArrayMap.java
index 3889cb6..7c9861f 100644
--- a/core/java/android/util/ArrayMap.java
+++ b/core/java/android/util/ArrayMap.java
@@ -323,7 +323,17 @@
      */
     @Override
     public boolean containsKey(Object key) {
-        return key == null ? (indexOfNull() >= 0) : (indexOf(key, key.hashCode()) >= 0);
+        return indexOfKey(key) >= 0;
+    }
+
+    /**
+     * Returns the index of a key in the set.
+     *
+     * @param key The key to search for.
+     * @return Returns the index of the key if it exists, else a negative integer.
+     */
+    public int indexOfKey(Object key) {
+        return key == null ? indexOfNull() : indexOf(key, key.hashCode());
     }
 
     int indexOfValue(Object value) {
@@ -365,7 +375,7 @@
      */
     @Override
     public V get(Object key) {
-        final int index = key == null ? indexOfNull() : indexOf(key, key.hashCode());
+        final int index = indexOfKey(key);
         return index >= 0 ? (V)mArray[(index<<1)+1] : null;
     }
 
@@ -561,7 +571,7 @@
      */
     @Override
     public V remove(Object key) {
-        int index = key == null ? indexOfNull() : indexOf(key, key.hashCode());
+        final int index = indexOfKey(key);
         if (index >= 0) {
             return removeAt(index);
         }
@@ -747,7 +757,7 @@
 
                 @Override
                 protected int colIndexOfKey(Object key) {
-                    return key == null ? indexOfNull() : indexOf(key, key.hashCode());
+                    return indexOfKey(key);
                 }
 
                 @Override
diff --git a/core/java/android/util/ArraySet.java b/core/java/android/util/ArraySet.java
index 8f7aefd..423e48b 100644
--- a/core/java/android/util/ArraySet.java
+++ b/core/java/android/util/ArraySet.java
@@ -291,7 +291,17 @@
      */
     @Override
     public boolean contains(Object key) {
-        return key == null ? (indexOfNull() >= 0) : (indexOf(key, key.hashCode()) >= 0);
+        return indexOf(key) >= 0;
+    }
+
+    /**
+     * Returns the index of a value in the set.
+     *
+     * @param key The value to search for.
+     * @return Returns the index of the value if it exists, else a negative integer.
+     */
+    public int indexOf(Object key) {
+        return key == null ? indexOfNull() : indexOf(key, key.hashCode());
     }
 
     /**
@@ -396,7 +406,7 @@
      */
     @Override
     public boolean remove(Object object) {
-        int index = object == null ? indexOfNull() : indexOf(object, object.hashCode());
+        final int index = indexOf(object);
         if (index >= 0) {
             removeAt(index);
             return true;
@@ -586,12 +596,12 @@
 
                 @Override
                 protected int colIndexOfKey(Object key) {
-                    return key == null ? indexOfNull() : indexOf(key, key.hashCode());
+                    return indexOf(key);
                 }
 
                 @Override
                 protected int colIndexOfValue(Object value) {
-                    return value == null ? indexOfNull() : indexOf(value, value.hashCode());
+                    return indexOf(value);
                 }
 
                 @Override
diff --git a/core/java/android/util/Log.java b/core/java/android/util/Log.java
index 2b81072..a9b3571 100644
--- a/core/java/android/util/Log.java
+++ b/core/java/android/util/Log.java
@@ -96,12 +96,12 @@
      * @hide
      */
     public interface TerribleFailureHandler {
-        void onTerribleFailure(String tag, TerribleFailure what);
+        void onTerribleFailure(String tag, TerribleFailure what, boolean system);
     }
 
     private static TerribleFailureHandler sWtfHandler = new TerribleFailureHandler() {
-            public void onTerribleFailure(String tag, TerribleFailure what) {
-                RuntimeInit.wtf(tag, what);
+            public void onTerribleFailure(String tag, TerribleFailure what, boolean system) {
+                RuntimeInit.wtf(tag, what, system);
             }
         };
 
@@ -253,7 +253,7 @@
      * @param msg The message you would like logged.
      */
     public static int wtf(String tag, String msg) {
-        return wtf(LOG_ID_MAIN, tag, msg, null, false);
+        return wtf(LOG_ID_MAIN, tag, msg, null, false, false);
     }
 
     /**
@@ -262,7 +262,7 @@
      * @hide
      */
     public static int wtfStack(String tag, String msg) {
-        return wtf(LOG_ID_MAIN, tag, msg, null, true);
+        return wtf(LOG_ID_MAIN, tag, msg, null, true, false);
     }
 
     /**
@@ -272,7 +272,7 @@
      * @param tr An exception to log.
      */
     public static int wtf(String tag, Throwable tr) {
-        return wtf(LOG_ID_MAIN, tag, tr.getMessage(), tr, false);
+        return wtf(LOG_ID_MAIN, tag, tr.getMessage(), tr, false, false);
     }
 
     /**
@@ -283,14 +283,15 @@
      * @param tr An exception to log.  May be null.
      */
     public static int wtf(String tag, String msg, Throwable tr) {
-        return wtf(LOG_ID_MAIN, tag, msg, tr, false);
+        return wtf(LOG_ID_MAIN, tag, msg, tr, false, false);
     }
 
-    static int wtf(int logId, String tag, String msg, Throwable tr, boolean localStack) {
+    static int wtf(int logId, String tag, String msg, Throwable tr, boolean localStack,
+            boolean system) {
         TerribleFailure what = new TerribleFailure(msg, tr);
         int bytes = println_native(logId, ASSERT, tag, msg + '\n'
                 + getStackTraceString(localStack ? what : tr));
-        sWtfHandler.onTerribleFailure(tag, what);
+        sWtfHandler.onTerribleFailure(tag, what, system);
         return bytes;
     }
 
diff --git a/core/java/android/util/Slog.java b/core/java/android/util/Slog.java
index b25d80f..7a5fd50 100644
--- a/core/java/android/util/Slog.java
+++ b/core/java/android/util/Slog.java
@@ -74,19 +74,19 @@
     }
 
     public static int wtf(String tag, String msg) {
-        return Log.wtf(Log.LOG_ID_SYSTEM, tag, msg, null, false);
+        return Log.wtf(Log.LOG_ID_SYSTEM, tag, msg, null, false, true);
     }
 
     public static int wtfStack(String tag, String msg) {
-        return Log.wtf(Log.LOG_ID_SYSTEM, tag, msg, null, true);
+        return Log.wtf(Log.LOG_ID_SYSTEM, tag, msg, null, true, true);
     }
 
     public static int wtf(String tag, Throwable tr) {
-        return Log.wtf(Log.LOG_ID_SYSTEM, tag, tr.getMessage(), tr, false);
+        return Log.wtf(Log.LOG_ID_SYSTEM, tag, tr.getMessage(), tr, false, true);
     }
 
     public static int wtf(String tag, String msg, Throwable tr) {
-        return Log.wtf(Log.LOG_ID_SYSTEM, tag, msg, tr, false);
+        return Log.wtf(Log.LOG_ID_SYSTEM, tag, msg, tr, false, true);
     }
 
     public static int println(int priority, String tag, String msg) {
diff --git a/core/java/android/view/IWindowManager.aidl b/core/java/android/view/IWindowManager.aidl
index 7deb9c8..5d6d998 100644
--- a/core/java/android/view/IWindowManager.aidl
+++ b/core/java/android/view/IWindowManager.aidl
@@ -93,6 +93,8 @@
             int startHeight);
     void overridePendingAppTransitionThumb(in Bitmap srcThumb, int startX, int startY,
             IRemoteCallback startedCallback, boolean scaleUp);
+    void overridePendingAppTransitionAspectScaledThumb(in Bitmap srcThumb, int startX,
+            int startY, IRemoteCallback startedCallback, boolean scaleUp);
     void executeAppTransition();
     void setAppStartingWindow(IBinder token, String pkg, int theme,
             in CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel, int labelRes,
diff --git a/core/java/android/view/ThreadedRenderer.java b/core/java/android/view/ThreadedRenderer.java
index 50341fc..3af214d 100644
--- a/core/java/android/view/ThreadedRenderer.java
+++ b/core/java/android/view/ThreadedRenderer.java
@@ -99,15 +99,13 @@
     private boolean mRootNodeNeedsUpdate;
 
     ThreadedRenderer(Context context, boolean translucent) {
-        final TypedArray a = context.obtainStyledAttributes(
-                null, R.styleable.Lighting, R.attr.lightingStyle, 0);
+        final TypedArray a = context.obtainStyledAttributes(null, R.styleable.Lighting, 0, 0);
         mLightY = a.getDimension(R.styleable.Lighting_lightY, 0);
         mLightZ = a.getDimension(R.styleable.Lighting_lightZ, 0);
         mLightRadius = a.getDimension(R.styleable.Lighting_lightRadius, 0);
-        mAmbientShadowAlpha = Math.round(
-                255 * a.getFloat(R.styleable.Lighting_ambientShadowAlpha, 0));
-        mSpotShadowAlpha = Math.round(
-                255 * a.getFloat(R.styleable.Lighting_spotShadowAlpha, 0));
+        mAmbientShadowAlpha =
+                (int) (255 * a.getFloat(R.styleable.Lighting_ambientShadowAlpha, 0) + 0.5f);
+        mSpotShadowAlpha = (int) (255 * a.getFloat(R.styleable.Lighting_spotShadowAlpha, 0) + 0.5f);
         a.recycle();
 
         long rootNodePtr = nCreateRootRenderNode();
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 6f58582..2d58ecf 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -15110,7 +15110,10 @@
 
         final AccessibilityNodeInfo virtualView = viewRoot.getAccessibilityFocusedVirtualView();
         if (virtualView != null) {
-            virtualView.getBoundsInParent(bounds);
+            virtualView.getBoundsInScreen(bounds);
+            final int[] offset = mAttachInfo.mTmpLocation;
+            getLocationOnScreen(offset);
+            bounds.offset(-offset[0], -offset[1]);
         } else {
             bounds.set(0, 0, mRight - mLeft, mBottom - mTop);
         }
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index 854e6be..adad082 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -7022,27 +7022,23 @@
             if (another == null) {
                 return 1;
             }
-            if (getClass() != another.getClass()) {
-                return 1;
-            }
-            final int topDiference = mLocation.top - another.mLocation.top;
-            if (topDiference != 0) {
-                return topDiference;
-            }
-            // LTR
+            // We are ordering left-to-right, top-to-bottom.
             if (mLayoutDirection == LAYOUT_DIRECTION_LTR) {
                 final int leftDifference = mLocation.left - another.mLocation.left;
-                // First more to the left than second.
                 if (leftDifference != 0) {
                     return leftDifference;
                 }
             } else { // RTL
                 final int rightDifference = mLocation.right - another.mLocation.right;
-                // First more to the right than second.
                 if (rightDifference != 0) {
                     return -rightDifference;
                 }
             }
+            // We are ordering left-to-right, top-to-bottom.
+            final int topDifference = mLocation.top - another.mLocation.top;
+            if (topDifference != 0) {
+                return topDifference;
+            }
             // Break tie by height.
             final int heightDiference = mLocation.height() - another.mLocation.height();
             if (heightDiference != 0) {
diff --git a/core/java/android/view/accessibility/AccessibilityCache.java b/core/java/android/view/accessibility/AccessibilityCache.java
index ca6437a..ead757e 100644
--- a/core/java/android/view/accessibility/AccessibilityCache.java
+++ b/core/java/android/view/accessibility/AccessibilityCache.java
@@ -54,7 +54,12 @@
             if (DEBUG) {
                 Log.i(LOG_TAG, "Caching window: " + window.getId());
             }
-            mWindowCache.put(window.getId(), window);
+            final int windowId = window.getId();
+            AccessibilityWindowInfo oldWindow = mWindowCache.get(windowId);
+            if (oldWindow != null) {
+                oldWindow.recycle();
+            }
+            mWindowCache.put(windowId, AccessibilityWindowInfo.obtain(window));
         }
     }
 
@@ -183,14 +188,13 @@
                     sortedWindows.put(window.getLayer(), window);
                 }
 
-                List<AccessibilityWindowInfo> windows = new ArrayList<>();
+                List<AccessibilityWindowInfo> windows = new ArrayList<>(windowCount);
                 for (int i = windowCount - 1; i >= 0; i--) {
                     AccessibilityWindowInfo window = sortedWindows.valueAt(i);
                     windows.add(AccessibilityWindowInfo.obtain(window));
+                    sortedWindows.removeAt(i);
                 }
 
-                sortedWindows.clear();
-
                 return windows;
             }
             return null;
diff --git a/core/java/android/view/accessibility/AccessibilityWindowInfo.java b/core/java/android/view/accessibility/AccessibilityWindowInfo.java
index 80b5c50..ad55f5f 100644
--- a/core/java/android/view/accessibility/AccessibilityWindowInfo.java
+++ b/core/java/android/view/accessibility/AccessibilityWindowInfo.java
@@ -55,6 +55,7 @@
 
     private static final int BOOLEAN_PROPERTY_ACTIVE = 1 << 0;
     private static final int BOOLEAN_PROPERTY_FOCUSED = 1 << 1;
+    private static final int BOOLEAN_PROPERTY_ACCESSIBLITY_FOCUSED = 1 << 2;
 
     // Housekeeping.
     private static final int MAX_POOL_SIZE = 10;
@@ -258,6 +259,26 @@
     }
 
     /**
+     * Gets if this window has accessibility focus.
+     *
+     * @return Whether has accessibility focus.
+     */
+    public boolean isAccessibilityFocused() {
+        return getBooleanProperty(BOOLEAN_PROPERTY_ACCESSIBLITY_FOCUSED);
+    }
+
+    /**
+     * Sets if this window has accessibility focus.
+     *
+     * @param Whether has accessibility focus.
+     *
+     * @hide
+     */
+    public void setAccessibilityFocused(boolean focused) {
+        setBooleanProperty(BOOLEAN_PROPERTY_ACCESSIBLITY_FOCUSED, focused);
+    }
+
+    /**
      * Gets the number of child windows.
      *
      * @return The child count.
diff --git a/core/java/android/webkit/CookieManager.java b/core/java/android/webkit/CookieManager.java
index 7c30d2a..de7d2d0 100644
--- a/core/java/android/webkit/CookieManager.java
+++ b/core/java/android/webkit/CookieManager.java
@@ -98,7 +98,7 @@
      * @param webview the {@link WebView} instance to get the cookie policy for
      * @return true if the {@link WebView} accepts third party cookies
      */
-    public synchronized boolean acceptThirdPartyCookies(WebView webview) {
+    public boolean acceptThirdPartyCookies(WebView webview) {
         throw new MustOverrideException();
     }
 
diff --git a/core/java/android/widget/DatePickerCalendarDelegate.java b/core/java/android/widget/DatePickerCalendarDelegate.java
index 49d47fe..7df1fa3 100644
--- a/core/java/android/widget/DatePickerCalendarDelegate.java
+++ b/core/java/android/widget/DatePickerCalendarDelegate.java
@@ -16,9 +16,6 @@
 
 package android.widget;
 
-import android.animation.Keyframe;
-import android.animation.ObjectAnimator;
-import android.animation.PropertyValuesHolder;
 import android.content.Context;
 import android.content.res.ColorStateList;
 import android.content.res.Configuration;
@@ -60,10 +57,7 @@
     private static final int DEFAULT_START_YEAR = 1900;
     private static final int DEFAULT_END_YEAR = 2100;
 
-    private static final int PULSE_ANIMATOR_DURATION = 544;
-
     private static final int ANIMATION_DURATION = 300;
-    private static final int ANIMATION_DELAY = 650;
 
     private static final int MONTH_INDEX = 0;
     private static final int DAY_INDEX = 1;
@@ -73,8 +67,13 @@
     private SimpleDateFormat mDayFormat = new SimpleDateFormat("d", Locale.getDefault());
 
     private TextView mDayOfWeekView;
-    private LinearLayout mDateLayout;
+
+    /** Layout that contains the current month, day, and year. */
+    private LinearLayout mMonthDayYearLayout;
+
+    /** Clickable layout that contains the current day and year. */
     private LinearLayout mMonthAndDayLayout;
+
     private TextView mHeaderMonthTextView;
     private TextView mHeaderDayOfMonthTextView;
     private TextView mHeaderYearTextView;
@@ -93,8 +92,6 @@
 
     private DatePicker.OnDateChangedListener mDateChangedListener;
 
-    private boolean mDelayAnimation = true;
-
     private int mCurrentView = UNINITIALIZED;
 
     private Calendar mCurrentDate;
@@ -112,7 +109,6 @@
         mMinDate = getCalendarForLocale(mMinDate, locale);
         mMaxDate = getCalendarForLocale(mMaxDate, locale);
         mTempDate = getCalendarForLocale(mMaxDate, locale);
-
         mCurrentDate = getCalendarForLocale(mCurrentDate, locale);
 
         mMinDate.set(DEFAULT_START_YEAR, 1, 1);
@@ -129,7 +125,12 @@
         mDelegator.addView(mainView);
 
         mDayOfWeekView = (TextView) mainView.findViewById(R.id.date_picker_header);
-        mDateLayout = (LinearLayout) mainView.findViewById(R.id.day_picker_selector_layout);
+
+        // Layout that contains the current date and day name header.
+        final LinearLayout dateLayout = (LinearLayout) mainView.findViewById(
+                R.id.day_picker_selector_layout);
+        mMonthDayYearLayout = (LinearLayout) mainView.findViewById(
+                R.id.date_picker_month_day_year_layout);
         mMonthAndDayLayout = (LinearLayout) mainView.findViewById(
                 R.id.date_picker_month_and_day_layout);
         mMonthAndDayLayout.setOnClickListener(this);
@@ -156,7 +157,7 @@
                 R.styleable.DatePicker_headerSelectedTextColor, defaultHighlightColor);
         final int headerBackgroundColor = a.getColor(R.styleable.DatePicker_headerBackgroundColor,
                 Color.TRANSPARENT);
-        mDateLayout.setBackgroundColor(headerBackgroundColor);
+        dateLayout.setBackgroundColor(headerBackgroundColor);
 
         final int monthTextAppearanceResId = a.getResourceId(
                 R.styleable.DatePicker_headerMonthTextAppearance, -1);
@@ -189,6 +190,10 @@
         mYearPickerView = new YearPickerView(mContext);
         mYearPickerView.init(this);
 
+        final int yearSelectedCircleColor = a.getColor(R.styleable.DatePicker_yearListSelectorColor,
+                defaultHighlightColor);
+        mYearPickerView.setYearSelectedCircleColor(yearSelectedCircleColor);
+
         final ColorStateList calendarTextColor = a.getColorStateList(
                 R.styleable.DatePicker_calendarTextColor);
         final int calendarSelectedTextColor = a.getColor(
@@ -205,10 +210,12 @@
         mAnimator.addView(mDayPickerView);
         mAnimator.addView(mYearPickerView);
         mAnimator.setDateMillis(mCurrentDate.getTimeInMillis());
-        Animation animation = new AlphaAnimation(0.0f, 1.0f);
+
+        final Animation animation = new AlphaAnimation(0.0f, 1.0f);
         animation.setDuration(ANIMATION_DURATION);
         mAnimator.setInAnimation(animation);
-        Animation animation2 = new AlphaAnimation(1.0f, 0.0f);
+
+        final Animation animation2 = new AlphaAnimation(1.0f, 0.0f);
         animation2.setDuration(ANIMATION_DURATION);
         mAnimator.setOutAnimation(animation2);
 
@@ -276,30 +283,28 @@
             mDayOfWeekView.setText(mCurrentDate.getDisplayName(Calendar.DAY_OF_WEEK, Calendar.LONG,
                     Locale.getDefault()));
         }
-        final String bestDateTimePattern =
-                DateFormat.getBestDateTimePattern(mCurrentLocale, "yMMMd");
 
         // Compute indices of Month, Day and Year views
-        int[] viewIndices = getMonthDayYearIndexes(bestDateTimePattern);
+        final String bestDateTimePattern =
+                DateFormat.getBestDateTimePattern(mCurrentLocale, "yMMMd");
+        final int[] viewIndices = getMonthDayYearIndexes(bestDateTimePattern);
 
-        // Restart from a clean state
-        mMonthAndDayLayout.removeAllViews();
-        mDateLayout.removeView(mHeaderYearTextView);
-
-        // Position the Year View at the correct location
+        // Position the Year and MonthAndDay views within the header.
+        mMonthDayYearLayout.removeAllViews();
         if (viewIndices[YEAR_INDEX] == 0) {
-            mDateLayout.addView(mHeaderYearTextView, 1);
+            mMonthDayYearLayout.addView(mHeaderYearTextView);
+            mMonthDayYearLayout.addView(mMonthAndDayLayout);
         } else {
-            mDateLayout.addView(mHeaderYearTextView, 2);
+            mMonthDayYearLayout.addView(mMonthAndDayLayout);
+            mMonthDayYearLayout.addView(mHeaderYearTextView);
         }
 
-        // Position Day and Month Views
+        // Position Day and Month views within the MonthAndDay view.
+        mMonthAndDayLayout.removeAllViews();
         if (viewIndices[MONTH_INDEX] > viewIndices[DAY_INDEX]) {
-            // Day View is first
             mMonthAndDayLayout.addView(mHeaderDayOfMonthTextView);
             mMonthAndDayLayout.addView(mHeaderMonthTextView);
         } else {
-            // Month View is first
             mMonthAndDayLayout.addView(mHeaderMonthTextView);
             mMonthAndDayLayout.addView(mHeaderDayOfMonthTextView);
         }
@@ -329,12 +334,6 @@
 
         switch (viewIndex) {
             case MONTH_AND_DAY_VIEW:
-                ObjectAnimator pulseAnimator = getPulseAnimator(mMonthAndDayLayout, 0.9f,
-                        1.05f);
-                if (mDelayAnimation) {
-                    pulseAnimator.setStartDelay(ANIMATION_DELAY);
-                    mDelayAnimation = false;
-                }
                 mDayPickerView.onDateChanged();
                 if (mCurrentView != viewIndex) {
                     mMonthAndDayLayout.setSelected(true);
@@ -342,19 +341,13 @@
                     mAnimator.setDisplayedChild(MONTH_AND_DAY_VIEW);
                     mCurrentView = viewIndex;
                 }
-                pulseAnimator.start();
 
-                int flags = DateUtils.FORMAT_SHOW_DATE;
-                String dayString = DateUtils.formatDateTime(mContext, millis, flags);
+                final int flags = DateUtils.FORMAT_SHOW_DATE;
+                final String dayString = DateUtils.formatDateTime(mContext, millis, flags);
                 mAnimator.setContentDescription(mDayPickerDescription + ": " + dayString);
                 mAnimator.announceForAccessibility(mSelectDay);
                 break;
             case YEAR_VIEW:
-                pulseAnimator = getPulseAnimator(mHeaderYearTextView, 0.85f, 1.1f);
-                if (mDelayAnimation) {
-                    pulseAnimator.setStartDelay(ANIMATION_DELAY);
-                    mDelayAnimation = false;
-                }
                 mYearPickerView.onDateChanged();
                 if (mCurrentView != viewIndex) {
                     mMonthAndDayLayout.setSelected(false);
@@ -362,9 +355,8 @@
                     mAnimator.setDisplayedChild(YEAR_VIEW);
                     mCurrentView = viewIndex;
                 }
-                pulseAnimator.start();
 
-                CharSequence yearString = mYearFormat.format(millis);
+                final CharSequence yearString = mYearFormat.format(millis);
                 mAnimator.setContentDescription(mYearPickerDescription + ": " + yearString);
                 mAnimator.announceForAccessibility(mSelectYear);
                 break;
@@ -789,25 +781,4 @@
             }
         };
     }
-
-    /**
-     * Render an animator to pulsate a view in place.
-     * @param labelToAnimate the view to pulsate.
-     * @return The animator object. Use .start() to begin.
-     */
-    public static ObjectAnimator getPulseAnimator(View labelToAnimate, float decreaseRatio,
-                                                  float increaseRatio) {
-        Keyframe k0 = Keyframe.ofFloat(0f, 1f);
-        Keyframe k1 = Keyframe.ofFloat(0.275f, decreaseRatio);
-        Keyframe k2 = Keyframe.ofFloat(0.69f, increaseRatio);
-        Keyframe k3 = Keyframe.ofFloat(1f, 1f);
-
-        PropertyValuesHolder scaleX = PropertyValuesHolder.ofKeyframe(View.SCALE_X, k0, k1, k2, k3);
-        PropertyValuesHolder scaleY = PropertyValuesHolder.ofKeyframe(View.SCALE_Y, k0, k1, k2, k3);
-        ObjectAnimator pulseAnimator =
-                ObjectAnimator.ofPropertyValuesHolder(labelToAnimate, scaleX, scaleY);
-        pulseAnimator.setDuration(PULSE_ANIMATOR_DURATION);
-
-        return pulseAnimator;
-    }
 }
diff --git a/core/java/android/widget/DayPickerView.java b/core/java/android/widget/DayPickerView.java
index c44bd46..ca4095e 100644
--- a/core/java/android/widget/DayPickerView.java
+++ b/core/java/android/widget/DayPickerView.java
@@ -73,11 +73,6 @@
 
     private ScrollStateRunnable mScrollStateChangedRunnable = new ScrollStateRunnable(this);
 
-    public DayPickerView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-        init();
-    }
-
     public DayPickerView(Context context, DatePickerController controller) {
         super(context);
         init();
diff --git a/core/java/android/widget/TimePickerClockDelegate.java b/core/java/android/widget/TimePickerClockDelegate.java
index ae44047..8917f39 100644
--- a/core/java/android/widget/TimePickerClockDelegate.java
+++ b/core/java/android/widget/TimePickerClockDelegate.java
@@ -18,7 +18,6 @@
 
 import android.content.Context;
 import android.content.res.Configuration;
-import android.content.res.Resources;
 import android.content.res.TypedArray;
 import android.os.Parcel;
 import android.os.Parcelable;
@@ -34,6 +33,7 @@
 import android.view.inputmethod.InputMethodManager;
 import com.android.internal.R;
 
+import java.text.DateFormatSymbols;
 import java.util.Calendar;
 import java.util.Locale;
 
@@ -149,7 +149,7 @@
         mAmPmStrings = getAmPmStrings(context);
 
         // am/pm
-        View amPmView = mDelegator.findViewById(R.id.amPm);
+        final View amPmView = mDelegator.findViewById(R.id.amPm);
         if (amPmView instanceof Button) {
             mAmPmSpinner = null;
             mAmPmSpinnerInput = null;
diff --git a/core/java/android/widget/TimePickerSpinnerDelegate.java b/core/java/android/widget/TimePickerSpinnerDelegate.java
index dd1bf4f..6169d2e 100644
--- a/core/java/android/widget/TimePickerSpinnerDelegate.java
+++ b/core/java/android/widget/TimePickerSpinnerDelegate.java
@@ -16,9 +16,6 @@
 
 package android.widget;
 
-import android.animation.Keyframe;
-import android.animation.ObjectAnimator;
-import android.animation.PropertyValuesHolder;
 import android.content.Context;
 import android.content.res.ColorStateList;
 import android.content.res.Configuration;
@@ -43,6 +40,7 @@
 
 import com.android.internal.R;
 
+import java.text.DateFormatSymbols;
 import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.Locale;
@@ -73,12 +71,6 @@
 
     private static final int HOURS_IN_HALF_DAY = 12;
 
-    // Delay in ms before starting the pulse animation
-    private static final int PULSE_ANIMATOR_DELAY = 300;
-
-    // Duration in ms of the pulse animation
-    private static final int PULSE_ANIMATOR_DURATION = 544;
-
     private TextView mHourView;
     private TextView mMinuteView;
     private TextView mAmPmTextView;
@@ -98,7 +90,6 @@
     private String mDoublePlaceholderText;
     private String mDeletedKeyFormat;
     private boolean mInKbMode;
-    private boolean mIsTimeValid = true;
     private ArrayList<Integer> mTypedTimes = new ArrayList<Integer>();
     private Node mLegalTimesTree;
     private int mAmKeyCode;
@@ -215,14 +206,14 @@
         mHourView.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                setCurrentItemShowing(HOUR_INDEX, true, false, true);
+                setCurrentItemShowing(HOUR_INDEX, true, true);
                 tryVibrate();
             }
         });
         mMinuteView.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                setCurrentItemShowing(MINUTE_INDEX, true, false, true);
+                setCurrentItemShowing(MINUTE_INDEX, true, true);
                 tryVibrate();
             }
         });
@@ -245,7 +236,7 @@
 
     private void updateRadialPicker(int index) {
         mRadialTimePickerView.initialize(mInitialHourOfDay, mInitialMinute, mIs24HourView);
-        setCurrentItemShowing(index, false, true, true);
+        setCurrentItemShowing(index, false, true);
     }
 
     private int computeMaxWidthOfNumbers(int max) {
@@ -633,7 +624,7 @@
             updateHeaderHour(newValue, false);
             String announcement = String.format("%d", newValue);
             if (mAllowAutoAdvance && autoAdvance) {
-                setCurrentItemShowing(MINUTE_INDEX, true, true, false);
+                setCurrentItemShowing(MINUTE_INDEX, true, false);
                 announcement += ". " + mSelectMinutes;
             } else {
                 mRadialTimePickerView.setContentDescription(
@@ -753,11 +744,9 @@
     /**
      * Show either Hours or Minutes.
      */
-    private void setCurrentItemShowing(int index, boolean animateCircle, boolean delayLabelAnimate,
-                                       boolean announce) {
+    private void setCurrentItemShowing(int index, boolean animateCircle, boolean announce) {
         mRadialTimePickerView.setCurrentItemShowing(index, animateCircle);
 
-        TextView labelToAnimate;
         if (index == HOUR_INDEX) {
             int hours = mRadialTimePickerView.getCurrentHour();
             if (!mIs24HourView) {
@@ -767,24 +756,16 @@
             if (announce) {
                 mRadialTimePickerView.announceForAccessibility(mSelectHours);
             }
-            labelToAnimate = mHourView;
         } else {
             int minutes = mRadialTimePickerView.getCurrentMinute();
             mRadialTimePickerView.setContentDescription(mMinutePickerDescription + ": " + minutes);
             if (announce) {
                 mRadialTimePickerView.announceForAccessibility(mSelectMinutes);
             }
-            labelToAnimate = mMinuteView;
         }
 
         mHourView.setSelected(index == HOUR_INDEX);
         mMinuteView.setSelected(index == MINUTE_INDEX);
-
-        ObjectAnimator pulseAnimator = getPulseAnimator(labelToAnimate, 0.85f, 1.1f);
-        if (delayLabelAnimate) {
-            pulseAnimator.setStartDelay(PULSE_ANIMATOR_DELAY);
-        }
-        pulseAnimator.start();
     }
 
     /**
@@ -980,7 +961,7 @@
             if (!mIs24HourView) {
                 updateAmPmDisplay(hour < 12 ? AM : PM);
             }
-            setCurrentItemShowing(mRadialTimePickerView.getCurrentItemShowing(), true, true, true);
+            setCurrentItemShowing(mRadialTimePickerView.getCurrentItemShowing(), true, true);
             onValidationChanged(true);
         } else {
             boolean[] enteredZeros = {false, false};
@@ -1289,26 +1270,4 @@
             return false;
         }
     }
-
-    /**
-     * Render an animator to pulsate a view in place.
-     *
-     * @param labelToAnimate the view to pulsate.
-     * @return The animator object. Use .start() to begin.
-     */
-    private static ObjectAnimator getPulseAnimator(View labelToAnimate, float decreaseRatio,
-            float increaseRatio) {
-        final Keyframe k0 = Keyframe.ofFloat(0f, 1f);
-        final Keyframe k1 = Keyframe.ofFloat(0.275f, decreaseRatio);
-        final Keyframe k2 = Keyframe.ofFloat(0.69f, increaseRatio);
-        final Keyframe k3 = Keyframe.ofFloat(1f, 1f);
-
-        PropertyValuesHolder scaleX = PropertyValuesHolder.ofKeyframe(View.SCALE_X, k0, k1, k2, k3);
-        PropertyValuesHolder scaleY = PropertyValuesHolder.ofKeyframe(View.SCALE_Y, k0, k1, k2, k3);
-        ObjectAnimator pulseAnimator =
-                ObjectAnimator.ofPropertyValuesHolder(labelToAnimate, scaleX, scaleY);
-        pulseAnimator.setDuration(PULSE_ANIMATOR_DURATION);
-
-        return pulseAnimator;
-    }
 }
diff --git a/core/java/android/widget/YearPickerView.java b/core/java/android/widget/YearPickerView.java
index 94c21dc..2bf07f9 100644
--- a/core/java/android/widget/YearPickerView.java
+++ b/core/java/android/widget/YearPickerView.java
@@ -70,15 +70,6 @@
                 R.dimen.datepicker_year_picker_padding_top);
         setPadding(0, paddingTop, 0, 0);
 
-        // Use Theme attributes if possible
-        final TypedArray a = context.obtainStyledAttributes(
-                attrs, R.styleable.DatePicker, defStyleAttr, defStyleRes);
-        final int colorResId = a.getResourceId(R.styleable.DatePicker_yearListSelectorColor,
-                R.color.datepicker_default_circle_background_color_holo_light);
-        mYearSelectedCircleColor = res.getColor(colorResId);
-
-        a.recycle();
-
         setOnItemClickListener(this);
         setDividerHeight(0);
     }
diff --git a/core/java/com/android/internal/app/ToolbarActionBar.java b/core/java/com/android/internal/app/ToolbarActionBar.java
index 13eb182..abe8a9f 100644
--- a/core/java/com/android/internal/app/ToolbarActionBar.java
+++ b/core/java/com/android/internal/app/ToolbarActionBar.java
@@ -226,6 +226,11 @@
     }
 
     @Override
+    public void setWindowTitle(CharSequence title) {
+        mDecorToolbar.setWindowTitle(title);
+    }
+
+    @Override
     public void setSubtitle(CharSequence subtitle) {
         mDecorToolbar.setSubtitle(subtitle);
     }
diff --git a/core/java/com/android/internal/app/WindowDecorActionBar.java b/core/java/com/android/internal/app/WindowDecorActionBar.java
index b58e1db..a8f7bb3 100644
--- a/core/java/com/android/internal/app/WindowDecorActionBar.java
+++ b/core/java/com/android/internal/app/WindowDecorActionBar.java
@@ -431,6 +431,11 @@
         mDecorToolbar.setTitle(title);
     }
 
+    @Override
+    public void setWindowTitle(CharSequence title) {
+        mDecorToolbar.setWindowTitle(title);
+    }
+
     public void setSubtitle(CharSequence subtitle) {
         mDecorToolbar.setSubtitle(subtitle);
     }
diff --git a/core/java/com/android/internal/net/VpnConfig.java b/core/java/com/android/internal/net/VpnConfig.java
index 9c3f419..3d016be 100644
--- a/core/java/com/android/internal/net/VpnConfig.java
+++ b/core/java/com/android/internal/net/VpnConfig.java
@@ -90,6 +90,8 @@
     public List<RouteInfo> routes = new ArrayList<RouteInfo>();
     public List<String> dnsServers;
     public List<String> searchDomains;
+    public List<String> allowedApplications;
+    public List<String> disallowedApplications;
     public PendingIntent configureIntent;
     public long startTime = -1;
     public boolean legacy;
@@ -151,6 +153,8 @@
         out.writeTypedList(routes);
         out.writeStringList(dnsServers);
         out.writeStringList(searchDomains);
+        out.writeStringList(allowedApplications);
+        out.writeStringList(disallowedApplications);
         out.writeParcelable(configureIntent, flags);
         out.writeLong(startTime);
         out.writeInt(legacy ? 1 : 0);
@@ -173,6 +177,8 @@
             in.readTypedList(config.routes, RouteInfo.CREATOR);
             config.dnsServers = in.createStringArrayList();
             config.searchDomains = in.createStringArrayList();
+            config.allowedApplications = in.createStringArrayList();
+            config.disallowedApplications = in.createStringArrayList();
             config.configureIntent = in.readParcelable(null);
             config.startTime = in.readLong();
             config.legacy = in.readInt() != 0;
diff --git a/core/java/com/android/internal/os/BinderInternal.java b/core/java/com/android/internal/os/BinderInternal.java
index 3b0f0f4..240d9df 100644
--- a/core/java/com/android/internal/os/BinderInternal.java
+++ b/core/java/com/android/internal/os/BinderInternal.java
@@ -21,6 +21,7 @@
 import android.util.EventLog;
 
 import java.lang.ref.WeakReference;
+import java.util.ArrayList;
 
 /**
  * Private and debugging Binder APIs.
@@ -28,19 +29,35 @@
  * @see IBinder
  */
 public class BinderInternal {
-    static WeakReference<GcWatcher> mGcWatcher
+    static WeakReference<GcWatcher> sGcWatcher
             = new WeakReference<GcWatcher>(new GcWatcher());
-    static long mLastGcTime;
-    
+    static ArrayList<Runnable> sGcWatchers = new ArrayList<>();
+    static Runnable[] sTmpWatchers = new Runnable[1];
+    static long sLastGcTime;
+
     static final class GcWatcher {
         @Override
         protected void finalize() throws Throwable {
             handleGc();
-            mLastGcTime = SystemClock.uptimeMillis();
-            mGcWatcher = new WeakReference<GcWatcher>(new GcWatcher());
+            sLastGcTime = SystemClock.uptimeMillis();
+            synchronized (sGcWatchers) {
+                sTmpWatchers = sGcWatchers.toArray(sTmpWatchers);
+            }
+            for (int i=0; i<sTmpWatchers.length; i++) {
+                if (sTmpWatchers[i] != null) {
+                    sTmpWatchers[i].run();
+                }
+            }
+            sGcWatcher = new WeakReference<GcWatcher>(new GcWatcher());
         }
     }
-    
+
+    public static void addGcWatcher(Runnable watcher) {
+        synchronized (sGcWatchers) {
+            sGcWatchers.add(watcher);
+        }
+    }
+
     /**
      * Add the calling thread to the IPC thread pool.  This function does
      * not return until the current process is exiting.
@@ -58,7 +75,7 @@
      * SystemClock.uptimeMillis()} of the last garbage collection.
      */
     public static long getLastGcTime() {
-        return mLastGcTime;
+        return sLastGcTime;
     }
 
     /**
diff --git a/core/java/com/android/internal/os/InstallerConnection.java b/core/java/com/android/internal/os/InstallerConnection.java
index e3f229f..2f30ebc 100644
--- a/core/java/com/android/internal/os/InstallerConnection.java
+++ b/core/java/com/android/internal/os/InstallerConnection.java
@@ -91,26 +91,40 @@
     }
 
     public int dexopt(String apkPath, int uid, boolean isPublic, String instructionSet) {
+        return dexopt(apkPath, uid, isPublic, "*", instructionSet, false);
+    }
+
+    public int dexopt(String apkPath, int uid, boolean isPublic, String pkgName,
+            String instructionSet, boolean vmSafeMode) {
         StringBuilder builder = new StringBuilder("dexopt");
         builder.append(' ');
         builder.append(apkPath);
         builder.append(' ');
         builder.append(uid);
         builder.append(isPublic ? " 1" : " 0");
-        builder.append(" *");         // No pkgName arg present
+        builder.append(' ');
+        builder.append(pkgName);
         builder.append(' ');
         builder.append(instructionSet);
+        builder.append(' ');
+        builder.append(vmSafeMode ? " 1" : " 0");
         return execute(builder.toString());
     }
 
     public int patchoat(String apkPath, int uid, boolean isPublic, String instructionSet) {
+        return patchoat(apkPath, uid, isPublic, "*", instructionSet);
+    }
+
+    public int patchoat(String apkPath, int uid, boolean isPublic, String pkgName,
+            String instructionSet) {
         StringBuilder builder = new StringBuilder("patchoat");
         builder.append(' ');
         builder.append(apkPath);
         builder.append(' ');
         builder.append(uid);
         builder.append(isPublic ? " 1" : " 0");
-        builder.append(" *");         // No pkgName arg present
+        builder.append(' ');
+        builder.append(pkgName);
         builder.append(' ');
         builder.append(instructionSet);
         return execute(builder.toString());
diff --git a/core/java/com/android/internal/os/RuntimeInit.java b/core/java/com/android/internal/os/RuntimeInit.java
index d35fce4..29ccb6a 100644
--- a/core/java/com/android/internal/os/RuntimeInit.java
+++ b/core/java/com/android/internal/os/RuntimeInit.java
@@ -338,10 +338,10 @@
      * @param tag to record with the error
      * @param t exception describing the error site and conditions
      */
-    public static void wtf(String tag, Throwable t) {
+    public static void wtf(String tag, Throwable t, boolean system) {
         try {
             if (ActivityManagerNative.getDefault().handleApplicationWtf(
-                    mApplicationObject, tag, new ApplicationErrorReport.CrashInfo(t))) {
+                    mApplicationObject, tag, system, new ApplicationErrorReport.CrashInfo(t))) {
                 // The Activity Manager has already written us off -- now exit.
                 Process.killProcess(Process.myPid());
                 System.exit(10);
diff --git a/core/java/com/android/internal/widget/ToolbarWidgetWrapper.java b/core/java/com/android/internal/widget/ToolbarWidgetWrapper.java
index 5da5ae9..250bbac 100644
--- a/core/java/com/android/internal/widget/ToolbarWidgetWrapper.java
+++ b/core/java/com/android/internal/widget/ToolbarWidgetWrapper.java
@@ -162,6 +162,8 @@
             }
 
             a.recycle();
+        } else {
+            mDisplayOpts = detectDisplayOptions();
         }
 
         if (TextUtils.isEmpty(mToolbar.getNavigationContentDescription())) {
@@ -181,6 +183,15 @@
         });
     }
 
+    private int detectDisplayOptions() {
+        int opts = ActionBar.DISPLAY_SHOW_TITLE | ActionBar.DISPLAY_SHOW_HOME |
+                ActionBar.DISPLAY_USE_LOGO;
+        if (mToolbar.getNavigationIcon() != null) {
+            opts |= ActionBar.DISPLAY_HOME_AS_UP;
+        }
+        return opts;
+    }
+
     @Override
     public ViewGroup getViewGroup() {
         return mToolbar;
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index 79b8542..62d8036 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -879,9 +879,17 @@
         parseRuntimeOption("dalvik.vm.profile.max-stack-depth",
                            profileMaxStackDepth,
                            "-Xprofile-max-stack-depth:");
-    }
 
-    parseRuntimeOption("dalvik.vm.native.bridge", nativeBridgeLibrary, "-XX:NativeBridge=");
+        // Native bridge library. "0" means that native bridge is disabled.
+        property_get("ro.dalvik.vm.native.bridge", propBuf, "");
+        if (propBuf[0] == '\0') {
+            ALOGW("ro.dalvik.vm.native.bridge is not expected to be empty");
+        } else if (strcmp(propBuf, "0") != 0) {
+            snprintf(nativeBridgeLibrary, sizeof("-XX:NativeBridge=") + PROPERTY_VALUE_MAX,
+                     "-XX:NativeBridge=%s", propBuf);
+            addOption(nativeBridgeLibrary);
+        }
+    }
 
     initArgs.version = JNI_VERSION_1_4;
     initArgs.options = mOptions.editArray();
diff --git a/core/jni/android/graphics/Shader.cpp b/core/jni/android/graphics/Shader.cpp
index e02aa5e..6146fff 100644
--- a/core/jni/android/graphics/Shader.cpp
+++ b/core/jni/android/graphics/Shader.cpp
@@ -66,6 +66,7 @@
         } else {
             shader->resetLocalMatrix();
         }
+        shader->setGenerationID(shader->getGenerationID() + 1);
     }
 }
 
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 672ad84..7c5233c 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -2208,7 +2208,7 @@
     <permission android:name="android.permission.MODIFY_PARENTAL_CONTROLS"
         android:label="@string/permlab_modifyParentalControls"
         android:description="@string/permdesc_modifyParentalControls"
-        android:protectionLevel="signature" />
+        android:protectionLevel="signature|system" />
 
     <!-- Must be required by device administration receiver, to ensure that only the
          system can interact with it. -->
diff --git a/core/res/res/layout-land/time_picker_holo.xml b/core/res/res/layout-land/time_picker_holo.xml
index 3b3d63c..f316f1b 100644
--- a/core/res/res/layout-land/time_picker_holo.xml
+++ b/core/res/res/layout-land/time_picker_holo.xml
@@ -18,25 +18,26 @@
 -->
 
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="match_parent"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="horizontal"
+    android:focusable="true"
+    android:layout_marginLeft="@dimen/timepicker_minimum_margin_sides"
+    android:layout_marginRight="@dimen/timepicker_minimum_margin_sides"
+    android:layout_marginTop="@dimen/timepicker_minimum_margin_top_bottom"
+    android:layout_marginBottom="@dimen/timepicker_minimum_margin_top_bottom">
+    <FrameLayout
+        android:layout_width="0dp"
         android:layout_height="match_parent"
-        android:orientation="horizontal"
-        android:focusable="true"
-        android:layout_marginLeft="@dimen/timepicker_minimum_margin_sides"
-        android:layout_marginRight="@dimen/timepicker_minimum_margin_sides"
-        android:layout_marginTop="@dimen/timepicker_minimum_margin_top_bottom"
-        android:layout_marginBottom="@dimen/timepicker_minimum_margin_top_bottom">
-    <LinearLayout
-            android:layout_width="@dimen/timepicker_left_side_width"
-            android:layout_height="match_parent"
-            android:orientation="vertical">
+        android:layout_weight="1"
+        android:minWidth="@dimen/timepicker_left_side_width"
+        android:orientation="vertical">
         <include
-                layout="@layout/time_header_label"
-                android:layout_width="match_parent"
-                android:layout_height="0dip"
-                android:layout_weight="1"
-                android:layout_gravity="center" />
-    </LinearLayout>
+            layout="@layout/time_header_label"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_gravity="center" />
+    </FrameLayout>
     <android.widget.RadialTimePickerView
         android:id="@+id/radial_picker"
         android:layout_width="@dimen/timepicker_radial_picker_dimen"
diff --git a/core/res/res/layout/date_picker_selected_date.xml b/core/res/res/layout/date_picker_selected_date.xml
index 23ae08f..d212cb0 100644
--- a/core/res/res/layout/date_picker_selected_date.xml
+++ b/core/res/res/layout/date_picker_selected_date.xml
@@ -32,37 +32,42 @@
         android:layout_marginBottom="8dp" />
 
     <LinearLayout
-        android:id="@+id/date_picker_month_and_day_layout"
+        android:id="@+id/date_picker_month_day_year_layout"
         android:layout_width="match_parent"
         android:layout_height="0dp"
         android:layout_weight="1"
-        android:layout_gravity="center"
-        android:clickable="true"
-        android:orientation="vertical">
+        android:orientation="vertical"
+        android:gravity="center">
 
-        <TextView
-            android:id="@+id/date_picker_month"
+        <LinearLayout
+            android:id="@+id/date_picker_month_and_day_layout"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:duplicateParentState="true"
-            android:gravity="center_horizontal|bottom" />
+            android:clickable="true"
+            android:orientation="vertical">
+
+            <TextView
+                android:id="@+id/date_picker_month"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:duplicateParentState="true"
+                android:gravity="center" />
+
+            <TextView
+                android:id="@+id/date_picker_day"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="-10dip"
+                android:layout_marginBottom="-10dip"
+                android:duplicateParentState="true"
+                android:gravity="center" />
+        </LinearLayout>
 
         <TextView
-            android:id="@+id/date_picker_day"
+            android:id="@+id/date_picker_year"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_gravity="center"
-            android:layout_marginBottom="-10dip"
-            android:layout_marginTop="-10dip"
-            android:duplicateParentState="true"
             android:gravity="center" />
     </LinearLayout>
 
-    <TextView
-        android:id="@+id/date_picker_year"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_gravity="center"
-        android:gravity="center_horizontal|top" />
-
 </LinearLayout>
diff --git a/core/res/res/layout/preference_material.xml b/core/res/res/layout/preference_material.xml
index 3919f5f..778e70a 100644
--- a/core/res/res/layout/preference_material.xml
+++ b/core/res/res/layout/preference_material.xml
@@ -20,58 +20,62 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:minHeight="?android:attr/listPreferredItemHeightSmall"
+    android:minHeight="?attr/listPreferredItemHeightSmall"
     android:gravity="center_vertical"
     android:paddingStart="?attr/listPreferredItemPaddingStart"
     android:paddingEnd="?attr/listPreferredItemPaddingEnd"
-    android:background="?android:attr/activatedBackgroundIndicator">
+    android:background="?attr/activatedBackgroundIndicator">
 
     <LinearLayout
-        android:id="@+android:id/icon_frame"
+        android:id="@+id/icon_frame"
         android:layout_width="wrap_content"
         android:layout_height="match_parent"
-        android:minWidth="58dip"
+        android:layout_marginStart="-4dp"
+        android:minWidth="60dp"
         android:gravity="start|center_vertical"
-        android:orientation="horizontal">
+        android:orientation="horizontal"
+        android:paddingEnd="12dp"
+        android:paddingTop="4dp"
+        android:paddingBottom="4dp">
         <ImageView
-            android:id="@+android:id/icon"
+            android:id="@+id/icon"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:scaleType="centerInside"
-            android:layout_marginEnd="8dip" />
+            android:maxWidth="48dp"
+            android:maxHeight="48dp" />
     </LinearLayout>
 
     <RelativeLayout
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_weight="1"
-        android:paddingTop="16dip"
-        android:paddingBottom="16dip">
+        android:paddingTop="16dp"
+        android:paddingBottom="16dp">
 
-        <TextView android:id="@+android:id/title"
+        <TextView android:id="@+id/title"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:singleLine="true"
-            android:textAppearance="?android:attr/textAppearanceListItem"
+            android:textAppearance="?attr/textAppearanceListItem"
             android:ellipsize="marquee" />
 
-        <TextView android:id="@+android:id/summary"
+        <TextView android:id="@+id/summary"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_below="@android:id/title"
-            android:layout_alignStart="@android:id/title"
-            android:textAppearance="?android:attr/textAppearanceListItemSecondary"
-            android:textColor="?android:attr/textColorSecondary"
+            android:layout_below="@id/title"
+            android:layout_alignStart="@id/title"
+            android:textAppearance="?attr/textAppearanceListItemSecondary"
+            android:textColor="?attr/textColorSecondary"
             android:maxLines="10" />
 
     </RelativeLayout>
 
     <!-- Preference should place its actual preference widget here. -->
-    <LinearLayout android:id="@+android:id/widget_frame"
+    <LinearLayout android:id="@+id/widget_frame"
         android:layout_width="wrap_content"
         android:layout_height="match_parent"
-        android:minWidth="58dip"
         android:gravity="end|center_vertical"
+        android:paddingStart="16dp"
         android:orientation="vertical" />
 
 </LinearLayout>
diff --git a/core/res/res/values-af/strings.xml b/core/res/res/values-af/strings.xml
index 6dfda5e..312ffb138 100644
--- a/core/res/res/values-af/strings.xml
+++ b/core/res/res/values-af/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"Sit foon aan of af"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Laat die program toe om die tablet aan en af te skakel."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Laat die program toe om die foon aan en af te skakel."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"stel skermuitteltyd terug"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Laat die program toe om die skermuitteltyd terug te stel."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"laat loop in fabriekstoetsmodus"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Laat loop as \'n laevlak-vervaardigertoets, sodat volle toegang tot die tablethardeware verkry word. Net beskikbaar wanneer \'n tablet in vervaardigertoetsmodus loop."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Laat loop as \'n laevlak-vervaardigertoets, sodat volle toegang tot die foonhardeware verkry word. Net beskikbaar wanneer \'n foon in vervaardigertoets-modus loop."</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"Weier"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Toestemming versoek"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Toestemming versoek\nvir rekening <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Jy gebruik hierdie program buite jou werkprofiel"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"Jy gebruik tans hierdie program in jou werkprofiel"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Invoermetode"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Sinkroniseer"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Aanvaar oproep?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Altyd"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Net een keer"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s steun nie werkprofiel nie"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tablet"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Foon"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Oorfone"</string>
@@ -1643,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Toeganklikheid geaktiveer."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Toeganklikheid gekanselleer."</string>
     <string name="user_switched" msgid="3768006783166984410">"Huidige gebruiker <xliff:g id="NAME">%1$s</xliff:g> ."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Skakel tans oor na <xliff:g id="NAME">%1$s</xliff:g> …"</string>
     <string name="owner_name" msgid="2716755460376028154">"Eienaar"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Fout"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Hierdie verandering word nie deur jou administrateur toegelaat nie"</string>
@@ -1779,6 +1774,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Vra PIN voordat jy ontspeld"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Vra ontsluitpatroon voordat jy ontspeld"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Vra wagwoord voordat jy ontspeld"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"Om die batteryleeftyd te help verbeter, verminder batterybespaarder jou toestel se werkverrigting en beperk virbasie en die meeste agtergronddata. E-pos, boodskappe en ander programme wat op sinkronisering staatmaak, sal dalk nie opdateer nie tensy jy hulle oopmaak.\n\nBatterybespaarder skakel outomaties af wanneer jou toestel besig is om te laai."</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Om batteryleeftyd te help verbeter, verminder batterybespaarder jou toestel se werkverrigting en beperk vibrasie en die meeste agtergronddata. E-pos, boodskappe en ander programme wat op sinkronisering staatmaak, sal dalk nie opdateer nie tensy jy hulle oopmaak.\n\nBatterybespaarder skakel outomaties af wanneer jou toestel laai."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Totdat jou ontspantyd om <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> eindig"</string>
 </resources>
diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml
index 0f2810c..a1de99e 100644
--- a/core/res/res/values-am/strings.xml
+++ b/core/res/res/values-am/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"ስልክ አብራ ወይም አጥፋ"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"ጡባዊ ተኮውን ለማብራት እና ለማጥፋት ለመተግበሪያው ይፈቅዳሉ።"</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"ስልኩን ለማብራት እና ለማጥፋት ለመተግበሪያው ይፈቅዳሉ።"</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"የማሳያ እረፍት መውሰጃ ዳግም አስጀምር"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"መተግበሪያው የማሳያው እረፍት መውሰጃውን ዳግም እንዲያስጀምር ያስችለዋል።"</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"የፋብሪካ ሙከራ ሁነታ አሂድ"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"ለመሣሪያው ሀርድዌር ሙሉ ድረስበመፍቀድ እንደ ዝቅተኛ-ደረጃ አምራች ሙከራ አሂድ። የሚገኘው መሣሪያው በአምራች ሙከራ ሁነታ ላይ ሲአሄድ ብቻ ነው።"</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"ለስልኩ ሀርድዌር ሙሉመድረስበመፍቀድእንደ ዝቅተኛ-ደረጃ አምራች ሙከራ አሂድ። የሚገኘው ስልኩ በአምራች ሙከራ ሁነታ ላይ ሲአሄድ ብቻ ነው።"</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"ያስተባብሉ"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"ፈቃድ ተጠይቋል"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">\n" ለ<xliff:g id="ACCOUNT">%s</xliff:g> መለያ ፈቃድ ተጠይቋል"</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"ከስራ መገለጫዎ ውጪ ሆነው መተግበሪያ እየተጠቀሙ ነው"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"ይህን መተግበሪያ በእርስዎ የስራ መገለጫ ላይ እየተጠቀሙበት ነው"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"ግቤት ስልት"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"አስምር"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"ጥሪ ተቀበል?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"ዘወትር"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"አንዴ ብቻ"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s የስራ መገለጫ አይደግፍም"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"ጡባዊ ተኮ"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"ስልክ"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"የጆሮ ማዳመጫዎች"</string>
@@ -1643,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"ተደራሽነት ነቅቷል።"</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"ተደራሽነት ተሰርዟል።"</string>
     <string name="user_switched" msgid="3768006783166984410">"የአሁኑ ተጠቃሚ <xliff:g id="NAME">%1$s</xliff:g>።"</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"ባለቤት"</string>
     <string name="error_message_title" msgid="4510373083082500195">"ስህተት"</string>
@@ -1779,6 +1775,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"ከመንቀል በፊት ፒን ጠይቅ"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"ከመንቀል በፊት የማስከፈቻ ስርዓተ-ጥለት ጠይቅ"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"ከመንቀል በፊት የይለፍ ቃል ጠይቅ"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"የባትሪ ህይወት እንዲሻሻል ለማገዝ ባትሪ ቆጣቢ የመሣሪያዎን አፈጻጸም ይቀንሰውና ንዝረትን አብዛኛውን የጀርባ ውሂብ ይገድባል። ኢሜይል፣ መልዕክት መላክ እና ሌሎች በማመሳሰል ላይ ብቻ የሚወሰኑ መተግበሪያዎች እስኪከፍቷቸው ድረስ ላይዘመኑ ይችላሉ።\n\nመሣሪያዎ ኃይል እየሞላ ሳለ ባትሪ ቆጣቢ በራስ-ሰር ይጠፋል"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"የባትሪ ህይወትን ለማሻሻል ሲባል ባትሪ ቆጣቢ የመሣሪያዎ የስራ አፈጻጸምን እና ንዝረትንና አብዛኛውን የጀርባ ውሂብ ይቀንሳል። ኢሜይል፣ መልዕክት መላላኪያ እና ሌሎች በማመሳሰል ላይ የሚወሰኑ መተግበሪያዎች እስኪከፍቷቸው ድረስ ላይዘምኑ ይችላሉ።\n\nመሣሪያዎ ባትሪ እየሞላ ሲሆን ባትሪ ቆጣቢ በራስ-ሰር ይጠፋል።"</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"የጥገና ጊዜዎ <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> ላይ እስኪያበቃ ድረስ"</string>
 </resources>
diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml
index 200a578..ba2194e 100644
--- a/core/res/res/values-ar/strings.xml
+++ b/core/res/res/values-ar/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"تشغيل الهاتف أو إيقاف تشغيله"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"للسماح للتطبيق بتشغيل الجهاز اللوحي أو إيقاف تشغيله."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"للسماح للتطبيق بتشغيل الهاتف أو إيقاف تشغيله."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"إعادة تعيين مهلة العرض"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"للسماح للتطبيق بإعادة تعيين مهلة العرض."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"تشغيل في وضع اختبار المصنع"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"التشغيل كاختبار للشركة المصنعة من المستوى المنخفض، مما يسمح بإكمال الدخول إلى الجهاز اللوحي. ويتوفر فقط عندما يتم تشغيل الجهاز اللوحي في وضع اختبار المصنِّع."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"للتشغيل كاختبار مصنِّع بمستوى أدنى، مما يسمح بالدخول الكامل إلى جهاز الهاتف. لا يتوفر سوى عند تشغيل الهاتف في وضع اختبار المصنِّع."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"رفض"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"الإذن مطلوب"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"الإذن مطلوب\nللحساب <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"أنت تستخدم هذا التطبيق خارج ملفك الشخصي للعمل"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"أنت تستخدم هذا التطبيق في ملفك الشخصي للعمل"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"طريقة الإرسال"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"مزامنة"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"إمكانية الدخول"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"هل تريد قبول المكالمة؟"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"دومًا"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"مرة واحدة فقط"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"‏لا يدعم %1$s الملفات الشخصية للعمل"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"الجهاز اللوحي"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"الهاتف"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"سماعات رأس"</string>
@@ -1644,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"تم تمكين إمكانية الدخول."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"تم إلغاء تسهيل الدخول."</string>
     <string name="user_switched" msgid="3768006783166984410">"المستخدم الحالي <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"المالك"</string>
     <string name="error_message_title" msgid="4510373083082500195">"خطأ"</string>
@@ -1777,12 +1772,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"بدء"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"تم تثبيت الشاشة"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"تم إلغاء تثبيت الشاشة"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"للمساعدة في تحسين مدة تشغيل البطارية، يقلل وضع توفير طاقة البطارية أداء جهازك ويقيد الاهتزاز ومعظم بيانات الخلفية. وقد لا يتم تحديث البريد الإلكتروني والمراسلة والتطبيقات الأخرى التي تعتمد على المزامنة إلا إذا فتحتها.\n\nيتم إيقاف وضع توفير طاقة البطارية تلقائيًا أثناء شحن جهازك"</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"المطالبة برقم التعريف الشخصي قبل إزالة التثبيت"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"المطالبة بنقش إلغاء القفل قبل إزالة التثبيت"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"المطالبة بكلمة المرور قبل إزالة التثبيت"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"للمساعدة في تحسين مدة تشغيل البطارية، يقلل وضع توفير طاقة البطارية أداء جهازك ويقلل من الاهتزاز ومعظم بيانات الخلفية. وقد لا يتم تحديث البريد الإلكتروني والمراسلة والتطبيقات الأخرى التي تعتمد على المزامنة ما لم تفتحها.\n\nيتم إيقاف وضع توفير طاقة البطارية تلقائيًا عندما يكون الجهاز قيد الشحن."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"إلى أن ينتهي وقت التوقف عن العمل في <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml
index 224081c..5e2c5d8 100644
--- a/core/res/res/values-bg/strings.xml
+++ b/core/res/res/values-bg/strings.xml
@@ -1427,8 +1427,7 @@
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Иска се разрешение\nза профила <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
     <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
     <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_work" msgid="621480743856004612">"Използвате това приложение в служебния си потребителски профил"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Метод на въвеждане"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Синхронизиране"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Достъпност"</string>
@@ -1644,7 +1643,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Достъпността е активирана."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Функцията за достъпност е анулирана."</string>
     <string name="user_switched" msgid="3768006783166984410">"Текущ потребител <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"Собственик"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Грешка"</string>
@@ -1777,12 +1776,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"СТАРТИРАНЕ"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Екранът е фиксиран"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Екранът е освободен"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"С цел удължаване на живота на батерията режимът за запазването й намалява ефективността на устройството ви и ограничава вибрирането и повечето данни на заден план. Имейл, Съобщения и другите приложения, които разчитат на синхронизиране, може да не се актуализират, освен ако не ги отворите.\n\nТози режим автоматично се изключва, когато устройството ви се зарежда."</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Запитване за ПИН код преди освобождаване"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Запитване за фигура за отключване преди освобождаване"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Запитване за парола преди освобождаване"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"С цел удължаване на живота на батерията режимът за запазването й намалява ефективността на устройството ви и ограничава вибрирането и повечето данни на заден план. Имейл, Съобщения и другите приложения, които разчитат на синхронизиране, може да не се актуализират, освен ако не ги отворите.\n\nТози режим автоматично се изключва, когато устройството ви се зарежда."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"До приключване на неактивността в <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-bn-rBD/strings.xml b/core/res/res/values-bn-rBD/strings.xml
index ca9f081..07cf6c0 100644
--- a/core/res/res/values-bn-rBD/strings.xml
+++ b/core/res/res/values-bn-rBD/strings.xml
@@ -1639,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"অ্যাক্সেসযোগ্যতা সক্ষম করা হয়েছে৷"</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"অ্যাক্সেসযোগ্যতা বাতিল করা হয়েছে৷"</string>
     <string name="user_switched" msgid="3768006783166984410">"বর্তমান ব্যবহারকারী <xliff:g id="NAME">%1$s</xliff:g>৷"</string>
-    <string name="user_switching_message" msgid="8664390176945256295">"<xliff:g id="NAME">%1$s</xliff:g> নামের ব্যবহারকারীতে যাচ্ছে"</string>
+    <string name="user_switching_message" msgid="2871009331809089783">"<xliff:g id="NAME">%1$s</xliff:g> নামের ব্যবহারকারীতে যাচ্ছে…"</string>
     <string name="owner_name" msgid="2716755460376028154">"মালিক"</string>
     <string name="error_message_title" msgid="4510373083082500195">"ত্রুটি"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"এই পরিবর্তনটি আপনার প্রশাসক দ্বারা অনুমোদিত নয়"</string>
@@ -1774,6 +1774,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"আনপিন করার আগে PIN চান"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"আনপিন করার আগে আনলক প্যাটার্ন চান"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"আনপিন করার আগে পাসওয়ার্ড চান"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"ব্যাটারির আয়ু বাড়াতে সহায়তার জন্য, ব্যাটারি সঞ্চয়কারী আপনার ডিভাইসের কার্য-সম্পাদনা কমিয়ে আনবে এবং কম্পন ও বেশিরভাগ পশ্চাদভূমি ডেটাকে সীমিত করবে। ইমেল, বার্তাপ্রেরণ ও অন্যান্য অ্যাপ্লিকেশান, যেগুলি সিঙ্ক হওয়ার উপর নির্ভরশীল সেগুলিকে আপনি না খোলা পর্যন্ত সেগুলি আপডেট নাও হতে পারে।\n\nআপনার ডিভাইস চার্জ হওয়ার সময় ব্যাটারি সঞ্চয়কারী স্বয়ংক্রিয়ভাবে বন্ধ হয়ে যাবে।"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"ব্যাটারির আয়ু বাড়াতে সহায়তার জন্য, ব্যাটারি সঞ্চয়কারী আপনার ডিভাইসের কার্য-সম্পাদনা কমিয়ে আনবে এবং কম্পন ও পশ্চাদভূমি ডেটাকে সীমিত করবে। ইমেল, বার্তাপ্রেরণ ও অন্যান্য অ্যাপ্লিকেশান, যেগুলি সিঙ্ক হওয়ার উপর নির্ভরশীল সেগুলিকে আপনি না খোলা পর্যন্ত সেগুলি আপডেট নাও হতে পারে।\n\nআপনার ডিভাইস চার্জ হওয়ার সময় ব্যাটারি সঞ্চয়কারী স্বয়ংক্রিয়ভাবে বন্ধ হয়ে যাবে।"</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g>টার সময়ে আপনার ডাউনটাইম শেষ হওয়া পর্যন্ত"</string>
 </resources>
diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml
index 1308606..6859fe5 100644
--- a/core/res/res/values-ca/strings.xml
+++ b/core/res/res/values-ca/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"engegar o apagar el telèfon"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Permet que l\'aplicació encengui i apagui la tauleta."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Permet a l\'aplicació engegar o apagar el telèfon."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"Restableix el temps d\'espera de la pantalla"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Permet que l\'aplicació restableixi el temps d\'espera de la pantalla."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"executar en mode de proves de fàbrica"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Executa com a prova de perfil baix del fabricant que permet accés complet al maquinari de la tauleta. Només està disponible quan la tauleta s\'executa en mode de prova del fabricant."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"S\'executa com a prova del fabricant de baix nivell, cosa que permet l\'accés total al maquinari del telèfon. Només està disponible quan un telèfon s\'executa en mode de proves del fabricant."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"Denega"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Permís sol·licitat"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"S\'ha sol·licitat permís\nper al compte <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Estàs utilitzant aquesta aplicació fora del perfil professional."</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"Estàs utilitzant l\'aplicació al perfil professional."</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Mètode d\'introducció de text"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Sincronització"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Accessibilitat"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Vols acceptar la trucada?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Sempre"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Només una vegada"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s no admet perfils professionals."</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tauleta"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Telèfon"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Auriculars"</string>
@@ -1644,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"S\'ha activat l\'accessibilitat."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Accessibilitat cancel·lada."</string>
     <string name="user_switched" msgid="3768006783166984410">"Usuari actual: <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"Propietari"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Error"</string>
@@ -1777,12 +1772,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"INICI"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Pantalla fixada"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Pantalla desfixada"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"Per contribuir a millorar la durada de la bateria, l\'estalviador de bateria redueix el rendiment del dispositiu i limita la vibració i la majoria de dades en segon pla. Pot ser que el correu electrònic, la missatgeria i altres aplicacions que depenguin de la sincronització no s\'actualitzin tret que les obris.\n\nL\'estalviador de bateria es desactiva automàticament en carregar el dispositiu."</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Demana el codi PIN abans d\'anul·lar la fixació"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Demana el patró de desbloqueig abans d\'anul·lar la fixació"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Demana la contrasenya abans d\'anul·lar la fixació"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Per tal d\'augmentar la durada de la bateria, l\'estalvi de bateria redueix el rendiment del dispositiu i en limita la vibració i la majoria de dades en segon pla. És possible que el correu electrònic, la missatgeria i la resta d\'aplicacions que se sincronitzen amb freqüència no s\'actualitzin llevat que les obris.\n\nL\'estalvi de bateria es desactiva automàticament mentre el dispositiu s\'està carregant."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Fins que no finalitzi la inactivitat a les <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>."</string>
 </resources>
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index 49eea4f..e1ab6c4 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"zapnutí či vypnutí telefonu"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Umožňuje aplikaci zapnout či vypnout tablet."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Umožňuje aplikaci zapnout či vypnout telefon."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"resetování časového limitu displeje"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Umožňuje aplikaci resetovat časový limit displeje."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"spuštění v režimu továrního testu"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Umožňuje aplikaci spuštění v režimu nízkoúrovňového testu výrobce a povolí přístup k hardwaru tabletu. K dispozici, pouze je-li tablet spuštěn v režimu testování výrobce."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Umožňuje aplikaci spuštění v režimu nízkoúrovňového testu výrobce a povolí přístup k hardwaru telefonu. K dispozici pouze, je-li telefon spuštěn v režimu testování výrobce."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"Odepřít"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Požadováno oprávnění"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Požadováno oprávnění\npro účet <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Tuto aplikaci používáte mimo svůj pracovní profil."</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"Tuto aplikaci používáte v pracovním profilu"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Metoda zadávání dat"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Synchronizace"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Usnadnění"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Přijmout hovor?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Vždy"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Pouze jednou"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s pracovní profily nepodporuje."</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tablet"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Telefon"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Sluchátka"</string>
@@ -1644,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Usnadnění přístupu je aktivováno."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Usnadnění zrušeno."</string>
     <string name="user_switched" msgid="3768006783166984410">"Aktuální uživatel je <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"Vlastník"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Chyba"</string>
@@ -1777,12 +1772,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"SPUSTIT"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Obrazovka připnuta"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Obrazovka uvolněna"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"Za účelem zvýšení životnosti baterie sníží režim úspory baterie výkon vašeho zařízení a omezí vibrace a většinu dat na pozadí. E-mail, zprávy a další aplikace, které používají synchronizaci, nemusejí být aktualizovány, dokud je nespustíte.\n\nRežim úspory baterie se při nabíjení zařízení automaticky vypne."</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Před uvolněním požádat o kód PIN"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Před uvolněním požádat o bezpečnostní gesto"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Před uvolněním požádat o heslo"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Za účelem zvýšení životnosti baterie režim úspory baterie sníží výkon vašeho zařízení a omezí vibrace a většinu dat na pozadí. E-mail, zprávy a další aplikace, které používají synchronizaci, nemusejí být aktualizovány, dokud je nespustíte.\n\nPři nabíjení zařízení se režim úspory baterie automaticky vypne."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Dokud v <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> neskončí pozastavení"</string>
 </resources>
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index 873f401..195743d 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"tænd eller sluk for telefonen"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Tillader, at appen kan slukke og tænde din tablet."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Tillader, at appen kan slukke og tænde telefonen."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"nulstil timeout for skærmen"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Tillader, at appen kan nulstille timeout for skærmen."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"kør i fabriksindstillet testtilstand"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Kør som en producenttest på lavt niveau, der giver fuld adgang til tabletens hardware. Kun tilgængeligt når en tablet kører i producenttesttilstand."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Kør som en producenttest på lavt niveau. Giver fuld adgang til telefonens hardware. Kun tilgængeligt når en telefon kører i producenttesttilstand."</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"Afvis"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Der er anmodet om tilladelse"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Der er anmodet om tilladelse\nfor kontoen <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Du bruger denne app uden for din arbejdsprofil"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"Du bruger denne app i din arbejdsprofil"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Inputmetode"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Synkroniser"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Vil du besvare opkaldet?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Altid"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Kun én gang"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s understøtter ikke arbejdsprofil"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tablet"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Telefon"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Hovedtelefoner"</string>
@@ -1643,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Hjælpefunktioner er aktiveret."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Hjælpefunktioner er annulleret."</string>
     <string name="user_switched" msgid="3768006783166984410">"Nuværende bruger <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"Ejer"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Fejl"</string>
@@ -1779,6 +1775,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Bed om pinkode inden frigørelse"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Bed om oplåsningsmønster inden frigørelse"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Bed om adgangskode inden frigørelse"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"Hvis du vil hjælpe med at forbedre batteriets levetid, reducerer batterisparefunktionen enhedens ydeevne og begrænser vibration og de fleste baggrundsdata. E-mail, beskeder og andre apps, der er afhængige af synkronisering, kan ikke opdatere, medmindre du åbner dem.\n\nBatterisparefunktionen deaktiveres automatisk, når enheden lader op"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"For at forbedre batteriets levetid reducerer batterisparefunktionen enhedens ydeevne og begrænser vibrationer og de fleste baggrundsdata. E-mail, beskeder og andre apps, der benytter synkronisering, opdateres ikke, medmindre du åbner dem.\n\nBatterisparefunktionen deaktiveres automatisk, når enheden oplades."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Indtil din nedetid slutter kl. <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index dfc1050..d958619 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"Gerät ein- oder ausschalten"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Ermöglicht der App, das Tablet ein- oder auszuschalten"</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Ermöglicht der App, das Telefon ein- oder auszuschalten"</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"Display-Zeitlimit zurücksetzen"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Ermöglicht der App das Zurücksetzen des Display-Zeitlimits."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"In Werkstestmodus ausführen"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Führt einen systemnahen Herstellertest durch, in dessen Rahmen auf die gesamte Tablet-Hardware zugegriffen werden kann. Nur verfügbar, wenn ein Tablet im Herstellertestmodus ausgeführt wird."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Führt einen systemnahen Herstellertest durch, in dessen Rahmen auf die gesamte Telefon-Hardware zugegriffen werden kann. Nur verfügbar, wenn ein Telefon im Herstellertestmodus ausgeführt wird."</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"Ablehnen"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Berechtigung angefordert"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Berechtigung angefordert\nfür Konto <xliff:g id="ACCOUNT">%s</xliff:g>"</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Sie verwenden diese App außerhalb Ihres Arbeitsprofils."</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"Sie verwenden diese App in Ihrem Arbeitsprofil."</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Eingabemethode"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Synchronisieren"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Anruf annehmen?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Immer"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Nur diesmal"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"Das Arbeitsprofil wird von %1$s nicht unterstützt."</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tablet"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Telefon"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Kopfhörer"</string>
@@ -1643,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Bedienungshilfen aktiviert"</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Bedienungshilfen abgebrochen"</string>
     <string name="user_switched" msgid="3768006783166984410">"Aktueller Nutzer <xliff:g id="NAME">%1$s</xliff:g>"</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Wechseln zu <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Eigentümer"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Fehler"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Ihr Administrator lässt diese Änderung nicht zu."</string>
@@ -1779,6 +1774,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Vor dem Beenden nach PIN fragen"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Vor dem Beenden nach Entsperrungsmuster fragen"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Vor dem Beenden nach Passwort fragen"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"Im Energiesparmodus wird Ihr Akku geschont, indem die Geräteleistung reduziert wird und der Vibrationsmodus sowie die meisten Hintergrunddaten begrenzt werden. E-Mails, SMS/MMS und andere Apps mit Synchronisierung werden möglicherweise erst aktualisiert, sobald Sie sie öffnen.\n\nDer Energiesparmodus wird automatisch deaktiviert, wenn Ihr Gerät geladen wird."</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Der Energiesparmodus hilft, den Akku zu schonen, indem er die Leistung des Geräts reduziert und die Vibrationsfunktion und die meisten Hintergrunddatenaktivitäten einschränkt. E-Mail-, SMS/MMS- und andere Apps, die die Synchronisierungsfunktion benötigen, werden möglicherweise nicht aktualisiert, bis Sie sie öffnen.\n\nDer Energiesparmodus endet automatisch, wenn Ihr Gerät aufgeladen wird."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Bis zum Ende der Downtime um <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml
index 4129794..929a726 100644
--- a/core/res/res/values-el/strings.xml
+++ b/core/res/res/values-el/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"ενεργοποίηση και απενεργοποίηση τηλεφώνου"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Επιτρέπει στην εφαρμογή να ενεργοποιήσει ή να απενεργοποιήσει το tablet."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Επιτρέπει στην εφαρμογή να ενεργοποιήσει ή να απενεργοποιήσει το τηλέφωνο."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"επαναφορά χρονικού ορίου λήξης οθόνης"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Επιτρέπει στην εφαρμογή να επαναφέρει το χρονικό όριο λήξης της οθόνης."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"εκτέλεση σε λειτουργία εργοστασιακής δοκιμής"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Εκτέλεση ως χαμηλού επιπέδου δοκιμή κατασκευαστή, ώστε να επιτρέπεται πλήρης πρόσβαση στο υλικό του tablet. Διαθέσιμο μόνο όταν το tablet βρίσκεται σε λειτουργία δοκιμής κατασκευαστή."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Εκτέλεση ως χαμηλού επιπέδου δοκιμή κατασκευαστή, ώστε να επιτρέπεται πλήρης πρόσβαση στο υλικό του τηλεφώνου. Διαθέσιμο μόνο όταν το τηλέφωνο βρίσκεται σε λειτουργία δοκιμής κατασκευαστή."</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"Άρνηση"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Απαιτείται άδεια"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Ζητήθηκε άδεια\nγια τον λογαριασμό <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Χρησιμοποιείτε αυτήν την εφαρμογή εκτός του προφίλ εργασίας σας"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"Χρησιμοποιείτε αυτήν την εφαρμογή στο προφίλ εργασίας"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Μέθοδος εισόδου"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Συγχρονισμός"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Αποδοχή κλήσης;"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Πάντα"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Μόνο μία φορά"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"Το προφίλ εργασίας δεν υποστηρίζεται από %1$s"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tablet"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Τηλέφωνο"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Ακουστικά"</string>
@@ -1643,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Ενεργοποιήθηκε η προσβασιμότητα."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Η λειτουργία προσβασιμότητας ακυρώθηκε."</string>
     <string name="user_switched" msgid="3768006783166984410">"Τρέχων χρήστης <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Εναλλαγή σε <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Κάτοχος"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Σφάλμα"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Αυτή η αλλαγή δεν επιτρέπεται από το διαχειριστή σας"</string>
@@ -1779,6 +1774,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Να γίνεται ερώτηση για το PIN, πριν από το ξεκαρφίτσωμα"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Να γίνεται ερώτηση για το μοτίβο ξεκλειδώματος, πριν από το ξεκαρφίτσωμα"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Να γίνεται ερώτηση για τον κωδικό πρόσβασης, πριν από το ξεκαρφίτσωμα"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"Για τη βελτίωση της διάρκειας ζωής της μπαταρίας, η λειτουργία εξοικονόμησης μπαταρίας μειώνει την απόδοση της συσκευής σας και περιορίζει τη δόνηση και την πλειονότητα των δεδομένων παρασκηνίου. Το ηλεκτρονικό ταχυδρομείου, η ανταλλαγή μηνυμάτων και άλλες εφαρμογές που βασίζονται στο συγχρονισμό ενδέχεται να μην ενημερώνονται, παρά μόνο εάν τις ανοίξετε.\n\nΗ λειτουργία εξοικονόμησης μπαταρίας απενεργοποιείται αυτόματα κατά τη φόρτιση της συσκευής σας."</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Για τη βελτίωση της διάρκειας ζωής της μπαταρίας, η λειτουργία εξοικονόμησης μπαταρίας μειώνει την απόδοση της συσκευής σας και περιορίζει τη δόνηση και την πλειονότητα των δεδομένων παρασκηνίου. Το ηλεκτρονικό ταχυδρομείου, η ανταλλαγή μηνυμάτων και άλλες εφαρμογές που βασίζονται στο συγχρονισμό ενδέχεται να μην ενημερώνονται, παρά μόνο εάν τις ανοίξετε.\n\nΗ λειτουργία εξοικονόμησης μπαταρίας απενεργοποιείται αυτόματα κατά τη φόρτιση της συσκευής σας."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Έως τη λήξη του νεκρού χρόνου σας στις <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml
index 19aa924..e3148ec 100644
--- a/core/res/res/values-en-rGB/strings.xml
+++ b/core/res/res/values-en-rGB/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"turn phone on or off"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Allows the app to turn the tablet on or off."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Allows the app to turn the phone on or off."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"reset display timeout"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Allows the app to reset the display timeout."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"run in factory test mode"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Run as a low-level manufacturer test, allowing complete access to the tablet hardware. Only available when a tablet is running in manufacturer test mode."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Run as a low-level manufacturer test, allowing complete access to the phone hardware. Only available when a phone is running in manufacturer test mode."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"Deny"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Permission requested"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Permission requested\nfor account <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"You\'re using this app outside of your work profile"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"You\'re using this app in your work profile"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Input Method"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Sync"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Accessibility"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Accept call?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Always"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Just once"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s doesn\'t support work profile"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tablet"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Phone"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Headphones"</string>
@@ -1644,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Accessibility enabled."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Accessibility cancelled."</string>
     <string name="user_switched" msgid="3768006783166984410">"Current user <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Switching to <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Owner"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Error"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"This change isn\'t allowed by your administrator"</string>
@@ -1777,12 +1771,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"START"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Screen pinned"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Screen unpinned"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"To help improve battery life, battery saver reduces your device’s performance and limits vibration and most background data. Email, messaging and other apps that rely on syncing may not update unless you open them.\n\nBattery saver turns off automatically when your device is charging"</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Ask for PIN before unpinning"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Ask for unlock pattern before unpinning"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Ask for password before unpinning"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"To help improve battery life, battery saver reduces your device’s performance and limits vibration and most background data. Email, messaging and other apps that rely on syncing may not update unless you open them.\n\nBattery saver turns off automatically when your device is charging."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Until your downtime ends at <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-en-rIN/strings.xml b/core/res/res/values-en-rIN/strings.xml
index 19aa924..e3148ec 100644
--- a/core/res/res/values-en-rIN/strings.xml
+++ b/core/res/res/values-en-rIN/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"turn phone on or off"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Allows the app to turn the tablet on or off."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Allows the app to turn the phone on or off."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"reset display timeout"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Allows the app to reset the display timeout."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"run in factory test mode"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Run as a low-level manufacturer test, allowing complete access to the tablet hardware. Only available when a tablet is running in manufacturer test mode."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Run as a low-level manufacturer test, allowing complete access to the phone hardware. Only available when a phone is running in manufacturer test mode."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"Deny"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Permission requested"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Permission requested\nfor account <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"You\'re using this app outside of your work profile"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"You\'re using this app in your work profile"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Input Method"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Sync"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Accessibility"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Accept call?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Always"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Just once"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s doesn\'t support work profile"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tablet"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Phone"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Headphones"</string>
@@ -1644,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Accessibility enabled."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Accessibility cancelled."</string>
     <string name="user_switched" msgid="3768006783166984410">"Current user <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Switching to <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Owner"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Error"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"This change isn\'t allowed by your administrator"</string>
@@ -1777,12 +1771,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"START"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Screen pinned"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Screen unpinned"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"To help improve battery life, battery saver reduces your device’s performance and limits vibration and most background data. Email, messaging and other apps that rely on syncing may not update unless you open them.\n\nBattery saver turns off automatically when your device is charging"</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Ask for PIN before unpinning"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Ask for unlock pattern before unpinning"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Ask for password before unpinning"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"To help improve battery life, battery saver reduces your device’s performance and limits vibration and most background data. Email, messaging and other apps that rely on syncing may not update unless you open them.\n\nBattery saver turns off automatically when your device is charging."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Until your downtime ends at <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index 771fcb0..3820ee5 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"apagar o encender el dispositivo"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Permite que la aplicación encienda o apague la tablet."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Permite que la aplicación encienda o apague el dispositivo."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"restablecer el tiempo de espera de la pantalla"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Permite que la aplicación restablezca el tiempo de espera de la pantalla."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"ejecutar en el modo de prueba de fábrica"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Se ejecuta como una prueba de fábrica de bajo nivel que permite un acceso completo al hardware del tablet. Sólo disponible cuando el tablet se ejecuta en el modo de prueba de fábrica."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Se ejecuta como una prueba de fábrica de bajo nivel que permite un acceso completo al hardware del dispositivo. Sólo disponible cuando un dispositivo se ejecuta en el modo de prueba de fábrica."</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"Denegar"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Permiso solicitado"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Permiso solicitado\npara la cuenta <xliff:g id="ACCOUNT">%s</xliff:g>"</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Estás utilizando esta aplicación fuera del perfil de trabajo."</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"Estás utilizando esta aplicación en tu perfil de trabajo."</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Método de entrada"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Sincronización"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"¿Aceptar la llamada?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Siempre"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Solo una vez"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s no admite perfiles de trabajo."</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tablet"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Dispositivo"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Auriculares"</string>
@@ -1643,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Se activó la accesibilidad."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Se canceló la accesibilidad."</string>
     <string name="user_switched" msgid="3768006783166984410">"Usuario actual: <xliff:g id="NAME">%1$s</xliff:g>"</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"Propietario"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Error"</string>
@@ -1779,6 +1775,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Solicitar PIN para quitar fijación"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Solicitar patrón de desbloqueo para quitar fijación"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Solicitar contraseña para quitar fijación"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"Para ayudar a mejorar la duración de la batería, la función de ahorro de batería reduce el rendimiento del dispositivo y limita la vibración y la mayoría de los datos en segundo plano. Es posible que ciertas aplicaciones que utilizan la sincronización, como las de correo electrónico y mensajería, no se actualicen a menos que las abras.\n\nEl ahorro de batería se desactiva automáticamente mientras el dispositivo se está cargando."</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Para ayudar a mejorar la duración de la batería, la función de ahorro de batería reduce el rendimiento del dispositivo y limita la vibración y la mayor parte de la transmisión de datos en segundo plano. Es posible que las aplicaciones que se sincronizan, como las de correo electrónico y mensajería, no se actualicen a menos que las abras.\n\nEl ahorro de batería se desactiva automáticamente cuando el dispositivo se está cargando."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Hasta que termine el tiempo de inactividad a la(s) <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index 7ae2b09..9faf680 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"encender o apagar el teléfono"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Permite que la aplicación encienda o apague el tablet."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Permite que la aplicación encienda o apague el teléfono."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"restablecer tiempo de espera de la pantalla"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Permite que la aplicación restablezca el tiempo de espera de la pantalla."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"ejecutar en modo de prueba de fábrica"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Permite la ejecución como prueba de fabricante de nivel inferior, lo que posibilita un acceso completo al hardware del tablet. Solo está disponible cuando un tablet se está ejecutando en modo de prueba."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Ejecutar como prueba de fabricante de nivel inferior, permitiendo un acceso íntegro al hardware del teléfono. Solo está disponible cuando un teléfono se está ejecutando en modo de prueba."</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"Denegar"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Permiso solicitado"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Permiso solicitado\npara la cuenta <xliff:g id="ACCOUNT">%s</xliff:g>"</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Estás usando esta aplicación fuera del perfil de trabajo"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"Estás usando esta aplicación en tu perfil de trabajo"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Método de introducción de texto"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Sincronización"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"¿Aceptar la llamada?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Siempre"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Solo una vez"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s no admite perfiles de trabajo"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tablet"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Teléfono"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Auriculares"</string>
@@ -1643,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Accesibilidad habilitada"</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Accesibilidad cancelada"</string>
     <string name="user_switched" msgid="3768006783166984410">"Usuario actual: <xliff:g id="NAME">%1$s</xliff:g>"</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Cambiando a <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Propietario"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Error"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"El administrador no permite este cambio"</string>
@@ -1779,6 +1774,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Solicitar PIN para desactivar"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Solicitar patrón de desbloqueo para desactivar"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Solicitar contraseña para desactivar"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"Para ayudar a mejorar la duración de la batería, la función de ahorro de energía reduce el rendimiento del dispositivo y limita la vibración y la mayor parte de la transmisión de datos en segundo plano. Es posible que las aplicaciones que se sincronizan, como las de correo y mensajes, no se actualicen a menos que las abras.\n\nLa función de ahorro de energía se desactiva automáticamente cuando el dispositivo se está cargando"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Para ayudar a mejorar la duración de la batería, la función de ahorro de energía reduce el rendimiento del dispositivo y limita la vibración y la mayor parte de la transmisión de datos en segundo plano. Es posible que las aplicaciones que se sincronizan, como las de correo y mensajes, no se actualicen a menos que las abras.\n\nLa función de ahorro de energía se desactiva automáticamente cuando el dispositivo se está cargando."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Hasta que el tiempo de inactividad finalice el <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-et-rEE/strings.xml b/core/res/res/values-et-rEE/strings.xml
index 7932206..dc7c625 100644
--- a/core/res/res/values-et-rEE/strings.xml
+++ b/core/res/res/values-et-rEE/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"lülita telefon sisse või välja"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Võimaldab rakendusel tahvelarvutit sisse või välja lülitada."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Võimaldab rakendusel telefoni sisse või välja lülitada."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"ekraanikuva ajalõpu lähtestamine"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Lubab rakendusel lähtestada ekraanikuva ajalõpu."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"käivita tehase testrežiimis"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Käitage madalatasemelise tootjatestina, mis annab täieliku juurdepääsu tahvelarvuti riistvarale. Saadaval ainult siis, kui tahvelarvuti töötab tootjatesti režiimis."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Käivitage madalatasemelise tootjatestina, mis võimaldab täielikku juurdepääsu telefoni riistvarale. Kasutatav ainult juhul, kui telefon töötab tootja testrežiimis."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"Keela"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Taotletud luba"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Luba on taotletud\nkontole <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Kasutate rakendust väljaspool tööprofiili"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"Kasutate seda rakendust oma tööprofiilil"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Sisestusmeetod"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Sünkroonimine"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Juurdepääsetavus"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Kas vastata kõnele?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Alati"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Ainult üks kord"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s ei toeta tööprofiili"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tahvelarvuti"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Telefon"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Kõrvaklapid"</string>
@@ -1644,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Hõlbustus on lubatud."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Hõlbustus on tühistatud."</string>
     <string name="user_switched" msgid="3768006783166984410">"Praegune kasutaja <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"Omanik"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Viga"</string>
@@ -1777,12 +1772,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"KÄIVITA"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Ekraan on kinnitatud"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Ekraan on vabastatud"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"Aku tööea pikendamiseks vähendab akusäästja seadme jõudlust ja piirab vibratsiooni ning enamikku taustaandmeid. E-posti, sõnumsidet ja muid sünkroonimisele tuginevaid rakendusi ei pruugita värskendada, kui te neid ei ava.\n\nAkusäästja lülitub seadme laadimisel automaatselt välja"</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Enne vabastamist küsi PIN-koodi"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Enne vabastamist küsi avamismustrit"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Enne vabastamist küsi parooli"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Aku kestuse parandamiseks vähendab akusäästja teie seadme jõudlust ja piirab vibratsiooni ning suuremat osa taustaandmetest. E-posti, sõnumsidet ja muid sünkroonimisele tuginevaid rakendusi võidakse värskendada ainult siis, kui te need avate.\n\nAkusäästja lülitatakse seadme laadimise ajal automaatselt välja."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Kuni seisakuaja lõppemiseni kell <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-eu-rES/strings.xml b/core/res/res/values-eu-rES/strings.xml
index d2cb26a..6183bc0 100644
--- a/core/res/res/values-eu-rES/strings.xml
+++ b/core/res/res/values-eu-rES/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"piztu edo itzali telefonoa"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Tableta piztea eta itzaltzea baimentzen die aplikazioei."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Telefonoa piztea eta itzaltzea baimentzen die aplikazioei."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"berrezarri bistaratzeko denbora-muga"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Bistaratzeko denbora-muga berrezartzea baimentzen die aplikazioei."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"exekutatu fabrikako proba moduan"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Exekutatu fabrikatzailearen behe-mailako proba gisa, tabletaren hardwarerako sarbide osoa izateko. Tableta fabrikatzailearen proba moduan exekutatzen denean baino ez dago erabilgarri."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Exekutatu fabrikatzailearen behe-mailako proba gisa, telefonoaren hardwarerako sarbide osoa izateko. Telefonoa fabrikatzailearen proba moduan exekutatzen denean baino ez dago erabilgarri."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"Ukatu"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Baimena eskatu da"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Baimena eskatu da \n<xliff:g id="ACCOUNT">%s</xliff:g> konturako."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Laneko profiletik kanpo ari zara aplikazioa erabiltzen"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"Laneko profilean ari zara aplikazioa erabiltzen"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Idazketa-metodoa"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Sinkronizatuta"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Erabilerraztasuna"</string>
@@ -1539,7 +1535,7 @@
     <string name="data_usage_4g_limit_title" msgid="4609566827219442376">"4 GB-ko mugara iritsi zara"</string>
     <string name="data_usage_mobile_limit_title" msgid="557158376602636112">"Datuen mugara iritsi zara"</string>
     <string name="data_usage_wifi_limit_title" msgid="5803363779034792676">"Wi-Fi datuen mugara iritsi zara"</string>
-    <string name="data_usage_limit_body" msgid="291731708279614081">"Datuen erabilera etenda geratu da zikloa amaitzen den arte"</string>
+    <string name="data_usage_limit_body" msgid="291731708279614081">"Datuen erab. etenda zikloa amaitu arte"</string>
     <string name="data_usage_3g_limit_snoozed_title" msgid="7026739121138005231">"2G-3G datu-muga gainditu da"</string>
     <string name="data_usage_4g_limit_snoozed_title" msgid="1106562779311209039">"4G datu-muga gainditu da"</string>
     <string name="data_usage_mobile_limit_snoozed_title" msgid="4941346653729943789">"Datu mugikorren muga gainditu da"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Deia onartu nahi duzu?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Beti"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Behin soilik"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s abiarazleak ez du laneko profil hau onartzen"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tableta"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Telefonoa"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Aurikularrak"</string>
@@ -1644,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Erabilerraztasuna gaitu da."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Erabilerraztasuna bertan behera utzi da."</string>
     <string name="user_switched" msgid="3768006783166984410">"Uneko erabiltzailea: <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"<xliff:g id="NAME">%1$s</xliff:g> erabiltzailera aldatzen…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Jabea"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Errorea"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Zure administratzaileak ez du aldaketa egiteko baimena eman"</string>
@@ -1777,12 +1771,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"HASI"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Pantaila ainguratu da"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Aingura kendu zaio pantailari"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"Bateriak gehiago iraun dezan, bateria aurrezteko aukerak gailuaren errendimendua murrizten du, eta dardara eta atzeko planoko datu gehienak mugatzen ditu. Baliteke posta elektronikoa, mezuak eta sinkronizatzen diren beste aplikazio batzuk ez eguneratzea, horiek ireki ezean.\n\nBateria aurrezteko aukera automatikoki desaktibatzen da gailua kargatzen hasten denean."</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Eskatu PIN kodea aingura kendu aurretik"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Eskatu desblokeatzeko eredua aingura kendu aurretik"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Eskatu pasahitza aingura kendu aurretik"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Bateriak gehiago iraun dezan, bateria aurrezteko aukerak gailuaren errendimendua murrizten du, eta dardara eta atzeko planoko datu gehienak mugatzen ditu. Baliteke posta elektronikoa, mezuak eta sinkronizatzen diren beste aplikazio batzuk ez eguneratzea, ireki ezean.\n\nBateria aurrezteko aukera automatikoki desaktibatzen da gailua kargatzen ari denean."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> arte iraungo du jarduerarik gabeko aldiak"</string>
 </resources>
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index 3438757..7f9e77a 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"روشن/خاموش کردن تلفن"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"‏به برنامه اجازه می‎دهد رایانهٔ لوحی را روشن یا خاموش کند."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"‏به برنامه اجازه می‎دهد گوشی را روشن یا خاموش کند."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"بازنشانی مهلت زمانی صفحه‌نمایش"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"به برنامه امکان می‌دهد مهلت زمانی صفحه‌نمایش را بازیابی کند."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"اجرا در حالت تست کارخانه"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"اجرا به‌عنوان تست سازنده سطح پایین، امکان دسترسی کامل به سخت‌افزار رایانهٔ لوحی شما را فراهم می‌آورد. فقط زمانی که رایانهٔ لوحی در حالت تست سازنده در حال اجراست قابل دسترسی است."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"اجرا به‌عنوان تست سازنده سطح پایین، امکان دسترسی کامل به سخت‌افزار تلفن شما را فراهم می‌آورد. فقط زمانی که تلفن در حالت تست سازنده در حال اجراست قابل دسترسی است."</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"رد کردن"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"مجوز درخواست شد"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"مجوز\nبرای حساب <xliff:g id="ACCOUNT">%s</xliff:g> درخواست شد."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"شما از این برنامه در خارج از نمایه کاری‌تان استفاده می‌کنید"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"از این برنامه در نمایه کاری‌تان استفاده می‌کنید"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"روش ورودی"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"همگام‌سازی"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"تماس را می‌پذیرید؟"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"همیشه"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"فقط این بار"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"‏%1$s از نمایه کاری پشتیبانی نمی‌کند"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"رایانهٔ لوحی"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"تلفن"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"هدفون‌ها"</string>
@@ -1643,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"قابلیت دسترسی فعال شد."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"قابلیت دسترسی لغو شد."</string>
     <string name="user_switched" msgid="3768006783166984410">"کاربر کنونی <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"در حالت تغییر به <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"دارنده"</string>
     <string name="error_message_title" msgid="4510373083082500195">"خطا"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"این تغییر از طرف سرپرستتان مجاز دانسته نشده است"</string>
@@ -1779,6 +1774,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"درخواست کد پین قبل از برداشتن پین"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"درخواست الگوی باز کردن قفل قبل از برداشتن پین"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"درخواست گذرواژه قبل از برداشتن پین"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"برای کمک به بهبود عمر باتری، ذخیره‌کننده باتری عملکرد دستگاهتان را کاهش می‌دهد و اکثر اطلاعات پس‌زمینه و لرزش را محدود می‌کند. ممکن است ایمیل، پیام‌رسانی و سایر برنامه‌هایی که به همگام‌سازی وابسته هستند، به‌روزرسانی نشوند مگر اینکه آنها را باز کنید.\n\nوقتی دستگاهتان در حال شارژ است، ذخیره‌کننده باتری به صورت خودکار خاموش می‌شود."</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"برای کمک به بهبود عمر باتری، ذخیره‌کننده باتری عملکرد دستگاه‌تان را کاهش می‌دهد و اغلب اطلاعات پس‌زمینه و لرزش را محدود می‌کند. ایمیل، پیام‌رسانی و سایر برنامه‌هایی که به همگام‌سازی وابسته هستند ممکن است به‌روز نشوند مگر اینکه آنها را باز کنید.\n\nوقتی دستگاه‌تان شارژ می‌شود، ذخیره‌کننده باتری به صورت خودکار خاموش می‌شود."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"تا زمانی که زمان استراحت در <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> به پایان برسد"</string>
 </resources>
diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml
index e62a90b..66ddf0f 100644
--- a/core/res/res/values-fi/strings.xml
+++ b/core/res/res/values-fi/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"sammutta tai käynnistä puhelin"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Antaa sovelluksen sammuttaa tai käynnistää tablet-laitteen."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Antaa sovelluksen sammuttaa ja käynnistää puhelimen."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"nollaa näytön aikakatkaisu"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Sallii sovelluksen nollata näytön aikakatkaisu."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"toimi tehdastestaustilassa"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Suorita matalan tason valmistajan testinä, jolloin koko tabletin laitteisto on käytössä. Käytettävissä vain, kun tabletia käytetään valmistajan testitilassa."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Suorita alemman tason valmistajan testinä ja anna täydet oikeudet puhelimen laitteistolle. Käytettävissä vain, kun puhelin on valmistajan testitilassa."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"Kiellä"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Lupa pyydetty"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Pyydetään lupaa\ntilille <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Käytät sovellusta muulla kuin työprofiililla"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"Käytät sovellusta työprofiililla"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Syöttötapa"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Synkronointi"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Esteettömyys"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Vastataanko puheluun?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Aina"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Vain kerran"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s ei tue työprofiilia"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tablet-laite"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Puhelin"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Kuulokkeet"</string>
@@ -1644,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Esteettömyystila käytössä."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Esteettömyystila peruutettu."</string>
     <string name="user_switched" msgid="3768006783166984410">"Nykyinen käyttäjä: <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"Omistaja"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Virhe"</string>
@@ -1777,12 +1772,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"ALOITA"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Näyttö kiinnitetty"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Näyttö irrotettu"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"Akun käyttöikä pitenee, kun virransäästö vähentää laitteen tehokkuutta ja rajoittaa värinän käyttöä ja muita taustaohjelmien tiedonsiirtoa. Sähköposti, viestit ja muut synkronointia käyttävät sovellukset eivät välttämättä päivity, jos niitä ei avata.\n\nVirransäästötila poistetaan käytöstä automaattisesti, kun laitetta ladataan."</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Pyydä PIN-koodi ennen irrotusta"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Pyydä lukituksenpoistokuvio ennen irrotusta"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Pyydä salasana ennen irrotusta"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Akunsäästötoiminto heikentää laitteen suorituskykyä ja rajoittaa värinää ja useimpia taustatietoja akun iän pidentämiseksi. Sähköposti, viestitys ja muut synkronointia edellyttävät sovellukset eivät ehkä päivity, ellet käynnistä niitä.\n\nAkunsäästö kytkeytyy automaattisesti pois laitteen akun latauksen ajaksi."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Käyttökatkos päättyy klo <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-fr-rCA/strings.xml b/core/res/res/values-fr-rCA/strings.xml
index 6575880..d7f3771 100644
--- a/core/res/res/values-fr-rCA/strings.xml
+++ b/core/res/res/values-fr-rCA/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"éteindre ou allumer le téléphone"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Permet à l\'application d\'éteindre et d\'allumer la tablette."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Permet à l\'application d\'éteindre et d\'allumer le téléphone."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"réinitialiser le délai d\'affichage"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Permet à l\'application de réinitialiser le délai d\'affichage."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"exécuter en mode test d\'usine"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Permet d\'exécuter une application en mode test fabricant de faible niveau, autorisant ainsi l\'accès complet à la tablette. Cette fonctionnalité est uniquement disponible lorsque la tablette est en mode test fabricant."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Permet d\'exécuter en tant que test fabricant de faible niveau en autorisant l\'accès au matériel du téléphone. Cette fonctionnalité est uniquement disponible lorsque le téléphone est en mode de test fabricant."</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"Refuser"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Autorisation demandée"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Autorisation demandée\npour le compte \"<xliff:g id="ACCOUNT">%s</xliff:g>\""</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Vous utilisez cette application en dehors de votre profil professionnel"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"Vous utilisez cette application dans votre profil professionnel"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Mode de saisie"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Synchroniser"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Prendre l\'appel?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Toujours"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Une seule fois"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s ne prend pas en charge le profil professionnel"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tablette"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Téléphone"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Oreillettes"</string>
@@ -1643,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"L\'accessibilité a bien été activée."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Accessibilité annulée."</string>
     <string name="user_switched" msgid="3768006783166984410">"Utilisateur actuel : <xliff:g id="NAME">%1$s</xliff:g>"</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"Propriétaire"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Erreur"</string>
@@ -1779,6 +1775,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Demander le NIP avant d\'annuler l\'épinglage"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Demander le schéma de déverrouillage avant d\'annuler l\'épinglage"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Demander le mot de passe avant d\'annuler l\'épinglage"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"Pour optimiser l\'autonomie de la pile, l\'économiseur d\'énergie réduit les performances de votre appareil et limite les données en arrière-plan. Vous devrez peut-être ouvrir manuellement les applications de courriel, de messagerie et les autres applications synchronisées pour les mettre à jour.\n\nL\'économiseur d\'énergie se désactive automatiquement lorsque votre appareil est en charge."</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Pour optimiser l\'autonomie de la pile, l\'économiseur d\'énergie réduit les performances de votre appareil et limite les données en arrière-plan. Vous devrez peut-être ouvrir manuellement les applications de courriel, de messagerie et les autres applications synchronisées pour les mettre à jour.\n\nL\'économiseur d\'énergie se désactive automatiquement lorsque votre appareil est en charge."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Jusqu\'à ce que le temps d\'arrêt se termine à <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index d7fffa3..b52cb21 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -1427,8 +1427,7 @@
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Autorisation demandée\npour le compte \"<xliff:g id="ACCOUNT">%s</xliff:g>\""</string>
     <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
     <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_work" msgid="621480743856004612">"Vous utilisez cette application dans votre profil professionnel."</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Mode de saisie"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Synchronisation"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Accessibilité"</string>
@@ -1644,7 +1643,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"L\'accessibilité a bien été activée."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Accessibilité annulée."</string>
     <string name="user_switched" msgid="3768006783166984410">"Utilisateur actuel : <xliff:g id="NAME">%1$s</xliff:g>"</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"Propriétaire"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Erreur"</string>
@@ -1777,12 +1776,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"ACTIVER"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Écran épinglé."</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Épinglage de l\'écran annulé."</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"Pour améliorer l\'autonomie de la batterie, l\'économiseur de batterie réduit les performances de votre appareil, et il limite les vibrations et la plupart des données en arrière-plan. La messagerie électronique, la messagerie instantanée et les autres applications basées sur la synchronisation ne sont mises à jour que si vous les ouvrez.\n\nL\'économiseur de batterie s\'éteint automatiquement lorsque votre appareil est en charge."</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Demander le code PIN avant d\'annuler l\'épinglage"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Demander le schéma de déverrouillage avant d\'annuler l\'épinglage"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Demander le mot de passe avant d\'annuler l\'épinglage"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Pour optimiser l\'autonomie de la batterie, l\'économiseur de batterie réduit les performances de votre appareil et limite les données en arrière-plan. Vous devrez peut-être ouvrir manuellement les applications d\'e-mail, de SMS/MMS et les autres applications synchronisées pour les mettre à jour.\n\nL\'économiseur de batterie s\'éteint automatiquement lorsque votre appareil est en charge."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Jusqu\'à ce que le temps d\'arrêt se termine à <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-gl-rES/strings.xml b/core/res/res/values-gl-rES/strings.xml
index dc14296..e6ff7eb 100644
--- a/core/res/res/values-gl-rES/strings.xml
+++ b/core/res/res/values-gl-rES/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"acender ou apagar o teléfono"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Permite á aplicación acender ou apagar o tablet."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Permite á aplicación acender ou apagar o teléfono."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"restablecer tempo de espera da pantalla"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Permite que a aplicación restableza o tempo de espera da pantalla."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"executarse en modo de proba de fábrica"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Executar como unha proba de baixo nivel do fabricante, permitindo un acceso completo ao hardware do tablet. Só está dispoñible cando o tablet está funcionando en modo de proba do fabricante."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Executar como unha proba de baixo nivel do fabricante, o cal permite un acceso completo ao hardware do teléfono. Só está dispoñible cando o teléfono está funcionando no modo de proba do fabricante."</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"Rexeitar"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Permiso solicitado"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Permiso solicitado\npara a conta <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Estás usando esta aplicación fóra do teu perfil de traballo"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"Estás usando esta aplicación no teu perfil de traballo"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Método de entrada"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Sincronizar"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Aceptar chamada?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Sempre"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Só unha vez"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s non admite o perfil de traballo"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tablet"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Teléfono"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Auriculares"</string>
@@ -1643,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Accesibilidade activada"</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Accesibilidade cancelada"</string>
     <string name="user_switched" msgid="3768006783166984410">"Usuario actual <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Cambiando a <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Propietario"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Erro"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"O administrador non admite este cambio"</string>
@@ -1779,6 +1774,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Solicitar un PIN antes de soltar a pantalla"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Solicitar un padrón de desbloqueo antes de soltar a pantalla"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Solicitar un contrasinal antes de soltar a pantalla"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"Para axudar a mellorar a duración da batería, a función aforro de batería reduce o rendemento do dispositivo e restrinxe a vibración e a maioría dos datos en segundo plano. É posible que o correo electrónico, as mensaxes e outras aplicacións que se sincronizan con frecuencia, non se actualicen a menos que as abras.\n\nA función aforro de batería desactívase automaticamente durante a carga do dispositivo."</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Para axudar a mellorar a duración da batería, o aforro de batería reduce o rendemento do dispositivo e restrinxe a vibración e a maioría dos datos en segundo plano. É posible que o correo, as mensaxes e outras aplicacións que se sincronizan con frecuencia, non se actualicen a menos que as abras.\n\nO aforro de batería desactívase automaticamente durante a carga do dispositivo."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Ata que remate o tempo de inactividade ás <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml
index 961ce41..5b6008e 100644
--- a/core/res/res/values-hi/strings.xml
+++ b/core/res/res/values-hi/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"फ़ोन चालू या बंद करें"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"ऐप्स को टेबलेट चालू या बंद करने देता है."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"ऐप्स को फ़ोन चालू या बंद करने देता है."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"प्रदर्शन समयबाह्य रीसेट करें"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"एेप्स को प्रदर्शन समयबाह्य रीसेट करने देती है."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"फ़ैक्‍ट्री परीक्षण मोड में चलाएं"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"टेबलेट हार्डवेयर में पूर्ण पहुंच की अनुमति देते हुए निम्‍न-स्‍तर निर्माता परीक्षण के रूप में चलाएं. केवल तभी उपलब्‍ध जब कोई टेबलेट निर्माता परीक्षण मोड में चल रहा हो."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"फ़ोन हार्डवेयर में पूर्ण पहुंच की अनुमति देते हुए निम्‍न-स्‍तर निर्माता परीक्षण के रूप में चलाएं. केवल तभी उपलब्‍ध जब कोई फ़ोन निर्माता परीक्षण मोड में चल रहा हो."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"अस्वीकारें"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"अनुमति अनुरोधित"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"<xliff:g id="ACCOUNT">%s</xliff:g> खाते के लिए अनुमति\nका अनुरोध किया गया."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"आप इस ऐप्स का उपयोग अपनी कार्य प्रोफ़ाइल से बाहर कर रहे हैं"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"आप इस ऐप्स का उपयोग अपनी कार्य प्रोफ़ाइल में कर रहे हैं"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"इनपुट विधि"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"समन्वयन"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"आसान तरीका"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"कॉल स्वीकार करें?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"हमेशा"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"केवल एक बार"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s कार्य प्रोफ़ाइल का समर्थन नहीं करता"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"टेबलेट"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"फ़ोन"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"हेडफ़ोन"</string>
@@ -1644,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"आसान तरीका सक्षम कर दी है."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"आसान तरीका रद्द की गई."</string>
     <string name="user_switched" msgid="3768006783166984410">"वर्तमान उपयोगकर्ता <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"स्वामी"</string>
     <string name="error_message_title" msgid="4510373083082500195">"त्रुटि"</string>
@@ -1777,12 +1772,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"प्रारंभ करें"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"स्‍क्रीन पिन की गई"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"स्‍क्रीन अनपिन की गई"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"बैटरी का जीवनकाल सुधारने में सहायता करने के लिए, बैटरी बचतकर्ता आपके उपकरण के प्रदर्शन को कम करता है और कंपन तथा अधिकांश पृष्‍ठभूमि डेटा को सीमित करता है. ईमेल, संदेश सेवा और समन्वयन पर निर्भर करने वाले अन्‍य ऐप्‍स तब तक अपडेट नहीं हो सकते जब तक कि आप उन्हें नहीं खोलते हैं.\n\nजब आपका उपकरण चार्ज हो रहा होता है तब बैटरी सेवर अपने आप बंद हो जाता है"</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"अनपिन करने से पहले पिन के लिए पूछें"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"अनपिन करने से पहले अनलॉक पैटर्न के लिए पूछें"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"अनपिन करने से पहले पासवर्ड के लिए पूछें"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"बैटरी के जीवन काल को बेहतर बनाने में सहायता के लिए, बैटरी सेवर आपके उपकरण के प्रदर्शन को घटा देता है तथा कंपन और अधिकांश पृष्ठभूमि डेटा को सीमित कर देता है. ईमेल, संदेश सेवा और अन्य ऐप्स जो समन्वयन पर निर्भर करते हैं वे तब तक अपडेट नहीं हो सकते जब तक कि आप उन्हें नहीं खोलते.\n\nजब आपका उपकरण चार्ज हो रहा होता है तो बैटरी सेवर अपने आप बंद हो जाता है."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"जब तक कि <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> बजे आपका डाउनटाइम समाप्‍त न हो"</string>
 </resources>
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index d91d399..bfa871e 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"uključivanje ili isključivanje telefona"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Aplikaciji omogućuje uključivanje i isključivanje tabletnog računala."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Aplikaciji omogućuje uključivanje ili isključivanje telefona."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"ponovno postavljanje vremena čekanja zaslona"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Omogućuje aplikaciji ponovno postavljanje vremena čekanja zaslona."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"pokretanje u tvorničkom testnom načinu rada"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Pokrenite kao niskorazinski proizvođački test, uz omogućavanje potpunog pristupa hardveru tabletnog uređaja. Dostupno je samo ako tabletni uređaj radi u proizvođačkom testnom načinu rada."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Pokrenite kao niskorazinski proizvođački test, uz omogućavanje potpunog pristupa telefonskom hardveru. Dostupno je samo ako telefon radi u proizvođačkom testnom načinu rada."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"Odbij"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Zatražena je dozvola"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Zatražena je dozvola\nza račun <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Ovu aplikaciju upotrebljavate izvan svog radnog profila"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"Upotrebljavate tu aplikaciju u radnom profilu"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Način unosa"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Sinkronizacija"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Dostupnost"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Prihvatiti poziv?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Uvijek"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Samo jednom"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s ne podržava radni profil"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tabletno računalo"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Telefon"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Slušalice"</string>
@@ -1644,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Dostupnost je omogućena."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Pristupačnost otkazana."</string>
     <string name="user_switched" msgid="3768006783166984410">"Trenutačni korisnik <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"Vlasnik"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Pogreška"</string>
@@ -1777,12 +1772,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"POKRENI"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Zaslon je pričvršćen"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Zaslon je otkvačen"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"Da biste produžili trajanje baterije, alat za čuvanje baterije smanjuje performanse uređaja te ograničava vibracije i veći dio prijenosa podataka.\n\nAlat za čuvanje baterije automatski se isključuje prilikom punjenja uređaja"</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Traži PIN radi otkvačivanja"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Traži uzorak za otključavanje radi otkvačivanja"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Traži zaporku radi otkvačivanja"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Da bi se produljilo trajanje baterije, ušteda baterije smanjuje rad uređaja i ograničava vibraciju i većinu pozadinskih podataka. Aplikacije za e-poštu, slanje poruka i ostalo koje se oslanjaju na sinkronizaciju možda se neće ažurirati ako ih ne otvorite.\n\nUšteda baterije isključuje se automatski dok se uređaj puni."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Dok razdoblje zastoja ne završi u <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml
index 7cf99e8..9fc1366 100644
--- a/core/res/res/values-hu/strings.xml
+++ b/core/res/res/values-hu/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"a telefon be- és kikapcsolása"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Lehetővé teszi az alkalmazás számára a táblagép be- és kikapcsolását."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Lehetővé teszi az alkalmazás számára, hogy be- vagy kikapcsolja a telefont."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"a képernyő időkorlátjának visszaállítása"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Lehetővé teszi az alkalmazás számára a képernyő időkorlátjának visszaállítását."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"futtatás gyári tesztüzemmódban"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Alacsony szintű gyári tesztként fut, lehetővé téve a táblagép összes hardverének elérését. Csak akkor érhető el, ha a táblagép gyári teszt üzemmódban fut."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Futtatás alacsony szintű gyártói tesztként, lehetővé téve a telefon hardverének teljes körű elérését. Csak akkor érhető el, ha a telefon gyártói tesztüzemmódban van."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"Elutasítás"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Az engedélykérés megtörtént"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Az engedélykérés megtörtént\na(z) <xliff:g id="ACCOUNT">%s</xliff:g> fiók számára."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Ezt az alkalmazást munkaprofilján kívül használja"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"Munkaprofiljában már használja az alkalmazást"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Beviteli mód"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Szinkronizálás"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Kisegítő lehetőségek"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Fogadja a hívást?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Mindig"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Csak egyszer"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"A(z) %1$s nem támogatja a munkaprofilokat."</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Táblagép"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Telefon"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Fejhallgató"</string>
@@ -1644,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Hozzáférés engedélyezve"</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Hozzáférés megszakítva."</string>
     <string name="user_switched" msgid="3768006783166984410">"<xliff:g id="NAME">%1$s</xliff:g> az aktuális felhasználó."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Átváltás erre: <xliff:g id="NAME">%1$s</xliff:g>..."</string>
     <string name="owner_name" msgid="2716755460376028154">"Tulajdonos"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Hiba"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Rendszergazdája nem engedélyezi ezt a módosítást"</string>
@@ -1777,12 +1771,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"INDÍT"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Képernyő rögzítve"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Képernyő rögzítése feloldva"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"Az akkumulátor üzemidejének növeléséhez az akkumulátorkímélő mód csökkenti az eszköz teljesítményét, valamint korlátozza a rezgést és a legtöbb háttéradatot. Előfordulhat, hogy az e-mailek, az üzenetküldő programok és más alkalmazások, amelyek a szinkronizálás funkciót használják, nem frissülnek addig, amíg meg nem nyitja őket.\n\nAz akkumulátorkímélő mód automatikusan kikapcsol, amikor az eszköz töltődik"</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"PIN kód kérése a rögzítés feloldásához"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Feloldási minta kérése a rögzítés feloldásához"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Jelszó kérése a rögzítés feloldásához"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Az akkumulátor üzemidejének növeléséhez az akkumulátorkímélő mód csökkenti az eszköz teljesítményét, valamint korlátozza a rezgést és a legtöbb háttéradatot. Előfordulhat, hogy az e-mailek, az üzenetküldő programok és más alkalmazások, amelyek a szinkronizálás funkciót használják, nem frissülnek addig, amíg meg nem nyitja őket.\n\nAz akkumulátorkímélő mód automatikusan kikapcsol, amikor az eszköz töltődik."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Amíg az állásidő véget nem ér ekkor: <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-hy-rAM/strings.xml b/core/res/res/values-hy-rAM/strings.xml
index ea456b0..f35c1d4 100644
--- a/core/res/res/values-hy-rAM/strings.xml
+++ b/core/res/res/values-hy-rAM/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"հեռախոսը միացնել կամ անջատել"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Թույլ է տալիս հավելվածին միացնել կամ անջատել գրասալիկը:"</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Թույլ է տալիս հավելվածին միացնել կամ անջատել հեռախոսը:"</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"վերակայել էկրանի ակտիվության ժամանակը"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Թույլ է տալիս հավելվածին վերակայել էկրանի ակտիվության ժամանակը:"</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"աշխատել գործարանային փորձնական ռեժիմում"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Աշխատեցնել որպես արտադրողի ցածր մակարդակի փորձարկում` թույլատրելով գրասալիկի սարքին լիարժեք մուտք: Հասանելի է միայն այն ժամանակ, երբ գրասալիկը աշխատում է արտադրողի փորձնական ռեժիմում:"</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Աշխատեցնել որպես արտադրողի ցածր մակարդակի փորձարկում` թույլատրելով լիարժեք մուտք հեռախոսի սարքաշարին: Հասանելի է միայն այն ժամանակ, երբ հեռախոսն աշխատում է արտադրողի փորձնական ռեժիմում:"</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"Մերժել"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Թույլտվության հարցում է արված"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Թույլտվության հարցում է արված\n<xliff:g id="ACCOUNT">%s</xliff:g> հաշվի համար:"</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Դուք օգտագործում եք այս հավելվածը ձեր աշխատանքային պրոֆիլից դուրս"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"Դուք օգտագործում եք այս հավելվածը ձեր աշխատանքային պրոֆիլում"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Ներածման եղանակը"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Համաժամել"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Ընդունե՞լ զանգը:"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Միշտ"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Միայն մեկ անգամ"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s-ը չի աջակցում աշխատանքային պրոֆիլներ"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Գրասալիկ"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Հեռախոս"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Ականջակալներ"</string>
@@ -1643,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Մատչելիությունը միացված է:"</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Մուտքի հնարավորությունը չեղարկված է:"</string>
     <string name="user_switched" msgid="3768006783166984410">"Ներկայիս օգտվողը <xliff:g id="NAME">%1$s</xliff:g>:"</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"Սեփականատեր"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Սխալ"</string>
@@ -1779,6 +1775,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Ապաամրացնելուց առաջ հարցնել PIN-կոդը"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Ապաամրացնելուց առաջ հարցնել ապակողպող նախշը"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Ապաամրացնելուց առաջ հարցնել գաղտնաբառը"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"Մարտկոցի աշխատաժամանակը շատացնելու համար մարտկոցի տնտեսումը կնվազեցնի ձեր սարքի կատարողականը և կսահմանափակի թրթռոցն ու ֆոնային տվյալներից շատերը: Էլփոստը, հաղորդագրությունները և այլ ծրագրերը, որոնք օգտագործում են համաժամեցումը, կթարմանան միայն դրանք աշխատեցնելիս: \n\nՄարկտոցի տնտեսումը ավտոմատ կանջատվի, հենց սարքը միացվի լիցքավորման:"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Մարտկոցի աշխատաժամանակը շատացնելու համար մարտկոցի տնտեսումը կնվազեցնի ձեր սարքի կատարողականը և կսահմանափակի թրթռոցն ու ֆոնային տվյալներից շատերը: Էլփոստը, հաղորդագրությունները և այլ ծրագրերը, որոնք  օգտագործում են համաժամեցումը, կթարմանան միայն դրանք աշխատեցնելիս:\n\nՄարկտոցի տնտեսումը ավտոմատ կանջատվի, հենց սարքը միացվի լիցքավորման:"</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Մինչև ձեր ժամանակն ավարտվի ժամը <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index 12f851a..7878d71 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"daya ponsel hidup atau mati"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Mengizinkan apl menyalakan atau mematikan tablet."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Mengizinkan apl mematikan atau menyalakan ponsel."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"setel ulang batas waktu tampilan"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Memungkinkan aplikasi menyetel ulang batas waktu tampilan."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"jalankan pada mode uji pabrik"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Menjalankan sebagai uji pabrikan tingkat rendah, mengizinkan akses lengkap ke perangkat keras tablet. Hanya tersedia jika tablet berjalan dalam mode uji pabrikan."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Jalankan sebagai uji pabrik tingkat rendah, yang memungkinkan akses penuh pada perangkat keras ponsel. Hanya tersedia ketika ponsel berjalan pada mode uji pabrik."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"Tolak"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Izin dimintakan"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Izin dimintakan\nuntuk akun <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Anda menggunakan aplikasi ini di luar profil kerja"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"Anda menggunakan aplikasi ini di profil kerja"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Metode masukan"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Sinkron"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Aksesibilitas"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Terima panggilan?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Selalu"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Hanya sekali"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s tidak mendukung profil kerja"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tablet"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Ponsel"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Headphone"</string>
@@ -1644,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Aksesibilitas diaktifkan."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Aksesibilitas dibatalkan."</string>
     <string name="user_switched" msgid="3768006783166984410">"Pengguna saat ini <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Beralih ke <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Pemilik"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Kesalahan"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Perubahan ini tidak diizinkan oleh administrator Anda"</string>
@@ -1777,12 +1771,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"MULAI"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Layar disematkan"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Layar dicopot sematannya"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"Untuk membantu meningkatkan masa pakai baterai, penghemat baterai mengurangi kinerja perangkat Anda dan membatasi getaran serta sebagian besar data latar belakang. Email, perpesanan, dan aplikasi lain yang mengandalkan sinkronisasi tidak dapat diperbarui hingga Anda membukanya.\n\nPenghemat baterai akan dinonaktifkan secara otomatis saat baterai perangkat diisi"</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Meminta PIN sebelum melepas sematan"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Meminta pola pembukaan kunci sebelum melepas sematan"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Meminta sandi sebelum melepas sematan"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Guna membantu meningkatkan masa pakai baterai, penghemat baterai mengurangi kinerja perangkat dan membatasi getaran serta sebagian besar data latar belakang. Email, perpesanan, dan aplikasi lain yang bergantung pada sinkronisasi mungkin tidak akan diperbarui kecuali Anda membukanya.\n\nPenghemat baterai dinonaktifkan secara otomatis saat perangkat diisi daya."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Hingga waktu perbaikan Anda berakhir pukul <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-is-rIS/strings.xml b/core/res/res/values-is-rIS/strings.xml
index 7d5edd9..b8582f5 100644
--- a/core/res/res/values-is-rIS/strings.xml
+++ b/core/res/res/values-is-rIS/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"kveikja eða slökkva á símanum"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Leyfir forriti að kveikja og slökkva á spjaldtölvunni."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Leyfir forriti að kveikja og slökkva á símanum."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"endurstilla tímamörk skjás"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Leyfir forritinu að endurstilla tímamörk skjás."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"keyra í prófunarstillingu verksmiðju"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Keyra sem lágtækniprófun framleiðanda með fullan aðgang að vélbúnaði spjaldtölvunnar. Aðeins í boði þegar spjaldtölva er keyrð í prófunarstillingu framleiðanda."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Keyra sem lágtækniprófun framleiðanda með fullan aðgang að vélbúnaði símans. Aðeins í boði þegar sími er keyrður í prófunarstillingu framleiðanda."</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"Hafna"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Beðið um heimild"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Beðið um heimild\nfyrir reikninginn <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Þú ert að nota þetta forrit utan vinnusniðsins"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"Þú ert að nota þetta forrit á vinnusniðinu þínu"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Innsláttaraðferð"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Samstilling"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Samþykkja símtal?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Alltaf"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Bara einu sinni"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s styður ekki vinnusnið"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Spjaldtölva"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Sími"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Heyrnartól"</string>
@@ -1643,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Kveikt á auknu aðgengi."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Hætt við aukið aðgengi."</string>
     <string name="user_switched" msgid="3768006783166984410">"Núverandi notandi <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Skiptir yfir á <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Eigandi"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Villa"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Stjórnandinn þinn leyfir ekki þessa breytingu."</string>
@@ -1779,6 +1774,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Biðja um PIN-númer til að losa"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Biðja um opnunarmynstur til að losa"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Biðja um aðgangsorð til að losa"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"Til að auka endingu rafhlöðunnar dregur rafhlöðusparnaður úr afköstum tækisins og takmarkar titring og flest bakgrunnsgögn. Ekki er víst að tölvupóstur, skilaboð og önnur forrit sem reiða sig á samstillingu verði uppfærð fyrr en þú opnar þau.\n\nSjálfkrafa er slökkt á rafhlöðusparnaði þegar tækið er í hleðslu."</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Til að auka endingu rafhlöðunnar dregur rafhlöðusparnaður úr afköstum tækisins og takmarkar titring og flest bakgrunnsgögn. Ekki er víst að tölvupóstur, skilaboð og önnur forrit sem reiða sig á samstillingu verði uppfærð fyrr en þú opnar þau.\n\nSjálfkrafa er slökkt á rafhlöðusparnaði þegar tækið er í hleðslu."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Þangað til niðritíma lýkur, <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index f1347ca..c039671 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"accensione o spegnimento del telefono"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Consente all\'applicazione di accendere o spegnere il tablet."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Consente all\'applicazione di accendere o spegnere il telefono."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"reimpostazione del timeout del display"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Consente all\'app di reimpostare il timeout del display."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"esecuzione in modalità test di fabbrica"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"In esecuzione come test del produttore di basso livello, consentendo l\'accesso completo all\'hardware del tablet. Disponibile soltanto quando il tablet è in esecuzione in modalità test del produttore."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"In esecuzione come test del produttore di basso livello, consentendo l\'accesso completo all\'hardware del telefono. Disponibile soltanto quando il telefono è in esecuzione in modalità test del produttore."</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"Nega"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Autorizzazione richiesta"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Autorizzazione richiesta\nper l\'account <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Stai utilizzando l\'app al di fuori del tuo profilo di lavoro"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"Stai utilizzando l\'app nel tuo profilo di lavoro"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Metodo inserimento"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Sinc"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Accettare la chiamata?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Sempre"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Solo una volta"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s non supporta il profilo di lavoro"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tablet"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Telefono"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Cuffie audio"</string>
@@ -1643,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Accessibilità attivata."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Accessibilità annullata."</string>
     <string name="user_switched" msgid="3768006783166984410">"Utente corrente <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Passaggio a <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Proprietario"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Errore"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Questa modifica non è consentita dal tuo amministratore"</string>
@@ -1779,6 +1774,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Richiedi il PIN prima di sbloccare"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Richiedi sequenza di sblocco prima di sbloccare"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Richiedi password prima di sbloccare"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"Per contribuire a prolungare la durata della batteria, la funzione Basso consumo riduce le prestazioni del dispositivo, oltre a limitare le emissioni di vibrazioni e l\'utilizzo di molti dati in background. Email, Messaggi e altre app che ricorrono alla sincronizzazione subiscono un aggiornamento solo se aperte.\n\nLa funzione Basso consumo viene disattivata automaticamente quando il dispositivo è in fase di ricarica"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Per aumentare la durata della batteria, la funzione Risparmio energetico riduce le prestazioni del dispositivo e limita vibrazione e gran parte dei dati in background. App di email, messaggi e altre app basate sulla sincronizzazione potrebbero non essere aggiornate se non le apri.\n\nIl risparmio energetico si disattiva automaticamente quando il dispositivo è in carica."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Fino al termine del periodo di inattività previsto per le <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index f6c3c8e..ad35f39 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"הפעל או כבה את הטלפון"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"מאפשר לאפליקציה להפעיל או לכבות את הטאבלט."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"מאפשר לאפליקציה להפעיל או לכבות את הטלפון."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"איפוס הזמן הקצוב לתפוגת התצוגה"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"מאפשר לאפליקציה לאפס את הזמן הקצוב לתפוגת התצוגה."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"הפעל במצב בדיקת יצרן"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"הפעל כבדיקת יצרן ברמה נמוכה, המאפשרת גישה מלאה לחומרה של הטאבלט. זמין רק כאשר הטאבלט פועל במצב בדיקת יצרן."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"הפעל כבדיקת יצרן ברמה נמוכה, המאפשרת גישה מלאה לחומרת הטלפון. זמינה רק כאשר טלפון פועל במצב בדיקת יצרן."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"דחה"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"בקשת הרשאה"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"נדרשת הרשאה\nלחשבון <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"אתה משתמש באפליקציה זו מחוץ לפרופיל העבודה שלך"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"אתה משתמש באפליקציה זו בפרופיל העבודה שלך"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"שיטת קלט"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"סינכרון"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"נגישות"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"האם לקבל את השיחה?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"תמיד"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"רק פעם אחת"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"‏%1$s אינו תומך בפרופיל עבודה"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"טאבלט"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"טלפון"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"אוזניות"</string>
@@ -1644,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"נגישות הופעלה."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"נגישות בוטלה."</string>
     <string name="user_switched" msgid="3768006783166984410">"המשתמש הנוכחי <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"עובר אל <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"בעלים"</string>
     <string name="error_message_title" msgid="4510373083082500195">"שגיאה"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"מנהל המערכת שלך אינו מתיר שינוי זה"</string>
@@ -1777,12 +1771,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"הפעל"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"המסך מוצמד"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"הצמדת המסך בוטלה"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"כדי לסייע בשיפור חיי הסוללה, התכונה \'חיסכון בסוללה\' מצמצמת את פעילות המכשיר ומגבילה את השימוש ברטט וברוב נתוני הרקע. ייתכן שדוא\"ל, שליחת הודעות ואפליקציות אחרות המסתמכות על סנכרון לא יתעדכנו, אלא אם תפתח אותן.\n\nהתכונה \'חיסכון בסוללה\' מופסקת באופן אוטומטי כשהמכשיר נטען"</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"בקש קוד אימות לפני ביטול הצמדה"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"בקש קו ביטול נעילה לפני ביטול הצמדה"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"בקש סיסמה לפני ביטול הצמדה"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"כדי לעזור בהארכת חיי הסוללה, תכונת \'חיסכון בסוללה\' מצמצמת את פעילות המכשיר ומגבילה את השימוש ברטט וברוב נתוני הרקע. ייתכן שדוא\"ל, שליחת הודעות ואפליקציות אחרות המסתמכות על סנכרון לא יתעדכנו, אלא אם תפתח אותן.\n\nתכונת \'חיסכון בסוללה\' מופסקת אוטומטית כשהמכשיר מחובר לחשמל."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"עד לסיום ההשבתה בשעה <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index 591f98c..97cdd7c 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"電源のON/OFF"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"タブレットの電源のON/OFFをアプリに許可します。"</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"携帯端末の電源のON/OFFをアプリに許可します。"</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"表示タイムアウトのリセット"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"表示タイムアウトをリセットすることをアプリに許可します。"</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"出荷時試験モードでの実行"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"タブレットハードウェアへのアクセスを完全に許可して、低レベルのメーカーテストを実行します。メーカーのテストモードでタブレットを使用する場合にのみ利用できます。"</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"携帯電話のハードウェアへのアクセスを完全に許可して、低レベルのメーカーテストとして実行します。メーカーのテストモードで携帯電話を使用するときのみ利用できます。"</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"拒否"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"権限がリクエストされました"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"次のアカウントにアクセスする権限が\nリクエストされました: <xliff:g id="ACCOUNT">%s</xliff:g>"</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"ワークプロフィールの外部でこのアプリを使用しています"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"ワークプロフィールでこのアプリを使用しています"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"入力方法"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"同期"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"ユーザー補助"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"通話を受けますか?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"常時"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"1回のみ"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$sはワークプロフィールをサポートしていません"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"タブレット"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"携帯端末"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"ヘッドホン"</string>
@@ -1644,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"ユーザー補助が有効になりました。"</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"ユーザー補助をキャンセルしました。"</string>
     <string name="user_switched" msgid="3768006783166984410">"現在のユーザーは<xliff:g id="NAME">%1$s</xliff:g>です。"</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"所有者"</string>
     <string name="error_message_title" msgid="4510373083082500195">"エラー"</string>
@@ -1777,12 +1772,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"開始する"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"画面を固定しました"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"画面固定を解除しました"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"バッテリーを長持ちさせるため、バッテリーセーバーは端末のパフォーマンス、バイブレーション、ほとんどのバックグラウンドデータを制限します。同期を使用するメールやメッセージなどのアプリは起動しないと更新されない場合があります。\n\nバッテリーセーバーは、端末の充電中は自動的にOFFになります。"</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"オフライン再生を解除する前にPINの入力を求める"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"オフライン再生を解除する前にロック解除パターンの入力を求める"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"オフライン再生を解除する前にパスワードの入力を求める"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"バッテリーを長持ちさせるため、バッテリーセーバーは端末のパフォーマンス、バイブレーション、ほとんどのバックグラウンドデータを制限します。同期を使用するメールやメッセージなどのアプリは起動しないと更新されない場合があります。\n\nバッテリーセーバーは、端末の充電中は自動的にOFFになります。"</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g>にダウンロードが終わるまで"</string>
 </resources>
diff --git a/core/res/res/values-ka-rGE/strings.xml b/core/res/res/values-ka-rGE/strings.xml
index 54b076f..50ac6f1 100644
--- a/core/res/res/values-ka-rGE/strings.xml
+++ b/core/res/res/values-ka-rGE/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"ტელეფონის ჩართვა ან გამორთვა"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"აპს შეეძლება, ჩართოს ან გამორთოს ტაბლეტი."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"აპს შეეძლება, ჩართოს ან გამორთოს ტელეფონი."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"დისლპეის დროის ლიმიტის ხელახლა დაყენება"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"უფლებას აძლევს აპს, ხელახლა დააყენოს დისლპეის დროის ლიმიტი."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"ქარხნულ სატესტო რეჟიმში გაშვება"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"მწარმოებლის დაბალი დონის ტესტის რეჟიმში გაშვება, რომლის დროსაც სრულად არის ხელმისაწვდომი ტაბლეტის აპარატული უზრუნველყოფა. ხელმისაწვდომია მხოლოდ მწარმოებლის ტესტის რეჟიმში ჩართულ ტაბლეტზე."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"მწარმოებლის დაბალი დონის ტესტის რეჟიმში გაშვება, რომლის დროსაც სრულად არის ხელმისაწვდომი ტელეფონის აპარატული უზრუნველყოფა. ხელმისაწვდომია მხოლოდ მწარმოებლის ტესტის რეჟიმში ჩართულ ტელეფონზე."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"აკრძალვა"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"მოთხოვნილია ნებართვა"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"მოთხოვნილია ნებრათვა \nანგარიშისთვის: <xliff:g id="ACCOUNT">%s</xliff:g>"</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"იყენებთ ამ აპს თქვენს სამუშაო პროფილს მიღმა"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"ამ აპს თქვენს სამუშაო პროფილში იყენებთ"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"შეყვანის მეთოდი"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"სინქრონიზაცია"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"წვდომა"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"უპასუხებთ ზარს?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"ყოველთვის"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"მხოლოდ ერთხელ"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s მხარს არ უჭერს სამუშაო პროფილს"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"ტაბლეტი"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"ტელეფონი"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"ყურსასმენები"</string>
@@ -1644,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"მარტივი წვდომა ჩართულია."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"მარტივი წვდომა გაუქმდა."</string>
     <string name="user_switched" msgid="3768006783166984410">"ამჟამინდელი მომხმარებელი <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"მფლობელი"</string>
     <string name="error_message_title" msgid="4510373083082500195">"შეცდომა"</string>
@@ -1777,12 +1772,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"დაწყება"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"ეკრანი დაფიქსირდა"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"ეკრანს ფიქსაცია მოეხსნა"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"ბატარეის ფუნქციონალობის გახანგრძლივებისათვის, ბატარეის დამზოგი ამცირებს თქვენი მოწყობილობის წარმადობას და ზღუდავს ვიბრაციასა და უმეტეს ფონურ მონაცემებს. ელფოსტა, შეტყობინებები და ახვა აპები, რომლებიც სინქრონიზაციაზეა დამოკიდებული, შეიძლება არ განახლდეს, თუ არ გახსნით მათ.\n\nბატარეის დამზოგი ავტომატურად გამოირთვება, როდესაც თქვენი მოწყობილობა დატენვის რეჟიმში გადავა"</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"ფიქსაციის მოხსნამდე PIN-ის მოთხოვნა"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"ფიქსაციის მოხსნამდე განბლოკვის ნიმუშის მოთხოვნა"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"ფიქსაციის მოხსნამდე პაროლის მოთხოვნა"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"ბატარეის გამძლეობის გასახანგრძლივებლად, ბატარეის დამზოგი ამცირებს თქვენი მოწყობილობის წარმადობას და ზღუდავს ვიბრაციასა და უმეტეს ფონურ მონაცემს. თუ არ განაახლებთ, შეიძლება არ გაიხსნას ელფოსტა, შეტყობინებები და სხვა აპები, რომლებიც სინქრონიზაციაზეა დამოკიდებული.\n\nბატარეის დამზოგი ავტომატურად გამოირთვება, როდესაც თქვენი მოწყობილობა იტენება."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"დანამ თქვენი კავშირგარეშე დრო დასრულდებოდეს <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>-ზე"</string>
 </resources>
diff --git a/core/res/res/values-kk-rKZ/strings.xml b/core/res/res/values-kk-rKZ/strings.xml
index 11a8c43..3b7463f 100644
--- a/core/res/res/values-kk-rKZ/strings.xml
+++ b/core/res/res/values-kk-rKZ/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"телефонды қуат көзіне қосу немесе ажырату"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Қолданбаға планшетті қосуға немесе өшіруге рұқсат береді."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Қолданбаға телефонды қосуға немесе өшіруге рұқсат береді."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"дисплейдің күту уақытының бітуін қалпына келтіру"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Қолданбаға дисплейдің күту уақытының бітуін қалпына келтіруге рұқсат етеді."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"зауыт тесті режимінде жүргізу"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Төмен деңгейлі өндіріс тесті ретінде қосып, планшеттің қатты дискісіне кіру мүмкіндігін беру. Планшет өндіріс тесті режимінде жұмыс істегенде ғана қол жетімді."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Төмен деңгейлі өндіріс тесті ретінде қосып, телефонның қатты дискісіне кіру мүмкіндігін беру. Телефон өндіріс тесті режимінде жұмыс істегенде ғана қол жетімді."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"Бас тарту"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Рұқсат өтінілді"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Рұқсат \nесептік жазба үшін <xliff:g id="ACCOUNT">%s</xliff:g> өтінілді."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Осы қолданбаны жұмыс профиліңізден тыс пайдаланып жатырсыз"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"Осы қолданбаны жұмыс профиліңізде пайдаланып жатырсыз"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Енгізу әдісі"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Синх"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Қол жетімділік"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Қоңырауды қабылдау?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Үнемі"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Бір рет қана"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s жұмыс профилін қолдамайды"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Планшет"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Телефон"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Құлақаспаптар"</string>
@@ -1644,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Қол жетімділік қосылды."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Қол жетімділік өшірілді."</string>
     <string name="user_switched" msgid="3768006783166984410">"Ағымдағы пайдаланушы <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"Пайдаланушы"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Қателік"</string>
@@ -1777,12 +1772,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"БАСТАУ"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Экран түйрелді"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Экран босатылды"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"Батареяның қызмет мерзімін жақсарту үшін батарея үнемдегіш құрылғының өнімділігін азайтады және діріл мен фондық деректердің көпшілігін шектейді. Синхрондауды қажет ететін электрондық пошта, хабар алмасу және басқа қолданбалар ашқанша жаңартылмауы мүмкін.\n\nБатарея үнемдегіш құрылғы зарядталып жатқанда автоматты түрде өшеді"</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Босату алдында PIN кодын сұрау"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Босату алдында бекітпесін ашу өрнегін сұрау"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Босату алдында құпия сөзді сұрау"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Батареяның қызмет мерзімін жақсарту үшін батарея үнемдегіш құрылғының өнімділігін азайтады және діріл мен фондық деректердің көпшілігін шектейді. Синхрондауды қажет ететін электрондық пошта, хабар алмасу және басқа қолданбалар ашқанша жаңартылмауы мүмкін.\n\nБатарея үнемдегіш құрылғы зарядталып жатқанда автоматты түрде өшеді."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> уақытында әрекетсіздік аяқталғанша"</string>
 </resources>
diff --git a/core/res/res/values-km-rKH/strings.xml b/core/res/res/values-km-rKH/strings.xml
index e825ead..9f02ea1 100644
--- a/core/res/res/values-km-rKH/strings.xml
+++ b/core/res/res/values-km-rKH/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"បិទ/បើក​ទូរស័ព្ទ"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"ឲ្យ​កម្មវិធី​បិទ/បើក​កុំព្យូទ័រ​បន្ទះ។"</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"ឲ្យ​កម្មវិធី​បិទ/បើក​ទូរស័ព្ទ។"</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"កំណត់​ការ​អស់​ពេល​បង្ហាញ​ឡើងវិញ"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"ឲ្យ​កម្មវិធី​កំណត់​ការ​អស់​ពេល​បង្ហាញ​ឡើងវិញ។"</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"ដំណើរការ​ក្នុង​របៀប​សាកល្បង​ពី​រោងចក្រ"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"ដំណើរការ​សាកល្បង​ក្រុមហ៊ុន​ផលិត​កម្រិត​ទាប ដោយ​អនុញ្ញាត​ឲ្យ​ចូល​ផ្នែក​រឹង​កុំព្យូទ័រ​បន្ទះ។ អាច​ប្រើ​​បាន​តែ​ពេល​កុំព្យូទ័រ​កំពុង​ដំណើរការ​ក្នុង​របៀប​សាកល្បង​ក្រុមហ៊ុន​ផលិត។"</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"ដំណើរ​ការ​ការ​សាកល្បង​ក្រុមហ៊ុន​ផលិត​កម្រិត​ទាប ដោយ​អនុញ្ញាត​ការ​ចូល​ដំណើរការ​ផ្នែក​រឹង​ទូរស័ព្ទ។ អាច​ប្រើ​បាន​តែ​នៅ​ពេល​ទូរស័ព្ទ​កំពុង​ដំណើរការ​របៀប​សាកល្បង​ក្រុមហ៊ុន​ផលិត។"</string>
@@ -1427,10 +1425,8 @@
     <string name="deny" msgid="2081879885755434506">"បដិសេធ"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"បាន​ស្នើ​សិទ្ធិ"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"បាន​ស្នើ​សិទ្ធិ\nសម្រាប់​គណនី <xliff:g id="ACCOUNT">%s</xliff:g> ។"</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"អ្នក​កំពុង​ប្រើ​កម្មវិធី​នេះ​នៅ​ខាងក្រៅ​ប្រវត្តិរូប​​ការងារ​របស់​អ្នក"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"អ្នក​កំពុង​ប្រើ​កម្មវិធី​នេះ​ក្នុង​ប្រវត្តិរូប​ការងារ​របស់​អ្នក"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"វិធីសាស្ត្រ​បញ្ចូល"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"ធ្វើ​សម​កាល​កម្ម"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"ភាព​ងាយស្រួល"</string>
@@ -1572,8 +1568,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"ទទួល​ការ​ហៅ​?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"ជា​និច្ច"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"តែ​ម្ដង"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s មិន​គាំទ្រ​ប្រវត្តិរូប​ការងារ"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"កុំព្យូទ័រ​បន្ទះ"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"ទូរស័ព្ទ"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"កាស"</string>
@@ -1646,7 +1641,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"បាន​បើក​មធ្យោបាយ​ងាយស្រួល​។"</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"បាន​បោះបង់​ភាព​ងាយស្រួល។"</string>
     <string name="user_switched" msgid="3768006783166984410">"អ្នក​ប្រើ​បច្ចុប្បន្ន <xliff:g id="NAME">%1$s</xliff:g> ។"</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"ម្ចាស់"</string>
     <string name="error_message_title" msgid="4510373083082500195">"កំហុស"</string>
@@ -1779,12 +1774,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"ចាប់ផ្ដើម"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"បាន​ភ្ជាប់​អេក្រង់"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"មិន​បាន​ភ្ជាប់​អេក្រង់"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"ដើម្បី​ជួយ​កែ​លម្អ​​អាយុ​ថ្ម, កម្មវិធី​សន្សំ​ថ្ម​កាត់​បន្ថយ​ការ​អនុវត្ត​ឧបករណ៍​របស់​អ្នក និង​កម្រិត​ការ​ញ័រ និង​ទិន្នន័យ​ផ្ទៃ​ខាង​ក្រោយ​។ អ៊ីមែល, ការ​ផ្ញើ​សារ​និង​កម្មវិធី​ផ្សេងៗ​​ដែល​ផ្អែក​លើ​ការ​ធ្វើ​សមកាលកម្ម​មិន​ធ្វើ​បច្ចុប្បន្នភាព​ទេ​លុះ​ត្រា​តែ​អ្នក​បើក​ពួកវា។\n\nកម្មវិធី​សន្សំ​ថ្ម​បិទ​ដោយ​ស្វ័យ​ប្រវត្តិ​ពេល​ឧបករណ៍​របស់​អ្នក​កំពុង​បញ្ចូល​ថ្ម"</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"សួរ​រក​កូដ PIN មុន​ពេល​ផ្ដាច់"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"សួរ​រក​លំនាំ​ដោះ​សោ​មុន​ពេល​ផ្ដាច់"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"សួរ​រក​ពាក្យ​សម្ងាត់​មុន​ពេល​ផ្ដាច់"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"ដើម្បី​បង្កើន​អាយុ​ថ្ម កម្មវិធី​សន្សំ​ថ្ម​កាត់​បន្ថយ​ការអនុវត្ត​ឧបករណ៍​របស់​អ្នក​ ហើយ​​កម្រិត​ការ​ញ័រ និង​ទិន្នន័យ​ផ្ទៃ​ខាង​ក្រោយ។ អ៊ីមែល, ការ​ផ្ញើ​សារ និង​កម្មវិធី​ផ្សេងៗ​ទៀត​ដែល​ផ្អែក​លើ​ការ​ធ្វើ​សម​កាល​កម្ម​​​មិន​អាច​ធ្វើ​បច្ចុប្បន្នភាព​លុះ​ត្រា​តែ​អ្នក​បើក​ពួកវា។\n\nកម្មវិធី​សន្សំ​ថ្ម​បិទ​ដោយ​ស្វ័យ​ប្រវត្តិ​ពេល​ឧបករណ៍​របស់​អ្នក​កំពុង​បញ្ចូល​ថ្ម។"</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"រហូត​ដល់ម៉ោង​របស់​អ្នក​បញ្ចប់​នៅ <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-kn-rIN/strings.xml b/core/res/res/values-kn-rIN/strings.xml
index 3b977a9..3121a7a 100644
--- a/core/res/res/values-kn-rIN/strings.xml
+++ b/core/res/res/values-kn-rIN/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"ಫೋನ್ ಆನ್ ಅಥವಾ ಆಫ್ ಮಾಡಿ"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"ಟ್ಯಾಬ್ಲೆಟ್‌‌ ಅನ್ನು ಆನ್‌‌ ಅಥವಾ ಆಫ್‌ ಮಾಡಲು ಅಪ್ಲಿಕೇಶನ್‌ ಅನುಮತಿಸುತ್ತದೆ."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"ಫೋನ್‌ ಅನ್ನು ಆನ್‌‌ ಅಥವಾ ಆಫ್‌ ಮಾಡಲು ಅಪ್ಲಿಕೇಶನ್‌ ಅನುಮತಿಸುತ್ತದೆ."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"ಪ್ರದರ್ಶನ ಅವಧಿ ಮೀರುವಿಕೆಯನ್ನು ಮರುಹೊಂದಿಸಿ"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"ಪ್ರದರ್ಶನ ಅವಧಿ ಮೀರುವಿಕೆಯನ್ನು ಮರುಹೊಂದಿಸಲು ಅಪ್ಲಿಕೇಶನ್ ಅನ್ನು ಅನುಮತಿಸುತ್ತದೆ."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"ಫ್ಯಾಕ್ಟರಿ ಪರೀಕ್ಷೆಯ ಮೋಡ್‌ನಲ್ಲಿ ರನ್ ಮಾಡಿ"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"ಟ್ಯಾಬ್ಲೆಟ್ ಹಾರ್ಡ್‌ವೇರ್‌ಗೆ ಸಂಪೂರ್ಣ ಪ್ರವೇಶವನ್ನು ಕಲ್ಪಿಸುವ ಮೂಲಕ ಕೆಳಮಟ್ಟದ ತಯಾರಕರ ಪರೀಕ್ಷೆಯ ರೂಪದಲ್ಲಿ ರನ್ ಆಗುತ್ತದೆ. ತಯಾರಕರ ಪರೀಕ್ಷೆಯ ಮೋಡ್‌ನಲ್ಲಿ ಟ್ಯಾಬ್ಲೆಟ್ ರನ್ ಆಗುತ್ತಿರುವಾಗ ಮಾತ್ರ ಲಭ್ಯವಿರುತ್ತದೆ."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"ಫೋನ್ ಹಾರ್ಡ್‌ವೇರ್‌ಗೆ ಸಂಪೂರ್ಣ ಪ್ರವೇಶವನ್ನು ಅನುಮತಿಸುವ ಮೂಲಕ, ಕೆಳಮಟ್ಟದ ತಯಾರಕರ ಪರೀಕ್ಷೆಯ ರೂಪದಲ್ಲಿ ರನ್ ಮಾಡಿ. ತಯಾರಕರ ಪರೀಕ್ಷೆಯ ಮೋಡ್‌ನಲ್ಲಿ ಫೋನ್ ರನ್ ಆಗುತ್ತಿರುವಾಗ ಮಾತ್ರ ಲಭ್ಯವಿದೆ."</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"ನಿರಾಕರಿಸು"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"ಅನುಮತಿ ವಿನಂತಿಸಲಾಗಿದೆ"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"<xliff:g id="ACCOUNT">%s</xliff:g> ಖಾತೆಗಾಗಿ\n ಅನುಮತಿಯನ್ನು ವಿನಂತಿಸಲಾಗಿದೆ."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"ನಿಮ್ಮ ಕೆಲಸದ ಪ್ರೊಫೈಲ್‌ನ ಹೊರಗೆ ನೀವು ಈ ಅಪ್ಲಿಕೇಶನ್‌ ಅನ್ನು ಬಳಸುತ್ತಿರುವಿರಿ"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"ನಿಮ್ಮ ಕೆಲಸದ ಪ್ರೊಫೈಲ್‌ನಲ್ಲಿ ನೀವು ಈ ಅಪ್ಲಿಕೇಶನ್‌ ಅನ್ನು ಬಳಸುತ್ತಿರುವಿರಿ"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"ಇನ್‌ಪುಟ್ ವಿಧಾನ"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"ಸಿಂಕ್ ಮಾಡು"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"ಕರೆ ಸ್ವೀಕರಿಸುವುದೇ?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"ಯಾವಾಗಲೂ"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"ಒಮ್ಮೆ ಮಾತ್ರ"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s ಕೆಲಸದ ಪ್ರೊಫೈಲ್ ಅನ್ನು ಬೆಂಬಲಿಸುವುದಿಲ್ಲ"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"ಟ್ಯಾಬ್ಲೆಟ್‌‌"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"ಫೋನ್"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"ಹೆಡ್‌ಫೋನ್‌ಗಳು"</string>
@@ -1643,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"ಪ್ರವೇಶಿಸುವಿಕೆ ಸಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"ಪ್ರವೇಶಿಸುವಿಕೆಯನ್ನು ರದ್ದುಮಾಡಲಾಗಿದೆ."</string>
     <string name="user_switched" msgid="3768006783166984410">"ಪ್ರಸ್ತುತ ಬಳಕೆದಾರರು <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"<xliff:g id="NAME">%1$s</xliff:g> ಗೆ ಬದಲಾಯಿಸಲಾಗುತ್ತಿದೆ…"</string>
     <string name="owner_name" msgid="2716755460376028154">"ಮಾಲೀಕರು"</string>
     <string name="error_message_title" msgid="4510373083082500195">"ದೋಷ"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"ಈ ಬದಲಾವಣೆಯನ್ನು ನಿಮ್ಮ ನಿರ್ವಾಹಕರು ಅನುಮತಿಸುವುದಿಲ್ಲ"</string>
@@ -1779,6 +1774,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"ಅನ್‌ಪಿನ್ ಮಾಡುವುದಕ್ಕೂ ಮೊದಲು PIN ಕೇಳಿ"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"ಅನ್‌ಪಿನ್ ಮಾಡುವುದಕ್ಕೂ ಮೊದಲು ಅನ್‌ಲಾಕ್ ನಮೂನೆಯನ್ನು ಕೇಳಿ"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"ಅನ್‌ಪಿನ್ ಮಾಡುವುದಕ್ಕೂ ಮೊದಲು ಪಾಸ್‌ವರ್ಡ್ ಕೇಳಿ"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"ಬ್ಯಾಟರಿ ಬಾಳಿಕೆಯನ್ನು ಸುಧಾರಿಸುವ ನಿಟ್ಟಿನಲ್ಲಿ, ಬ್ಯಾಟರಿ ಉಳಿಸುವಿಕೆ ನಿಮ್ಮ ಸಾಧನದ ಕಾರ್ಯಕ್ಷಮತೆಯನ್ನು ಕಡಿಮೆ ಮಾಡುತ್ತದೆ. ಜೊತೆಗೆ ವೈಬ್ರೇಷನ್‌ ಹಾಗೂ ಬಹಳಷ್ಟು ಹಿನ್ನೆಲೆ ಡೇಟಾವನ್ನು ಸೀಮಿತಗೊಳಿಸುತ್ತದೆ. ಸಿಂಕ್‌ ಅನ್ನು ಅವಲಂಭಿಸಿರುವ ಇಮೇಲ್‌, ಸಂದೇಶ ಕಳುಹಿಸುವಿಕೆ ಹಾಗೂ ಇತರ ಅಪ್ಲಿಕೇಶನ್‌ಗಳು ಅವುಗಳನ್ನು ತೆರೆಯದ ಹೊರತು ನವೀಕೃತಗೊಳ್ಳುವುದಿಲ್ಲ. \n\n ಸಾಧನವನ್ನು ಚಾರ್ಜ್ ಮಾಡುತ್ತಿರುವಾಗ ಬ್ಯಾಟರಿ ಉಳಿಸುವಿಕೆ ತನ್ನಿಂದ ತಾನೇ ಆಫ್‌ ಆಗುತ್ತದೆ"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"ಬ್ಯಾಟರಿ ಬಾಳಿಕೆಯನ್ನು ವೃದ್ದಿಸಲು ಸಹಾಯ ಮಾಡಲು, ಬ್ಯಾಟರಿ ಉಳಿತಾಯವು ನಿಮ್ಮ ಸಾಧನದ ಕಾರ್ಯಕ್ಷಮತೆಯನ್ನು ಕಡಿಮೆಗೊಳಿಸುತ್ತದೆ ಮತ್ತು ಕಂಪನವನ್ನು ಹಾಗೂ ಹೆಚ್ಚಿನ ಹಿನ್ನೆಲೆ ಡೇಟಾವನ್ನು ಸೀಮಿತಗೊಳಿಸುತ್ತದೆ. ಇಮೇಲ್, ಸಂದೇಶ ಕಳುಹಿಸುವಿಕೆ, ಮತ್ತು ಸಿಂಕ್ ಮಾಡುವುದನ್ನು ಅವಲಂಬಿಸಿರುವ ಇತರ ಅಪ್ಲಿಕೇಶನ್‌ಗಳನ್ನು ನೀವು ತೆರೆಯುವವರೆಗೆ ಅವುಗಳನ್ನು ನವೀಕರಿಸಲಾಗುವುದಿಲ್ಲ.\n\nನಿಮ್ಮ ಸಾಧನವು ಚಾರ್ಜ್ ಆಗುತ್ತಿರುವಾಗ ಬ್ಯಾಟರಿ ಉಳಿತಾಯವು ಸ್ವಯಂಚಾಲಿತವಾಗಿ ಆಫ್ ಆಗುತ್ತದೆ."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"ನಿಮ್ಮ ಅಲಭ್ಯತೆ ಕೊನೆಗೊಳ್ಳುವವರೆಗೆ <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index 53367d5..077df60 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"휴대전화 전원 켜고 끄기"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"앱이 태블릿을 켜거나 끌 수 있도록 허용합니다."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"앱이 휴대전화를 켜거나 끌 수 있도록 허용합니다."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"화면 자동 잠금 시간 재설정"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"앱에서 화면 자동 잠금 시간을 재설정하도록 허용합니다."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"출고 테스트 모드로 실행"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"태블릿 하드웨어에 대한 완전한 액세스를 허용하는 하위 수준의 제조업체 테스트로 실행됩니다. 태블릿이 제조업체 테스트 모드로 실행 중일 때만 사용할 수 있습니다."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"휴대전화 하드웨어에 대한 완전한 액세스를 허용하는 하위 수준의 제조업체 테스트로 실행됩니다. 휴대전화가 제조업체 테스트 모드로 실행 중일 때만 사용할 수 있습니다."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"거부"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"권한 요청됨"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"<xliff:g id="ACCOUNT">%s</xliff:g> 계정에 대해\n권한 요청"</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"직장 프로필 외부에서 이 앱을 사용 중입니다."</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"직장 프로필에서 이 앱을 사용 중입니다."</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"입력 방법"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"동기화"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"접근성"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"통화를 수락하시겠습니까?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"항상"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"한 번만"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s에서 직장 프로필을 지원하지 않습니다."</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"태블릿"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"휴대전화"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"헤드폰"</string>
@@ -1644,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"접근성을 사용 설정했습니다."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"접근성이 취소되었습니다."</string>
     <string name="user_switched" msgid="3768006783166984410">"현재 사용자는 <xliff:g id="NAME">%1$s</xliff:g>님입니다."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"소유자"</string>
     <string name="error_message_title" msgid="4510373083082500195">"오류"</string>
@@ -1777,12 +1772,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"시작"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"화면 고정됨"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"화면 고정 해제됨"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"배터리 절약 기능은 배터리 수명을 개선하기 위해 기기의 성능을 줄이고 진동과 대부분의 백그라운드 데이터를 제한합니다. 동기화가 필요한 이메일, 메시지, 기타 앱은 열었을 때 업데이트됩니다.\n\n기기를 충전하는 중에는 배터리 절약 기능이 자동으로 중지됩니다."</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"고정 해제 이전에 PIN 요청"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"고정 해제 이전에 잠금해제 패턴 요청"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"고정 해제 이전에 비밀번호 요청"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"배터리 수명을 개선하기 위해 배터리 세이버에서는 기기의 성능을 줄이고 진동과 대부분의 백그라운드 데이터를 제한합니다. 동기화가 필요한 이메일, 메시지, 기타 앱은 열어야 업데이트됩니다.\n\n기기를 충전하는 중에는 배터리 세이버가 자동으로 사용 중지됩니다."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g>에 정지가 종료될 때까지"</string>
 </resources>
diff --git a/core/res/res/values-ky-rKG/strings.xml b/core/res/res/values-ky-rKG/strings.xml
index 3b5a0a9d..1b2e511 100644
--- a/core/res/res/values-ky-rKG/strings.xml
+++ b/core/res/res/values-ky-rKG/strings.xml
@@ -803,10 +803,8 @@
     <skip />
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Колдонмого планшетти күйгүзүп же өчүрүү мүмкүнчүлүгүн берет."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Колдонмого телефонду күйгүзүп же өчүрүү мүмкүнчүлүгүн берет."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"дисплейдин күтүү убакытын кайра коюу"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Колдонмонун дисплейин күтүү убакытын кайра коюу мүмкүнчүлүгүн берет."</string>
     <!-- no translation found for permlab_factoryTest (3715225492696416187) -->
     <skip />
     <!-- no translation found for permdesc_factoryTest (3952059318359653091) -->
@@ -1855,10 +1853,8 @@
     <skip />
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Уруксат талап кылуу"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Кийинки эсепке\nуруксат талап кылынууда: <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Бул колдонмо жумуш профилиңиздин сыртында колдонулуп жатат"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"Бул колдонмону жумуш профилиңизде пайдаланып жатасыз"</string>
     <!-- no translation found for input_method_binding_label (1283557179944992649) -->
     <skip />
     <!-- no translation found for sync_binding_label (3687969138375092423) -->
@@ -2051,8 +2047,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Чалуу кабыл алынсынбы?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Дайыма"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Бир жолу гана"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s жумуш профилин колдоого албайт"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Планшет"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Телефон"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Кулакчын"</string>
@@ -2125,7 +2120,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Жеткиликтүүлүк иштетилди."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Атайын мүмкүнчүлүктөр иштетилген жок."</string>
     <string name="user_switched" msgid="3768006783166984410">"Учурдагы колдонуучу <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"Ээси"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Ката"</string>
@@ -2258,12 +2253,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"БАШТОО"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Экран кадалды"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Экран бошотулду"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"Батареянын кубатын узакка чейин жеткирүү үчүн, кубат үнөмдөгүч түзмөгүңүздүн ишинин майнаптуулугун төмөндөтүп, дирилдөөнү жана фондук дайындардын көпчүлүгүн чектеп коёт. Электрондук почта, билдирүү жазышуу жана башка шайкештештирилген колдонмолор ачылмайынча жаңыртылбашы мүмкүн.\n\nТүзмөгүңүз кубатталып жатканда кубат үнөмдөгүч автоматтык түрдө өчүп калат"</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Бошотуудан мурун PIN суралсын"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Бошотуудан мурун кулпуну ачкан үлгү суралсын"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Бошотуудан мурун сырсөз суралсын"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Батарея өмүрүн узартууга жардамдашуу үчүн, батарея үнөмдөгүч түзмөгүңүздүн өндүрүмдүүлүгүн азайтып, дирилдөөнү жана көпчүлүк фон дайындарын чектейт. Email, билдирүү жазуу жана башка шайкештирүүгө көз каранды колдонмолор, аларды ачмайыңызча жаңыртылбашы мүмкүн.\n\nТүзмөгүңүз кубатталып жатканда батарея үнөмдөгүч автоматтык түрдө өчөт."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Иштебей турган абал <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> аяктамайынча"</string>
 </resources>
diff --git a/core/res/res/values-lo-rLA/strings.xml b/core/res/res/values-lo-rLA/strings.xml
index f46a62e..b052ecb 100644
--- a/core/res/res/values-lo-rLA/strings.xml
+++ b/core/res/res/values-lo-rLA/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"ເປີດ ຫຼືປິດໂທລະສັບ"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"ອະນຸຍາດໃຫ້ແອັບຯເປີດ ຫຼືປິດແທັບເລັດ."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"ອະນຸຍາດໃຫ້ແອັບພລິເຄຊັນປິດ ຫຼືເປີດແທັບເລັດໄດ້."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"ຣີ​ເຊັດ​ໄລ​​ຍະ​ເວ​ລາ​ກ່ອນ​ປິດ​ໜ້າ​ຈໍ."</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"​ອະ​ນຸ​ຍາດ​ໃຫ້​ແອັບຯ​ຣີ​ເຊັດ​ໄລ​​ຍະ​ເວ​ລາ​ກ່ອນ​ປິດ​ໜ້າ​ຈໍ."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"ເຮັດວຽກໃນໂໝດການທົດສອບຂອງໂຮງງານ"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"ເຮັດວຽກໃນຮູບແບບທົດສອບໃນລະດັບຕໍ່າຂອງຜູ່ຜະລິດ, ອະນຸຍາດການເຂົ້າເຖິງແບບເຕັມຮູບແບບຫາຮາດແວຂອງແທັບເລັດ. ໃຊ້ໄດ້ສະເພາະໃນເວລາທີ່ແທັບເລັດກຳລັງຢູ່ໃນໂໝດ ການທົດສອບຂອງຜູ່ຜະລິດgmqjkoaho."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"ເປີດໃຊ້ໃນແບບການທົດສອບຂອງຜູ່ລະລິດໃນລະດັບຕໍ່າ, ອະນຸຍາດການເຂົ້າເຖິງຮາດແວຂອງໂທລະສັບແບບສົມບູນ. ສະເພາະເມື່ອໂທລະສັບຖືກເປີດໃຊ້ ໃນໂໝດການທົດສອບຂອງຜູ່ຜະລິດເທົ່ານັ້ນ."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"ປະ​ຕິ​ເສດ"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"ຕ້ອງການການອະນຸຍາດ"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"ຮ້ອງຂໍການກຳນົດສິດ\nສຳລັບບັນຊີ <xliff:g id="ACCOUNT">%s</xliff:g> ແລ້ວ."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"​ທ່ານ​ກຳ​ລັງ​ໃຊ້​ແອັບຯ​ນີ້ນອກ​ໂປຣ​ໄຟລ໌​ບ່ອນ​ເຮັດ​ວຽກ​ຂອງ​ທ່ານ"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"​ທ່ານ​ກຳ​ລັງ​ໃຊ້​ແອັບຯ​ນີ້​ໃນ​ໂປຣ​ໄຟລ໌​​ບ່ອນ​ເຮັດ​ວຽກ​ຂອງ​ທ່ານ"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"ວິທີການປ້ອນຂໍ້ມູນ"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"ຊິ້ງຂໍ້ມູນ"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"ການຊ່ວຍເຂົ້າເຖິງ"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"ຮັບການໂທບໍ່?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"ທຸກຄັ້ງ"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"ຄັ້ງດຽວ"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s ບໍ່​ຮອງ​ຮັບ​ໂປຣ​ໄຟລ໌​ບ່ອນ​ເຮັດ​ວຽກ​ຂອງ​ທ່ານ"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"ແທັບເລັດ"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"ໂທລະສັບ"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"ຫູຟັງ"</string>
@@ -1644,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"ເປີດການຊ່ວຍເຂົ້າເຖິງແລ້ວ."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"ຍົກເລີກໂຕຊ່ວຍການເຂົ້າເຖິງແລ້ວ."</string>
     <string name="user_switched" msgid="3768006783166984410">"ຜູ່ໃຊ້ປັດຈຸບັນ <xliff:g id="NAME">%1$s</xliff:g> ."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"ກຳ​ລັງ​ສະ​ລັບ​​ໄປ​ຫາ <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"ເຈົ້າຂອງ"</string>
     <string name="error_message_title" msgid="4510373083082500195">"ຜິດພາດ"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"​ຜູ່​ເບິ່ງ​ແຍງ​ລະ​ບົບ​ຂອງ​ທ່ານບໍ່​ອະ​ນຸ​ຍາດ​ໃຫ້​ປ່ຽນ​ແປງ​ສິ່ງ​ນີ້"</string>
@@ -1777,12 +1771,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"​ເລີ່ມ"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"​ປັກ​ໝຸດ​ໜ້າ​ຈໍ​ແລ້ວ"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"ຍົກ​ເລີກ​ການ​ປັກ​ໝຸນ​​ຫນ້າ​ຈໍ​ແລ້ວ"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"ເພື່ອ​ຊ່ວຍ​ປັບ​ປຸ​ງ​ອາ​ຍຸ​ແບັດ​ເຕີ​ຣີ, ໂຕ​ປະ​ຢັດ​ແບັດ​ເຕີ​ຣີ​ຈະຫຼຸດ​ປະ​ສິດ​ທິ​ພາບ​ຂອງ​ອຸ​ປະ​ກອນ​ຂອງ​ທ່ານ​ລົງ ແລະ​ຈຳ​ກັດ​ການ​ສັ່ນ​ເຕືອນ ຮວມ​​ທັງ​ຂໍ້​ມູນ​ພື້ນຫຼັງ​ສ່ວນ​ໃຫຍ່. ອີ​ເມວ, ການ​ສົ່ງ​ຂໍ້​ຄ​ວາມ ແລະ​ແອັບຯ​ອື່ນໆ​ທີ່​ອີງ​ອາ​ໃສ​ການ​ຊິ້ງ​ຂໍ້​ມູນ​ອາດບໍ່​ມີ​ການ​ອັບ​ເດດ​ຈົນ​ກວ່າ​ທ່ານ​ຈະ​ເປີດ​ແອັບຯ​ເຫຼົ່າ​ນັ້ນ.\n\nໂຕ​ປະ​ຢັດ​ແບັດ​ເຕີ​ຣີ​ຈະ​ປິດ​ໂຕ​ເອງ​​ອັດ​ຕະ​ໂນ​ມັດ​ໃນ​ເວ​ລາ​ທີ່​ອຸ​ປະ​ກອນ​ຂອງ​ທ່ານ​ສາກ​ໄຟ​ຢູ່"</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"​ຖາມ​ຫາ PIN ກ່ອນ​ຍົກ​ເລີກ​ການປັກ​ໝຸດ"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"​ຖາມ​ຫາ​ຮູບ​ແບບ​ປົດ​ລັອກ​ກ່ອນ​ຍົກ​ເລີກ​ການ​ປັກ​ໝຸດ"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"​ຖາມ​ຫາ​ລະ​ຫັດ​ຜ່ານ​ກ່ອນ​ຍົກ​ເລີກ​ການ​ປັກ​ໝຸດ"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"ເພື່ອ​ຊ່ວຍ​ປັບ​ປຸງ​ອາ​ຍຸ​ແບັດ​ເຕ​ີ​ຣີ, ໂຕ​ປະ​ຢັດ​ແບັດ​ເຕີ​ຣີ​ຈະຫຼຸດ​ປະ​ສິດ​ທິ​ພາບ​​ຂອງ​ອຸ​ປະ​ກອນ​ທ່ານ​ລົງ ແລະ​ຈຳ​ກັດ​ການ​ສັ່ນເຕືອນ ຮວມ​ເຖິງຂໍ້​ມູນ​ພື້ນຫຼັງ​ສ່ວນ​ໃຫຍ່​ນຳ. ອີ​ເມວ, ການ​ສົ່ງ​ຂໍ້​ຄວາມ ແລະ​ແອັບຯ​ອື່ນໆ​ທີ່​ອີງ​ອາ​ໃສ​ການ​ຊິ້ງ​ຂໍ້​ມູນ​ອາດບໍ່​ມີ​ການ​ອັບ​ເດດ​ຈົນ​ກວ່າ​ທ່ານ​ຈະ​ເປີດ​ພວກ​ມັນ​ຂຶ້ນ​ມາ.\n\n​ໂຕ​ປະ​ຢັດ​ແບັດ​ເຕີ​ຣີ​ຈະ​ປິດ​ໂດຍ​ອັດ​ຕະ​ໂນ​ມັດ​ເມື່ອ​ມີ​ອຸ​ປະ​ກອນ​ຖືກ​ສາກ​ໄຟ."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"ຈົນ​ກວ່າ​ດາວ​ທາມ​ຂອງ​ທ່ານ​ຈະ​ສິ້ນ​ສຸດ​ທີ່ <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml
index 9956a42..5551608 100644
--- a/core/res/res/values-lt/strings.xml
+++ b/core/res/res/values-lt/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"telefono įjungimas ir išjungimas"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Leidžiama programai įjungti ar išjungti planšetinį kompiuterį."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Leidžiama programai įjungti ar išjungti telefoną."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"iš naujo nustatyti vaizdo skirtąjį laiką"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Leidžiama programai iš naujo nustatyti vaizdo skirtąjį laiką."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"paleisti gamyklos bandymo režime"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Paleisti kaip žemo lygio gamintojo bandymą, leidžiant užbaigti prieigą prie aparatinės planšetinio kompiuterio įrangos. Pasiekiama tik tada, kai planšetinis kompiuteris veikia gamintojo bandymo režimu."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Paleisti kaip žemo lygio gamintojo bandymą, leidžiant užbaigti prieigą prie aparatinės telefono įrangos. Galima tik kai telefonas veikia gamintojo bandymo režimu."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"Atmesti"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Pateikta užklausa dėl leidimo"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Pateikta leidimo užklausa\ndėl <xliff:g id="ACCOUNT">%s</xliff:g> paskyros"</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Šią programą naudojate ne darbo profilyje"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"Šią programą naudojate darbo profilyje"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Įvesties būdas"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Sinchronizuoti"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Pasiekiamumas"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Priimti skambutį?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Visada"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Tik kartą"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s nepalaiko darbo profilio"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Planšetinis kompiuteris"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Telefonas"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Ausinės"</string>
@@ -1644,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Pritaikymas neįgaliesiems įgalintas."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Pritaikymo neįgaliesiems režimas atšauktas."</string>
     <string name="user_switched" msgid="3768006783166984410">"Dabartinis naudotojas: <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Perjungiama į <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Savininkas"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Klaida"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Administratorius neleidžia atlikti šio pakeitimo"</string>
@@ -1777,12 +1771,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"ĮJUNGTI"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Ekrano prisegtas"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Ekranas atsegtas"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"Kad padėtų pailginti akumuliatoriaus veikimo laiką, akumuliatoriaus energijos taupymo funkcija sumažina įrenginio našumą, apriboja vibravimą ir daugelį fono duomenų. El. pašto, pranešimų siuntimo ir kitos programos, kurios remiasi sinchronizavimu, galbūt nebus atnaujintos, jei jų neatidarysite.\n\nAkumuliatoriaus energijos taupymo funkcija automatiškai išjungiama, kai įrenginys kraunamas."</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Prašyti PIN kodo prieš atsegant"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Prašyti atrakinimo piešinio prieš atsegant"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Prašyti slaptažodžio prieš atsegant"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Siekiant pailginti akumuliatoriaus veikimo laiką, akumuliatoriaus tausojimo programa sumažina įrenginio našumą ir apriboja vibravimą bei daugumą foninių duomenų. El. paštas, pranešimų siuntimas ir kitos programos, kurios veikia sinchronizavimo pagrindu, gali nebūti atnaujintos, nebent jas atidarysite.\n\nKraunant įrenginį akumuliatoriaus tausojimo programa automatiškai išjungiama."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Kol jūsų prastova baigsis <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml
index 00dbf90..47c5e7c 100644
--- a/core/res/res/values-lv/strings.xml
+++ b/core/res/res/values-lv/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"ieslēgt vai izslēgt tālruni"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Ļauj lietotnei ieslēgt vai izslēgt planšetdatoru."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Ļauj lietotnei ieslēgt vai izslēgt tālruni."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"displeja noildzes atiestatīšana"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Ļauj lietotnei atiestatīt displeja noildzi."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"darbināt rūpnīcas pārbaudes režīmā"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Darbina kā zema līmeņa ražotāja testu, atļaujot pilnīgu piekļuvi planšetdatora aparatūrai. Pieejama tikai tad, ja planšetdators darbojas ražotāja testa režīmā."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Darbiniet kā zema līmeņa ražotāja pārbaudi, atļaujot pilnīgu piekļuvi tālruņa aparatūrai. Pieejams tikai tad, ja tālrunis darbojas ražotāja pārbaudes režīmā."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"Noraidīt"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Atļauja ir pieprasīta."</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Atļauja kontam <xliff:g id="ACCOUNT">%s</xliff:g>\nir pieprasīta."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Šo lietotni izmantojat ārpus sava darba profila"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"Jūs izmantojat šo lietotni no sava darba profila."</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Ievades metode"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Sinhronizācija"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Pieejamība"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Vai atbildēt uz zvanu?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Vienmēr"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Tikai vienreiz"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"Programma %1$s neatbalsta darba profilus"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Planšetdators"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Tālrunis"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Austiņas"</string>
@@ -1644,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Pieejamības režīms ir iespējots."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Pieejamība ir atcelta."</string>
     <string name="user_switched" msgid="3768006783166984410">"Pašreizējais lietotājs: <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"Īpašnieks"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Kļūda"</string>
@@ -1777,12 +1772,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"SĀKT"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Ekrāns ir piesprausts"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Ekrāns ir atsprausts"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"Lai palīdzētu uzlabot akumulatora darbības laiku, akumulatora jaudas taupīšanas režīms samazina ierīces veiktspēju un ierobežo vibrācijas un lielāko daļu fona datu. E-pasta, ziņojumapmaiņas un citas lietotnes, kurām ir nepieciešama sinhronizācija, iespējams, neatjauninās savus datus, ja vien tās neatvērsiet.\n\nKad ierīce tiek uzlādēta, akumulatora enerģijas taupīšanas režīms tiek automātiski izslēgts."</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Pirms atspraušanas pieprasīt PIN"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Pirms atspraušanas pieprasīt grafisko atslēgu"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Pirms atspraušanas pieprasīt paroli"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Lai paildzinātu akumulatora darbības laiku, akumulatora enerģijas taupīšanas režīmā tiks pazemināta ierīces veiktspēja, samazināta vibrācija un ierobežota liela daļa fona datu. E-pasta, ziņojumapmaiņas un citas lietotnes, kas regulāri tiek sinhronizētas, tiks atjauninātas tikai tad, ja tās atvērsiet.\n\nIerīces uzlādes laikā akumulatora jaudas taupīšana tiek izslēgta automātiski."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Līdz beigsies dīkstāve (<xliff:g id="FORMATTEDTIME">%1$s</xliff:g>)"</string>
 </resources>
diff --git a/core/res/res/values-mk-rMK/strings.xml b/core/res/res/values-mk-rMK/strings.xml
index 1029e2b..ddfc0bb 100644
--- a/core/res/res/values-mk-rMK/strings.xml
+++ b/core/res/res/values-mk-rMK/strings.xml
@@ -1427,8 +1427,7 @@
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Побарана е дозвола\nза сметка <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
     <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
     <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_work" msgid="621480743856004612">"Ја користите апликацијата во работниот профил"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Метод на внес"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Синхронизирај"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Пристапност"</string>
@@ -1646,8 +1645,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Овозможена е пристапност."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Пристапноста е откажана."</string>
     <string name="user_switched" msgid="3768006783166984410">"Тековен корисник <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Се префрла на <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Сопственик"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Грешка"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Администраторот не ја дозволува промената"</string>
@@ -1779,12 +1777,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"СТАРТ"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Екранот е закачен"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Екранот е откачен"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"За да помогне да се подобри трајноста на батеријата, штедачот на батеријата ја намалува изведбата на уредот и ги ограничува вибрациите и повеќето податоци во заднина. Е-поштата, пораките и другите апликации што зависат од синхронизирање може нема да се ажурираат сè додека не ги отворите.\n\nШтедачот на батерија автоматски се исклучува кога уредот се полни."</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Прашај за ПИН пред откачување"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Прашај за шема за отклучување пред откачување"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Прашај за лозинка пред откачување"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"За да помогне во подобрување на трајноста на батеријата, штедачот на батерија го намалува учинокот на уредот и ги ограничува вибрациите и повеќето податоци во заднина. Е-поштата, испраќањето пораки и другите апликации кои се потпираат на синхронизирање може да не се ажурираат освен ако не ги отворите.\n\nШтедачот на батерија автоматски се исклучува кога уредот се полни."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Додека не заврши паузата во <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-ml-rIN/strings.xml b/core/res/res/values-ml-rIN/strings.xml
index 04aa66b..e2bcb51 100644
--- a/core/res/res/values-ml-rIN/strings.xml
+++ b/core/res/res/values-ml-rIN/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"ഫോൺ ഓണാക്കുക അല്ലെങ്കിൽ ഓഫാക്കുക"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"ടാബ്‌ലെറ്റ് ഓൺ ചെയ്യുന്നതിനോ ഓഫുചെയ്യുന്നതിനോ അപ്ലിക്കേഷനെ അനുവദിക്കുന്നു."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"ഫോൺ ഓൺ ചെയ്യുന്നതിനോ ഓഫുചെയ്യുന്നതിനോ അപ്ലിക്കേഷനെ അനുവദിക്കുന്നു."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"ഡിസ്പ്ലേ കാലഹരണപ്പെടൽ പുനഃസജ്ജമാക്കുക"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"ഡിസ്പ്ലേ കാലഹരണപ്പെടൽ പുനഃസജ്ജമാക്കാൻ അപ്ലിക്കേഷനെ അനുവദിക്കുന്നു."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"ഫാക്‌ടറി പരീക്ഷണ മോഡിൽ പ്രവർത്തിപ്പിക്കുക"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"കുറഞ്ഞ നിലയിലുള്ള നിർമ്മാതാവിന്റെ പരീക്ഷണമായി പ്രവർത്തിപ്പിക്കുന്നത്, ടാബ്‌ലെറ്റ് ഹാർഡ്‌വെയറിലേക്ക് പൂർണ്ണ ആക്‌സസ്സ് അനുവദിക്കുന്നു. നിർമ്മാതാവിന്റെ പരീക്ഷണ മോഡിൽ ഒരു ടാബ്‌ലെറ്റ് പ്രവർത്തിക്കുമ്പോൾ മാത്രമേ ലഭ്യമാകൂ."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"കുറഞ്ഞ നിലയിലുള്ള നിർമ്മാതാവിന്റെ പരീക്ഷണമായി പ്രവർത്തിപ്പിക്കുന്നത്, ഫോൺ ഹാർഡ്‌വെയറിലേക്ക് പൂർണ്ണ ആക്‌സസ്സ് അനുവദിക്കുന്നു. നിർമ്മാതാവിന്റെ പരീക്ഷണ മോഡിൽ ഒരു ഫോൺ പ്രവർത്തിക്കുമ്പോൾ മാത്രമേ ലഭ്യമാകൂ."</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"നിരസിക്കുക"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"അനുമതി ആവശ്യമാണ്"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"<xliff:g id="ACCOUNT">%s</xliff:g> എന്ന അക്കൗണ്ടിനായി\nഅനുമതി അഭ്യർത്ഥിച്ചു."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"നിങ്ങളുടെ ഔദ്യോഗിക പ്രൊഫൈലിന് പുറത്ത് ഈ അപ്ലിക്കേഷൻ ഉപയോഗിക്കുന്നു"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"നിങ്ങളുടെ ഔദ്യോഗിക പ്രൊഫൈലിൽ ഈ അപ്ലിക്കേഷൻ ഉപയോഗിക്കുന്നു"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"ടൈപ്പുചെയ്യൽ രീതി"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"സമന്വയിപ്പിക്കുക"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"കോൾ സ്വീകരിക്കണോ?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"എല്ലായ്പ്പോഴും"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"ഒരിക്കൽ മാത്രം"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s, ഔദ്യോഗിക പ്രൊഫൈലിനെ പിന്തുണയ്‌ക്കുന്നില്ല"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"ടാബ്‌ലെറ്റ്"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"ഫോണ്‍"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"ഹെഡ്‌ഫോണുകൾ"</string>
@@ -1643,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"പ്രവേശനക്ഷമത പ്രവർത്തനക്ഷമമാക്കി."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"പ്രവേശനക്ഷമത റദ്ദാക്കി."</string>
     <string name="user_switched" msgid="3768006783166984410">"നിലവിലെ ഉപയോക്താവ് <xliff:g id="NAME">%1$s</xliff:g> ആണ്."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"<xliff:g id="NAME">%1$s</xliff:g> എന്ന ഉപയോക്താവിലേക്ക് മാറുന്നു…"</string>
     <string name="owner_name" msgid="2716755460376028154">"ഉടമ"</string>
     <string name="error_message_title" msgid="4510373083082500195">"പിശക്"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"ഈ മാറ്റം നിങ്ങളുടെ അഡ്‌മിനിസ്‌ട്രേറ്റർ അനുവദിച്ചതല്ല"</string>
@@ -1779,6 +1774,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"അൺപിൻ ചെയ്യുന്നതിനുമുമ്പ് PIN ആവശ്യപ്പെടുക"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"അൺപിൻ ചെയ്യുന്നതിനുമുമ്പ് അൺലോക്ക് പാറ്റേൺ ആവശ്യപ്പെടുക"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"അൺപിൻ ചെയ്യുന്നതിനുമുമ്പ് പാസ്‌വേഡ് ആവശ്യപ്പെടുക"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"ബാറ്ററി ആയുസ്സ് മെച്ചപ്പെടുത്താൻ സഹായിക്കുന്നതിന്, ബാറ്ററി സേവർ നിങ്ങളുടെ ഉപകരണത്തിന്റെ പ്രകടനത്തെ കുറയ്‌ക്കുകയും വൈബ്രേഷനെയും മിക്ക പശ്ചാത്തല ഡാറ്റയെയും പരിമിതപ്പെടുത്തുകയും ചെയ്യുന്നു. ഇമെയിൽ, സന്ദേശമയയ്‌ക്കൽ, സമന്വയിപ്പിക്കലിനെ ആശ്രയിച്ചുള്ള മറ്റ് അപ്ലിക്കേഷനുകൾ എന്നിവ നിങ്ങൾ തുറക്കുന്നതുവരെ അപ്‌ഡേറ്റുചെയ്യാനിടയില്ല.\n\nനിങ്ങളുടെ ഉപകരണം ചാർജ്ജുചെയ്യുമ്പോൾ ബാറ്ററി സേവർ യാന്ത്രികമായി ഓഫാകും"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"ബാറ്ററി ആയുസ്സ് മെച്ചപ്പെടുത്താൻ സഹായിക്കുന്നതിന്, ബാറ്ററി സേവർ നിങ്ങളുടെ ഉപകരണത്തിന്റെ പ്രകടനത്തെ കുറയ്‌ക്കുകയും വൈബ്രേഷനെയും മിക്ക പശ്ചാത്തല ഡാറ്റയെയും പരിമിതപ്പെടുത്തുകയും ചെയ്യുന്നു. ഇമെയിൽ, സന്ദേശമയയ്‌ക്കൽ, സമന്വയിപ്പിക്കലിനെ ആശ്രയിച്ചുള്ള മറ്റ് അപ്ലിക്കേഷനുകൾ എന്നിവ നിങ്ങൾ തുറക്കുന്നതുവരെ അപ്‌ഡേറ്റുചെയ്യാനിടയില്ല.\n\nനിങ്ങളുടെ ഉപകരണം ചാർജ്ജുചെയ്യുമ്പോൾ ബാറ്ററി സേവർ യാന്ത്രികമായി ഓഫാകും."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g>-ന് നിങ്ങളുടെ കാലാവധി അവസാനിക്കുന്നതുവരെ"</string>
 </resources>
diff --git a/core/res/res/values-mn-rMN/strings.xml b/core/res/res/values-mn-rMN/strings.xml
index 86c9e1c..d63ba81 100644
--- a/core/res/res/values-mn-rMN/strings.xml
+++ b/core/res/res/values-mn-rMN/strings.xml
@@ -1639,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Хялбаршуулсан горим идэвхжив."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Хандалт цуцлагдсан."</string>
     <string name="user_switched" msgid="3768006783166984410">"Одоогийн хэрэглэгч <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <string name="user_switching_message" msgid="8664390176945256295">"<xliff:g id="NAME">%1$s</xliff:g> хэрэглэгч рүү сэлгэж байна"</string>
+    <string name="user_switching_message" msgid="2871009331809089783">"<xliff:g id="NAME">%1$s</xliff:g> руу сэлгэж байна…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Эзэмшигч"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Алдаа"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Энэ өөрчлөлтийг админ зөвшөөрөөгүй байна"</string>
@@ -1774,6 +1774,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Тогтоосныг суллахаас өмнө PIN асуух"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Тогтоосныг суллахаас өмнө түгжээ тайлах хээ асуух"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Тогтоосныг суллахаас өмнө нууц үг асуух"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"Батерейны ашиглалтыг уртасгахын тулд батерей хэмнэгч нь таны төхөөрөмжийн ажиллагааг бууруулж, чичрэлт болон далд датаны ихэнх хувийг хязгаарлана. Имэйл, зурвас гэх мэт синк хийгддэг бусад апп-ууд таныг нээхээс нааш шинэчлэгдэхгүй байж болно.\n\nТаныг төхөөрөмжөө цэнэглэх үед батерей хэмнэгч автоматаар унтарна."</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Батерейны ашиглалтыг уртасгахын тулд батерей хэмнэгч нь таны төхөөрөмжийн ажиллагааг бууруулж, чичрэлт болон далд датаны ихэнх хувийг хязгаарлана. Имэйл, зурвас гэх мэт синк хийгддэг бусад апп-ууд таныг нээхээс нааш шинэчлэгдэхгүй байж болно.\n\nТаныг төхөөрөмжөө цэнэглэх үед батерей хэмнэгч автоматаар унтарна."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Таны уйтгартай байдал <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>-д дуусах хүртэл"</string>
 </resources>
diff --git a/core/res/res/values-mr-rIN/strings.xml b/core/res/res/values-mr-rIN/strings.xml
index c676fcb..f05bca5 100644
--- a/core/res/res/values-mr-rIN/strings.xml
+++ b/core/res/res/values-mr-rIN/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"फोन चालू किंवा बंद करा"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"टॅब्लेट चालू किंवा बंद करण्यासाठी अॅप ला अनुमती देते."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"फोन चालू किंवा बंद करण्यासाठी अॅप ला अनुमती देते."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"प्रदर्शन कालबाह्य रीसेट करा"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"अ‍ॅपला प्रदर्शन कालबाह्य रीसेट करण्‍याची अनुमती देते."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"फॅक्टरी चाचणी मोडमध्ये चालवा"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"टॅब्लेट हार्डवेअरमध्‍ये पूर्ण प्रवेशाची अनुमती देऊन निम्‍न-दर्जा निर्माता चाचणी म्‍हणून चालवा. टॅब्लेट केवळ निर्माता चाचणी मोडमध्‍ये चालत असताना उपलब्‍ध."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"फोन हार्डवेअरमध्‍ये पूर्ण प्रवेशाची अनुमती देऊन निम्‍न-दर्जा निर्माता चाचणी म्‍हणून चालवा. फोन केवळ निर्माता चाचणी मोडमध्‍ये चालत असताना उपलब्‍ध."</string>
@@ -1404,7 +1402,7 @@
     <string name="permlab_recovery" msgid="3157024487744125846">"अद्यतन आणि पुनर्प्राप्ती सिस्‍टमसह परस्‍परसंवाद करा"</string>
     <string name="permdesc_recovery" msgid="8511774533266359571">"अनुप्रयोगाला पुनर्प्राप्ती सिस्‍ट‍मसह आणि सिस्‍टम अद्यतनांसह परस्‍परसंवाद करण्‍याची अनुमती देते."</string>
     <string name="permlab_manageMediaProjection" msgid="1120495449419929218">"मीडिया प्रोजेक्‍शन सत्र व्‍यवस्‍थापित करा"</string>
-    <string name="permdesc_manageMediaProjection" msgid="8053759147529492856">"अनुप्रयोगास मीडिया प्रोजेक्‍शन सत्र व्यवस्‍थापित करण्‍याची अनुमती देते. हे सत्र अनुप्रयोगांना प्रदर्शन आणि ऑडिओ सामग्री कॅप्‍चर करण्‍याची क्षमता प्रदान करु शकतात. सामान्य अ‍ॅप्‍स द्वारे कधीही आवश्यकता नसावी."</string>
+    <string name="permdesc_manageMediaProjection" msgid="8053759147529492856">"अनुप्रयोगास मीडिया प्रोजेक्‍शन सत्र व्यवस्‍थापित करण्‍याची अनुमती देते. हे सत्र अनुप्रयोगांना प्रदर्शन आणि ऑडिओ सामग्री कॅप्‍चर करण्‍याची क्षमता प्रदान करू शकतात. सामान्य अ‍ॅप्‍स द्वारे कधीही आवश्यकता नसावी."</string>
     <string name="permlab_readInstallSessions" msgid="6165432407628065939">"स्‍थापना सत्र वाचा"</string>
     <string name="permdesc_readInstallSessions" msgid="2049771699626019849">"अनुप्रयोगास स्‍थापना सत्र वाचण्‍याची अनुमती देते. हे सक्रिय पॅकेज स्‍थापनांविषयी तपशील पाहाण्‍याची यास अनुमती देते."</string>
     <string name="tutorial_double_tap_to_zoom_message_short" msgid="4070433208160063538">"झूम नियंत्रणासाठी दोनदा स्पर्श करा"</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"नकार द्या"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"परवानगीची विनंती केली"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"<xliff:g id="ACCOUNT">%s</xliff:g> खात्यासाठी\nपरवानगीची विनंती केली."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"आपण हा अ‍ॅप आपल्‍या कार्य प्रोफाईलच्या बाहेर वापरत आहात"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"आपण हा अ‍ॅप आपल्या कार्य प्रोफाईलमध्‍ये वापरत आहात"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"इनपुट पद्धत"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"संकालन करा"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"कॉल स्वीकारायचा?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"नेहमी"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"फक्त एकदाच"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s कार्य प्रोफाईलचे समर्थन करीत नाही"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"टॅब्लेट"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"फोन"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"हेडफोन"</string>
@@ -1643,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"प्रवेशयोग्यता सक्षम."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"प्रवेशयोग्यता रद्द."</string>
     <string name="user_switched" msgid="3768006783166984410">"वर्तमान वापरकर्ता <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"<xliff:g id="NAME">%1$s</xliff:g> वर स्विच करत आहे…"</string>
     <string name="owner_name" msgid="2716755460376028154">"मालक"</string>
     <string name="error_message_title" msgid="4510373083082500195">"त्रुटी"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"या बदलास आपल्या प्रशासकाकडून अनुमती नाही"</string>
@@ -1779,6 +1774,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"अनपिन करण्‍यापूर्वी PIN साठी विचारा"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"अनपिन करण्‍यापूर्वी अनलॉक नमुन्यासाठी विचारा"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"अनपिन करण्‍यापूर्वी संकेतशब्दासाठी विचारा"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"बॅटरीचे आयुष्य सुधारण्यात मदत होण्यासाठी, बॅटरी बचतकर्ता आपल्या डिव्हाइसचे कार्यप्रदर्शन कमी करतो आणि कंपन आणि बराच पार्श्वभूमी डेटा मर्यादित करतो. संकालनावर अवलंबून असणारे ईमेल, संदेशन आणि अन्य अॅप्स आपण ते उघडल्याशिवाय अद्यतनित होऊ शकत नाहीत.\n\nआपले डिव्हाइस चार्ज होत असते तेव्हा बॅटरी बचतकर्ता स्वयंचलितपणे बंद होतो"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"बॅटरीचे आयुष्य सुधारण्यात मदत होण्यासाठी, बॅटरी बचतकर्ता आपल्या डिव्हाइसचे कार्यप्रदर्शन कमी करतो आणि कंपन आणि बराच पार्श्वभूमी डेटा मर्यादित करतो. संकालनावर अवलंबून असणारे ईमेल, संदेशन आणि अन्य अॅप्स आपण ते उघडल्याशिवाय अद्यतनित होऊ शकत नाहीत.\n\nआपले डिव्हाइस चार्ज होत असते तेव्हा बॅटरी बचतकर्ता स्वयंचलितपणे बंद होतो."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"आपला कार्य न करण्याचा कालावधी <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> वाजता समाप्त होईपर्यंत"</string>
 </resources>
diff --git a/core/res/res/values-ms-rMY/strings.xml b/core/res/res/values-ms-rMY/strings.xml
index f3e248e..29b01cf 100644
--- a/core/res/res/values-ms-rMY/strings.xml
+++ b/core/res/res/values-ms-rMY/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"kuasakan telefon hidup atau mati"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Membenarkan apl menghidupkan atau mematikan tablet."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Membenarkan apl menghidupkan atau mematikan telefon."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"tetapkan semula tamat masa paparan"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Membenarkan apl menetapkan semula tamat masa paparan."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"jalankan dalam mod ujian kilang"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Jalankan sebagai ujian pengeluar peringkat rendah, membenarkan akses penuh kepada perkakasan tablet. Hanya tersedia apabila tablet dijalankan dalam mod ujian pengeluar."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Menjalankan sebagai ujian pengilang peringkat rendah, membenarkan akses penuh kepada perkakasan telefon. Hanya tersedia apabila telefon dijalankan dalam mod ujian pengilang."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"Nafi"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Kebenaran diminta"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Kebenaran diminta\nuntuk akaun <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Anda menggunakan apl ini di luar profil kerja anda"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"Anda menggunakan apl ini dalam profil kerja anda"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Kaedah input"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Penyegerakan"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Kebolehaksesan"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Terima panggilan?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Sentiasa"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Hanya sekali"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s tidak menyokong profil kerja"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tablet"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Telefon"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Fon kepala"</string>
@@ -1644,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Kebolehcapaian didayakan."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Kebolehcapaian dibatalkan."</string>
     <string name="user_switched" msgid="3768006783166984410">"Pengguna semasa <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"Pemilik"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Ralat"</string>
@@ -1777,12 +1772,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"MULA"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Skrin disemat"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Skrin dinyahsemat"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"Untuk membantu memperbaik hayat bateri, penjimat bateri mengurangkan prestasi peranti anda dan menghadkan getaran serta kebanyakan data latar belakang. E-mel, pemesejan dan apl lain yang bergantung kepada penyegerakan mungkin tidak dikemas kini melainkan anda membuka apl itu. \n\n Penjimat Bateri dimatikan secara automatik semasa peranti anda mengecas"</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Minta PIN sebelum menyahsemat"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Minta corak buka kunci sebelum menyahsemat"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Minta kata laluan sebelum menyahsemat"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Untuk membantu memperbaik hayat bateri, penjimat bateri mengurangkan prestasi peranti anda dan menghadkan getaran serta kebanyakan data latar belakang. E-mel, pemesejan dan apl lain yang bergantung pada penyegerakan mungkin tidak dikemas kini melainkan anda membuka apl tersebut.\n\nPenjimat bateri dimatikan secara automatik semasa peranti anda mengecas."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Sehingga waktu gendala anda berakhir pada <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-my-rMM/strings.xml b/core/res/res/values-my-rMM/strings.xml
index eed4685..b5882d5 100644
--- a/core/res/res/values-my-rMM/strings.xml
+++ b/core/res/res/values-my-rMM/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"ဖုန်းဖွင့် (သို့)ပိတ်"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"appအား တက်ဘလက်ကို ဖွင့် သို့မဟုတ် ပိတ်ခွင့် ပြုသည်။"</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"appအား ဖုန်းကို ဖွင့် သို့မဟုတ် ပိတ်ခွင့် ပြုသည်။"</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"မျက်နှာပြင်မှိန်ချိန် ပြန်ညှိရန်"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"မျက်နှာပြင်မှိန်ချိန် ပြန်ညှိရန် app ကိုခွင့်ပြုပါ။"</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"စက်ရုံစမ်းသပ်စနစ်ဖြင့် အလုပ်လုပ်ဆောင်စေရန်"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"ထုတ်လုပ်သူ၏အနိမ့်စားအဆင့်စမ်းသပ်မှုအနေဖြင့်လုပ်ဆောင်စေမည် တက်ပလက်စက်အား လုံးဝဝင်ရောက်ကြည့်ရှုရန်ခွင့်ပြုမည်။ တက်ပလက်မှာ ထုတ်လုပ်သူ၏စမ်းသပ်မှုစနစ်ဖြင့် လုပ်ဆောင်နေစဥ်သာ ရရှိမည်။"</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"ထုတ်လုပ်သူ၏အနိမ့်စားအဆင့်စမ်းသပ်မှုအနေဖြင့်လုပ်ဆောင်စေမည် ဖုန်းစက်အား လုံးဝဝင်ရောက်ကြည့်ရှုရန်ခွင့်ပြုမည် ဖုန်းမှာ ထုတ်လုပ်သူ၏စမ်းသပ်မှုစနစ်ဖြင့် လုပ်ဆောင်နေစဥ်သာ ရရှိမည်"</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"ငြင်းပယ်သည်"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"ခွင့်ပြုချက် တောင်းခံထားခြင်း"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"အကောင့် <xliff:g id="ACCOUNT">%s</xliff:g> အတွက် \n ခွင့်ပြုချက် တောင်းခံထားပြီး"</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"သင်သည် ဒီappကို သင့်အလုပ်ပရိုဖိုင် ပြင်ပတွင် အသုံးပြုနေ၏"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"သင်သည် ဒီappကို သင်၏ အလုပ် ပရိုဖိုင် ထဲမှာ အသုံးပြုနေသည်"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"ထည့်သွင်းရန်နည်းလမ်း"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"ထပ်တူ ကိုက်ညီခြင်း"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"ဖုန်းခေါ်ဆိုမှုကို လက်ခံမလား?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"အမြဲတမ်း"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"တစ်ခါတည်း"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s က အလုပ်ပရိုဖိုင်ကို မပံ့ပိုးပါ။"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"တက်ဘလက်"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"ဖုန်း"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"နားကြပ်"</string>
@@ -1643,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"သုံးစွဲခွင့် ကို ဖွင့်ထားသည်"</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"အသုံးပြုခွင့် ဖျက်လိုက်သည်"</string>
     <string name="user_switched" msgid="3768006783166984410">"လက်ရှိအသုံးပြုနေသူ <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"<xliff:g id="NAME">%1$s</xliff:g>သို့ ပြောင်းနေ…"</string>
     <string name="owner_name" msgid="2716755460376028154">"ပိုင်ရှင်"</string>
     <string name="error_message_title" msgid="4510373083082500195">"အမှား"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"ဒီအပြောင်းအလဲမျိုးကို သင့် စီမံအုပ်ချုပ်သူမှ ခွင့်မပြုပါ"</string>
@@ -1779,6 +1774,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"ပင်မဖြုတ်မီမှာ PIN ကို မေးကြည့်ရန်"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"ပင်မဖြုတ်မီမှာ သော့ဖွင့် ရေးဆွဲမှုပုံစံကို မေးကြည့်ရန်"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"ပင်မဖြုတ်မီမှာ စကားဝှက်ကို မေးကြည့်ရန်"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"ဘက်ထရီ သက်တမ်းကို တိုးပေးရန်၊ ဘက်ထရီ ချွေတာသူက သင့်ကိရိယာ၏ လုပ်ကိုင်မှုများကို လျှော့ချလျက် တုန်ခါမှု နှင့် နောက်ခံ ဒေတာ အများစုကို ကန့်သတ်ပေးသည်။ စင့်ကို အားကိုးကြရသည့် အီးမေးလ်၊ စာပို့စနစ်၊ နှင့် အခြား appများသည် သင်က ၎င်းတို့ကို မဖွင့်မချင်း မွမ်းမံဖြစ်မည် မဟုတ်ပါ။ \n\nသင်၏ ကိရိယာက အားသွင်း နေချိန်မှာ ဘက်ထရီ ချွေတာသူကို အလိုအလျောက် ပိတ်ထားမည်။"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"ဘက်ထရီသက်တမ်း ကြာရှည်ခံရန်အတွက်၊ ဘက်ထရီချွေတာရေးအပိုင်းမှ သင့် စက်ပစ္စည်း၏ဆောင်ရွက်ချက်များကို လျော့ချပေးပြီး တုန်ခါမှုနှင့် နောက်ခံအချက်အလက်အများစုကို ကန့်သတ်ပေးသည်။ အီးမေး၊ စာပို့ခြင်း နှင့် တခြားapp များကို သင်ဖွင့်မထားပါက အချိန်နှင့်တပြေးညီ ညှိမပေးပါ။ \n\n စက်ပစ္စည်း အားသွင်းနေစဉ် ဘက်ထရီချွေတာရေးအပိုင်းသည် အလိုအလျောက်ပင် အလုပ်မလုပ်ပါ။"</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"သင်၏ စက်ရပ်ချိန် <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> မှာ ပြီးဆုံးသည့် အထိ။"</string>
 </resources>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index 37f07e2..2ddad21 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"slå telefonen av eller på"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Lar appen slå på eller av nettbrettet."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Lar appen slå på eller av telefonen."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"tilbakestille tidsavbruddet for skjermen"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Tillater at appen tilbakestiller tidsavbruddet for skjermen."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"kjøre i fabrikktestmodus"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Kjør en produsenttest på lavt nivå, noe som gir fullstendig tilgang til nettbrettets maskinvare. Kun tilgjengelig når nettbrettet kjøres i produsenttestmodus."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Kjøre som en lavnivås produsenttest, med full tilgang til telefonens maskinvare. Kun tilgjengelig når telefonen kjører i produsenttestmodus."</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"Avslå"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Tillatelse forespurt"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Tillatelse forespurt\nfor kontoen <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Du bruker denne appen utenfor arbeidsprofilen"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"Du bruker denne appen i jobbprofilen din"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Inndatametode"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Synkronisering"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Vil du besvare anropet?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Alltid"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Bare én gang"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s støtter ikke arbeidsprofiler"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Nettbrett"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Telefon"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Hodetelefoner"</string>
@@ -1643,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Tilgjengelighet er aktivert."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Tilgjengelighetstjenesten ble avbrutt."</string>
     <string name="user_switched" msgid="3768006783166984410">"Gjeldende bruker: <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Bytter til <xliff:g id="NAME">%1$s</xliff:g> …"</string>
     <string name="owner_name" msgid="2716755460376028154">"Eier"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Feil"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Denne endringen er ikke tillatt av administratoren"</string>
@@ -1779,6 +1774,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Krev PIN-kode for å løsne apper"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Krev bruk av opplåsningsmønster for å løsne apper"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Krev passord for å løsne apper"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"Batterisparing reduserer enhetens ytelse og begrenser vibrering og de fleste bakgrunnsdata for å forbedre batterilevetiden. Det kan hende E-post, Meldinger og andre apper som er avhengige av synkronisering, ikke oppdateres med mindre du åpner dem.\n\nBatterisparing slås automatisk av når enheten lades."</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Batterisparing reduserer enhetens ytelse og begrenser vibrering og de fleste bakgrunnsdata for å forbedre batterilevetiden. Det kan hende E-post, Meldinger og andre apper som er avhengige av synkronisering, ikke oppdateres med mindre du åpner dem.\n\nBatterisparing slås automatisk av når enheten lades."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Til hviletiden din ender kl. <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-ne-rNP/strings.xml b/core/res/res/values-ne-rNP/strings.xml
index 71d0197..6f0e8bc 100644
--- a/core/res/res/values-ne-rNP/strings.xml
+++ b/core/res/res/values-ne-rNP/strings.xml
@@ -1435,8 +1435,7 @@
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">\n"खाता <xliff:g id="ACCOUNT">%s</xliff:g>को लागि अनुरोध गरिएको अनुमति।"</string>
     <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
     <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_work" msgid="621480743856004612">"तपाईँ आफ्नो कार्य प्रोफाइलमा यो अनुप्रयोग प्रयोग गरिरहनु भएको छ"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"इनपुट विधि"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"सिङ्क गर्नुहोस्"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"उपलब्धता"</string>
@@ -1652,7 +1651,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"पहुँच सक्षम गरिएको।"</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"पहुँचयोग्यता रद्द गरियो।"</string>
     <string name="user_switched" msgid="3768006783166984410">"अहिलेको प्रयोगकर्ता <xliff:g id="NAME">%1$s</xliff:g>।"</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"मालिक"</string>
     <string name="error_message_title" msgid="4510373083082500195">"त्रुटि"</string>
@@ -1785,12 +1784,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"START"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"स्क्रिन पिन गरियो"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"स्क्रिन अनपिन गरियो"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"ब्याट्री जीवन सुधार्न, ब्याट्री बचत गर्न आफ्नो उपकरणको प्रदर्शन र सीमा कम्पन र सबै भन्दा पृष्ठभूमि डेटा कम गर्छ। इमेल, सन्देश, र तपाईँ तिनीहरूलाई खोल्न नभएसम्म अद्यावधिक गर्न सक्छ समिकरण भर पर्ने अन्य अनुप्रयोगहरू। \n\n आफ्नो उपकरण चार्ज गर्दा ब्याट्री बचत स्वचालित रूपमा बन्द"</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"पिन निकाल्नुअघि PIN सोध्नुहोस्"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"पिन निकाल्नुअघि खोल्ने रूपरेखा सोध्नुहोस्"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"पिन निकाल्नुअघि पासवर्ड सोध्नुहोस्"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"ब्याट्री जीवन सुधार्न, ब्याट्री बचतले आफ्नो उपकरणको प्रदर्शन र कम्पनको सीमा र सबैभन्दा पृष्ठभूमि डेटा कम गर्छ। इमेल, सन्देश, र अन्य अनुप्रयोगहरू जसले तपाईं तिनीहरूलाई नखोले सम्म समिकरण अद्यावधिक नगर्न सक्छ भनि भर पर्छ।\n\nब्याट्री बचतले तपाईँको उपकरण चार्ज हुँदै बेला तपाईँको उपकरण स्वचालित बन्द गर्छ।"</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"तपाईँको <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> डाउनटाइम समाप्त हुँदा सम्म"</string>
 </resources>
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index 4bc383c..c94a0da 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"telefoon in- of uitschakelen"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Hiermee kan de app de tablet in- of uitschakelen."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Hiermee kan de app de telefoon in- of uitschakelen."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"time-out van het scherm opnieuw instellen"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Hiermee kan de app de time-out van het scherm opnieuw instellen."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"uitvoeren in fabriekstestmodus"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Uitvoeren als fabrikanttest op laag niveau, waardoor toegang wordt gegeven tot de hardware van de tablet. Alleen beschikbaar als een tablet zich in de fabrikanttestmodus bevindt."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Uitvoeren als fabrikanttest op laag niveau, waardoor toegang wordt gegeven tot de hardware van de telefoon. Alleen beschikbaar als een telefoon zich in de fabrikanttestmodus bevindt."</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"Weigeren"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Toestemming gevraagd"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Toestemming gevraagd\nvoor account <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"U gebruikt deze app buiten uw werkprofiel"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"U gebruikt deze app in uw werkprofiel"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Invoermethode"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Synchroniseren"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Oproep accepteren?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Altijd"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Eén keer"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s ondersteunt werkprofielen niet"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tablet"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Telefoon"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Hoofdtelefoon"</string>
@@ -1643,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Toegankelijkheid ingeschakeld."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Toegankelijkheid geannuleerd."</string>
     <string name="user_switched" msgid="3768006783166984410">"Huidige gebruiker <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Overschakelen naar <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Eigenaar"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Fout"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Deze wijziging is niet toegestaan door uw beheerder"</string>
@@ -1779,6 +1774,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Vragen om pincode voordat items worden losgemaakt"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Vragen om ontgrendelingspatroon voordat items worden losgemaakt"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Vragen om wachtwoord voordat items worden losgemaakt"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"Om ervoor te zorgen dat de accu langer meegaat, vermindert Accubesparing de prestaties van uw apparaat en worden trillen en de meeste achtergrondgegevens beperkt. E-mail, berichten en andere apps die afhankelijk zijn van synchronisatie worden pas bijgewerkt als u ze opent.\n\nAccubesparing wordt tijdens het opladen van uw apparaat automatisch uitgeschakeld"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Accubesparing beperkt de prestaties van uw apparaat, de trilfunctie en de meeste achtergrondgegevens om de accuduur te verlengen.\n\nAccubesparing wordt automatisch uitgeschakeld wanneer uw apparaat wordt opgeladen."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Totdat uw downtime eindigt om <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index d8e133d..419055b 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"włączanie lub wyłączanie telefonu"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Pozwala aplikacji na włączanie i wyłączanie tabletu."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Pozwala aplikacji na włączanie i wyłączanie telefonu."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"resetowanie czasu oczekiwania wyświetlacza"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Pozwala aplikacji zresetować czas oczekiwania na wygaszenie wyświetlacza."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"uruchamianie w trybie testu fabrycznego"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Możliwość uruchamiania aplikacji jako niskopoziomowego testu producenta, co zapewnia pełny dostęp do elementów sprzętowych tabletu. Dostępna tylko wówczas, gdy tablet działa w trybie testu producenta."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Uruchom jako niskopoziomowy test producenta, pozwalając na całkowity dostęp do elementów sprzętowych telefonu. Dostępne tylko jeśli telefon działa w trybie testu producenta."</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"Odmów"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Prośba o pozwolenie"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Prośba o pozwolenie\ndotyczące konta <xliff:g id="ACCOUNT">%s</xliff:g>"</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Używasz tej aplikacji poza profilem do pracy"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"Używasz tej aplikacji w swoim profilu do pracy"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Sposób wprowadzania tekstu"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Synchronizacja"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Odebrać połączenie?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Zawsze"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Tylko raz"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s nie obsługuje profilu do pracy"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tablet"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Telefon"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Słuchawki"</string>
@@ -1643,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Włączono ułatwienia dostępu."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Ułatwienia dostępu zostały anulowane."</string>
     <string name="user_switched" msgid="3768006783166984410">"Bieżący użytkownik: <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Przełączam na <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Właściciel"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Błąd"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Ta zmiana nie jest dozwolona przez administratora"</string>
@@ -1779,6 +1774,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Przed odpięciem poproś o PIN"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Przed odpięciem poproś o wzór odblokowania"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Przed odpięciem poproś o hasło"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"Aby wydłużyć czas pracy na baterii, Oszczędzanie baterii zmniejsza wydajność urządzenia, ogranicza wibracje i przetwarzanie większości danych w tle. Poczta, SMS i inne synchronizowane aplikacje mogą aktualizować swoją zawartość dopiero wtedy, gdy je uruchomisz.\n\nOszczędzanie baterii wyłącza się automatycznie podczas ładowania urządzenia"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Aby wydłużyć czas pracy baterii, Oszczędzanie baterii ogranicza aktywność urządzenia, w tym wibracje i przetwarzanie większości danych w tle. Poczta, SMS i inne synchronizowane aplikacje mogą nie aktualizować swojej zawartości, dopóki ich nie otworzysz.\n\nOszczędzanie baterii wyłącza się automatycznie podczas ładowania urządzenia."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Do zakończenia przestoju o <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index db0b11e..8ca9b2a 100644
--- a/core/res/res/values-pt-rPT/strings.xml
+++ b/core/res/res/values-pt-rPT/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"ligar ou desligar o telefone"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Permite que uma aplicação ligue ou desligue o tablet."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Permite que a aplicação ligue ou desligue o telemóvel."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"repor tempo limite de visualização"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Permite que a aplicação reponha o tempo limite de visualização."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"executar em modo de teste de fábrica"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Executar como um teste de nível inferior do fabricante, permitindo o acesso total ao hardware do tablet. Apenas disponível quando um tablet está em execução em modo de teste do fabricante."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Executar como um teste de nível inferior do fabricante, permitindo o acesso total ao hardware do telefone. Apenas disponível quando um telefone está em execução em modo de teste do fabricante."</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"Recusar"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Permissão solicitada"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Permissão solicitada\npara a conta <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Está a utilizar esta aplicação fora do seu perfil de trabalho"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"Está a utilizar esta aplicação no seu perfil de trabalho"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Método de entrada"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Sincronização"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Aceitar chamada?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Sempre"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Apenas uma vez"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s não suporta o perfil de trabalho"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tablet"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Telemóvel"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Auscultadores"</string>
@@ -1643,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Acessibilidade ativada."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Acessibilidade cancelada."</string>
     <string name="user_switched" msgid="3768006783166984410">"<xliff:g id="NAME">%1$s</xliff:g> do utilizador atual."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"A mudar para <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Proprietário"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Erro"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"O administrador não permite esta alteração"</string>
@@ -1779,6 +1774,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Pedir PIN antes de soltar"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Pedir sequência de desbloqueio antes de soltar"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Pedir palavra-passe antes de soltar"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"Para ajudar a melhorar a duração da bateria, o economizador de bateria reduz o desempenho do dispositivo e limita a vibração e a maioria dos dados em segundo plano. O email, as mensagens e as outras aplicações que dependem da sincronização poderão não ser atualizados, a menos que os abra. \n\nO economizador de bateria desliga-se automaticamente quando o dispositivo está a carregar"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Para ajudar a melhorar a duração da bateria, a poupança de bateria reduz o desempenho do dispositivo e limita a vibração e a maior parte dos dados de segundo plano. O email, as mensagens e outras aplicações que dependem da sincronização não podem ser atualizados, exceto se os abrir.\n\nA poupança de bateria desliga-se automaticamente quando o dispositivo estiver a carregar."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Até o período de inatividade terminar às <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index 7a70a71..5b5c464 100644
--- a/core/res/res/values-pt/strings.xml
+++ b/core/res/res/values-pt/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"ligar ou desligar o telefone"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Permite que o aplicativo ative ou desative o tablet."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Permite que o aplicativo ative ou desative o telefone."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"tempo limite de exibição"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Permite que o app redefina o tempo limite de exibição."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"executar no modo de teste de fábrica"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Executa como um teste do fabricante de nível inferior, permitindo o acesso completo ao hardware do tablet. Disponível apenas quando um tablet está em execução no modo de teste do fabricante."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Executa como um teste do fabricante de nível inferior, permitindo o acesso completo ao hardware do telefone. Disponível apenas quando um telefone está em execução no modo de teste do fabricante."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"Negar"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Permissão solicitada"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Permissão solicitada\npara a conta <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Este app está sendo usado fora de seu perfil de trabalho"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"Você está usando este app em seu perfil de trabalho"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Método de entrada"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Sincronizar"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Acessibilidade"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Aceitar chamada?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Sempre"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Só uma vez"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s não aceita perfis de trabalho"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tablet"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Telefone"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Fones de ouvido"</string>
@@ -1644,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Acessibilidade ativada."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Acessibilidade cancelada."</string>
     <string name="user_switched" msgid="3768006783166984410">"Usuário atual <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"Proprietário"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Erro"</string>
@@ -1777,12 +1772,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"INICIAR"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Tela fixada"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Tela liberada"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"Para ajudar a melhorar a vida útil da bateria, a economia de bateria reduz o desempenho do dispositivo e restringe a vibração e a maioria dos dados em segundo plano. É possível que apps de e-mail, mensagens e outros que dependem de sincronização não sejam atualizados, a menos que sejam abertos.\n\nA economia de bateria é desativada automaticamente quando o dispositivo é carregado."</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Pedir PIN antes de liberar"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Pedir padrão de desbloqueio antes de liberar"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Pedir senha antes de liberar"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Para ajudar a melhorar a vida útil da bateria, a economia de bateria reduz o desempenho do dispositivo e restringe a vibração e a maioria dos dados em segundo plano. É possível que apps de e-mail, mensagens, entre outros, que dependem de sincronização não sejam atualizados a menos que sejam abertos.\n\nA economia de bateria é desativada automaticamente quando o dispositivo estiver carregando."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Até o período de inatividade terminar às <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index 6be16e0..6d9ffd7 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -613,10 +613,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"telefon pornit sau oprit"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Permite aplicaţiei să pornească sau să oprească tableta."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Permite aplicaţiei să activeze sau să dezactiveze telefonul."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"resetați timpul limită de afișare"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Permite aplicației să reseteze timpul limită de afișare."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"rulare în mod test de fabrică"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Rulează ca test de nivel redus setat de producător, permiţând accesul complet la sistemul hardware al computerului tablet PC. Permisiune disponibilă doar când acesta rulează în modul de testare setat de producător."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Rulează ca testare de nivel redus al producătorului, permiţând accesul complet la hardware-ul telefonului. Permisiune disponibilă doar când telefonul rulează în modul de testare a producător."</string>
@@ -1427,8 +1425,7 @@
     <string name="deny" msgid="2081879885755434506">"Refuzaţi"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Permisiune solicitată"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Permisiune solicitată\npentru contul <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Utilizați această aplicație în afara profilului de serviciu"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"Utilizați această aplicație în profilul de serviciu"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Metodă de intrare"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Sincronizare"</string>
@@ -1571,8 +1568,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Acceptaţi apelul?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Întotdeauna"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Numai o dată"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s nu acceptă profilul de serviciu"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tabletă"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Telefon"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Căşti"</string>
@@ -1645,7 +1641,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"S-a activat accesibilitatea."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Accesibilitatea a fost anulată"</string>
     <string name="user_switched" msgid="3768006783166984410">"Utilizator curent: <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"Proprietar"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Eroare"</string>
@@ -1781,6 +1777,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Cereți codul PIN înainte de a anula fixarea"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Cereți modelul pentru deblocare înainte de a anula fixarea"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Cereți parola înainte de a anula fixarea"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"Pentru a îmbunătăți durata de viață a bateriei, economisirea bateriei reduce performanțele dispozitivului dvs. și limiteează vibrația și majoritatea datelor de fundal. Este posibil ca e-mailul, mesageria și alte aplicații care se bazează pe sincronizare să nu se actualizeze decât dacă le deschideți.\n\nEconomisirea bateriei se oprește automat atunci când dispozitivul se încarcă"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Pentru a ajuta la îmbunătățirea duratei bateriei, modul Economisirea bateriei reduce performanțele dispozitivului și limitează vibrațiile și majoritatea datelor de fundal. Mesajele prin e-mail și alte aplicații care se bazează pe sincronizare nu se vor actualiza dacă nu le deschideți.\n\nEconomisirea baterie se dezactivează automat când dispozitivul se încarcă."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Până când inactivitatea dvs. se încheie la <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index 7a58f5d..8287034 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"Включение/выключение телефона"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Приложение сможет включать и выключать планшетный ПК."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Приложение сможет включать и выключать телефон."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"сброс времени ожидания перед переходом в спящий режим"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Сброс времени ожидания перед переходом в спящий режим."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"Включение тестового режима"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Выполнять стандартную проверку нижнего уровня, обеспечивающую полный доступ к аппаратному обеспечению планшетного ПК. Доступно только в режиме стандартной проверки."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Выполнить стандартную проверку нижнего уровня, обеспечивающую полный доступ к аппаратному обеспечению телефона. Доступно, только в режиме стандартной проверки."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"Отклонить"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Разрешение запрошено"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Требуется разрешение\nдля аккаунта <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Это приложение используется в личном профиле"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"Вы перешли в рабочий профиль"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Способ ввода"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Синхр."</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Спец. возможности"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Ответить?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Всегда"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Только сейчас"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s не поддерживает рабочие профили"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Планшетный ПК"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Телефон"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Наушники"</string>
@@ -1644,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Специальные возможности включены."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Специальные возможности не будут включены."</string>
     <string name="user_switched" msgid="3768006783166984410">"Выбран аккаунт пользователя <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"Владелец"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Ошибка"</string>
@@ -1777,12 +1772,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"ДА"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Блокировка включена"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Блокировка выключена"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"Чтобы продлить время работы устройства от батареи, в режиме энергосбережения будут отключены некоторые функции, в том числе вибросигнал, и ограничена передача данных в фоновом режиме. Электронная почта, обмен сообщениями и другие инструменты, требующие синхронизации, могут не работать, пока вы их не запустите.\n\nРежим энергосбережения отключается автоматически, когда устройство заряжается."</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Запрашивать PIN-код для отключения блокировки"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Запрашивать графический ключ для отключения блокировки"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Запрашивать пароль для отключения блокировки"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Чтобы продлить время работы устройства от батареи, в режиме энергосбережения будут отключены некоторые функции, в том числе вибросигнал, и ограничена передача данных в фоновом режиме. Электронная почта, обмен сообщениями и другие инструменты, требующие синхронизации, могут не работать, пока вы их не запустите.\n\nРежим энергосбережения отключается автоматически, когда устройство заряжается."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Когда период простоя завершится (в <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>)"</string>
 </resources>
diff --git a/core/res/res/values-si-rLK/strings.xml b/core/res/res/values-si-rLK/strings.xml
index dae2ac76..d8d4484 100644
--- a/core/res/res/values-si-rLK/strings.xml
+++ b/core/res/res/values-si-rLK/strings.xml
@@ -1430,8 +1430,7 @@
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"<xliff:g id="ACCOUNT">%s</xliff:g> ගිණුම සඳහා\nඅවසර ඉල්ලන ලදි."</string>
     <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
     <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_work" msgid="621480743856004612">"මෙම යෙදුම ඔබගේ පුද්ගලික කොටසේ ඔබ භාවිතා කරයි"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"ආදාන ක්‍රමය"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"සමමුහුර්තය"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"ප්‍රවේශ්‍යතාව"</string>
@@ -1647,7 +1646,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"ප‍්‍රවේශ්‍යතාව සබල කරන ලදි."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"ප‍්‍රවේශ්‍යතාව අවලංගු කර ඇත."</string>
     <string name="user_switched" msgid="3768006783166984410">"දැනට සිටින පරිශීලකයා <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"හිමිකරු"</string>
     <string name="error_message_title" msgid="4510373083082500195">"දෝෂය"</string>
@@ -1780,12 +1779,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"ආරම්භය"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"තිරය අගුළුදමා ඇත"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"තිරයේ අගුළු ඇර ඇත"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"බැටරියේ ජීව කාලය දියුණු කිරීමට උදව් කිරීමට, ඔබගේ උපාංගයේ ක්‍රියාකාරිත්වය සහ සීමා කළ කම්පනයන් සහ බොහොමයක් පසුබිම් දත්ත බැටරි සුරැකීමෙන් අඩු කරයි. සමමුහුර්ත කිරීම බලාපොරොත්තු වෙන ඊ-තැපෑල, පණිවිඩ යැවීම සහ වෙනත් යෙදුම් යාවත්කාලීන වන්නේ ඔබ ඒවා විවෘත කළ විට පමණි.\n\nඔබගේ උපාංගය ආරෝපණය වන විට බැටරි සුරැකීම ස්වයංක්‍රීයව අක්‍රිය වේ."</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"ගැලවීමට පෙර PIN විමසන්න"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"ගැලවීමට පෙර අගුළු අරින රටාව සඳහා අසන්න"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"ගැලවීමට පෙර මුරපදය විමසන්න"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"බැටරියේ ජීව කාලය දියුණු කිරීමට උදව් කිරීමට, ඔබගේ උපාංගයේ ක්‍රියාකාරිත්වය සහ සීමා කළ කම්පනයන් සහ බොහොමයක් පසුබිම් දත්ත බැටරි සුරැකීමෙන් අඩු කරයි. සමමුහුර්ත කිරීම බලාපොරොත්තු වෙන ඊ-තැපෑල, පණිවිඩ යැවීම සහ වෙනත් යෙදුම් යාවත්කාලීන වන්නේ ඔබ ඒවා විවෘත කළ විට පමණි.\n\nඔබගේ උපාංගය ආරෝපණය වන විට බැටරි සුරැකීම ස්වයංක්‍රීයව අක්‍රිය වේ."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"ඔබගේ බිඳවැටුම් වේලාව <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> දී අවසන්වන තුරු"</string>
 </resources>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index db9b48d..f898582 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"zapnutie a vypnutie telefónu"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Umožňuje aplikácii zapnúť a vypnúť tablet."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Umožňuje aplikácii zapnúť a vypnúť telefón."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"obnoviť časový limit obrazovky"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Umožňuje aplikácii obnoviť časový limit obrazovky."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"spustenie v režime továrenského testu"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Umožňuje aplikácii spustenie v režime nízkoúrovňového testu výrobcu a povolí úplný prístup k hardvéru tabletu. K dispozícii iba vtedy, keď je tablet spustený v režime testovania výrobcu."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Umožňuje aplikácii spustenie v režime nízkoúrovňového testu výrobcu a povolí úplný prístup k hardvéru telefónu. K dispozícii iba vtedy, keď je telefón spustený v režime testovania výrobcu."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"Zamietnuť"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Vyžaduje sa povolenie"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Vyžaduje sa oprávnenie\npre účet <xliff:g id="ACCOUNT">%s</xliff:g>"</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Túto aplikáciu používate mimo svojho pracovného profilu"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"Túto aplikáciu používate vo svojom pracovnom profile"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Metóda vstupu"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Synchronizovať"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Zjednodušenie"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Prijať hovor?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Vždy"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Len raz"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"Spúšťač %1$s nepodporuje pracovné profily"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tablet"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Telefón"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Slúchadlá"</string>
@@ -1644,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Zjednodušenie ovládania je povolené."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Zjednodušenie ovládania bolo zrušené."</string>
     <string name="user_switched" msgid="3768006783166984410">"Aktuálny používateľ je <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"Vlastník"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Chyba"</string>
@@ -1777,12 +1772,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"SPUSTIŤ"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Obrazovka bola pripnutá"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Obrazovka bola uvoľnená"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"S cieľom zvýšenia výdrže batérie režim úspory batérie zníži výkon vášho zariadenia a obmedzí vibrácie a väčšinu dát na pozadí. E-mail, správy a ďalšie aplikácie, ktoré používajú synchronizáciu, sa nemusia aktualizovať, dokým ich nespustíte.\n\nRežim úspory batérie sa pri nabíjaní zariadenia automaticky vypne."</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Pred uvoľnením požiadať o číslo PIN"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Pred uvoľnením požiadať o bezpečnostný vzor"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Pred uvoľnením požiadať o heslo"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Šetrič batérie znižuje výkonnosť vášho zariadenia a obmedzuje vibrovanie a prenos údajov na pozadí, aby tak predĺžil výdrž batérie. E-maily, správy a ďalšie aplikácie, ktorú sú závislé od synchronizácie, sa nemusia aktualizovať, dokým ich neotvoríte.\n\nPri nabíjaní zariadenia sa šetrič batérie automaticky vypne."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Dokým o <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> neskončí výpadok"</string>
 </resources>
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index a544df4..cc50955 100644
--- a/core/res/res/values-sl/strings.xml
+++ b/core/res/res/values-sl/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"vklop ali izklop telefona"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Programu omogoča vklop ali izklop tabličnega računalnika."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Programu omogoča vklop ali izklop telefona."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"ponastavitev časovne omejitve za zaslon"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Aplikaciji omogoča ponastavitev časovne omejitve za zaslon."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"izvajanje v preskusnem načinu delovanja"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Izvajanje kot proizvajalčev preskus na najnižjem nivoju, kar omogoča popoln dostop do strojne opreme tabličnega računalnika. Dovoljenje je na voljo, samo če se tablični računalnik izvaja v načinu proizvajalčevega preskusa."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Se izvaja kot preskus izdelovalca nizke ravni, ki dovoljuje popoln dostop do strojne opreme telefona. Na voljo le, ko se telefon izvaja v načinu preskusa izdelovalca."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"Zavrni"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Zahtevano je dovoljenje"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Zahtevano je dovoljenje\nza račun <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Aplikacijo uporabljate zunaj delovnega profila"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"To aplikacijo uporabljate v delovnem profilu"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Način vnosa"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Sinhronizacija"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Pripomočki za osebe s posebnimi potrebami"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Ali želite sprejeti klic?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Vedno"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Samo tokrat"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s ne podpira delovnega profila"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tablični računalnik"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Telefon"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Slušalke"</string>
@@ -1644,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Pripomočki za ljudi s posebnimi potrebami so omogočeni."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Omogočanje pripomočkov za ljudi s posebnimi potrebami preklicano."</string>
     <string name="user_switched" msgid="3768006783166984410">"Trenutni uporabnik <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"Lastnik"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Napaka"</string>
@@ -1777,12 +1772,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"ZAŽENI"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Zaslon je pripet"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Zaslon je odpet"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"Varčevanje z energijo akumulatorja podaljša čas njegovega delovanja tako, da zmanjša zmogljivost delovanja naprave in omeji vibriranje ter prenos večine podatkov v ozadju. Aplikacije za e-pošto, sporočanje in drugo, ki uporabljajo sinhroniziranje, se morda ne posodabljajo, razen če jih odprete.\n\nVarčevanje z energijo se samodejno izklopi med polnjenjem akumulatorja naprave."</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Pred odpenjanjem vprašaj za PIN"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Pred odpenjanjem vprašaj za vzorec za odklepanje"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Pred odpenjanjem vprašaj za geslo"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Varčevanje z energijo akumulatorja poveča čas delovanja akumulatorja, tako da zmanjša zmogljivost delovanja naprave in omeji vibriranje ter prenos večine podatkov v ozadju. Aplikacije za e-pošto, sporočanje in drugo, ki uporabljajo sinhroniziranje, se morda ne posodabljajo, razen če jih odprete.\n\nVarčevanje z energijo se samodejno izklopi med polnjenjem akumulatorja naprave."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Do konca prekinitve delovanja ob <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index 991a809..c9b78e9 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"укључивање или искључивање телефона"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Дозвољава апликацији да укључује или искључује таблет."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Дозвољава апликацији да укључује и искључује телефон."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"ресетовање временског ограничења за екран"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Дозвољава апликацији да ресетује временско ограничење за екран."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"покретање у режиму фабричког тестирања"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Покреће се као тест произвођача ниског нивоа, омогућавајући комплетан приступ хардверу таблета. Доступно је само када је таблет покренут у пробном режиму произвођача."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Покретање теста ниског нивоа који спроводи произвођач, које омогућава потпуни приступ хардверу телефона. Доступно је само када телефон покренут у режиму тестирања које спроводи произвођач."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"Одбиј"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Затражена је дозвола"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Затражена је дозвола\nза налог <xliff:g id="ACCOUNT">%s</xliff:g>"</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Користите ову апликацију изван пословног профила"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"Користите ову апликацију на пословном профилу"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Метод уноса"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Синхронизација"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Приступачност"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Желите ли да прихватите позив?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Увек"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Само једном"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s не подржава пословни профил"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Таблет"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Телефон"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Слушалице"</string>
@@ -1644,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Приступачност је омогућена."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Приступачност је отказана."</string>
     <string name="user_switched" msgid="3768006783166984410">"Актуелни корисник <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"Власник"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Грешка"</string>
@@ -1777,12 +1772,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"ПОКРЕНИ"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Екран је закачен"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Екран је откачен"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"Да би побољшала трајање батерије, уштеда батерије снижава перформансе уређаја и ограничава вибрацију и већину позадинских података. Имејл, размена порука и друге апликације које се ослањају на синхронизацију можда се неће ажурирати ако их не отворите.\n\nУштеда батерије се аутоматски искључује када се уређај пуни"</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Тражи PIN пре откачињања"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Тражи шаблон за откључавање пре откачињања"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Тражи лозинку пре откачињања"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Да би смањила потрошњу батерије, Штедња батерије снижава перформансе уређаја, ограничава вибрацију и већину позадинских података. Имејл, размена порука и друге апликације које се ослањају на синхронизацију се можда неће ажурирати ако их не отворите.\n\nШтедња батерије се аутоматски искључује када се уређај пуни."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Док се прекид рада не заврши у <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index a860f34..2201950 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"sätta på eller stänga av telefonen"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Tillåter att appen slår på eller stänger av surfplattan."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Tillåter att appen slår på eller stänger av mobilen."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"återställa tidsgräns för skärm"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Gör att appen kan återställa tidsgränsen för skärmen."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"kör i fabrikstestläge"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Köra som ett testläge för tillverkaren på låg nivå. På så sätt får du fullständig åtkomst till surfplattans maskinvara. Är endast tillgänglig när surfplattan körs i tillverkarens testläge."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Köra som ett testläge för tillverkaren på låg nivå. På så sätt får du fullständig åtkomst till telefonens maskinvara. Är endast tillgänglig när telefonen körs i tillverkarens testläge."</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"Neka"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Begärd behörighet"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Begärd behörighet\nför kontot <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Du använder den här appen i din arbetsprofil"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"Du använder den här appen i din profil"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Indatametod"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Synkronisera"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Vill du ta emot samtal?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Alltid"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Bara en gång"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s har inte stöd för arbetsprofil"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Surfplatta"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Mobil"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Hörlurar"</string>
@@ -1643,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Tillgänglighetsläget har aktiverats."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Byte till tillgänglighetsläge avbrutet."</string>
     <string name="user_switched" msgid="3768006783166984410">"Nuvarande användare: <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Byter till <xliff:g id="NAME">%1$s</xliff:g> …"</string>
     <string name="owner_name" msgid="2716755460376028154">"Ägare"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Fel"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Administratören tillåter inte den här ändringen"</string>
@@ -1779,6 +1774,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Be om pinkod innan skärmen slutar fästas"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Be om upplåsningsmönster innan skärmen slutar fästas"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Be om lösenord innan skärmen slutar fästas"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"Batterisparläget ökar batteriets livslängd genom att sänka enhetens prestanda, begränsa vibrationerna och begränsa bakgrundsdata. E-post- och meddelandeappar och andra appar som behöver synkroniseras kanske inte uppdateras om du inte startar dem.\n\nBatterisparläget stängs av automatiskt medan enheten laddas."</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"I batterisparläget reduceras enhetens prestanda så att batteriet ska räcka längre, och vibration samt den mesta användningen av bakgrundsdata begränsas. Det kan hända att appar för e-post, sms och annat som kräver synkronisering inte uppdateras förrän du öppnar dem.\n\nBatterisparläget inaktiveras automatiskt när enheten laddas."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Tills avbrottstiden är slut <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml
index 7706bca..c22c4cb 100644
--- a/core/res/res/values-sw/strings.xml
+++ b/core/res/res/values-sw/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"washa au zima simu"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Inaruhusu programu kuwasha au kuzima kompyuta kibao."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Inaruhusu programu kuwasha au kuzima simu."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"weka onyesho la muda umekwisha upya"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Huruhusu programu kuweka upya onyesho la muda umekwisha."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"endesha katika hali ya jaribio ya kiwanda"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Endesha kama jaribio la mtengenezaji la kiwango cha chini, kwa hivyo kuruhusu ufikiaji kamili wa maunzi ya kompyuta ndogo. Inapatikana tu wakati kompyuta ndogo inaendeshwa katika hali ya jaribio la mtengenezaji."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Endesha kama jaribio la kiwango cha chini cha mtengenezaji, kwa hivyo kuruhusu ufikiaji kamili wa maunzi ya simu. Inapatikana tu wakati simu inaendeshwa katika gumzo ya jaribio ya mtengenezaji."</string>
@@ -716,7 +714,7 @@
     <string name="permdesc_cache_filesystem" msgid="5578967642265550955">"Huruhusu programu kusoma na kuandika mfumo wa faili wa akiba."</string>
     <string name="permlab_use_sip" msgid="2052499390128979920">"piga/pokea simu za SIP"</string>
     <string name="permdesc_use_sip" msgid="2297804849860225257">"Ruhusu programu ipige na kupokea simu za SIP."</string>
-    <string name="permlab_bind_incall_service" msgid="6773648341975287125">"wezesha muingiliano na skrini ya simu inayoingia"</string>
+    <string name="permlab_bind_incall_service" msgid="6773648341975287125">"wezesha mwingiliano na skrini ya simu inayoingia"</string>
     <string name="permdesc_bind_incall_service" msgid="8343471381323215005">"Huruhusu programu kudhibiti wakati na jinsi mtumiaji anavyoona skrini ya simu inayoingia."</string>
     <string name="permlab_bind_connection_service" msgid="3557341439297014940">"shirikiana na huduma za simu"</string>
     <string name="permdesc_bind_connection_service" msgid="4008754499822478114">"Huruhusu programu kushirikiana na huduma za simu ili kupiga au kupokea simu."</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"Kataza"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Idhini imeitishwa"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Idhini imeombwa\nya akaunti<xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Unatumia programu hii nje ya wasifu wako wa kazi"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"Unatumia programu hii kwenye wasifu wako wa kazi"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Mbinu ya uingizaji"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Sawazisha"</string>
@@ -1534,10 +1531,10 @@
     <string name="extract_edit_menu_button" msgid="8940478730496610137">"Badilisha"</string>
     <string name="data_usage_warning_title" msgid="1955638862122232342">"Onyo la matumizi ya data"</string>
     <string name="data_usage_warning_body" msgid="2814673551471969954">"Gusa ili kuangalia matumizi na mipangilio."</string>
-    <string name="data_usage_3g_limit_title" msgid="4361523876818447683">"Kikomo cha data ya 2G-3G kimefikiwa"</string>
+    <string name="data_usage_3g_limit_title" msgid="4361523876818447683">"Kikomo data ya 2G-3G kimefikiwa"</string>
     <string name="data_usage_4g_limit_title" msgid="4609566827219442376">"Kikomo cha data ya 4G kimefikiwa"</string>
-    <string name="data_usage_mobile_limit_title" msgid="557158376602636112">"Kikomo cha data ya simu kimefikiwa"</string>
-    <string name="data_usage_wifi_limit_title" msgid="5803363779034792676">"Kikomo cha data ya Wi-Fi kimefikiwa"</string>
+    <string name="data_usage_mobile_limit_title" msgid="557158376602636112">"Kikomo data ya simu kimefikiwa"</string>
+    <string name="data_usage_wifi_limit_title" msgid="5803363779034792676">"Kikomo data ya Wi-Fi kimefikiwa"</string>
     <string name="data_usage_limit_body" msgid="291731708279614081">"Data imesitishwa kwa mzunguko uliosalia"</string>
     <string name="data_usage_3g_limit_snoozed_title" msgid="7026739121138005231">"Kikomo cha data ya 2G-3G kimezidishwa"</string>
     <string name="data_usage_4g_limit_snoozed_title" msgid="1106562779311209039">"Kikomo cha data cha 4G kimezidishwa"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Kubali simu?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Kila mara"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Mara moja tu"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s haitumii wasifu wa kazi"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Kompyuta kibao"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Simu"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Vipokeasauti"</string>
@@ -1643,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Ufikivu umewezeshwa."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Ufikivu umeghairiwa."</string>
     <string name="user_switched" msgid="3768006783166984410">"Mtumiaji wa sasa <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Inabadili kwenda <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Mmiliki"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Hitilafu"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Mabadiliko haya hayaruhusiwi na msimamizi wako"</string>
@@ -1779,6 +1774,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Omba PIN kabla hujabandua"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Omba mchoro wa kufungua kabla hujabandua"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Omba nenosiri kabla hujabandua"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"Ili kusaidia kuokoa muda wa matumizi wa betri, kiokoa betri hupunguza utendaji wa kifaa chako na kuzuia kutetema na data nyingi ya chinichini. Barua pepe, utumaji ujumbe, na programu nyingine zinazotegemea usawazishaji huenda zisisasishwe usipozifungua.\n\nKiokoa betri hujizima kiotomatiki kifaa chako kinapokuwa kinachaji."</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Ili kusaidia kuokoa muda wa matumizi wa betri, kiokoa betri hupunguza utendaji wa kifaa chako na kuzuia kutetema na data nyingi ya chinichini. Barua pepe, utumaji ujumbe, na programu nyingine zinazotegemea usawazishaji huenda hazitasasisha usipozifungua.\n\nKiokoa betri huwashwa otomatiki kifaa kinapokuwa kinachaji."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Hadi <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> wakati wa kutotenda kazi kwa kifaa chako unapoisha"</string>
 </resources>
diff --git a/core/res/res/values-sw600dp/dimens.xml b/core/res/res/values-sw600dp/dimens.xml
index 3180e58..c0d9995 100644
--- a/core/res/res/values-sw600dp/dimens.xml
+++ b/core/res/res/values-sw600dp/dimens.xml
@@ -19,9 +19,9 @@
 -->
 <resources>
     <!-- The width that is used when creating thumbnails of applications. -->
-    <dimen name="thumbnail_width">512dp</dimen>
+    <dimen name="thumbnail_width">360dp</dimen>
     <!-- The height that is used when creating thumbnails of applications. -->
-    <dimen name="thumbnail_height">512dp</dimen>
+    <dimen name="thumbnail_height">360dp</dimen>
     <!-- The maximum number of action buttons that should be permitted within
          an action bar/action mode. This will be used to determine how many
          showAsAction="ifRoom" items can fit. "always" items can override this. -->
diff --git a/core/res/res/values-ta-rIN/strings.xml b/core/res/res/values-ta-rIN/strings.xml
index 5e7a648..1dcd387 100644
--- a/core/res/res/values-ta-rIN/strings.xml
+++ b/core/res/res/values-ta-rIN/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"தொலைபேசியை இயக்குதல் அல்லது முடக்குதல்"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"டேப்லெட்டை இயக்க அல்லது முடக்க, பயன்பாட்டை அனுமதிக்கிறது."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"மொபைலை இயக்க அல்லது முடக்க, பயன்பாட்டை அனுமதிக்கிறது."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"திரை நேர முடிவை மீட்டமைத்தல்"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"திரை நேர முடிவை மீட்டமைக்கப் பயன்பாட்டை அனுமதிக்கிறது."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"ஆரம்ப சோதனைமுறையில் இயக்குதல்"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"டேப்லெட் வன்பொருளிற்கு முழு அணுகலையும் வழங்கி, கீழ்நிலை தயாரிப்பாளர் சோதனையாக இயக்கவும். டேப்லெட்டானது தயாரிப்பாளர் சோதனை முறையில் இயங்கும்போது மட்டுமே கிடைக்கும்."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"தொலைபேசி வன்பொருளிற்கு முழு அணுகலையும் வழங்கி, கீழ்நிலை தயாரிப்பாளர் சோதனையாக இயக்கவும். தொலைபேசியானது தயாரிப்பாளர் சோதனை முறையில் இயங்கும்போது மட்டுமே கிடைக்கும்."</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"நிராகரி"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"அனுமதிக் கோரப்பட்டது"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"<xliff:g id="ACCOUNT">%s</xliff:g> கணக்கிற்கான அனுமதி\nகோரப்பட்டது."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"இந்தப் பயன்பாட்டைப் பணி சுயவிவரத்திற்கு வெளியே பயன்படுத்துகிறீர்கள்"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"பணி சுயவிவரத்தில் பயன்பாட்டைப் பயன்படுத்துகிறீர்கள்"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"உள்ளீட்டு முறை"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"ஒத்திசை"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"அழைப்பை ஏற்கவா?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"எப்போதும்"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"இப்போது மட்டும்"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s பணி சுயவிவரத்தை ஆதரிக்காது"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"டேப்லெட்"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"மொபைல்"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"ஹெட்ஃபோன்கள்"</string>
@@ -1643,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"அணுகல்தன்மை இயக்கப்பட்டது."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"அணுகல்தன்மை ரத்துசெய்யப்பட்டது."</string>
     <string name="user_switched" msgid="3768006783166984410">"நடப்பு பயனர் <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"<xliff:g id="NAME">%1$s</xliff:g>க்கு மாறுகிறது…"</string>
     <string name="owner_name" msgid="2716755460376028154">"உரிமையாளர்"</string>
     <string name="error_message_title" msgid="4510373083082500195">"பிழை"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"உங்கள் நிர்வாகி இந்த மாற்றத்தை அனுமதிக்கவில்லை"</string>
@@ -1779,6 +1774,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"அகற்றும் முன் PINஐக் கேள்"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"அகற்றும் முன் திறத்தல் வடிவத்தைக் கேள்"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"அகற்றும் முன் கடவுச்சொல்லைக் கேள்"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"பேட்டரியின் ஆயுட்காலத்தை அதிகரிக்க, பேட்டரி சேமிப்பான் சாதனத்தின் செயல்திறனைக் குறைத்து, அதிர்வுறுவதையும் பெரும்பாலான பின்புலத் தரவையும் வரம்பிடுகிறது. ஒத்திசைவைச் சார்ந்திருக்கும் மின்னஞ்சல், செய்தியிடல், மேலும் பிற பயன்பாடுகளைத் திறக்கும் வரை, அவை புதுப்பிக்கப்படாமல் இருக்கலாம்.\n\nசாதனம் சார்ஜ் ஆகும் போது, பேட்டரி சேமிப்பான் தானாகவே முடக்கப்படும்"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"பேட்டரியின் ஆயுட்காலத்தை அதிகரிக்க, பேட்டரி சேமிப்பான் சாதனத்தின் செயல்திறனைக் குறைத்து, அதிர்வுறுவதையும் பெரும்பாலான பின்புலத் தரவையும் வரம்பிடுகிறது. ஒத்திசைவைச் சார்ந்திருக்கும் மின்னஞ்சல், செய்தியிடல், மேலும் பிற பயன்பாடுகளைத் திறக்கும் வரை, அவை புதுப்பிக்கப்படாமல் இருக்கலாம்.\n\nசாதனம் சார்ஜ் ஆகும் போது, பேட்டரி சேமிப்பான் தானாகவே முடக்கப்படும்."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g>இல் செயல்படாத நேரம் முடியும் வரை"</string>
 </resources>
diff --git a/core/res/res/values-te-rIN/strings.xml b/core/res/res/values-te-rIN/strings.xml
index ae4ba5f..cee97e2 100644
--- a/core/res/res/values-te-rIN/strings.xml
+++ b/core/res/res/values-te-rIN/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"పవర్ ఫోన్‌ను ఆన్ లేదా ఆఫ్ చేయడం"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"టాబ్లెట్‌ను ఆన్ లేదా ఆఫ్ చేయడానికి అనువర్తనాన్ని అనుమతిస్తుంది."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"ఫోన్‌ను ఆన్ లేదా ఆఫ్ చేయడానికి అనువర్తనాన్ని అనుమతిస్తుంది."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"డిస్‌ప్లే నిలుపుదల సమయాన్ని రీసెట్ చేయడం"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"డిస్‌ప్లే నిలుపుదల సమయాన్ని రీసెట్ చేయడానికి అనువర్తనాన్ని అనుమతిస్తుంది."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"ఫ్యాక్టరీ పరీక్ష మోడ్‌లో అమలు చేయడం"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"టాబ్లెట్ హార్డ్‌వేర్‌కు పూర్తి ప్రాప్యతను అనుమతిస్తూ, తక్కువ-స్థాయి తయారీదారు పరీక్షగా అమలు చేయండి. టాబ్లెట్ తయారీదారు పరీక్ష మోడ్‌లో అమలవుతున్నప్పుడు మాత్రమే అందుబాటులో ఉంటుంది."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"ఫోన్ హార్డ్‌వేర్‌కు పూర్తి ప్రాప్యతను అనుమతిస్తూ, తక్కువ-స్థాయి తయారీదారు పరీక్షగా అమలు చేయండి. ఫోన్ తయారీదారు పరీక్ష మోడ్‌లో అమలవుతున్నప్పుడు మాత్రమే అందుబాటులో ఉంటుంది."</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"తిరస్కరించండి"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"అనుమతి అభ్యర్థించబడింది"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"ఖాతా <xliff:g id="ACCOUNT">%s</xliff:g> కోసం\nఅనుమతి అభ్యర్థించబడింది."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"మీరు మీ కార్యాలయ ప్రొఫైల్‌కు వెలుపల ఈ అనువర్తనాన్ని ఉపయోగిస్తున్నారు"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"మీరు మీ కార్యాలయ ప్రొఫైల్‌లో ఈ అనువర్తనాన్ని ఉపయోగిస్తున్నారు"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"ఇన్‌పుట్ పద్ధతి"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"సమకాలీకరణ"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"కాల్‌ను ఆమోదించాలా?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"ఎల్లప్పుడూ"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"ఒకసారి"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s కార్యాలయ ప్రొఫైల్‌కు మద్దతు ఇవ్వదు"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"టాబ్లెట్"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"ఫోన్"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"హెడ్‌ఫోన్‌లు"</string>
@@ -1643,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"ప్రాప్యత ప్రారంభించబడింది."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"ప్రాప్యత రద్దు చేయబడింది."</string>
     <string name="user_switched" msgid="3768006783166984410">"ప్రస్తుత వినియోగదారు <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"<xliff:g id="NAME">%1$s</xliff:g>కి మారుస్తోంది…"</string>
     <string name="owner_name" msgid="2716755460376028154">"యజమాని"</string>
     <string name="error_message_title" msgid="4510373083082500195">"లోపం"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"ఈ మార్పును మీ నిర్వాహకుడు అనుమతించలేదు"</string>
@@ -1779,6 +1774,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"అన్‌పిన్ చేయడానికి ముందు PIN కోసం అడుగు"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"అన్‌పిన్ చేయడానికి ముందు అన్‌లాక్ నమూనా కోసం అడుగు"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"అన్‌పిన్ చేయడానికి ముందు పాస్‌వర్డ్ కోసం అడుగు"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"బ్యాటరీ సామర్థ్యాన్ని మెరుగుపరచడంలో సహాయపడటానికి, బ్యాటరీ సేవర్ మీ పరికరం పనితీరుని తగ్గిస్తుంది మరియు వైబ్రేషన్‌ను మరియు అత్యధిక నేపథ్య డేటాను పరిమితపరుస్తుంది. అలాగే సమకాలీకరణపై ఆధారపడే ఇమెయిల్, సందేశ సేవ మరియు ఇతర అనువర్తనాలు మీరు వాటిని తెరిస్తే మినహా నవీకరించబడకపోవచ్చు.\n\nమీ పరికరం ఛార్జింగ్‌లో ఉన్నప్పుడు బ్యాటరీ సేవర్ స్వయంచాలకంగా ఆఫ్ చేయబడుతుంది."</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"బ్యాటరీ సామర్థ్యాన్ని మెరుగుపరచడంలో సహాయపడటానికి, బ్యాటరీ సేవర్ మీ పరికరం పనితీరుని తగ్గిస్తుంది మరియు వైబ్రేషన్‌ను మరియు అత్యధిక నేపథ్య డేటాను పరిమితపరుస్తుంది. అలాగే సమకాలీకరణపై ఆధారపడే ఇమెయిల్, సందేశ సేవ మరియు ఇతర అనువర్తనాలు మీరు వాటిని తెరిస్తే మినహా నవీకరించబడకపోవచ్చు.\n\nమీ పరికరం ఛార్జింగ్‌లో ఉన్నప్పుడు బ్యాటరీ సేవర్ స్వయంచాలకంగా ఆఫ్ చేయబడుతుంది."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"మీ వృథా సమయం <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>కి ముగిసే వరకు"</string>
 </resources>
diff --git a/core/res/res/values-television/dimens.xml b/core/res/res/values-television/dimens.xml
new file mode 100644
index 0000000..8266642
--- /dev/null
+++ b/core/res/res/values-television/dimens.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+
+     <!-- Lighting and shadow properties -->
+     <dimen name="light_y">-300dp</dimen>
+     <item type="dimen" format="float" name="ambient_shadow_alpha">0.4</item>
+     <item type="dimen" format="float" name="spot_shadow_alpha">0.4</item>
+
+</resources>
diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml
index b2eebda..291d8ac 100644
--- a/core/res/res/values-th/strings.xml
+++ b/core/res/res/values-th/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"เปิดหรือปิดโทรศัพท์"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"อนุญาตให้แอปพลิเคชันเปิดหรือปิดแท็บเล็ต"</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"อนุญาตให้แอปพลิเคชันเปิดหรือปิดโทรศัพท์"</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"รีเซ็ตระยะหมดเวลาแสดงผล"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"อนุญาตให้แอปนี้รีเซ็ตระยะหมดเวลาแสดงผล"</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"เรียกใช้ในโหมดการทดสอบจากโรงงาน"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"เรียกใช้การทดสอบจากผู้ผลิตในระดับต่ำ โดยอนุญาตให้เข้าถึงฮาร์ดแวร์แท็บเล็ตอย่างสมบูรณ์ ใช้ได้เฉพาะช่วงที่แท็บเล็ตทำงานในโหมดการทดสอบจากผู้ผลิตเท่านั้น"</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"เรียกใช้การทดสอบจากผู้ผลิตในระดับต่ำ โดยอนุญาตให้เข้าถึงฮาร์ดแวร์โทรศัพท์อย่างสมบูรณ์ ใช้ได้เฉพาะช่วงที่โทรศัพท์ทำงานในโหมดการทดสอบจากผู้ผลิตเท่านั้น"</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"ปฏิเสธ"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"การอนุญาตที่ขอ"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"การอนุญาตที่ขอ\nสำหรับบัญชี <xliff:g id="ACCOUNT">%s</xliff:g>"</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"คุณกำลังใช้แอปนี้นอกโปรไฟล์งานของคุณ"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"คุณกำลังใช้แอปนี้ในโปรไฟล์งานของคุณ"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"วิธีป้อนข้อมูล"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"ซิงค์"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"การเข้าถึง"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"รับสายหรือไม่"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"ทุกครั้ง"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"เฉพาะครั้งนี้"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s ไม่สนับสนุนโปรไฟล์งาน"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"แท็บเล็ต"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"โทรศัพท์"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"หูฟัง"</string>
@@ -1644,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"เปิดใช้งานการเข้าถึงแล้ว"</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"ยกเลิกการเข้าถึงแล้ว"</string>
     <string name="user_switched" msgid="3768006783166984410">"ผู้ใช้ปัจจุบัน <xliff:g id="NAME">%1$s</xliff:g>"</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"เจ้าของ"</string>
     <string name="error_message_title" msgid="4510373083082500195">"ข้อผิดพลาด"</string>
@@ -1777,12 +1772,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"เริ่มต้น"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"ตรึงหน้าจอแล้ว"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"เลิกตรึงหน้าจอแล้ว"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"เพื่อให้สามารถใช้แบตเตอรี่ได้ยาวนานขึ้น โหมดประหยัดแบตเตอรี่จะลดการทำงานของอุปกรณ์ และจำกัดการสั่นรวมถึงข้อมูลแบ็กกราวด์เกือบทั้งหมด อีเมล การรับส่งข้อความ และแอปอื่นๆ ที่ใช้การซิงค์อาจไม่อัปเดตจนกว่าคุณจะเปิดใช้\n\nโหมดประหยัดแบตเตอรี่จะปิดอัตโนมัติเมื่อชาร์จอุปกรณ์"</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"ขอ PIN ก่อนเลิกตรึง"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"ขอรูปแบบการปลดล็อกก่อนเลิกตรึง"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"ขอรหัสผ่านก่อนเลิกตรึง"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"เพื่อให้สามารถใช้แบตเตอรี่ได้ยาวนานขึ้น โหมดประหยัดแบตเตอรี่จะลดการทำงานของอุปกรณ์ และจำกัดการสั่นรวมถึงข้อมูลแบ็กกราวด์เกือบทั้งหมด อีเมล การรับส่งข้อความ และแอปอื่นๆ ที่ใช้การซิงค์อาจไม่อัปเดตจนกว่าคุณจะเปิดใช้\n\nโหมดประหยัดแบตเตอรี่จะปิดอัตโนมัติเมื่อชาร์จอุปกรณ์"</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"จนกว่าจะสิ้นสุดช่วงเวลาที่เครื่องไม่ทำงานในเวลา <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml
index 222056a..ab1f19d 100644
--- a/core/res/res/values-tl/strings.xml
+++ b/core/res/res/values-tl/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"i-on o i-off ang telepono"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Pinapayagan ang app na i-on o i-off ang tablet."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Pinapayagan ang app na i-on o i-off ang telepono."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"i-reset ang pag-timeout ng display"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Pinapayagan ang app na i-reset ang pag-timeout ng display."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"tumakbo sa factory test mode"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Patakbuhin bilang isang pagsubok ng mababang antas na gumagawa, na pumapayag sa kumpletong access sa hardware ng tablet. Available lang kapag tumatakbo ang isang tablet sa mode na pagsubok ng gumagawa."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Patakbuhin bilang mababang antas na pagsubok ng gumawa, na nagpapahintulot ng kumpletong access sa hardware ng telepono. Available lang kapag tumatakbo ang telepono sa test mode ng gumawa."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"Tanggihan"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Hiniling ang pahintulot"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Hiniling ang pahintulot\npara sa account na <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Ginagamit mo ang app na ito sa labas ng iyong profile sa trabaho"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"Ginagamit mo ang app na ito sa iyong profile sa trabaho"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Pamamaraan ng pag-input"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"I-sync"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Kakayahang Ma-access"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Tanggapin ang tawag?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Palagi"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Isang beses lang"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"Hindi sinusuportahan ng %1$s ang profile sa trabaho"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tablet"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Telepono"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Mga Headphone"</string>
@@ -1644,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Pinagana ang accessibility."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Nakansela ang pagiging naa-access."</string>
     <string name="user_switched" msgid="3768006783166984410">"Kasalukuyang user <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"May-ari"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Error"</string>
@@ -1777,12 +1772,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"SIMULAN"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Naka-pin ang screen"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Naka-unpin ang screen"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"Upang makatulong na mas mapatagal ang baterya, binabawasan ng battery saver ang pagganap ng iyong device at nililimitahan ang pag-vibrate at ang karamihan ng data ng background. Hindi maaaring ma-update ang email, pagmemensahe at iba pang mga app na umaasa sa pagsi-sync maliban kung bubuksan mo ang mga ito.\n\nAwtomatikong mao-off ang battery saver kapag nagcha-charge ang iyong device"</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Humingi ng PIN bago mag-unpin"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Humingi ng pattern sa pag-unlock bago mag-unpin"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Humingi ng password bago mag-unpin"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Upang makatulong na mas mapatagal ang baterya, binabawasan ng battery saver ang pagganap ng iyong device at nililimitahan ang pag-vibrate at ang karamihan ng data ng background. Hindi maaaring ma-update ang email, pagmemensahe at iba pang mga app na umaasa sa pagsi-sync maliban kung bubuksan mo ang mga ito.\n\nAwtomatikong mao-off ang battery saver kapag nagcha-charge ang iyong device."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Hanggang sa matapos ang iyong downtime nang <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index ce97436..a4d83ea 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -1427,8 +1427,7 @@
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"<xliff:g id="ACCOUNT">%s</xliff:g> hesabı için\nizin isteğinde bulunuldu."</string>
     <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
     <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_work" msgid="621480743856004612">"Bu uygulamayı iş profilinizde kullanıyorsunuz"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Giriş yöntemi"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Senkronizasyon"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Erişebilirlik"</string>
@@ -1644,7 +1643,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Erişilebilirlik etkinleştirildi."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Erişilebilirlik iptal edildi."</string>
     <string name="user_switched" msgid="3768006783166984410">"Geçerli kullanıcı: <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"Sahibi"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Hata"</string>
@@ -1777,12 +1776,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"BAŞLAT"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Ekran sabitlendi"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Ekran sabitlemesi kaldırıldı"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"Pil ömrünü uzatmaya yardımcı olmak için pil koruyucu, cihazınızın performansını düşürür, titreşim ve çoğu arka plan verisini sınırlandırır. E-posta, mesajlaşma ve senkronizasyona dayanan diğer uygulamalar, uygulamanın kendisi açılmadıkça güncellenmeyebilir.\n\nPil koruyucu, cihazınız şarj edilirken otomatik olarak kapanır."</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Sabitlemeyi kaldırmadan önce PIN\'i sor"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Sabitlemeyi kaldırmadan önce kilit açma desenini sor"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Sabitlemeyi kaldırmadan önce şifre sor"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Pil tasarrufu, pilin ömrünü uzatmaya yardımcı olmak amacıyla cihazınızın performansını düşürür ve arka plan verilerini sınırlar. E-posta, mesajlaşma ve senkronizasyona dayalı diğer uygulamalar siz açmadığınız müddetçe güncellenemez. \n\nPil tasarrufu, cihaz şarj olurken otomatik olarak kapanır."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Kesinti süreniz <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> saatinde sona erene kadar"</string>
 </resources>
diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml
index d96ddb1..d2f2ace 100644
--- a/core/res/res/values-uk/strings.xml
+++ b/core/res/res/values-uk/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"вмик. чи вимик. телефон"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Дозволяє програмі вимикати чи вимикати планшетний ПК."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Дозволяє програмі вмикати чи вимикати телефон."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"скидати час очікування дисплея"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Додаток може скидати час очікування дисплея."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"запуск у завод. реж. тест."</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Запускає тест виробника на низьк. рівні, дозволяючи повний доступ до апарат. забезп. пристр. Доступно лише коли пристр. запущ. в режимі тестув. виробником."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Запускає тест виробника на низькому рівні, дозволяючи повний доступ до апарат. забезп. тел. Доступно лише коли тел. запущено в режимі тестув. виробником."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"Забор."</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Потрібен дозвіл"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Запитано дозвіл\nдля облікового запису <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Ви використовуєте цей додаток за межами робочого профілю"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"Ви використовуєте цей додаток у своєму робочому профілі"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Метод введення"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Синхр."</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Доступність"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Прийняти виклик?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Завжди"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Лише цього разу"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s не підтримує робочий профіль"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Планшетний ПК"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Телефон"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Навушники"</string>
@@ -1644,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Доступність увімкнено."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Доступність скасовано."</string>
     <string name="user_switched" msgid="3768006783166984410">"Поточний користувач: <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Перехід в обліковий запис користувача <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Власник"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Помилка"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Ця дія заборонена адміністратором"</string>
@@ -1777,12 +1771,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"УВІМКНУТИ"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Екран закріплено"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Екран відкріплено"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"Щоб подовжити час роботи акумулятора, функція заощадження заряду акумулятора знижує продуктивність пристрою, а також обмежує вібрацію та передавання більшості фонових даних. Електронна пошта, повідомлення й інші додатки, які синхронізуються, можуть не оновлюватися, доки ви їх не відкриєте.\n\nФункція заощадження заряду акумулятора автоматично вимикається під час заряджання пристрою."</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Запитувати PIN-код перед відкріпленням"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Запитувати ключ розблокування перед відкріпленням"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Запитувати пароль перед відкріпленням"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Щоб подовжити час роботи акумулятора, функція заощадження заряду акумулятора знизить продуктивність пристрою й обмежить вібрацію та більшість фонових даних. Електронна пошта, повідомлення й інші додатки, які синхронізуються, можуть не оновлюватися, доки ви їх не відкриєте.\n\nФункція заощадження заряду акумулятора автоматично вимкнеться, коли пристрій заряджатиметься."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Термін простою закінчується о <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-ur-rPK/strings.xml b/core/res/res/values-ur-rPK/strings.xml
index d97d768..a4870cd 100644
--- a/core/res/res/values-ur-rPK/strings.xml
+++ b/core/res/res/values-ur-rPK/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"فون کی پاور آن یا آف کریں"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"ایپ کو ٹیبلیٹ آن یا آف کرنے کی اجازت دیتا ہے۔"</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"ایپ کو فون آن یا آف کرنے کی اجازت دیتا ہے۔"</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"ڈسپلے ٹائم آؤٹ کو دوبارہ ترتیب دیں"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"ایپ کو ڈسپلے ٹائم آؤٹ کو دوبارہ ترتیب دینے کی اجازت دیتا ہے۔"</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"فیکٹری ٹیسٹ وضع میں چلائیں"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"ٹیبلیٹ ہارڈویئر تک مکمل رسائی کی اجازت دے کر، ایک کم سطح والے مینوفیکچرر ٹیسٹ کے بطور چلائیں۔ صرف اس وقت دستیاب ہوتا ہے جب ایک ٹیبلیٹ مینوفیکچرر ٹیسٹ وضع میں چل رہا ہوتا ہے۔"</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"فون ہارڈویئر تک مکمل رسائی کی اجازت دے کر ایک کم سطحی مینوفیکچرر ٹیسٹ کے بطور چلائیں۔ صرف اس وقت دستیاب ہوتا ہے جب کوئی فون مینوفیکچرر ٹیسٹ وضع میں چل رہا ہوتا ہے۔"</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"مسترد کریں"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"اجازت طلب کی گئی"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"اکاؤنٹ <xliff:g id="ACCOUNT">%s</xliff:g> کیلئے\nاجازت طلب کی گئی۔"</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"آپ اس ایپ کا استعمال اپنے دفتری پروفائل کے باہر کر رہے ہیں"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"آپ اس ایپ کو اپنے دفتری پروفائل میں استعمال کر رہے ہیں"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"اندراج کا طریقہ"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"مطابقت پذیری کریں"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Accessibility"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"کال قبول کریں؟"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"ہمیشہ"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"بس ایک مرتبہ"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"‏%1$s دفتری پروفائل کا تعاون نہیں کرتا ہے"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"ٹیبلیٹ"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"فون"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"ہیڈ فونز"</string>
@@ -1644,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"‏Accessibility فعال۔"</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"‏Accessibility منسوخ ہوگئی۔"</string>
     <string name="user_switched" msgid="3768006783166984410">"موجودہ صارف <xliff:g id="NAME">%1$s</xliff:g>۔"</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"مالک"</string>
     <string name="error_message_title" msgid="4510373083082500195">"خرابی"</string>
@@ -1777,12 +1772,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"شروع کریں"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"اسکرین کو پن کر دیا گیا"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"اسکرین کا پن ہٹا دیا گیا"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"بیٹری کی زندگی بہتر بنانے میں مدد کیلئے، بیٹری سیور آپ کے آلہ کی کارکردگی کم کر دیتا ہے اور ارتعاش اور پس منظر کا بیشتر ڈیٹا محدود کر دیتا ہے۔ مطابقت پذیری پر منحصر ای میل، پیغام رسانی اور دیگر ایپس اس وقت تک اپ ڈیٹ نہیں ہوسکتی ہیں جب تک آپ انہیں نہ کھولیں۔\n\nآپ کا آلہ چارج ہو رہے ہونے کی صورت میں بیٹری سیور خود بخود آف ہو جاتا ہے"</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"‏پن ہٹانے سے پہلے PIN طلب کریں"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"پن ہٹانے سے پہلے غیر مقفل کرنے کا پیٹرن طلب کریں"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"پن ہٹانے سے پہلے پاس ورڈ طلب کریں"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"بیٹری کی میعاد بہتر بنانے میں مدد کرنے کیلئے، بیٹری سیور آپ کے آلہ کی کارکردگی میں تخفیف کر دیتی ہے اور وائبریشن اور پس منظر کے زیادہ تر ڈیٹا کو محدود کر دیتی ہے۔ ای میل، پیغام رسانی اور مطابقت پذیری پر انحصار کرنے والی دیگر ایپس ممکن ہے اس وقت تک اپ ڈیٹ نہ ہوں جب تک آپ انہیں نہ کھولیں۔\n\nآپ کا آلہ چارج ہوتے وقت بیٹری سیور خود بخود آف ہو جاتی ہے۔"</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> پر آپ کا آخری وقت ختم ہونے تک"</string>
 </resources>
diff --git a/core/res/res/values-uz-rUZ/strings.xml b/core/res/res/values-uz-rUZ/strings.xml
index d8377b8..851f6c3 100644
--- a/core/res/res/values-uz-rUZ/strings.xml
+++ b/core/res/res/values-uz-rUZ/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"telefonni o‘chirish/yoqish"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Ilova planshetni yoqishi yoki o‘chirishi mumkin."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Ilova telefonni yoqishi yoki o‘chirishi mumkin."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"ekranning tanaffus vaqtini o‘zgartirish"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Ilovaga ekranning tanaffus vaqtini o‘zgartirish uchun ruxsat beradi."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"ishlab chiqarish sinovi usulida ishga tushirish"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Past darajadagi ishlab chiqarish sinovi usuli ishga tushirilganda, planshetga butunlay kirish imkonini beradi. Faqatgina planshet ishlab chiqarish sinovi usulida ishga tushirilgandagina buni amalga oshirish mumkin."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Past darajadagi ishlab chiqaruvchi sinovi usulida ishga tushirish. Telefon faqatgina ishlab chiqaruvchi sinovi usulida ishga tushirilgandagina mavjud bo‘ladi."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"Rad qilish"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Ruxsat so‘raldi"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"<xliff:g id="ACCOUNT">%s</xliff:g> hisobi uchun\nruxsat so‘raldi"</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Siz ushbu ilovadan ishchi profilingizdan tashqarida foydalanmoqdasiz"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"Siz ushbu ilovadan ishchi profilingizda foydalanmoqdasiz"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Kiritish uslubi"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Sinx"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Qulaylik"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Qo‘ng‘iroqni qabul qilasizmi?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Har doim"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Bir marta"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"“%1$s” ishchi profilni qo‘llab-quvvatlamaydi"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Planshet"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Telefon"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Quloq karnaychalari"</string>
@@ -1644,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Imkoniyatlar yoqilgan."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Qulaylik bekor qilindi."</string>
     <string name="user_switched" msgid="3768006783166984410">"Joriy foydalanuvchi <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"Egasi"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Xato"</string>
@@ -1777,12 +1772,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"ISHGA TUSHIRISH"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Ekran qadab qo‘yildi"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Ekran bo‘shatildi"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"Batareya quvvatini uzoqroq vaqtga yetkazish uchun quvvat tejash funksiyasi qurilmangiz unumdorligini kamaytiradi hamda uning tebranishi va orqa fonda internetdan foydalanishni cheklaydi. Sinxronlanib turishi lozim bo‘lgan e-pochta, xabar almashinuv va boshqa ilovalar esa ishga tushirilmaguncha yangilanmaydi.\n\nQurilmani quvvat oldirish uchun energiya manbayiga ulashingiz bilanoq, quvvat tejash funksiyasi avtomatik tarzda o‘chadi"</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Bo‘shatishdan oldin PIN kod so‘ralsin"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Bo‘shatishdan oldin chizmali parol so‘ralsin"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Bo‘shatishdan oldin parol so‘ralsin"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Batareya quvvatini uzoqroq vaqtga yetkazish uchun quvvat tejash funksiyasi qurilmangiz unumdorligini kamaytiradi hamda uning tebranishi va orqa fonda internetdan foydalanishni cheklaydi. Sinxronlanib turishi lozim bo‘lgan e-pochta, xabar almashinuv va boshqa ilovalar esa ishga tushirilmaguncha yangilanmaydi.\n\nQurilmani quvvat oldirish uchun energiya manbayiga ulashingiz bilanoq, quvvat tejash funksiyasi avtomatik tarzda o‘chadi."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Tanaffus vaqti tugaguncha – <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml
index 431b22351..819153b 100644
--- a/core/res/res/values-vi/strings.xml
+++ b/core/res/res/values-vi/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"bật hoặc tắt điện thoại"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Cho phép ứng dụng bật hoặc tắt máy tính bảng."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Cho phép ứng dụng bật hoặc tắt điện thoại."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"đặt lại thời gian chờ hiển thị"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Cho phép ứng dụng đặt lại thời gian chờ hiển thị."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"chạy ở chế độ thử nghiệm trong nhà máy"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Chạy dưới dạng thử nghiệm nhà máy cấp thấp, cho phép quyền truy cập hoàn toàn vào phần cứng máy tính bảng. Chỉ khả dụng khi máy tính bảng chạy ở chế độ thử nghiệm trong nhà máy."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Chạy dưới dạng thử nghiệm nhà máy cấp thấp, cho phép quyền truy cập hoàn toàn vào phần cứng điện thoại. Chỉ khả dụng khi điện thoại chạy ở chế độ thử nghiệm trong nhà máy."</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"Từ chối"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Đã yêu cầu quyền"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Đã yêu cầu quyền\ncho tài khoản <xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Bạn đang sử dụng ứng dụng này bên ngoài hồ sơ công việc của mình"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"Bạn đang sử dụng ứng dụng này trong hồ sơ công việc của mình"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Phương thức nhập"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Đồng bộ hóa"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Khả năng truy cập"</string>
@@ -1537,7 +1533,7 @@
     <string name="data_usage_warning_body" msgid="2814673551471969954">"Chạm để xem sử dụng và cài đặt."</string>
     <string name="data_usage_3g_limit_title" msgid="4361523876818447683">"Đã đạt tới giới hạn dữ liệu 2G-3G"</string>
     <string name="data_usage_4g_limit_title" msgid="4609566827219442376">"Đã đạt tới giới hạn dữ liệu 4G"</string>
-    <string name="data_usage_mobile_limit_title" msgid="557158376602636112">"Đã đạt tới giới hạn dữ liệu DĐ"</string>
+    <string name="data_usage_mobile_limit_title" msgid="557158376602636112">"Đã đạt tới giới hạn dữ liệu di động"</string>
     <string name="data_usage_wifi_limit_title" msgid="5803363779034792676">"Đã đạt tới g.hạn dữ liệu Wi-Fi"</string>
     <string name="data_usage_limit_body" msgid="291731708279614081">"Dữ liệu bị tạm ngừng trong phần còn lại của chu kỳ"</string>
     <string name="data_usage_3g_limit_snoozed_title" msgid="7026739121138005231">"Đã vượt quá g.hạn dữ liệu 2G-3G"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Chấp nhận cuộc gọi?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Luôn chọn"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Chỉ một lần"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s không hỗ trợ hồ sơ công việc"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Máy tính bảng"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Điện thoại"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Tai nghe"</string>
@@ -1644,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Trợ năng đã được bật."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Đã hủy trợ năng."</string>
     <string name="user_switched" msgid="3768006783166984410">"Người dùng hiện tại <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"Chủ sở hữu"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Lỗi"</string>
@@ -1777,12 +1772,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"BẮT ĐẦU"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Đã ghim màn hình"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Đã bỏ ghim màn hình"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"Để giúp tăng tuổi thọ pin, trình tiết kiệm pin sẽ giảm hiệu suất thiết bị của bạn, đồng thời hạn chế rung và hầu hết dữ liệu nền. Email, nhắn tin và các ứng dụng khác dựa trên đồng bộ hóa không thể cập nhật trừ khi bạn mở chúng.\n\nTrình tiết kiệm pin tự động tắt khi thiết bị của bạn đang sạc"</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Hỏi mã PIN trước khi bỏ ghim"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Hỏi hình mở khóa trước khi bỏ ghim"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Hỏi mật khẩu trước khi bỏ ghim"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Để giúp tăng tuổi thọ pin, trình tiết kiệm pin sẽ giảm hiệu suất thiết bị của bạn và hạn chế chế rung và hầu hết dữ liệu nền. Email, nhắn tin và các ứng dụng khác dựa trên đồng bộ hóa không thể cập nhật trừ khi bạn mở chúng.\n\nTrình tiết kiệm pin tự động tắt khi thiết bị của bạn đang sạc."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Cho tới khi thời gian ngừng hoạt động của bạn kết thúc vào <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index c84754f..97402e5 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -1427,8 +1427,7 @@
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"应用对帐户 <xliff:g id="ACCOUNT">%s</xliff:g>\n 提出权限请求。"</string>
     <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
     <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_work" msgid="621480743856004612">"您目前是在工作资料内使用此应用"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"输入法"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"同步"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"辅助功能"</string>
@@ -1644,7 +1643,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"辅助功能已启用。"</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"已取消辅助功能。"</string>
     <string name="user_switched" msgid="3768006783166984410">"当前用户是<xliff:g id="NAME">%1$s</xliff:g>。"</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"机主"</string>
     <string name="error_message_title" msgid="4510373083082500195">"错误"</string>
@@ -1777,12 +1776,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"启动"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"已固定屏幕"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"已取消固定屏幕"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"为了延长电池的续航时间,节电助手会降低设备的性能,并限制振动和大部分后台流量。对于电子邮件、聊天工具等依赖于同步功能的应用,可能要打开这类应用时才能收到新信息。\n\n节电助手会在设备充电时自动关闭"</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"取消固定屏幕前要求输入PIN码"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"取消固定屏幕前要求绘制解锁图案"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"取消固定屏幕前要求输入密码"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"为了延长电池的续航时间,节电助手会降低设备的性能,并限制振动和大部分后台流量。对于电子邮件、聊天工具等依赖于同步功能的应用,可能要打开这类应用时才能收到新信息。\n\n节电助手会在设备充电时自动关闭。"</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"直到休息时间结束(<xliff:g id="FORMATTEDTIME">%1$s</xliff:g>)"</string>
 </resources>
diff --git a/core/res/res/values-zh-rHK/strings.xml b/core/res/res/values-zh-rHK/strings.xml
index f2c6169..d48b428 100644
--- a/core/res/res/values-zh-rHK/strings.xml
+++ b/core/res/res/values-zh-rHK/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"開啟或關閉手機"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"允許應用程式開啟或關閉平板電腦。"</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"允許應用程式開啟或關閉手機。"</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"重設顯示逾時"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"允許應用程式重設顯示逾時。"</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"以原廠測試模式執行"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"允許在以低階製造商測試身分執行時,可具有平板電腦硬體的完整存取權限。只有在平板電腦以製造商測試模式執行時,才能使用此權限。"</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"以低階製造商測試執行,可具有手機硬件的完整存取權限。只有在手機以製造商測試模式執行時,才能使用此權限。"</string>
@@ -1404,7 +1402,7 @@
     <string name="permlab_recovery" msgid="3157024487744125846">"與更新和復原系統互動"</string>
     <string name="permdesc_recovery" msgid="8511774533266359571">"允許應用程式與復原系統和系統更新互動。"</string>
     <string name="permlab_manageMediaProjection" msgid="1120495449419929218">"管理媒體投影工作階段"</string>
-    <string name="permdesc_manageMediaProjection" msgid="8053759147529492856">"允許應用程式管理媒體投影工作階段。這類工作階段可讓應用程式擷取畫面內容和音訊內容 (一般應用程式並不需用)。"</string>
+    <string name="permdesc_manageMediaProjection" msgid="8053759147529492856">"允許應用程式管理媒體投影工作階段。這類工作階段可讓應用程式擷取畫面內容和音訊內容 (一般應用程式並不需要)。"</string>
     <string name="permlab_readInstallSessions" msgid="6165432407628065939">"讀取安裝工作階段"</string>
     <string name="permdesc_readInstallSessions" msgid="2049771699626019849">"允許應用程式讀取安裝工作階段。應用程式將可查看目前安裝套裝的詳細資料。"</string>
     <string name="tutorial_double_tap_to_zoom_message_short" msgid="4070433208160063538">"輕觸兩下即可控制縮放"</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"拒絕"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"已要求權限"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"<xliff:g id="ACCOUNT">%s</xliff:g> 帳戶的\n權限要求。"</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"您目前並未透過工作設定檔使用這個應用程式"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"您目前透過工作設定檔使用這個應用程式"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"輸入法"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"同步處理"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"協助工具"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"接聽電話嗎?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"一律採用"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"只此一次"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s 不支援工作設定檔"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"平板電腦"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"手機"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"耳機"</string>
@@ -1644,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"協助工具已啟用。"</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"協助工具已取消。"</string>
     <string name="user_switched" msgid="3768006783166984410">"目前的用戶是<xliff:g id="NAME">%1$s</xliff:g>。"</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"擁有者"</string>
     <string name="error_message_title" msgid="4510373083082500195">"錯誤"</string>
@@ -1777,12 +1772,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"啟動"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"螢幕已固定"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"已取消固定螢幕"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"節約電池用量模式有助於延長電池壽命,但會降低裝置效能、限制震動和背景資料傳輸。除非您啟用,否則電郵、短訊及其他需要使用同步功能的應用程式均不會更新。\n\n當裝置充電時,節約電池用量模式會自動關閉。"</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"取消固定時必須輸入 PIN"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"取消固定時必須畫出解鎖圖案"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"取消固定時必須輸入密碼"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"節約電池用量模式有助於延長電池壽命,但這會降低裝置效能,並限制震動及大部分背景數據傳輸。除非您啟用,否則電郵、短訊及其他需要使用同步功能的應用程式均不會更新。\n\n當裝置充電時,節約電池用量模式會自動關閉。"</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"直到停機時間於 <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> 結束"</string>
 </resources>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index f550d9e..f95a3cc 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"開啟或關閉電源"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"允許應用程式開啟或關閉平板電腦。"</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"允許應用程式開啟或關閉手機。"</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"重設顯示逾時"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"允許應用程式重設顯示逾時。"</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"在出廠測試模式下執行"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"允許在以低階製造商測試身分執行時,可具有平板電腦硬體的完整存取權限。只有在平板電腦以製造商測試模式執行時,才能使用此權限。"</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"執行低階製造商測試,允許完全存取手機硬體。此功能只能在手機是製造商測試模式下才可執行。"</string>
@@ -716,12 +714,12 @@
     <string name="permdesc_cache_filesystem" msgid="5578967642265550955">"允許應用程式讀取及寫入快取檔案系統。"</string>
     <string name="permlab_use_sip" msgid="2052499390128979920">"撥打/接聽 SIP 通話"</string>
     <string name="permdesc_use_sip" msgid="2297804849860225257">"允許應用程式撥打及接聽 SIP 通話。"</string>
-    <string name="permlab_bind_incall_service" msgid="6773648341975287125">"與「通話中畫面」互動"</string>
-    <string name="permdesc_bind_incall_service" msgid="8343471381323215005">"允許應用程式控制向使用者顯示「通話中畫面」的時機與方式。"</string>
+    <string name="permlab_bind_incall_service" msgid="6773648341975287125">"與通話螢幕互動"</string>
+    <string name="permdesc_bind_incall_service" msgid="8343471381323215005">"允許應用程式控制使用者看到通話螢幕的時機和方式。"</string>
     <string name="permlab_bind_connection_service" msgid="3557341439297014940">"與電話語音服務互動"</string>
     <string name="permdesc_bind_connection_service" msgid="4008754499822478114">"允許應用程式與電話語音服務互動以撥接電話。"</string>
-    <string name="permlab_control_incall_experience" msgid="9061024437607777619">"為使用者提供「通話中畫面」功能"</string>
-    <string name="permdesc_control_incall_experience" msgid="915159066039828124">"允許應用程式為使用者提供「通話中畫面」功能。"</string>
+    <string name="permlab_control_incall_experience" msgid="9061024437607777619">"為使用者提供通話體驗"</string>
+    <string name="permdesc_control_incall_experience" msgid="915159066039828124">"允許應用程式向使用者提供通話體驗。"</string>
     <string name="permlab_readNetworkUsageHistory" msgid="7862593283611493232">"讀取網路用量紀錄"</string>
     <string name="permdesc_readNetworkUsageHistory" msgid="7689060749819126472">"允許應用程式讀取特定網路和應用程式的網路使用記錄。"</string>
     <string name="permlab_manageNetworkPolicy" msgid="2562053592339859990">"管理網路政策"</string>
@@ -1404,7 +1402,7 @@
     <string name="permlab_recovery" msgid="3157024487744125846">"與更新和還原系統互動"</string>
     <string name="permdesc_recovery" msgid="8511774533266359571">"允許應用程式與還原系統及系統更新互動。"</string>
     <string name="permlab_manageMediaProjection" msgid="1120495449419929218">"管理媒體投影工作階段"</string>
-    <string name="permdesc_manageMediaProjection" msgid="8053759147529492856">"允許應用程式管理媒體投影工作階段。這類工作階段可讓應用程式擷取畫面內容和音訊內容 (一般應用程式並不需要)。"</string>
+    <string name="permdesc_manageMediaProjection" msgid="8053759147529492856">"允許應用程式管理媒體投影工作階段。這類工作階段可讓應用程式擷取螢幕內容和音訊內容,一般應用程式並不需要此權限。"</string>
     <string name="permlab_readInstallSessions" msgid="6165432407628065939">"讀取安裝工作階段"</string>
     <string name="permdesc_readInstallSessions" msgid="2049771699626019849">"允許應用程式讀取安裝工作階段。應用程式將可查看目前的套件安裝詳細資料。"</string>
     <string name="tutorial_double_tap_to_zoom_message_short" msgid="4070433208160063538">"輕觸兩下即可控制縮放"</string>
@@ -1425,10 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"拒絕"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"已要求權限"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"帳戶 <xliff:g id="ACCOUNT">%s</xliff:g> 已提出\n權限要求。"</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
-    <!-- no translation found for forward_intent_to_work (621480743856004612) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"您目前並非透過工作設定檔使用這個應用程式"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"您目前透過工作設定檔使用這個應用程式"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"輸入法"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"同步處理"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"協助工具"</string>
@@ -1570,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"接聽電話嗎?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"一律採用"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"僅限一次"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s 不支援工作設定檔"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"平板電腦"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"手機"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"耳機"</string>
@@ -1644,7 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"協助工具已啟用。"</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"協助工具已取消。"</string>
     <string name="user_switched" msgid="3768006783166984410">"目前的使用者是 <xliff:g id="NAME">%1$s</xliff:g>。"</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
+    <!-- no translation found for user_switching_message (2871009331809089783) -->
     <skip />
     <string name="owner_name" msgid="2716755460376028154">"擁有者"</string>
     <string name="error_message_title" msgid="4510373083082500195">"錯誤"</string>
@@ -1777,12 +1772,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"啟動"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"已固定螢幕"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"已取消固定螢幕"</string>
-    <!-- no translation found for lock_to_app_unlock_pin (2552556656504331634) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_pattern (4182192144797225137) -->
-    <skip />
-    <!-- no translation found for lock_to_app_unlock_password (6380979775916974414) -->
-    <skip />
-    <string name="battery_saver_description" msgid="725676363406667978">"節約耗電量功能會降低裝置的效能,並限制震動和大多數背景資料,藉此延長電池續航力。此外,電子郵件、簡訊和其他需要使用同步功能的應用程式若未開啟,將不會自動更新。\n\n當您為裝置充電時,節約耗電量功能會自動關閉。"</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"取消固定時必須輸入 PIN"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"取消固定時必須畫出解鎖圖形"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"取消固定時必須輸入密碼"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"節約耗電量功能會降低裝置的效能,並限制震動和大多數背景資料,藉此延長電池續航力。此外,電子郵件、簡訊和其他需要使用同步功能的應用程式若未開啟,將不會自動更新。\n\n當您為裝置充電時,節約耗電量功能會自動關閉。"</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"直到 <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> 停機時間結束"</string>
 </resources>
diff --git a/core/res/res/values-zu/strings.xml b/core/res/res/values-zu/strings.xml
index 161248b..a84be69 100644
--- a/core/res/res/values-zu/strings.xml
+++ b/core/res/res/values-zu/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"amandla efoni avuliwe noma avaliwe"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Ivumela uhlelo lokusebenza ukuvala noma ukuvula ithebhulethi."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Ivumela uhlelo lokusebenza ukuvula noma ukuvala ifoni."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"setha kabusha ukuphela kwesikhathi sokubonisa"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Ivumela uhlelo lokusebenza ukusetha kabusha ukuphela kwesikhathi sokubonisa."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"sebenzisa kwimodi yokuhlola yemboni"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Sebenzise njengokuhlola komkhiqizi wezinga eliphansi, uvumela ukufinyelela okugcwele ihadiwe yethebhulethi. Itholakala kuphela lapho ithebhulethi isebenza kwimodi yokuhlola yomkhiqizi."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Sebenzise njengokuhlola komkhiqizi wezinga eliphansi, uvumela ukufinyelela okugcwele ihadiwe yefoni. Itholakala kuphela lapho ifoni isebenza kwimodi yokuhlola yomkhiqizi."</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"Yala"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Imvume Iceliwe"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Imvume Iceliwe \n ye-akhawunti <xliff:g id="ACCOUNT">%s</xliff:g>"</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Usebenzisa lolu hlelo lokusebenza ngaphandle kwephrofayela yakho yomsebenzi"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"Usebenzisa lolu hlelo lokusebenza kuphrofayela yakho yomsebenzi"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Indlela yokufakwayo"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Vumelanisaa"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Amukela ucingo?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Njalo"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Kanye nje"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s ayisekeli iphrofayela yomsebenzi"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Ithebulethi"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Ifoni"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Ama-headphone"</string>
@@ -1643,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Ukufinyelela kunikwe amandla."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Ukufinyelela kukhanseliwe."</string>
     <string name="user_switched" msgid="3768006783166984410">"Umsebenzisi wamanje <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (8664390176945256295) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Ishintshela ku-<xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Umnikazi"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Iphutha"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Le nguquko ayivumelekile ngomqondisi wakho"</string>
@@ -1779,6 +1774,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Cela iphinikhodi ngaphambi kokuphina"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Cela iphethini yokuvula ngaphambi kokususa ukuphina"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Cela iphasiwedi ngaphambi kokususa ukuphina"</string>
-    <string name="battery_saver_description" msgid="725676363406667978">"Ukuze usize ukuthuthukisa impilo yebhethri, isilondolozi sebhethri sehlisa ukusebenza kwedivayisi yakho futhi ikhawulele ukudlidliza nedatha eningi yangasemuva. I-imeyili, imilayezo, nezinye izinhlelo zokusebenza ezincike ekuvumelaniseni ingahle ingabuyekezi ngaphandle kokuthi uwavule.\n\nIsilondolozi sebhethri sivala ngokuzenzakalelayo uma idivayisi yakho ishaja"</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Ukuze usize ukwenza kangcono impilo yebhethri, isilondolozi sebhethri sehlisa ukusebenza kwedivayisi yakho futhi sikhawulela ukudlidliza nedatha eningi yangasemuva. I-imeyili, imilayezo, nezinye izinhlelo zokusebenza ezincike ekuvumelaniseni kungenzeka zingabuyekezi ngaphandle kokuthi uzivule.\n\nIsilondolozi sebhethri sivaleka ngokuzenzakalelayo uma idivayisi yakho ishaja."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Kuze kuphele isikhathi sakho ngo-<xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index e88fe0a..d8b129c 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -1012,13 +1012,25 @@
         <!-- The color applied to framework switch thumbs in their normal state. -->
         <attr name="colorSwitchThumbNormal" format="color" />
 
-        <!-- ================== -->
-        <!-- Hardware rendering -->
-        <!-- ================== -->
+        <!-- =================== -->
+        <!-- Lighting properties -->
+        <!-- =================== -->
         <eat-comment />
 
-        <!-- Reference to the Lighting style. -->
-        <attr name="lightingStyle" format="reference" />
+        <!-- @hide The default Y position of the light used to project view shadows. -->
+        <attr name="lightY" format="dimension" />
+
+        <!-- @hide The default Z position of the light used to project view shadows. -->
+        <attr name="lightZ" format="dimension" />
+
+        <!-- @hide The default radius of the light used to project view shadows. -->
+        <attr name="lightRadius" format="dimension" />
+
+        <!-- Alpha value of the ambient shadow projected by elevated views, between 0 and 1. -->
+        <attr name="ambientShadowAlpha" format="float" />
+
+        <!-- Alpha value of the spot shadow projected by elevated views, between 0 and 1. -->
+        <attr name="spotShadowAlpha" format="float" />
     </declare-styleable>
 
     <!-- **************************************************************** -->
@@ -1713,6 +1725,7 @@
         <enum name="KEYCODE_12" value="228" />
         <enum name="KEYCODE_LAST_CHANNEL" value="229" />
         <enum name="KEYCODE_TV_DATA_SERVICE" value="230" />
+        <enum name="KEYCODE_VOICE_ASSIST" value="231" />
     </attr>
 
     <!-- ***************************************************************** -->
@@ -7383,11 +7396,11 @@
 
     <!-- @hide -->
     <declare-styleable name="Lighting">
-        <attr name="lightY" format="dimension" />
-        <attr name="lightZ" format="dimension" />
-        <attr name="lightRadius" format="dimension" />
-        <attr name="ambientShadowAlpha" format="float" />
-        <attr name="spotShadowAlpha" format="float" />
+        <attr name="lightY" />
+        <attr name="lightZ" />
+        <attr name="lightRadius" />
+        <attr name="ambientShadowAlpha" />
+        <attr name="spotShadowAlpha" />
     </declare-styleable>
 
     <declare-styleable name="RestrictionEntry">
diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml
index 0360460..4470fc3 100644
--- a/core/res/res/values/colors.xml
+++ b/core/res/res/values/colors.xml
@@ -130,7 +130,7 @@
     <drawable name="notification_template_divider">#29000000</drawable>
 
     <color name="notification_icon_bg_color">#ff9e9e9e</color>
-    <color name="notification_action_legacy_color_filter">#ff555555</color>
+    <color name="notification_action_color_filter">@color/secondary_text_material_light</color>
 
     <color name="notification_media_action_bg">#00000000</color>
     <color name="notification_media_progress">#FFFFFFFF</color>
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index 6fd2bb1..4e3abb9 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -373,7 +373,7 @@
 
     <!-- Used by SimpleMonthView -->
     <dimen name="datepicker_day_number_size">12sp</dimen>
-    <dimen name="datepicker_month_label_size">16sp</dimen>
+    <dimen name="datepicker_month_label_size">14sp</dimen>
     <dimen name="datepicker_month_day_label_text_size">12sp</dimen>
     <dimen name="datepicker_month_list_item_header_height">48dp</dimen>
     <dimen name="datepicker_day_number_select_circle_radius">16dp</dimen>
@@ -383,9 +383,9 @@
     <dimen name="datepicker_year_label_height">64dp</dimen>
     <dimen name="datepicker_year_label_text_size">22dp</dimen>
     <dimen name="datepicker_component_width">270dp</dimen>
-    <dimen name="datepicker_selected_date_day_size">75dp</dimen>
-    <dimen name="datepicker_selected_date_month_size">30dp</dimen>
-    <dimen name="datepicker_selected_date_year_size">30dp</dimen>
+    <dimen name="datepicker_selected_date_day_size">88dp</dimen>
+    <dimen name="datepicker_selected_date_month_size">24dp</dimen>
+    <dimen name="datepicker_selected_date_year_size">24dp</dimen>
     <dimen name="datepicker_header_height">30dp</dimen>
     <dimen name="datepicker_header_text_size">14dp</dimen>
 
@@ -405,4 +405,11 @@
 
      <dimen name="text_handle_min_size">40dp</dimen>
 
+     <!-- Lighting and shadow properties -->
+     <dimen name="light_y">-200dp</dimen>
+     <dimen name="light_z">800dp</dimen>
+     <dimen name="light_radius">800dp</dimen>
+     <item type="dimen" format="float" name="ambient_shadow_alpha">0.06</item>
+     <item type="dimen" format="float" name="spot_shadow_alpha">0.16</item>
+
 </resources>
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 07874c7..82125fe 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2278,6 +2278,8 @@
   <public type="attr" name="windowSharedElementsUseOverlay" />
   <public type="attr" name="reparent" />
   <public type="attr" name="reparentWithOverlay" />
+  <public type="attr" name="ambientShadowAlpha" />
+  <public type="attr" name="spotShadowAlpha" />
 
   <public-padding type="dimen" name="l_resource_pad" end="0x01050010" />
 
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index bb0be48..4aed037 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -1355,12 +1355,4 @@
         <item name="padding">16dp</item>
     </style>
 
-    <style name="Lighting">
-        <item name="lightY">-200dp</item>
-        <item name="lightZ">800dp</item>
-        <item name="lightRadius">800dp</item>
-        <item name="ambientShadowAlpha">0.06</item>
-        <item name="spotShadowAlpha">0.16</item>
-    </style>
-
 </resources>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 11d712e..d8c29b0 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -1718,7 +1718,7 @@
   <java-symbol type="layout" name="notification_template_material_big_text" />
   <java-symbol type="layout" name="notification_template_icon_group" />
   <java-symbol type="layout" name="notification_material_media_action" />
-  <java-symbol type="color" name="notification_action_legacy_color_filter" />
+  <java-symbol type="color" name="notification_action_color_filter" />
   <java-symbol type="color" name="notification_icon_bg_color" />
   <java-symbol type="drawable" name="notification_icon_legacy_bg" />
   <java-symbol type="drawable" name="notification_material_media_progress" />
@@ -1977,7 +1977,6 @@
   <java-symbol type="string" name="whichEditApplicationNamed" />
   <java-symbol type="string" name="whichSendApplication" />
   <java-symbol type="string" name="whichSendApplicationNamed" />
-  <java-symbol type="attr" name="lightingStyle" />
   <java-symbol type="attr" name="lightY" />
   <java-symbol type="attr" name="lightZ" />
   <java-symbol type="attr" name="lightRadius" />
@@ -1998,4 +1997,5 @@
   <java-symbol type="id" name="transitionTransform" />
   <java-symbol type="id" name="parentMatrix" />
   <java-symbol type="bool" name="config_auto_attach_data_on_creation" />
+  <java-symbol type="id" name="date_picker_month_day_year_layout" />
 </resources>
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index 5445816..48de5ad 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -410,14 +410,19 @@
         <item name="fastScrollPreviewBackgroundLeft">@drawable/menu_submenu_background</item>
         <item name="fastScrollOverlayPosition">floating</item>
         <item name="fastScrollTextColor">@color/primary_text_dark</item>
+
         <!-- Pointer style -->
         <item name="pointerStyle">@style/Pointer</item>
 
-        <!-- Accessibility focused drawable. -->
+        <!-- Accessibility focused drawable -->
         <item name="accessibilityFocusedDrawable">@drawable/view_accessibility_focused</item>
 
-        <!-- Lighting and shadow style. -->
-        <item name="lightingStyle">@style/Lighting</item>
+        <!-- Lighting and shadow properties -->
+        <item name="lightY">@dimen/light_y</item>
+        <item name="lightZ">@dimen/light_z</item>
+        <item name="lightRadius">@dimen/light_radius</item>
+        <item name="ambientShadowAlpha">@dimen/ambient_shadow_alpha</item>
+        <item name="spotShadowAlpha">@dimen/spot_shadow_alpha</item>
     </style>
 
     <!-- Variant of {@link #Theme} with no title bar -->
diff --git a/docs/html/tools/testing/testing_accessibility.jd b/docs/html/tools/testing/testing_accessibility.jd
index daf9b36..20948fa 100644
--- a/docs/html/tools/testing/testing_accessibility.jd
+++ b/docs/html/tools/testing/testing_accessibility.jd
@@ -179,7 +179,7 @@
 </p>
 
 <p>For more information about using TalkBack, see
-<a href="http://support.google.com/nexus/bin/answer.py?hl=en&answer=2700928">Use TalkBack</a>.</p>
+<a href="https://support.google.com/accessibility/android/topic/3529932">TalkBack</a>.</p>
 
 <h4 id="testing-ebt">Testing with Explore by Touch</h4>
 
@@ -207,8 +207,7 @@
 </ol>
 
 <p>For more information about using the Explore by Touch features, see
-<a href="http://support.google.com/nexus/bin/answer.py?hl=en&answer=2700722">Use Explore by
-Touch</a>.</p>
+<a href="https://support.google.com/accessibility/android/answer/6006598">Touch Exploration</a>.</p>
 
 <h3 id="test-navigation">Testing focus navigation</h3>
 
@@ -231,7 +230,7 @@
 
 <p>Gesture navigation is an accessibility navigation mode that allows users to navigate Android
   devices and applications using specific
-  <a href="http://support.google.com/nexus/bin/answer.py?hl=en&answer=2700718">gestures</a>. This
+  <a href="https://support.google.com/accessibility/android/answer/6006598">gestures</a>. This
   navigation mode is available on Android 4.1 (API Level 16) and higher.</p>
 
 <p class="note"><strong>Note:</strong> Accessibility gestures provide a different navigation path
@@ -248,8 +247,7 @@
 </ul>
 
 <p>For more information about using Explore by Touch accessibility gestures, see
-<a href="http://support.google.com/android/bin/topic.py?hl=en&topic=2492346">Accessibility
-gestures</a>.</p>
+<a href="https://support.google.com/accessibility/android/answer/6006598">Touch Exploration</a>.</p>
 
 <p class="note">
   <strong>Note:</strong> Accessibility services other than TalkBack may map accessibility gestures
diff --git a/docs/html/training/location/retrieve-current.jd b/docs/html/training/location/retrieve-current.jd
index 99e475f..f079040 100644
--- a/docs/html/training/location/retrieve-current.jd
+++ b/docs/html/training/location/retrieve-current.jd
@@ -167,13 +167,12 @@
                     "Google Play services is available.");
             // Continue
             return true;
-        // Google Play services was not available for some reason
+        // Google Play services was not available for some reason.
+        // resultCode holds the error code.
         } else {
-            // Get the error code
-            int errorCode = connectionResult.getErrorCode();
             // Get the error dialog from Google Play services
             Dialog errorDialog = GooglePlayServicesUtil.getErrorDialog(
-                    errorCode,
+                    resultCode,
                     this,
                     CONNECTION_FAILURE_RESOLUTION_REQUEST);
 
diff --git a/graphics/java/android/graphics/Bitmap.java b/graphics/java/android/graphics/Bitmap.java
index 4d0bb75..3090ffd8 100644
--- a/graphics/java/android/graphics/Bitmap.java
+++ b/graphics/java/android/graphics/Bitmap.java
@@ -21,6 +21,7 @@
 import android.os.Parcelable;
 import android.os.Trace;
 import android.util.DisplayMetrics;
+import dalvik.system.VMRuntime;
 
 import java.io.OutputStream;
 import java.nio.Buffer;
@@ -122,15 +123,18 @@
         mIsMutable = isMutable;
         mRequestPremultiplied = requestPremultiplied;
         mBuffer = buffer;
+
         // we delete this in our finalizer
         mNativeBitmap = nativeBitmap;
-        mFinalizer = new BitmapFinalizer(nativeBitmap);
 
         mNinePatchChunk = ninePatchChunk;
         mNinePatchInsets = ninePatchInsets;
         if (density >= 0) {
             mDensity = density;
         }
+
+        int nativeAllocationByteCount = buffer == null ? getByteCount() : 0;
+        mFinalizer = new BitmapFinalizer(nativeBitmap, nativeAllocationByteCount);
     }
 
     /**
@@ -1574,8 +1578,17 @@
     private static class BitmapFinalizer {
         private final long mNativeBitmap;
 
-        BitmapFinalizer(long nativeBitmap) {
+        // Native memory allocated for the duration of the Bitmap,
+        // if pixel data allocated into native memory, instead of java byte[]
+        private final int mNativeAllocationByteCount;
+
+        BitmapFinalizer(long nativeBitmap, int nativeAllocationByteCount) {
             mNativeBitmap = nativeBitmap;
+            mNativeAllocationByteCount = nativeAllocationByteCount;
+
+            if (mNativeAllocationByteCount != 0) {
+                VMRuntime.getRuntime().registerNativeAllocation(mNativeAllocationByteCount);
+            }
         }
 
         @Override
@@ -1585,6 +1598,9 @@
             } catch (Throwable t) {
                 // Ignore
             } finally {
+                if (mNativeAllocationByteCount != 0) {
+                    VMRuntime.getRuntime().registerNativeFree(mNativeAllocationByteCount);
+                }
                 nativeDestructor(mNativeBitmap);
             }
         }
diff --git a/graphics/java/android/graphics/drawable/VectorDrawable.java b/graphics/java/android/graphics/drawable/VectorDrawable.java
index 9ac6927..042da5b 100644
--- a/graphics/java/android/graphics/drawable/VectorDrawable.java
+++ b/graphics/java/android/graphics/drawable/VectorDrawable.java
@@ -119,7 +119,7 @@
  * <dd>Defines path string. This is using exactly same format as "d" attribute
  * in the SVG's path data. This is defined in the viewport space.</dd>
  * <dt><code>android:fillColor</code></dt>
- * <dd>Defines the color to fill the path (black if not present).</dd>
+ * <dd>Defines the color to fill the path (none if not present).</dd>
  * <dt><code>android:strokeColor</code></dt>
  * <dd>Defines the color to draw the path outline (none if not present).</dd>
  * <dt><code>android:strokeWidth</code></dt>
@@ -862,7 +862,7 @@
                 }
                 mRenderPath.addPath(path, mFinalPathMatrix);
 
-                if (fullPath.mFillColor != 0) {
+                if (fullPath.mFillColor != Color.TRANSPARENT) {
                     if (mFillPaint == null) {
                         mFillPaint = new Paint();
                         mFillPaint.setColorFilter(mColorFilter);
@@ -873,7 +873,7 @@
                     canvas.drawPath(mRenderPath, mFillPaint);
                 }
 
-                if (fullPath.mStrokeColor != 0) {
+                if (fullPath.mStrokeColor != Color.TRANSPARENT) {
                     if (mStrokePaint == null) {
                         mStrokePaint = new Paint();
                         mStrokePaint.setColorFilter(mColorFilter);
@@ -1237,9 +1237,9 @@
         // Variables below need to be copied (deep copy if applicable) for mutation.
         private int[] mThemeAttrs;
 
-        int mStrokeColor = 0;
+        int mStrokeColor = Color.TRANSPARENT;
         float mStrokeWidth = 0;
-        int mFillColor = Color.BLACK;
+        int mFillColor = Color.TRANSPARENT;
         int mFillRule;
         float mTrimPathStart = 0;
         float mTrimPathEnd = 1;
diff --git a/include/androidfw/ResourceTypes.h b/include/androidfw/ResourceTypes.h
index 1af497c..11568d2 100644
--- a/include/androidfw/ResourceTypes.h
+++ b/include/androidfw/ResourceTypes.h
@@ -954,6 +954,7 @@
         DENSITY_XHIGH = ACONFIGURATION_DENSITY_XHIGH,
         DENSITY_XXHIGH = ACONFIGURATION_DENSITY_XXHIGH,
         DENSITY_XXXHIGH = ACONFIGURATION_DENSITY_XXXHIGH,
+        DENSITY_ANY = ACONFIGURATION_DENSITY_ANY,
         DENSITY_NONE = ACONFIGURATION_DENSITY_NONE
     };
     
diff --git a/libs/androidfw/ResourceTypes.cpp b/libs/androidfw/ResourceTypes.cpp
index 239d682..3f014ef 100644
--- a/libs/androidfw/ResourceTypes.cpp
+++ b/libs/androidfw/ResourceTypes.cpp
@@ -2206,13 +2206,30 @@
 
         if (screenType || o.screenType) {
             if (density != o.density) {
-                // density is tough.  Any density is potentially useful
+                // Use the system default density (DENSITY_MEDIUM, 160dpi) if none specified.
+                const int thisDensity = density ? density : int(ResTable_config::DENSITY_MEDIUM);
+                const int otherDensity = o.density ? o.density : int(ResTable_config::DENSITY_MEDIUM);
+
+                // We always prefer DENSITY_ANY over scaling a density bucket.
+                if (thisDensity == ResTable_config::DENSITY_ANY) {
+                    return true;
+                } else if (otherDensity == ResTable_config::DENSITY_ANY) {
+                    return false;
+                }
+
+                int requestedDensity = requested->density;
+                if (requested->density == 0 ||
+                        requested->density == ResTable_config::DENSITY_ANY) {
+                    requestedDensity = ResTable_config::DENSITY_MEDIUM;
+                }
+
+                // DENSITY_ANY is now dealt with. We should look to
+                // pick a density bucket and potentially scale it.
+                // Any density is potentially useful
                 // because the system will scale it.  Scaling down
                 // is generally better than scaling up.
-                // Default density counts as 160dpi (the system default)
-                // TODO - remove 160 constants
-                int h = (density?density:160);
-                int l = (o.density?o.density:160);
+                int h = thisDensity;
+                int l = otherDensity;
                 bool bImBigger = true;
                 if (l > h) {
                     int t = h;
@@ -2221,17 +2238,16 @@
                     bImBigger = false;
                 }
 
-                int reqValue = (requested->density?requested->density:160);
-                if (reqValue >= h) {
+                if (requestedDensity >= h) {
                     // requested value higher than both l and h, give h
                     return bImBigger;
                 }
-                if (l >= reqValue) {
+                if (l >= requestedDensity) {
                     // requested value lower than both l and h, give l
                     return !bImBigger;
                 }
                 // saying that scaling down is 2x better than up
-                if (((2 * l) - reqValue) * h > reqValue * reqValue) {
+                if (((2 * l) - requestedDensity) * h > requestedDensity * requestedDensity) {
                     return !bImBigger;
                 } else {
                     return bImBigger;
@@ -2702,6 +2718,9 @@
             case ResTable_config::DENSITY_NONE:
                 res.append("nodpi");
                 break;
+            case ResTable_config::DENSITY_ANY:
+                res.append("anydpi");
+                break;
             default:
                 res.appendFormat("%ddpi", dtohs(density));
                 break;
diff --git a/libs/androidfw/tests/Android.mk b/libs/androidfw/tests/Android.mk
index 4ff6eec..a10c387 100644
--- a/libs/androidfw/tests/Android.mk
+++ b/libs/androidfw/tests/Android.mk
@@ -21,8 +21,9 @@
 LOCAL_PATH:= $(call my-dir)
 testFiles := \
     ByteBucketArray_test.cpp \
+    Config_test.cpp \
+    ConfigLocale_test.cpp \
     Idmap_test.cpp \
-    ResourceTypes_test.cpp \
     ResTable_test.cpp \
     Split_test.cpp \
     TypeWrappers_test.cpp \
diff --git a/libs/androidfw/tests/ResourceTypes_test.cpp b/libs/androidfw/tests/ConfigLocale_test.cpp
similarity index 90%
rename from libs/androidfw/tests/ResourceTypes_test.cpp
rename to libs/androidfw/tests/ConfigLocale_test.cpp
index f00a2d9..4999594 100644
--- a/libs/androidfw/tests/ResourceTypes_test.cpp
+++ b/libs/androidfw/tests/ConfigLocale_test.cpp
@@ -21,7 +21,7 @@
 #include <gtest/gtest.h>
 namespace android {
 
-TEST(ResourceTypesTest, ResourceConfig_packAndUnpack2LetterLanguage) {
+TEST(ConfigLocaleTest, packAndUnpack2LetterLanguage) {
      ResTable_config config;
      config.packLanguage("en");
 
@@ -44,7 +44,7 @@
      EXPECT_EQ(0, out[3]);
 }
 
-TEST(ResourceTypesTest, ResourceConfig_packAndUnpack2LetterRegion) {
+TEST(ConfigLocaleTest, packAndUnpack2LetterRegion) {
      ResTable_config config;
      config.packRegion("US");
 
@@ -59,7 +59,7 @@
      EXPECT_EQ(0, out[3]);
 }
 
-TEST(ResourceTypesTest, ResourceConfig_packAndUnpack3LetterLanguage) {
+TEST(ConfigLocaleTest, packAndUnpack3LetterLanguage) {
      ResTable_config config;
      config.packLanguage("eng");
 
@@ -75,7 +75,7 @@
      EXPECT_EQ(0, out[3]);
 }
 
-TEST(ResourceTypesTest, ResourceConfig_packAndUnpack3LetterLanguageAtOffset16) {
+TEST(ConfigLocaleTest, packAndUnpack3LetterLanguageAtOffset16) {
      ResTable_config config;
      config.packLanguage("tgp");
 
@@ -88,8 +88,8 @@
      // which is equivalent to:
      // 1  [0]   [1]   [2]
      // 1-01111-00110-10011
-     EXPECT_EQ(0xbc, config.language[0]);
-     EXPECT_EQ(0xd3, config.language[1]);
+     EXPECT_EQ(char(0xbc), config.language[0]);
+     EXPECT_EQ(char(0xd3), config.language[1]);
 
      char out[4] = { 1, 1, 1, 1};
      config.unpackLanguage(out);
@@ -99,7 +99,7 @@
      EXPECT_EQ(0, out[3]);
 }
 
-TEST(ResourceTypesTest, ResourceConfig_packAndUnpack3LetterRegion) {
+TEST(ConfigLocaleTest, packAndUnpack3LetterRegion) {
      ResTable_config config;
      config.packRegion("419");
 
@@ -131,7 +131,7 @@
      }
 }
 
-TEST(ResourceTypesTest, IsMoreSpecificThan) {
+TEST(ConfigLocaleTest, IsMoreSpecificThan) {
     ResTable_config l;
     ResTable_config r;
 
@@ -170,7 +170,7 @@
     EXPECT_TRUE(r.isMoreSpecificThan(l));
 }
 
-TEST(ResourceTypesTest, setLocale) {
+TEST(ConfigLocaleTest, setLocale) {
     ResTable_config test;
     test.setBcp47Locale("en-US");
     EXPECT_EQ('e', test.language[0]);
diff --git a/libs/androidfw/tests/Config_test.cpp b/libs/androidfw/tests/Config_test.cpp
new file mode 100644
index 0000000..ef30df4
--- /dev/null
+++ b/libs/androidfw/tests/Config_test.cpp
@@ -0,0 +1,103 @@
+/*
+ * Copyright (C) 2014 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 <androidfw/ResourceTypes.h>
+#include <utils/Log.h>
+#include <utils/String8.h>
+#include <utils/Vector.h>
+
+#include "TestHelpers.h"
+#include <gtest/gtest.h>
+
+namespace android {
+
+static ResTable_config selectBest(const ResTable_config& target,
+        const Vector<ResTable_config>& configs) {
+    ResTable_config bestConfig;
+    memset(&bestConfig, 0, sizeof(bestConfig));
+    const size_t configCount = configs.size();
+    for (size_t i = 0; i < configCount; i++) {
+        const ResTable_config& thisConfig = configs[i];
+        if (!thisConfig.match(target)) {
+            continue;
+        }
+
+        if (thisConfig.isBetterThan(bestConfig, &target)) {
+            bestConfig = thisConfig;
+        }
+    }
+    return bestConfig;
+}
+
+static ResTable_config buildDensityConfig(int density) {
+    ResTable_config config;
+    memset(&config, 0, sizeof(config));
+    config.density = uint16_t(density);
+    config.sdkVersion = 4;
+    return config;
+}
+
+TEST(ConfigTest, shouldSelectBestDensity) {
+    ResTable_config deviceConfig;
+    memset(&deviceConfig, 0, sizeof(deviceConfig));
+    deviceConfig.density = ResTable_config::DENSITY_XHIGH;
+    deviceConfig.sdkVersion = 21;
+
+    Vector<ResTable_config> configs;
+
+    ResTable_config expectedBest = buildDensityConfig(ResTable_config::DENSITY_HIGH);
+    configs.add(expectedBest);
+    ASSERT_EQ(expectedBest, selectBest(deviceConfig, configs));
+
+    expectedBest = buildDensityConfig(ResTable_config::DENSITY_XXHIGH);
+    configs.add(expectedBest);
+    ASSERT_EQ(expectedBest, selectBest(deviceConfig, configs));
+
+    expectedBest = buildDensityConfig(int(ResTable_config::DENSITY_XXHIGH) - 20);
+    configs.add(expectedBest);
+    ASSERT_EQ(expectedBest, selectBest(deviceConfig, configs));
+
+    configs.add(buildDensityConfig(int(ResTable_config::DENSITY_HIGH) + 20));
+    ASSERT_EQ(expectedBest, selectBest(deviceConfig, configs));
+
+    expectedBest = buildDensityConfig(ResTable_config::DENSITY_XHIGH);
+    configs.add(expectedBest);
+    ASSERT_EQ(expectedBest, selectBest(deviceConfig, configs));
+
+    expectedBest = buildDensityConfig(ResTable_config::DENSITY_ANY);
+    expectedBest.sdkVersion = 21;
+    configs.add(expectedBest);
+    ASSERT_EQ(expectedBest, selectBest(deviceConfig, configs));
+}
+
+TEST(ConfigTest, shouldSelectBestDensityWhenNoneSpecified) {
+    ResTable_config deviceConfig;
+    memset(&deviceConfig, 0, sizeof(deviceConfig));
+    deviceConfig.sdkVersion = 21;
+
+    Vector<ResTable_config> configs;
+    configs.add(buildDensityConfig(ResTable_config::DENSITY_HIGH));
+
+    ResTable_config expectedBest = buildDensityConfig(ResTable_config::DENSITY_MEDIUM);
+    configs.add(expectedBest);
+    ASSERT_EQ(expectedBest, selectBest(deviceConfig, configs));
+
+    expectedBest = buildDensityConfig(ResTable_config::DENSITY_ANY);
+    configs.add(expectedBest);
+    ASSERT_EQ(expectedBest, selectBest(deviceConfig, configs));
+}
+
+}  // namespace android.
diff --git a/libs/androidfw/tests/TestHelpers.h b/libs/androidfw/tests/TestHelpers.h
index 75a233a..fe2e5ce 100644
--- a/libs/androidfw/tests/TestHelpers.h
+++ b/libs/androidfw/tests/TestHelpers.h
@@ -3,6 +3,7 @@
 
 #include <ostream>
 
+#include <androidfw/ResourceTypes.h>
 #include <utils/String8.h>
 #include <utils/String16.h>
 
@@ -14,4 +15,16 @@
     return out << android::String8(str).string();
 }
 
+namespace android {
+
+static inline bool operator==(const android::ResTable_config& a, const android::ResTable_config& b) {
+    return memcmp(&a, &b, sizeof(a)) == 0;
+}
+
+static inline ::std::ostream& operator<<(::std::ostream& out, const android::ResTable_config& c) {
+    return out << c.toString().string();
+}
+
+} // namespace android
+
 #endif // __TEST_HELPERS_H
diff --git a/libs/hwui/DisplayListRenderer.h b/libs/hwui/DisplayListRenderer.h
index 7350082..e9c937cb 100644
--- a/libs/hwui/DisplayListRenderer.h
+++ b/libs/hwui/DisplayListRenderer.h
@@ -215,11 +215,17 @@
         if (!paint) return NULL;
 
         const SkPaint* paintCopy = mPaintMap.valueFor(paint);
-        if (paintCopy == NULL || paintCopy->getGenerationID() != paint->getGenerationID()) {
-            paintCopy = new SkPaint(*paint);
+        if (paintCopy == NULL
+                || paintCopy->getGenerationID() != paint->getGenerationID()
+                // We can't compare shader pointers because that will always
+                // change as we do partial copying via wrapping. However, if the
+                // shader changes the paint generationID will have changed and
+                // so we don't hit this comparison anyway
+                || !(paint->getShader() && paintCopy->getShader()
+                        && paint->getShader()->getGenerationID() == paintCopy->getShader()->getGenerationID())) {
+            paintCopy = copyPaint(paint);
             // replaceValueFor() performs an add if the entry doesn't exist
             mPaintMap.replaceValueFor(paint, paintCopy);
-            mDisplayListData->paints.add(paintCopy);
         }
 
         return paintCopy;
@@ -228,8 +234,15 @@
     inline SkPaint* copyPaint(const SkPaint* paint) {
         if (!paint) return NULL;
         SkPaint* paintCopy = new SkPaint(*paint);
+        if (paint->getShader()) {
+            SkShader* shaderCopy = SkShader::CreateLocalMatrixShader(
+                    paint->getShader(), paint->getShader()->getLocalMatrix());
+            paintCopy->setShader(shaderCopy);
+            paintCopy->setGenerationID(paint->getGenerationID());
+            shaderCopy->setGenerationID(paint->getShader()->getGenerationID());
+            shaderCopy->unref();
+        }
         mDisplayListData->paints.add(paintCopy);
-
         return paintCopy;
     }
 
diff --git a/libs/hwui/Layer.cpp b/libs/hwui/Layer.cpp
index 8639ae1..e6bc4db 100644
--- a/libs/hwui/Layer.cpp
+++ b/libs/hwui/Layer.cpp
@@ -54,9 +54,11 @@
     convexMask = NULL;
     caches.resourceCache.incrementRefcount(this);
     rendererLightPosDirty = true;
+    renderState.registerLayer(this);
 }
 
 Layer::~Layer() {
+    renderState.unregisterLayer(this);
     SkSafeUnref(colorFilter);
     removeFbo();
     deleteTexture();
diff --git a/libs/hwui/RenderState.cpp b/libs/hwui/RenderState.cpp
index 97f379d..50b8f39 100644
--- a/libs/hwui/RenderState.cpp
+++ b/libs/hwui/RenderState.cpp
@@ -34,6 +34,10 @@
     mCaches->init();
 }
 
+void RenderState::onGLContextDestroyed() {
+    LOG_ALWAYS_FATAL_IF(!mActiveLayers.empty(), "layers have survived gl context destruction");
+}
+
 void RenderState::setViewport(GLsizei width, GLsizei height) {
     mViewportWidth = width;
     mViewportHeight = height;
diff --git a/libs/hwui/RenderState.h b/libs/hwui/RenderState.h
index f7116e2..cd71c73 100644
--- a/libs/hwui/RenderState.h
+++ b/libs/hwui/RenderState.h
@@ -16,6 +16,7 @@
 #ifndef RENDERSTATE_H
 #define RENDERSTATE_H
 
+#include <set>
 #include <GLES2/gl2.h>
 #include <GLES2/gl2ext.h>
 
@@ -37,6 +38,7 @@
     PREVENT_COPY_AND_ASSIGN(RenderState);
 public:
     void onGLContextCreated();
+    void onGLContextDestroyed();
 
     void setViewport(GLsizei width, GLsizei height);
     void getViewport(GLsizei* outWidth, GLsizei* outHeight);
@@ -48,6 +50,13 @@
 
     void debugOverdraw(bool enable, bool clear);
 
+    void registerLayer(const Layer* layer) {
+        mActiveLayers.insert(layer);
+    }
+    void unregisterLayer(const Layer* layer) {
+        mActiveLayers.erase(layer);
+    }
+
 private:
     friend class renderthread::RenderThread;
 
@@ -58,6 +67,7 @@
     ~RenderState();
 
     Caches* mCaches;
+    std::set<const Layer*> mActiveLayers;
 
     GLsizei mViewportWidth;
     GLsizei mViewportHeight;
diff --git a/libs/hwui/SpotShadow.cpp b/libs/hwui/SpotShadow.cpp
index cb20a0b..2178cc7 100644
--- a/libs/hwui/SpotShadow.cpp
+++ b/libs/hwui/SpotShadow.cpp
@@ -647,7 +647,7 @@
     if (lightToPolyZ != 0) {
         // If any caster's vertex is almost above the light, we just keep it as 95%
         // of the height of the light.
-        ratioZ = MathUtils::min(polyVertex.z / lightToPolyZ, CASTER_Z_CAP_RATIO);
+        ratioZ = MathUtils::clamp(polyVertex.z / lightToPolyZ, 0.0f, CASTER_Z_CAP_RATIO);
     }
 
     outline.x = polyVertex.x - ratioZ * (lightCenter.x - polyVertex.x);
@@ -669,6 +669,10 @@
 void SpotShadow::createSpotShadow(bool isCasterOpaque, const Vector3& lightCenter,
         float lightSize, const Vector3* poly, int polyLength, const Vector3& polyCentroid,
         VertexBuffer& shadowTriangleStrip) {
+    if (CC_UNLIKELY(lightCenter.z <= 0)) {
+        ALOGW("Relative Light Z is not positive. No spot shadow!");
+        return;
+    }
     OutlineData outlineData[polyLength];
     Vector2 outlineCentroid;
     // Calculate the projected outline for each polygon's vertices from the light center.
@@ -787,7 +791,7 @@
         // The ratio can be simulated by using the inverse of maximum of ratioVI for
         // all (V).
         distOutline = (outlineData[i].position - outlineCentroid).length();
-        if (distOutline == 0) {
+        if (CC_UNLIKELY(distOutline == 0)) {
             // If the outline has 0 area, then there is no spot shadow anyway.
             ALOGW("Outline has 0 area, no spot shadow!");
             return;
diff --git a/libs/hwui/renderthread/EglManager.cpp b/libs/hwui/renderthread/EglManager.cpp
index 05ca34d..37f8e60 100644
--- a/libs/hwui/renderthread/EglManager.cpp
+++ b/libs/hwui/renderthread/EglManager.cpp
@@ -214,6 +214,7 @@
         Caches::getInstance().terminate();
     }
 
+    mRenderThread.renderState().onGLContextDestroyed();
     eglDestroyContext(mEglDisplay, mEglContext);
     eglDestroySurface(mEglDisplay, mPBufferSurface);
     eglMakeCurrent(mEglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
diff --git a/libs/hwui/utils/MathUtils.h b/libs/hwui/utils/MathUtils.h
index 00448b8..d89859b 100644
--- a/libs/hwui/utils/MathUtils.h
+++ b/libs/hwui/utils/MathUtils.h
@@ -76,6 +76,11 @@
         return a < b ? a : b;
     }
 
+    template<typename T>
+    static inline T clamp(T a, T minValue, T maxValue) {
+        return min(max(a, minValue), maxValue);
+    }
+
     inline static float lerp(float v1, float v2, float t) {
         return v1 + ((v2 - v1) * t);
     }
diff --git a/media/java/android/media/tv/TvContentRating.java b/media/java/android/media/tv/TvContentRating.java
index 93622ab..bbf7399 100644
--- a/media/java/android/media/tv/TvContentRating.java
+++ b/media/java/android/media/tv/TvContentRating.java
@@ -692,7 +692,7 @@
  *     </tr>
  *     <tr>
  *         <td valign="top" rowspan="5">GR_TV</td>
- *         <td>GR_TV_all</td>
+ *         <td>GR_TV_ALL</td>
  *         <td>Suitable for all ages</td>
  *     </tr>
  *     <tr>
@@ -794,7 +794,7 @@
  *         <td>Suitable for all ages</td>
  *     </tr>
  *     <tr>
- *         <td>IE_TV_Ch</td>
+ *         <td>IE_TV_CH</td>
  *         <td>Suitable for children ages 5 to 10, may contain comedic violence or action fantasy
  *         violence</td>
  *     </tr>
@@ -841,7 +841,7 @@
  *         <td>Unrestricted public exhibition</td>
  *     </tr>
  *     <tr>
- *         <td>IN_TV_U/A</td>
+ *         <td>IN_TV_U_A</td>
  *         <td>Unrestricted public exhibition, but with a caution regarding parental guidance to
  *         those under 12 years of age</td>
  *     </tr>
@@ -885,7 +885,7 @@
  *     </tr>
  *     <tr>
  *         <td valign="top" rowspan="5">KR_TV</td>
- *         <td>KR_TV_All</td>
+ *         <td>KR_TV_ALL</td>
  *         <td>Appropriate for all ages</td>
  *     </tr>
  *     <tr>
@@ -921,7 +921,7 @@
  *         <td>Parental guidance is required unaccompanied children</td>
  *     </tr>
  *     <tr>
- *         <td>MV_TV_PG-12</td>
+ *         <td>MV_TV_PG_12</td>
  *         <td>Parental guidance is required for children under the age of 12</td>
  *     </tr>
  *     <tr>
@@ -956,7 +956,7 @@
  *         and mild language</td>
  *     </tr>
  *     <tr>
- *         <td>MX_TV_B-15</td>
+ *         <td>MX_TV_B_15</td>
  *         <td>Designed for ages 15 and up, slightly more intensive than the 'A' and 'B' ratings
  *         </td>
  *     </tr>
diff --git a/media/java/android/media/tv/TvView.java b/media/java/android/media/tv/TvView.java
index 7110db9..017645a 100644
--- a/media/java/android/media/tv/TvView.java
+++ b/media/java/android/media/tv/TvView.java
@@ -305,7 +305,7 @@
                 mSessionCallback.mTuneParams = params;
             }
         } else {
-            reset();
+            resetInternal();
             // When createSession() is called multiple times before the callback is called,
             // only the callback of the last createSession() call will be actually called back.
             // The previous callbacks will be ignored. For the logic, mSessionCallback
@@ -328,6 +328,10 @@
                 sMainTvView = NULL_TV_VIEW;
             }
         }
+        resetInternal();
+    }
+
+    private void resetInternal() {
         if (mSession != null) {
             release();
             resetSurfaceView();
@@ -858,6 +862,7 @@
                     mSession.setStreamVolume(mStreamVolume);
                 }
             } else {
+                mSessionCallback = null;
                 if (mListener != null) {
                     mListener.onConnectionFailed(mInputId);
                 }
@@ -869,6 +874,8 @@
             if (this != mSessionCallback) {
                 return;
             }
+            mOverlayViewCreated = false;
+            mOverlayViewFrame = null;
             mSessionCallback = null;
             mSession = null;
             if (mListener != null) {
diff --git a/packages/Keyguard/res/values-ar/strings.xml b/packages/Keyguard/res/values-ar/strings.xml
index 59c0ff5..f04cb2f 100644
--- a/packages/Keyguard/res/values-ar/strings.xml
+++ b/packages/Keyguard/res/values-ar/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"تم إلغاء التشغيل"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"أسقط <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> للحذف."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"لن يتم حذف <xliff:g id="WIDGET_INDEX">%1$s</xliff:g>."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"تم ضبط التنبيه التالي على <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ب ت ث"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-bg/strings.xml b/packages/Keyguard/res/values-bg/strings.xml
index 59584d8..6b21310 100644
--- a/packages/Keyguard/res/values-bg/strings.xml
+++ b/packages/Keyguard/res/values-bg/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Стартирането е анулирано"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"Пуснете <xliff:g id="WIDGET_INDEX">%1$s</xliff:g>, за да изтриете."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g> няма да се изтрие."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Следващият будилник е зададен за <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"АБВ"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-ca/strings.xml b/packages/Keyguard/res/values-ca/strings.xml
index 88adb0f..02fa9c3 100644
--- a/packages/Keyguard/res/values-ca/strings.xml
+++ b/packages/Keyguard/res/values-ca/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"S\'ha cancel·lat l\'inici"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"Deixa anar <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> per suprimir-lo."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"No se suprimirà <xliff:g id="WIDGET_INDEX">%1$s</xliff:g>."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"S\'ha definit la pròxima alarma per a les: <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-cs/strings.xml b/packages/Keyguard/res/values-cs/strings.xml
index 32dbae9..870bf23 100644
--- a/packages/Keyguard/res/values-cs/strings.xml
+++ b/packages/Keyguard/res/values-cs/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Spuštění zrušeno"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"Uvolněním dotyku widget <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> vymažete."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"Widget <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> nebude vymazán."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Další budík je nastaven na <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"Alt"</string>
diff --git a/packages/Keyguard/res/values-en-rGB/strings.xml b/packages/Keyguard/res/values-en-rGB/strings.xml
index 2eac226..15b00db 100644
--- a/packages/Keyguard/res/values-en-rGB/strings.xml
+++ b/packages/Keyguard/res/values-en-rGB/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Launch cancelled"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"Drop <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> to delete."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g> will not be deleted."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Next alarm set for <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-en-rIN/strings.xml b/packages/Keyguard/res/values-en-rIN/strings.xml
index 2eac226..15b00db 100644
--- a/packages/Keyguard/res/values-en-rIN/strings.xml
+++ b/packages/Keyguard/res/values-en-rIN/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Launch cancelled"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"Drop <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> to delete."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g> will not be deleted."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Next alarm set for <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-et-rEE/strings.xml b/packages/Keyguard/res/values-et-rEE/strings.xml
index 96af27c..ce20dad 100644
--- a/packages/Keyguard/res/values-et-rEE/strings.xml
+++ b/packages/Keyguard/res/values-et-rEE/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Käivitamine on tühistatud"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"Kustutamiseks laske vidin <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> lahti."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"Vidinat <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> ei kustutata."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Järgmine alarm on määratud ajaks <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-eu-rES/strings.xml b/packages/Keyguard/res/values-eu-rES/strings.xml
index 0093ffd..f888e56 100644
--- a/packages/Keyguard/res/values-eu-rES/strings.xml
+++ b/packages/Keyguard/res/values-eu-rES/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Abiaraztea bertan behera utzi da"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"Ezabatzeko, jaregin <xliff:g id="WIDGET_INDEX">%1$s</xliff:g>."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"Ez da <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> ezabatuko."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Hurrengo alarmak ordu honetan joko du: <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-fi/strings.xml b/packages/Keyguard/res/values-fi/strings.xml
index 5e3e0cb..c72239a 100644
--- a/packages/Keyguard/res/values-fi/strings.xml
+++ b/packages/Keyguard/res/values-fi/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Käynnistys peruutettu"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"Poista <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> pudottamalla."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"Kohdetta <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> ei poisteta."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Seuraava hälytys asetettu: <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-fr/strings.xml b/packages/Keyguard/res/values-fr/strings.xml
index 6daf48b..bd750b6 100644
--- a/packages/Keyguard/res/values-fr/strings.xml
+++ b/packages/Keyguard/res/values-fr/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Lancement annulé."</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"Relâchez le widget \"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g>\" pour le supprimer."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"Le widget \"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g>\" ne va pas être supprimé."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Prochaine alarme définie à <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-hi/strings.xml b/packages/Keyguard/res/values-hi/strings.xml
index b69a0c0..423c2765 100644
--- a/packages/Keyguard/res/values-hi/strings.xml
+++ b/packages/Keyguard/res/values-hi/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"लॉन्‍च रद्द कर दिया गया"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"हटाने के लिए <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> खींचें."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g> को नहीं हटाया जाएगा."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"अगला अलार्म <xliff:g id="ALARM">%1$s</xliff:g> के लिए सेट किया गया"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-hr/strings.xml b/packages/Keyguard/res/values-hr/strings.xml
index 6ac9ff78..c44d106 100644
--- a/packages/Keyguard/res/values-hr/strings.xml
+++ b/packages/Keyguard/res/values-hr/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Pokretanje je otkazano"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"Ispustite widget <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> da biste ga izbrisali."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"Widget <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> neće se izbrisati."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Sljedeći alarm postavljen za <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-hu/strings.xml b/packages/Keyguard/res/values-hu/strings.xml
index dec02f8..6b04caa 100644
--- a/packages/Keyguard/res/values-hu/strings.xml
+++ b/packages/Keyguard/res/values-hu/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Indítás törölve"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"Engedje el a(z) <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> törléséhez."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"A(z) <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> nem lesz törölve."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"A következő riasztás beállított ideje: <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-hy-rAM/strings.xml b/packages/Keyguard/res/values-hy-rAM/strings.xml
index 604445e..7db59f0 100644
--- a/packages/Keyguard/res/values-hy-rAM/strings.xml
+++ b/packages/Keyguard/res/values-hy-rAM/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Գործարկումը չեղարկվեց"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g> վիջեթը ջնջելու համար բաց թողեք այն այստեղ:"</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g> վիջեթը չի ջնջվի:"</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Հաջորդ զարթուցիչը դրված է <xliff:g id="ALARM">%1$s</xliff:g>-ի վրա"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-in/strings.xml b/packages/Keyguard/res/values-in/strings.xml
index 4a61929..ba2be57 100644
--- a/packages/Keyguard/res/values-in/strings.xml
+++ b/packages/Keyguard/res/values-in/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Peluncuran dibatalkan"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"Jatuhkan <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> untuk menghapus."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g> tidak akan dihapus."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Alarm berikutnya disetel untuk <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-iw/strings.xml b/packages/Keyguard/res/values-iw/strings.xml
index 3b05a06..52747cb 100644
--- a/packages/Keyguard/res/values-iw/strings.xml
+++ b/packages/Keyguard/res/values-iw/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"ההפעלה בוטלה"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"שחרר את <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> למחיקה."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g> לא יימחק."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"ההתראה הבאה נקבעה לשעה <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"אבג"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-ja/strings.xml b/packages/Keyguard/res/values-ja/strings.xml
index e9e4a1d..2b9bda90 100644
--- a/packages/Keyguard/res/values-ja/strings.xml
+++ b/packages/Keyguard/res/values-ja/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"起動をキャンセルしました"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"削除するには<xliff:g id="WIDGET_INDEX">%1$s</xliff:g>をドロップしてください。"</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g>は削除されません。"</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"次のアラームは<xliff:g id="ALARM">%1$s</xliff:g>に設定されました"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-ka-rGE/strings.xml b/packages/Keyguard/res/values-ka-rGE/strings.xml
index 02ea6ca..dbf4939 100644
--- a/packages/Keyguard/res/values-ka-rGE/strings.xml
+++ b/packages/Keyguard/res/values-ka-rGE/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"გამოძახება გაუქმდა"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"ჩააგდეთ <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> წასაშლელად."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g> არ წაიშლება."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"შემდეგი მაღვიძარა დაყენებულია <xliff:g id="ALARM">%1$s</xliff:g>-ზე"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-kk-rKZ/strings.xml b/packages/Keyguard/res/values-kk-rKZ/strings.xml
index 311dc49..2d4c737 100644
--- a/packages/Keyguard/res/values-kk-rKZ/strings.xml
+++ b/packages/Keyguard/res/values-kk-rKZ/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Қосу тоқтатылды"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g> жою үшін тастаңыз"</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g> жойылмайды."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Келесі дабыл <xliff:g id="ALARM">%1$s</xliff:g> уақытына орнатылған"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-km-rKH/strings.xml b/packages/Keyguard/res/values-km-rKH/strings.xml
index 366c654..b21d713 100644
--- a/packages/Keyguard/res/values-km-rKH/strings.xml
+++ b/packages/Keyguard/res/values-km-rKH/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"បាន​បោះបង់​ការ​ចាប់ផ្ដើម"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"ទម្លាក់ <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> ដើម្បី​លុប។"</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g> នឹង​មិន​ត្រូវ​បាន​លុប​។"</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"ការ​ជូន​ដំណឹង​បន្ទាប់​កំណត់​សម្រាប់ <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-ko/strings.xml b/packages/Keyguard/res/values-ko/strings.xml
index 52d97e3..d7434a1 100644
--- a/packages/Keyguard/res/values-ko/strings.xml
+++ b/packages/Keyguard/res/values-ko/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"실행 취소됨"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"삭제하려면 <xliff:g id="WIDGET_INDEX">%1$s</xliff:g>을(를) 드롭합니다."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g>은(는) 삭제되지 않습니다."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"다음 알람이 <xliff:g id="ALARM">%1$s</xliff:g>(으)로 설정되었습니다."</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-ky-rKG/strings.xml b/packages/Keyguard/res/values-ky-rKG/strings.xml
index ed0f3fb..391d08a 100644
--- a/packages/Keyguard/res/values-ky-rKG/strings.xml
+++ b/packages/Keyguard/res/values-ky-rKG/strings.xml
@@ -79,8 +79,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Жүргүзүү токтотулду"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g> жок кылыш үчүн, түшүрүңүз."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g> жок кылынбайт."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Кийинки ойготкуч саат <xliff:g id="ALARM">%1$s</xliff:g> коюлган"</string>
     <!-- no translation found for password_keyboard_label_symbol_key (992280756256536042) -->
     <skip />
     <!-- no translation found for password_keyboard_label_alpha_key (8001096175167485649) -->
diff --git a/packages/Keyguard/res/values-lo-rLA/strings.xml b/packages/Keyguard/res/values-lo-rLA/strings.xml
index 01764fd..ecad431 100644
--- a/packages/Keyguard/res/values-lo-rLA/strings.xml
+++ b/packages/Keyguard/res/values-lo-rLA/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"ການເປີດໃຊ້ຖືກຍົກເລີກ"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"ວາງ <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> ເພື່ອລຶບ."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g> ຈະບໍ່ຖືກລຶບອອກ"</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"​ໂມງ​ປຸກ​ຕໍ່​ໄປ​ຖືກ​ຕັ້ງ​ໄວ້​ເວ​ລາ <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-lt/strings.xml b/packages/Keyguard/res/values-lt/strings.xml
index 75377ba..8f56619 100644
--- a/packages/Keyguard/res/values-lt/strings.xml
+++ b/packages/Keyguard/res/values-lt/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Paleidimas atšauktas"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"Paleiskite „<xliff:g id="WIDGET_INDEX">%1$s</xliff:g>“, kad jį ištrintumėte."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"„<xliff:g id="WIDGET_INDEX">%1$s</xliff:g>“ nebus ištrintas."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Kitas nustatytas signalas: <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-lv/strings.xml b/packages/Keyguard/res/values-lv/strings.xml
index 5e26b305..1596a7a 100644
--- a/packages/Keyguard/res/values-lv/strings.xml
+++ b/packages/Keyguard/res/values-lv/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Palaišana atcelta"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"Velciet logrīku <xliff:g id="WIDGET_INDEX">%1$s</xliff:g>, lai to izdzēstu."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"Logrīks <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> netiks izdzēsts."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Signāls iestatīts uz: <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-mk-rMK/strings.xml b/packages/Keyguard/res/values-mk-rMK/strings.xml
index f3e2d58..688e97b 100644
--- a/packages/Keyguard/res/values-mk-rMK/strings.xml
+++ b/packages/Keyguard/res/values-mk-rMK/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Стартувањето е откажано"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"Пушти го <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> да се избрише."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g> нема да се избрише."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Следниот аларм е поставен за <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"АБВ"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-ms-rMY/strings.xml b/packages/Keyguard/res/values-ms-rMY/strings.xml
index eea2d342..fcf6518 100644
--- a/packages/Keyguard/res/values-ms-rMY/strings.xml
+++ b/packages/Keyguard/res/values-ms-rMY/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Pelancaran dibatalkan"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"Jatuhkan <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> untuk memadam."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g> tidak akan dipadamkan."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Penggera seterusnya ditetapkan untuk <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-ne-rNP/strings.xml b/packages/Keyguard/res/values-ne-rNP/strings.xml
index 5db1b05..0906ff4 100644
--- a/packages/Keyguard/res/values-ne-rNP/strings.xml
+++ b/packages/Keyguard/res/values-ne-rNP/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"सुरुवात रद्द गरियो"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"मेट्नको लागि <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> ड्रप गर्नुहोस्"</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g> मेटिने छैन।"</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"<xliff:g id="ALARM">%1$s</xliff:g> को लागि अर्को चेतावनी सेट"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?१२३"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-pl/strings.xml b/packages/Keyguard/res/values-pl/strings.xml
index a00fc87..f879573 100644
--- a/packages/Keyguard/res/values-pl/strings.xml
+++ b/packages/Keyguard/res/values-pl/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Uruchomienie anulowane"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"Upuść <xliff:g id="WIDGET_INDEX">%1$s</xliff:g>, by usunąć."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g> nie zostanie usunięty."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Następny alarm ustawiono na <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-pt/strings.xml b/packages/Keyguard/res/values-pt/strings.xml
index 144d036..3d30218 100644
--- a/packages/Keyguard/res/values-pt/strings.xml
+++ b/packages/Keyguard/res/values-pt/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Inicialização cancelada"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"Solte <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> para excluir."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g> não será excluído."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Próximo alarme definido para <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-ru/strings.xml b/packages/Keyguard/res/values-ru/strings.xml
index c054ad2..7f31008 100644
--- a/packages/Keyguard/res/values-ru/strings.xml
+++ b/packages/Keyguard/res/values-ru/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Запуск отменен."</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"Отпустите виджет \"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g>\", чтобы удалить его."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"Виджет \"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g>\" не будет удален."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Будильник сработает в <xliff:g id="ALARM">%1$s</xliff:g>."</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"АБВ"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-si-rLK/strings.xml b/packages/Keyguard/res/values-si-rLK/strings.xml
index f5ec462..e99c488 100644
--- a/packages/Keyguard/res/values-si-rLK/strings.xml
+++ b/packages/Keyguard/res/values-si-rLK/strings.xml
@@ -80,8 +80,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"දියත් කිරීම අවලංගු කර ඇත"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"මැකීමට <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> හෙලන්න."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g> මකා දමා නැත."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"<xliff:g id="ALARM">%1$s</xliff:g> ට ඊළඟ සීනුව සකස් කර ඇත"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-sk/strings.xml b/packages/Keyguard/res/values-sk/strings.xml
index a1f5e49..f4c802f 100644
--- a/packages/Keyguard/res/values-sk/strings.xml
+++ b/packages/Keyguard/res/values-sk/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Spustenie bolo zrušené"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"Uvoľnením dotyku miniaplikáciu <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> odstránite."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"Miniaplikácia <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> nebude odstránená."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Nasledujúci budík je nastavený na <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-sl/strings.xml b/packages/Keyguard/res/values-sl/strings.xml
index 765180b..7d14282 100644
--- a/packages/Keyguard/res/values-sl/strings.xml
+++ b/packages/Keyguard/res/values-sl/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Zagon je preklican"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"Izpustite pripomoček <xliff:g id="WIDGET_INDEX">%1$s</xliff:g>, da ga izbrišete."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"Pripomoček <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> ne bo izbrisan."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Naslednji alarm je nastavljen za <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-sr/strings.xml b/packages/Keyguard/res/values-sr/strings.xml
index 5524734..8d84cb5 100644
--- a/packages/Keyguard/res/values-sr/strings.xml
+++ b/packages/Keyguard/res/values-sr/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Покретање је отказано"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"Отпустите виџет <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> да бисте га избрисали."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"Виџет <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> неће бити избрисан."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Следећи аларм је подешен за <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-th/strings.xml b/packages/Keyguard/res/values-th/strings.xml
index 1de9c74..eb1f7c3 100644
--- a/packages/Keyguard/res/values-th/strings.xml
+++ b/packages/Keyguard/res/values-th/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"ยกเลิกการเปิดใช้งานแล้ว"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"ลาก <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> เพื่อลบ"</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g> จะไม่ถูกลบ"</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"ตั้งเวลาปลุกครั้งถัดไปไว้ที่ <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-tl/strings.xml b/packages/Keyguard/res/values-tl/strings.xml
index a41877e..96a140b 100644
--- a/packages/Keyguard/res/values-tl/strings.xml
+++ b/packages/Keyguard/res/values-tl/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Nakansela ang paglunsad"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"I-drop ang <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> upang tanggalin."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"Hindi tatanggalin ang <xliff:g id="WIDGET_INDEX">%1$s</xliff:g>."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Nakatakda ang susunod na alarm para sa <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-tr/strings.xml b/packages/Keyguard/res/values-tr/strings.xml
index 361106d..b38789d 100644
--- a/packages/Keyguard/res/values-tr/strings.xml
+++ b/packages/Keyguard/res/values-tr/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Başlatma iptal edildi"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"Silmek için <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> widget\'ını bırakın."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g> silinmeyecek."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Sonraki alarm <xliff:g id="ALARM">%1$s</xliff:g> için ayarlandı"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-uk/strings.xml b/packages/Keyguard/res/values-uk/strings.xml
index 1c092a4..dc48ace 100644
--- a/packages/Keyguard/res/values-uk/strings.xml
+++ b/packages/Keyguard/res/values-uk/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Запуск скасовано"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"Відпустіть <xliff:g id="WIDGET_INDEX">%1$s</xliff:g>, щоб видалити."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g> не буде видалено."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Наступний сигнал: <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-ur-rPK/strings.xml b/packages/Keyguard/res/values-ur-rPK/strings.xml
index 6a8cd00..4921c28 100644
--- a/packages/Keyguard/res/values-ur-rPK/strings.xml
+++ b/packages/Keyguard/res/values-ur-rPK/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"شروعات کو منسوخ کر دیا گیا"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"حذف کرنے کیلئے <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> کو ڈراپ کریں۔"</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g> کو حذف نہیں کیا جائے گا۔"</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"اگلا الارم <xliff:g id="ALARM">%1$s</xliff:g> کیلئے سیٹ ہے"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"‎?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-uz-rUZ/strings.xml b/packages/Keyguard/res/values-uz-rUZ/strings.xml
index 6d57d80..ba09118 100644
--- a/packages/Keyguard/res/values-uz-rUZ/strings.xml
+++ b/packages/Keyguard/res/values-uz-rUZ/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Ishga tushirish bekor qilindi"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"O‘chirish uchun <xliff:g id="WIDGET_INDEX">%1$s</xliff:g>ni pastga tashlang."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g> o‘chirilmaydi."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Keyingi uyg‘otkich <xliff:g id="ALARM">%1$s</xliff:g> uchun o‘rnatildi"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-vi/strings.xml b/packages/Keyguard/res/values-vi/strings.xml
index 725f3b5..c640c04 100644
--- a/packages/Keyguard/res/values-vi/strings.xml
+++ b/packages/Keyguard/res/values-vi/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Quá trình chạy bị hủy"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"Thả <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> để xóa."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g> sẽ không bị xóa."</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Báo thức tiếp theo được đặt cho <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-zh-rCN/strings.xml b/packages/Keyguard/res/values-zh-rCN/strings.xml
index f8cecdf..8e8c4c8 100644
--- a/packages/Keyguard/res/values-zh-rCN/strings.xml
+++ b/packages/Keyguard/res/values-zh-rCN/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"启动已取消"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"放下<xliff:g id="WIDGET_INDEX">%1$s</xliff:g>即可将其删除。"</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g>将不会被删除。"</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"下次闹钟时间已设置为<xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-zh-rHK/strings.xml b/packages/Keyguard/res/values-zh-rHK/strings.xml
index 2320d0b..064c6df 100644
--- a/packages/Keyguard/res/values-zh-rHK/strings.xml
+++ b/packages/Keyguard/res/values-zh-rHK/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"已取消啟動"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"拖放「<xliff:g id="WIDGET_INDEX">%1$s</xliff:g>」即可刪除。"</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"「<xliff:g id="WIDGET_INDEX">%1$s</xliff:g>」將不會被刪除。"</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"已設定下一個鬧鐘時間:<xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-zh-rTW/strings.xml b/packages/Keyguard/res/values-zh-rTW/strings.xml
index d04891f..498d8a6 100644
--- a/packages/Keyguard/res/values-zh-rTW/strings.xml
+++ b/packages/Keyguard/res/values-zh-rTW/strings.xml
@@ -78,8 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"已取消啟動"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"拖放「<xliff:g id="WIDGET_INDEX">%1$s</xliff:g>」即可將其刪除。"</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"「<xliff:g id="WIDGET_INDEX">%1$s</xliff:g>」將不會遭到刪除。"</string>
-    <!-- no translation found for keyguard_accessibility_next_alarm (7269583073750518672) -->
-    <skip />
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"已設定下一個鬧鐘時間:<xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardActivityLauncher.java b/packages/Keyguard/src/com/android/keyguard/KeyguardActivityLauncher.java
index 32f7a1e..1978ded 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardActivityLauncher.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardActivityLauncher.java
@@ -242,8 +242,7 @@
                             null /*resultWho*/,
                             0 /*requestCode*/,
                             Intent.FLAG_ACTIVITY_NEW_TASK,
-                            null /*profileFile*/,
-                            null /*profileFd*/,
+                            null /*profilerInfo*/,
                             options,
                             user.getIdentifier());
                     if (DEBUG) Log.d(TAG, String.format("waitResult[%s,%s,%s,%s] at %s",
diff --git a/packages/PrintSpooler/src/com/android/printspooler/model/RemotePrintDocument.java b/packages/PrintSpooler/src/com/android/printspooler/model/RemotePrintDocument.java
index 9351078..d1aa33b 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/model/RemotePrintDocument.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/model/RemotePrintDocument.java
@@ -258,7 +258,8 @@
             Log.i(LOG_TAG, "[CALLED] finish()");
         }
         if (mState != STATE_STARTED && mState != STATE_UPDATED
-                && mState != STATE_FAILED && mState != STATE_CANCELING) {
+                && mState != STATE_FAILED && mState != STATE_CANCELING
+                && mState != STATE_CANCELED) {
             throw new IllegalStateException("Cannot finish in state:"
                     + stateToString(mState));
         }
diff --git a/packages/SettingsProvider/AndroidManifest.xml b/packages/SettingsProvider/AndroidManifest.xml
index 783aa03..469b776 100644
--- a/packages/SettingsProvider/AndroidManifest.xml
+++ b/packages/SettingsProvider/AndroidManifest.xml
@@ -16,6 +16,7 @@
                   android:multiprocess="false"
                   android:exported="true"
                   android:writePermission="android.permission.WRITE_SETTINGS"
+                  android:singleUser="true"
                   android:initOrder="100" />
     </application>
 </manifest>
diff --git a/packages/SystemUI/res/anim/recents_from_launcher_enter.xml b/packages/SystemUI/res/anim/recents_from_launcher_enter.xml
index 305a82f..4e1d66d 100644
--- a/packages/SystemUI/res/anim/recents_from_launcher_enter.xml
+++ b/packages/SystemUI/res/anim/recents_from_launcher_enter.xml
@@ -20,9 +20,9 @@
 <set xmlns:android="http://schemas.android.com/apk/res/android"
      android:shareInterpolator="false"
      android:zAdjustment="normal">
-  <alpha android:fromAlpha="1.0" android:toAlpha="1.0"
+  <alpha android:fromAlpha="0.0" android:toAlpha="1.0"
          android:fillEnabled="true"
          android:fillBefore="true" android:fillAfter="true"
          android:interpolator="@android:interpolator/linear"
-         android:duration="200"/>
+         android:duration="100"/>
 </set>
diff --git a/packages/SystemUI/res/anim/recents_from_launcher_exit.xml b/packages/SystemUI/res/anim/recents_from_launcher_exit.xml
index 863591f..afab78d 100644
--- a/packages/SystemUI/res/anim/recents_from_launcher_exit.xml
+++ b/packages/SystemUI/res/anim/recents_from_launcher_exit.xml
@@ -24,5 +24,5 @@
          android:fillEnabled="true"
          android:fillBefore="true" android:fillAfter="true"
          android:interpolator="@android:interpolator/linear_out_slow_in"
-         android:duration="200"/>
+         android:duration="100"/>
 </set>
diff --git a/packages/SystemUI/res/anim/recents_to_launcher_enter.xml b/packages/SystemUI/res/anim/recents_to_launcher_enter.xml
index adcefe0..4e1d66d 100644
--- a/packages/SystemUI/res/anim/recents_to_launcher_enter.xml
+++ b/packages/SystemUI/res/anim/recents_to_launcher_enter.xml
@@ -23,6 +23,6 @@
   <alpha android:fromAlpha="0.0" android:toAlpha="1.0"
          android:fillEnabled="true"
          android:fillBefore="true" android:fillAfter="true"
-         android:interpolator="@android:interpolator/fast_out_linear_in"
-         android:duration="200"/>
+         android:interpolator="@android:interpolator/linear"
+         android:duration="100"/>
 </set>
diff --git a/packages/SystemUI/res/anim/recents_to_launcher_exit.xml b/packages/SystemUI/res/anim/recents_to_launcher_exit.xml
index 863591f..afab78d 100644
--- a/packages/SystemUI/res/anim/recents_to_launcher_exit.xml
+++ b/packages/SystemUI/res/anim/recents_to_launcher_exit.xml
@@ -24,5 +24,5 @@
          android:fillEnabled="true"
          android:fillBefore="true" android:fillAfter="true"
          android:interpolator="@android:interpolator/linear_out_slow_in"
-         android:duration="200"/>
+         android:duration="100"/>
 </set>
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_ime_switcher_default.png b/packages/SystemUI/res/drawable-hdpi/ic_ime_switcher_default.png
deleted file mode 100644
index 369c88d..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_ime_switcher_default.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_ime_switcher_default.png b/packages/SystemUI/res/drawable-mdpi/ic_ime_switcher_default.png
deleted file mode 100644
index 7d97eb5..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_ime_switcher_default.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_ime_switcher_default.png b/packages/SystemUI/res/drawable-xhdpi/ic_ime_switcher_default.png
deleted file mode 100644
index 900801a..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_ime_switcher_default.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_ime_switcher_default.png b/packages/SystemUI/res/drawable-xxhdpi/ic_ime_switcher_default.png
deleted file mode 100644
index 6c8222e..0000000
--- a/packages/SystemUI/res/drawable-xxhdpi/ic_ime_switcher_default.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable/ic_ime_switcher_default.xml b/packages/SystemUI/res/drawable/ic_ime_switcher_default.xml
new file mode 100644
index 0000000..4d9ca88
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_ime_switcher_default.xml
@@ -0,0 +1,25 @@
+<!--
+  ~ Copyright (C) 2014 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
+  -->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="24.0dp"
+        android:height="24.0dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
+    <path
+        android:pathData="M20.000000,5.000000L4.000000,5.000000C2.900000,5.000000 2.000000,5.900000 2.000000,7.000000l0.000000,10.000000c0.000000,1.100000 0.900000,2.000000 2.000000,2.000000l16.000000,0.000000c1.100000,0.000000 2.000000,-0.900000 2.000000,-2.000000L22.000000,7.000000C22.000000,5.900000 21.100000,5.000000 20.000000,5.000000zM11.000000,8.000000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000L11.000000,8.000000zM11.000000,11.000000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000L11.000000,11.000000zM8.000000,8.000000l2.000000,0.000000l0.000000,2.000000L8.000000,10.000000L8.000000,8.000000zM8.000000,11.000000l2.000000,0.000000l0.000000,2.000000L8.000000,13.000000L8.000000,11.000000zM7.000000,13.000000L5.000000,13.000000l0.000000,-2.000000l2.000000,0.000000L7.000000,13.000000zM7.000000,10.000000L5.000000,10.000000L5.000000,8.000000l2.000000,0.000000L7.000000,10.000000zM16.000000,17.000000L8.000000,17.000000l0.000000,-2.000000l8.000000,0.000000L16.000000,17.000000zM16.000000,13.000000l-2.000000,0.000000l0.000000,-2.000000l2.000000,0.000000L16.000000,13.000000zM16.000000,10.000000l-2.000000,0.000000L14.000000,8.000000l2.000000,0.000000L16.000000,10.000000zM19.000000,13.000000l-2.000000,0.000000l0.000000,-2.000000l2.000000,0.000000L19.000000,13.000000zM19.000000,10.000000l-2.000000,0.000000L17.000000,8.000000l2.000000,0.000000L19.000000,10.000000z"
+        android:fillColor="@color/navigation_bar_icon_color"/>
+</vector>
diff --git a/packages/SystemUI/res/layout/recents_task_view.xml b/packages/SystemUI/res/layout/recents_task_view.xml
index 5253ee0..4cb8498 100644
--- a/packages/SystemUI/res/layout/recents_task_view.xml
+++ b/packages/SystemUI/res/layout/recents_task_view.xml
@@ -23,45 +23,7 @@
         android:id="@+id/task_view_thumbnail"
         android:layout_width="match_parent"
         android:layout_height="match_parent" />
-    <com.android.systemui.recents.views.TaskViewHeader
-        android:id="@+id/task_view_bar"
-        android:layout_width="match_parent"
-        android:layout_height="@dimen/recents_task_bar_height"
-        android:layout_gravity="top|center_horizontal">
-        <com.android.systemui.recents.views.FixedSizeImageView
-            android:id="@+id/application_icon"
-            android:layout_width="@dimen/recents_task_view_application_icon_size"
-            android:layout_height="@dimen/recents_task_view_application_icon_size"
-            android:layout_marginStart="8dp"
-            android:layout_gravity="center_vertical|start"
-            android:padding="8dp"
-            android:background="@drawable/recents_button_bg" />
-        <TextView
-            android:id="@+id/activity_description"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center_vertical|start"
-            android:layout_marginStart="64dp"
-            android:layout_marginEnd="64dp"
-            android:textSize="16sp"
-            android:textColor="#ffffffff"
-            android:text="@string/recents_empty_message"
-            android:fontFamily="sans-serif-medium"
-            android:singleLine="true"
-            android:maxLines="2"
-            android:ellipsize="marquee"
-            android:fadingEdge="horizontal" />
-        <com.android.systemui.recents.views.FixedSizeImageView
-            android:id="@+id/dismiss_task"
-            android:layout_width="48dp"
-            android:layout_height="48dp"
-            android:layout_marginEnd="4dp"
-            android:layout_gravity="center_vertical|end"
-            android:padding="12dp"
-            android:background="@drawable/recents_button_bg"
-            android:visibility="invisible"
-            android:src="@drawable/recents_dismiss_light" />
-    </com.android.systemui.recents.views.TaskViewHeader>
+    <include layout="@layout/recents_task_view_header" />
     <FrameLayout
         android:id="@+id/lock_to_app_fab"
         android:layout_width="48dp"
diff --git a/packages/SystemUI/res/layout/recents_task_view_header.xml b/packages/SystemUI/res/layout/recents_task_view_header.xml
new file mode 100644
index 0000000..f1d8ad0
--- /dev/null
+++ b/packages/SystemUI/res/layout/recents_task_view_header.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 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.
+-->
+<com.android.systemui.recents.views.TaskViewHeader
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/task_view_bar"
+    android:layout_width="match_parent"
+    android:layout_height="@dimen/recents_task_bar_height"
+    android:layout_gravity="top|center_horizontal">
+    <com.android.systemui.recents.views.FixedSizeImageView
+        android:id="@+id/application_icon"
+        android:layout_width="@dimen/recents_task_view_application_icon_size"
+        android:layout_height="@dimen/recents_task_view_application_icon_size"
+        android:layout_marginStart="8dp"
+        android:layout_gravity="center_vertical|start"
+        android:padding="8dp"
+        android:background="@drawable/recents_button_bg" />
+    <TextView
+        android:id="@+id/activity_description"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center_vertical|start"
+        android:layout_marginStart="64dp"
+        android:layout_marginEnd="64dp"
+        android:textSize="16sp"
+        android:textColor="#ffffffff"
+        android:text="@string/recents_empty_message"
+        android:fontFamily="sans-serif-medium"
+        android:singleLine="true"
+        android:maxLines="2"
+        android:ellipsize="marquee"
+        android:fadingEdge="horizontal" />
+    <com.android.systemui.recents.views.FixedSizeImageView
+        android:id="@+id/dismiss_task"
+        android:layout_width="48dp"
+        android:layout_height="48dp"
+        android:layout_marginEnd="4dp"
+        android:layout_gravity="center_vertical|end"
+        android:padding="12dp"
+        android:background="@drawable/recents_button_bg"
+        android:visibility="invisible"
+        android:src="@drawable/recents_dismiss_light" />
+</com.android.systemui.recents.views.TaskViewHeader>
\ No newline at end of file
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
index dea14e9..75ed81e 100644
--- a/packages/SystemUI/res/values/colors.xml
+++ b/packages/SystemUI/res/values/colors.xml
@@ -106,4 +106,7 @@
 
     <color name="keyguard_user_switcher_background_gradient_color">#77000000</color>
     <color name="doze_small_icon_background_color">#ff434343</color>
+
+    <!-- The color of the navigation bar icons. Need to be in sync with ic_sysbar_* -->
+    <color name="navigation_bar_icon_color">#E5FFFFFF</color>
 </resources>
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index 52dc000..e940b18 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -126,7 +126,7 @@
     <integer name="recents_animate_task_bar_enter_duration">275</integer>
     <!-- The animation delay for animating the first task in. This should roughly be the animation
      duration of the transition in to recents. -->
-    <integer name="recents_animate_task_bar_enter_delay">225</integer>
+    <integer name="recents_animate_task_bar_enter_delay">300</integer>
     <!-- The min animation duration for animating the task bar out. -->
     <integer name="recents_animate_task_exit_to_home_duration">225</integer>
     <!-- The min animation duration for animating the task bar out. -->
@@ -145,8 +145,6 @@
     <integer name="recents_animate_task_view_remove_duration">250</integer>
     <!-- The minimum alpha for the dim applied to cards that go deeper into the stack. -->
     <integer name="recents_max_task_stack_view_dim">96</integer>
-    <!-- The number of tasks that RecentsTaskLoader should load. -->
-    <integer name="recents_max_num_tasks_to_load">50</integer>
     <!-- The delay to enforce between each alt-tab key press. -->
     <integer name="recents_alt_tab_key_delay">200</integer>
     <!-- Transposes the recents layout in landscape. -->
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 0af693d..bc941ca 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -278,8 +278,14 @@
     <!-- The height of the speed bump view. -->
     <dimen name="speed_bump_height">16dp</dimen>
 
-    <!-- Lockscreen affordance drag distance for camera and phone. -->
-    <dimen name="affordance_drag_distance">100dp</dimen>
+    <!-- Lockscreen unlocking falsing threshold. -->
+    <dimen name="unlock_falsing_threshold">100dp</dimen>
+
+    <!-- Lockscreen falsing threshold for quick settings. -->
+    <dimen name="qs_falsing_threshold">60dp</dimen>
+
+    <!-- Falsing threshold used when dismissing notifications from the lockscreen. -->
+    <dimen name="swipe_helper_falsing_threshold">100dp</dimen>
 
     <dimen name="notifications_top_padding">8dp</dimen>
     
@@ -299,7 +305,7 @@
     <dimen name="heads_up_window_height">250dp</dimen>
 
     <!-- The minimum amount the user needs to swipe to go to the camera / phone. -->
-    <dimen name="keyguard_min_swipe_amount">75dp</dimen>
+    <dimen name="keyguard_min_swipe_amount">85dp</dimen>
 
     <!-- The minimum background radius when swiping to a side for the camera / phone affordances. -->
     <dimen name="keyguard_affordance_min_background_radius">30dp</dimen>
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index 8c1ac9f..b39fe24 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -33,11 +33,8 @@
         <item name="android:navigationBarColor">@android:color/transparent</item>
         <item name="android:windowDrawsSystemBarBackgrounds">true</item>
         <item name="android:windowAnimationStyle">@style/Animation.RecentsActivity</item>
-        <item name="*android:lightingStyle">@style/RecentsLighting</item>
-    </style>
 
-    <style name="RecentsLighting" parent="@*android:style/Lighting">
-        <item name="*android:ambientShadowAlpha">0.30</item>
+        <item name="android:ambientShadowAlpha">0.30</item>
     </style>
 
     <!-- Animations for a non-full-screen window or activity. -->
diff --git a/packages/SystemUI/src/com/android/systemui/SwipeHelper.java b/packages/SystemUI/src/com/android/systemui/SwipeHelper.java
index a18b0c0..8e603ba 100644
--- a/packages/SystemUI/src/com/android/systemui/SwipeHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/SwipeHelper.java
@@ -81,6 +81,8 @@
     private long mLongPressTimeout;
 
     final private int[] mTmpPos = new int[2];
+    private int mFalsingThreshold;
+    private boolean mTouchAboveFalsingThreshold;
 
     public SwipeHelper(int swipeDirection, Callback callback, Context context) {
         mCallback = callback;
@@ -93,6 +95,8 @@
         mLongPressTimeout = (long) (ViewConfiguration.getLongPressTimeout() * 1.5f); // extra long-press!
         mFastOutLinearInInterpolator = AnimationUtils.loadInterpolator(context,
                 android.R.interpolator.fast_out_linear_in);
+        mFalsingThreshold = context.getResources().getDimensionPixelSize(
+                R.dimen.swipe_helper_falsing_threshold);
     }
 
     public void setLongPressListener(LongPressListener listener) {
@@ -222,6 +226,7 @@
 
         switch (action) {
             case MotionEvent.ACTION_DOWN:
+                mTouchAboveFalsingThreshold = false;
                 mDragging = false;
                 mLongPressSent = false;
                 mCurrView = mCallback.getChildAtPosition(ev);
@@ -406,12 +411,16 @@
             case MotionEvent.ACTION_MOVE:
                 if (mCurrView != null) {
                     float delta = getPos(ev) - mInitialTouchPos;
+                    float absDelta = Math.abs(delta);
+                    if (absDelta >= mFalsingThreshold) {
+                        mTouchAboveFalsingThreshold = true;
+                    }
                     // don't let items that can't be dismissed be dragged more than
                     // maxScrollDistance
                     if (CONSTRAIN_SWIPE && !mCallback.canChildBeDismissed(mCurrView)) {
                         float size = getSize(mCurrAnimView);
                         float maxScrollDistance = 0.15f * size;
-                        if (Math.abs(delta) >= size) {
+                        if (absDelta >= size) {
                             delta = delta > 0 ? maxScrollDistance : -maxScrollDistance;
                         } else {
                             delta = maxScrollDistance * (float) Math.sin((delta/size)*(Math.PI/2));
@@ -437,9 +446,11 @@
                     boolean childSwipedFastEnough = (Math.abs(velocity) > escapeVelocity) &&
                             (Math.abs(velocity) > Math.abs(perpendicularVelocity)) &&
                             (velocity > 0) == (getTranslation(mCurrAnimView) > 0);
+                    boolean falsingDetected = mCallback.isAntiFalsingNeeded()
+                            && !mTouchAboveFalsingThreshold;
 
-                    boolean dismissChild = mCallback.canChildBeDismissed(mCurrView) &&
-                            (childSwipedFastEnough || childSwipedFarEnough);
+                    boolean dismissChild = mCallback.canChildBeDismissed(mCurrView)
+                            && !falsingDetected && (childSwipedFastEnough || childSwipedFarEnough);
 
                     if (dismissChild) {
                         // flingadingy
@@ -462,6 +473,8 @@
 
         boolean canChildBeDismissed(View v);
 
+        boolean isAntiFalsingNeeded();
+
         void onBeginDrag(View v);
 
         void onChildDismissed(View v);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
index a2136d2..a3ffc4e 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
@@ -401,16 +401,23 @@
         mBrightnessView.layout(0, mBrightnessPaddingTop,
                 mBrightnessView.getMeasuredWidth(),
                 mBrightnessPaddingTop + mBrightnessView.getMeasuredHeight());
+        boolean isRtl = getLayoutDirection() == LAYOUT_DIRECTION_RTL;
         for (TileRecord record : mRecords) {
             if (record.tileView.getVisibility() == GONE) continue;
             final int cols = getColumnCount(record.row);
             final int cw = record.row == 0 ? mLargeCellWidth : mCellWidth;
             final int extra = (w - cw * cols) / (cols + 1);
-            final int left = record.col * cw + (record.col + 1) * extra;
+            int left = record.col * cw + (record.col + 1) * extra;
             final int top = getRowTop(record.row);
-            record.tileView.layout(left, top,
-                    left + record.tileView.getMeasuredWidth(),
-                    top + record.tileView.getMeasuredHeight());
+            int right;
+            int tileWith = record.tileView.getMeasuredWidth();
+            if (isRtl) {
+                right = w - left;
+                left = right - tileWith;
+            } else {
+                right = left + tileWith;
+            }
+            record.tileView.layout(left, top, right, top + record.tileView.getMeasuredHeight());
         }
         final int dh = Math.max(mDetail.getMeasuredHeight(), getMeasuredHeight());
         mDetail.layout(0, 0, mDetail.getMeasuredWidth(), dh);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSTile.java b/packages/SystemUI/src/com/android/systemui/qs/QSTile.java
index 876652c..2b071cc 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSTile.java
@@ -306,6 +306,7 @@
         public String label;
         public String contentDescription;
         public String dualLabelContentDescription;
+        public boolean autoMirrorDrawable = true;
 
         public boolean copyTo(State other) {
             if (other == null) throw new IllegalArgumentException();
@@ -315,6 +316,7 @@
                     || !Objects.equals(other.icon, icon)
                     || !Objects.equals(other.label, label)
                     || !Objects.equals(other.contentDescription, contentDescription)
+                    || !Objects.equals(other.autoMirrorDrawable, autoMirrorDrawable)
                     || !Objects.equals(other.dualLabelContentDescription,
                     dualLabelContentDescription);
             other.visible = visible;
@@ -323,6 +325,7 @@
             other.label = label;
             other.contentDescription = contentDescription;
             other.dualLabelContentDescription = dualLabelContentDescription;
+            other.autoMirrorDrawable = autoMirrorDrawable;
             return changed;
         }
 
@@ -339,6 +342,7 @@
             sb.append(",label=").append(label);
             sb.append(",contentDescription=").append(contentDescription);
             sb.append(",dualLabelContentDescription=").append(dualLabelContentDescription);
+            sb.append(",autoMirrorDrawable=").append(autoMirrorDrawable);
             return sb.append(']');
         }
     }
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSTileView.java b/packages/SystemUI/src/com/android/systemui/qs/QSTileView.java
index 20fd5a0..9321614 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSTileView.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSTileView.java
@@ -265,6 +265,10 @@
             } else if (state.iconId > 0) {
                 iv.setImageResource(state.iconId);
             }
+            Drawable drawable = iv.getDrawable();
+            if (state.autoMirrorDrawable && drawable != null) {
+                drawable.setAutoMirrored(true);
+            }
         }
         if (mDual) {
             mDualLabel.setText(state.label);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/SignalTileView.java b/packages/SystemUI/src/com/android/systemui/qs/SignalTileView.java
index 1df3d20..0ecdeaa 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/SignalTileView.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/SignalTileView.java
@@ -18,6 +18,7 @@
 
 import android.animation.ValueAnimator;
 import android.content.Context;
+import android.graphics.drawable.Drawable;
 import android.view.View;
 import android.widget.FrameLayout;
 import android.widget.ImageView;
@@ -78,10 +79,19 @@
     }
 
     private void layoutIndicator(View indicator) {
+        boolean isRtl = getLayoutDirection() == LAYOUT_DIRECTION_RTL;
+        int left, right;
+        if (isRtl) {
+            right = mIconFrame.getLeft();
+            left = right - indicator.getMeasuredWidth();
+        } else {
+            left = mIconFrame.getRight();
+            right = left + indicator.getMeasuredWidth();
+        }
         indicator.layout(
-                mIconFrame.getRight(),
+                left,
                 mIconFrame.getBottom() - indicator.getMeasuredHeight(),
-                mIconFrame.getRight() + indicator.getMeasuredWidth(),
+                right,
                 mIconFrame.getBottom());
     }
 
@@ -96,6 +106,10 @@
         } else {
             mOverlay.setVisibility(GONE);
         }
+        Drawable drawable = mSignal.getDrawable();
+        if (state.autoMirrorDrawable && drawable != null) {
+            drawable.setAutoMirrored(true);
+        }
         final boolean shown = isShown();
         setVisibility(mIn, shown, s.activityIn);
         setVisibility(mOut, shown, s.activityOut);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java
index 109237b..0b83878 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java
@@ -88,6 +88,7 @@
         final boolean connecting = mController.isBluetoothConnecting();
         state.visible = supported;
         state.value = enabled;
+        state.autoMirrorDrawable = false;
         if (enabled) {
             state.label = null;
             if (connected) {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/CastTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/CastTile.java
index f503657..8304291 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/CastTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/CastTile.java
@@ -93,6 +93,7 @@
         state.visible = !(mKeyguard.isSecure() && mKeyguard.isShowing());
         state.label = mContext.getString(R.string.quick_settings_cast_title);
         state.value = false;
+        state.autoMirrorDrawable = false;
         final Set<CastDevice> devices = mController.getCastDevices();
         boolean connecting = false;
         for (CastDevice device : devices) {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java
index ce42d47..25bcfd2 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java
@@ -95,6 +95,7 @@
                 : !cb.enabled || cb.airplaneModeEnabled ? R.drawable.ic_qs_signal_disabled
                 : cb.mobileSignalIconId > 0 ? cb.mobileSignalIconId
                 : R.drawable.ic_qs_signal_no_signal;
+        state.autoMirrorDrawable = !cb.noSim;
         state.overlayIconId = cb.enabled && (cb.dataTypeIconId > 0) && !cb.wifiConnected
                 ? cb.dataTypeIconId
                 : 0;
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java
index 25a62ae..bdb0ad3 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java
@@ -191,6 +191,11 @@
         return true;
     }
 
+    @Override
+    public boolean isAntiFalsingNeeded() {
+        return false;
+    }
+
     public void dismissChild(View v) {
         mSwipeHelper.dismissChild(v, 0);
     }
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java
index e8e9d52..47c096f 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java
@@ -199,6 +199,11 @@
         return true;
     }
 
+    @Override
+    public boolean isAntiFalsingNeeded() {
+        return false;
+    }
+
     public void dismissChild(View v) {
         mSwipeHelper.dismissChild(v, 0);
     }
diff --git a/packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java b/packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java
index 354eb55..0b36bdbd 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java
@@ -22,6 +22,7 @@
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
+import android.content.pm.ActivityInfo;
 import android.content.res.Configuration;
 import android.content.res.Resources;
 import android.graphics.Bitmap;
@@ -29,6 +30,7 @@
 import android.graphics.Rect;
 import android.os.Handler;
 import android.os.UserHandle;
+import android.view.LayoutInflater;
 import android.view.View;
 import com.android.systemui.R;
 import com.android.systemui.RecentsComponent;
@@ -41,6 +43,7 @@
 import com.android.systemui.recents.model.TaskStack;
 import com.android.systemui.recents.views.TaskStackView;
 import com.android.systemui.recents.views.TaskStackViewLayoutAlgorithm;
+import com.android.systemui.recents.views.TaskViewHeader;
 import com.android.systemui.recents.views.TaskViewTransform;
 
 import java.util.ArrayList;
@@ -86,6 +89,10 @@
     int mNavBarHeight;
     int mNavBarWidth;
 
+    // Header (for transition)
+    TaskViewHeader mHeaderBar;
+    TaskStackView mDummyStackView;
+
     // Variables to keep track of if we need to start recents after binding
     View mStatusBarView;
     boolean mTriggeredFromAltTab;
@@ -114,6 +121,7 @@
     public void onStart() {
         // Initialize some static datastructures
         TaskStackViewLayoutAlgorithm.initializeCurve();
+        reloadHeaderBarLayout();
     }
 
     public void onBootCompleted() {
@@ -169,7 +177,7 @@
 
     void showRelativeAffiliatedTask(boolean showNextTask) {
         TaskStack stack = RecentsTaskLoader.getShallowTaskStack(mSystemServicesProxy,
-                Integer.MAX_VALUE);
+                Integer.MAX_VALUE, mContext.getResources());
         // Return early if there are no tasks
         if (stack.getTaskCount() == 0) return;
 
@@ -212,21 +220,9 @@
             // Bring an active task to the foreground
             mSystemServicesProxy.moveTaskToFront(toTask.key.id, launchOpts);
         } else {
-            // Launch the activity anew with the desired animation
-            boolean isDocument = Utilities.isDocument(toTask.key.baseIntent);
-            Intent intent = new Intent(toTask.key.baseIntent);
-            intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY
-                    | Intent.FLAG_ACTIVITY_TASK_ON_HOME);
-            if (!isDocument) {
-                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-            }
             try {
                 mSystemServicesProxy.startActivityFromRecents(toTask.key.id, launchOpts);
             } catch (ActivityNotFoundException anfe) {}
-
-            // Remove the old task from activity manager
-            RecentsTaskLoader.getInstance().getSystemServicesProxy().removeTask(toTask.key.id,
-                    isDocument);
         }
     }
 
@@ -250,6 +246,28 @@
             mSystemInsets.set(0, mStatusBarHeight, 0, mNavBarHeight);
         }
         sLastScreenshot = null;
+        reloadHeaderBarLayout();
+    }
+
+    /** Prepares the header bar layout. */
+    void reloadHeaderBarLayout() {
+        // Inflate the header bar layout so that we can rebind and draw it for the transition
+        Resources res = mContext.getResources();
+        TaskStack stack = new TaskStack();
+        mDummyStackView = new TaskStackView(mContext, stack);
+        TaskStackViewLayoutAlgorithm algo = mDummyStackView.getStackAlgorithm();
+        Rect taskStackBounds = new Rect(mTaskStackBounds);
+        taskStackBounds.bottom -= mSystemInsets.bottom;
+        algo.computeRects(mWindowRect.width(), mWindowRect.height(), taskStackBounds);
+        Rect taskViewSize = algo.getUntransformedTaskViewSize();
+        int taskBarHeight = res.getDimensionPixelSize(R.dimen.recents_task_bar_height);
+        LayoutInflater inflater = LayoutInflater.from(mContext);
+        mHeaderBar = (TaskViewHeader) inflater.inflate(R.layout.recents_task_view_header, null,
+                false);
+        mHeaderBar.measure(
+                View.MeasureSpec.makeMeasureSpec(taskViewSize.width(), View.MeasureSpec.EXACTLY),
+                View.MeasureSpec.makeMeasureSpec(taskBarHeight, View.MeasureSpec.EXACTLY));
+        mHeaderBar.layout(0, 0, taskViewSize.width(), taskBarHeight);
     }
 
     /** Gets the top task. */
@@ -361,27 +379,37 @@
             }
         }
 
-        // If the screenshot fails, then load the first task thumbnail and use that
-        Bitmap firstThumbnail = mSystemServicesProxy.getTaskThumbnail(topTask.id);
-        if (firstThumbnail != null) {
-            // Update the destination rect
-            Rect toTaskRect = getThumbnailTransitionRect(topTask.id, isTopTaskHome);
-            if (toTaskRect.width() > 0 && toTaskRect.height() > 0) {
-                // Create the new thumbnail for the animation down
-                // XXX: We should find a way to optimize this so we don't need to create a new bitmap
-                Bitmap thumbnail = Bitmap.createBitmap(toTaskRect.width(), toTaskRect.height(),
-                        Bitmap.Config.ARGB_8888);
-                int size = Math.min(firstThumbnail.getWidth(), firstThumbnail.getHeight());
-                Canvas c = new Canvas(thumbnail);
-                c.drawBitmap(firstThumbnail, new Rect(0, 0, size, size),
-                        new Rect(0, 0, toTaskRect.width(), toTaskRect.height()), null);
-                c.setBitmap(null);
-                // Recycle the old thumbnail
-                firstThumbnail.recycle();
-                mStartAnimationTriggered = false;
-                return ActivityOptions.makeThumbnailScaleDownAnimation(mStatusBarView,
-                        thumbnail, toTaskRect.left, toTaskRect.top, this);
+        // Update the destination rect
+        Task toTask = new Task();
+        TaskViewTransform toTransform = getThumbnailTransitionTransform(topTask.id, isTopTaskHome,
+                toTask);
+        if (toTransform != null && toTask.key != null) {
+            Rect toTaskRect = toTransform.rect;
+            ActivityInfo info = mSystemServicesProxy.getActivityInfo(
+                    toTask.key.baseIntent.getComponent(), toTask.key.userId);
+            if (toTask.activityIcon == null) {
+                toTask.activityIcon = mSystemServicesProxy.getActivityIcon(info,
+                        toTask.key.userId);
             }
+            if (toTask.activityLabel == null) {
+                toTask.activityLabel = mSystemServicesProxy.getActivityLabel(info);
+            }
+
+            Bitmap thumbnail = Bitmap.createBitmap(toTaskRect.width(), toTaskRect.height(),
+                    Bitmap.Config.ARGB_8888);
+            if (Constants.DebugFlags.App.EnableTransitionThumbnailDebugMode) {
+                thumbnail.eraseColor(0xFFff0000);
+            } else {
+                Canvas c = new Canvas(thumbnail);
+                c.scale(toTransform.scale, toTransform.scale);
+                mHeaderBar.rebindToTask(toTask);
+                mHeaderBar.draw(c);
+                c.setBitmap(null);
+            }
+
+            mStartAnimationTriggered = false;
+            return ActivityOptions.makeThumbnailAspectScaleDownAnimation(mStatusBarView,
+                    thumbnail, toTaskRect.left, toTaskRect.top, this);
         }
 
         // If both the screenshot and thumbnail fails, then just fall back to the default transition
@@ -389,21 +417,18 @@
     }
 
     /** Returns the transition rect for the given task id. */
-    Rect getThumbnailTransitionRect(int runningTaskId, boolean isTopTaskHome) {
+    TaskViewTransform getThumbnailTransitionTransform(int runningTaskId, boolean isTopTaskHome,
+                                                      Task runningTaskOut) {
         // Get the stack of tasks that we are animating into
-        TaskStack stack = RecentsTaskLoader.getShallowTaskStack(mSystemServicesProxy, -1);
+        TaskStack stack = RecentsTaskLoader.getShallowTaskStack(mSystemServicesProxy, -1,
+                mContext.getResources());
         if (stack.getTaskCount() == 0) {
-            return new Rect();
+            return null;
         }
 
         // Get the stack
-        TaskStackView tsv = new TaskStackView(mContext, stack);
-        TaskStackViewLayoutAlgorithm algo = tsv.getStackAlgorithm();
-        Rect taskStackBounds = new Rect(mTaskStackBounds);
-        taskStackBounds.bottom -= mSystemInsets.bottom;
-        tsv.computeRects(mWindowRect.width(), mWindowRect.height(), taskStackBounds,
-                mTriggeredFromAltTab, isTopTaskHome);
-        tsv.getScroller().setStackScrollToInitialState();
+        mDummyStackView.updateMinMaxScrollForStack(stack, mTriggeredFromAltTab, isTopTaskHome);
+        mDummyStackView.getScroller().setStackScrollToInitialState();
 
         // Find the running task in the TaskStack
         Task task = null;
@@ -415,6 +440,7 @@
                 Task t = tasks.get(i);
                 if (t.key.id == runningTaskId) {
                     task = t;
+                    runningTaskOut.copyFrom(t);
                     break;
                 }
             }
@@ -425,8 +451,9 @@
         }
 
         // Get the transform for the running task
-        mTmpTransform = algo.getStackTransform(task, tsv.getScroller().getStackScroll(), mTmpTransform, null);
-        return new Rect(mTmpTransform.rect);
+        mTmpTransform = mDummyStackView.getStackAlgorithm().getStackTransform(task,
+                mDummyStackView.getScroller().getStackScroll(), mTmpTransform, null);
+        return mTmpTransform;
     }
 
     /** Starts the recents activity */
diff --git a/packages/SystemUI/src/com/android/systemui/recents/Constants.java b/packages/SystemUI/src/com/android/systemui/recents/Constants.java
index 3709c43..6f4cf6b 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/Constants.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/Constants.java
@@ -27,6 +27,8 @@
         public static class App {
             // Enables the screenshot app->Recents transition
             public static final boolean EnableScreenshotAppTransition = false;
+            // Enables debug drawing for the transition thumbnail
+            public static final boolean EnableTransitionThumbnailDebugMode = false;
             // Enables the filtering of tasks according to their grouping
             public static final boolean EnableTaskFiltering = false;
             // Enables clipping of tasks against each other
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
index 7fafe7a..a5b845d 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
@@ -384,7 +384,6 @@
 
         // Private API calls to make the shadows look better
         try {
-            Utilities.setShadowProperty("ambientShadowStrength", String.valueOf(35f));
             Utilities.setShadowProperty("ambientRatio", String.valueOf(1.5f));
         } catch (IllegalAccessException e) {
             e.printStackTrace();
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
index b7f6451..9803687 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
@@ -16,6 +16,7 @@
 
 package com.android.systemui.recents;
 
+import android.app.ActivityManager;
 import android.content.Context;
 import android.content.SharedPreferences;
 import android.content.res.Configuration;
@@ -187,7 +188,7 @@
                 res.getInteger(R.integer.recents_filter_animate_new_views_duration);
 
         // Loading
-        maxNumTasksToLoad = res.getInteger(R.integer.recents_max_num_tasks_to_load);
+        maxNumTasksToLoad = ActivityManager.getMaxRecentTasksStatic();
 
         // Search Bar
         searchBarSpaceHeightPx = res.getDimensionPixelSize(R.dimen.recents_search_bar_space_height);
diff --git a/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java b/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
index 5390daf..b29f3780 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
@@ -174,6 +174,7 @@
         int minNumTasksToQuery = 10;
         int numTasksToQuery = Math.max(minNumTasksToQuery, numLatestTasks);
         List<ActivityManager.RecentTaskInfo> tasks = mAm.getRecentTasksForUser(numTasksToQuery,
+                ActivityManager.RECENT_IGNORE_HOME_STACK_TASKS |
                 ActivityManager.RECENT_IGNORE_UNAVAILABLE |
                 ActivityManager.RECENT_INCLUDE_PROFILES |
                 ActivityManager.RECENT_WITH_EXCLUDED, userId);
@@ -185,11 +186,6 @@
             // NOTE: The order of these checks happens in the expected order of the traversal of the
             // tasks
 
-            // Skip tasks from this Recents package
-            if (t.baseIntent.getComponent().getPackageName().equals(mRecentsPackage)) {
-                iter.remove();
-                continue;
-            }
             // Check the first non-recents task, include this task even if it is marked as excluded
             // from recents.  In other words, only remove excluded tasks if it is not the first task
             boolean isExcluded = (t.baseIntent.getFlags() & Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS)
@@ -199,11 +195,6 @@
                 continue;
             }
             isFirstValidTask = false;
-            // Skip tasks in the home stack
-            if (isInHomeStack(t.persistentId)) {
-                iter.remove();
-                continue;
-            }
         }
 
         return tasks.subList(0, Math.min(tasks.size(), numLatestTasks));
diff --git a/packages/SystemUI/src/com/android/systemui/recents/model/RecentsTaskLoader.java b/packages/SystemUI/src/com/android/systemui/recents/model/RecentsTaskLoader.java
index 0e2f370..b93c126 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/model/RecentsTaskLoader.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/model/RecentsTaskLoader.java
@@ -18,6 +18,7 @@
 
 import android.app.ActivityManager;
 import android.content.ComponentCallbacks2;
+import android.content.ComponentName;
 import android.content.Context;
 import android.content.pm.ActivityInfo;
 import android.content.res.Resources;
@@ -31,6 +32,7 @@
 import com.android.systemui.recents.RecentsConfiguration;
 import com.android.systemui.recents.misc.SystemServicesProxy;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.LinkedHashSet;
@@ -171,9 +173,9 @@
                     // Load the application icon if it is stale or we haven't cached one yet
                     if (cachedIcon == null) {
                         ActivityInfo info = ssp.getActivityInfo(t.key.baseIntent.getComponent(),
-                                t.userId);
+                                t.key.userId);
                         if (info != null) {
-                            cachedIcon = ssp.getActivityIcon(info, t.userId);
+                            cachedIcon = ssp.getActivityIcon(info, t.key.userId);
                         }
                         if (cachedIcon == null) {
                             cachedIcon = mDefaultApplicationIcon;
@@ -228,8 +230,10 @@
     static RecentsTaskLoader sInstance;
 
     SystemServicesProxy mSystemServicesProxy;
+    DrawableLruCache mTaskDescriptionIconCache;
     DrawableLruCache mApplicationIconCache;
     BitmapLruCache mThumbnailCache;
+    StringLruCache mActivityLabelCache;
     TaskResourceLoadQueue mLoadQueue;
     TaskResourceLoader mLoader;
 
@@ -270,8 +274,10 @@
         mSystemServicesProxy = new SystemServicesProxy(context);
         mPackageMonitor = new RecentsPackageMonitor();
         mLoadQueue = new TaskResourceLoadQueue();
+        mTaskDescriptionIconCache = new DrawableLruCache(iconCacheSize);
         mApplicationIconCache = new DrawableLruCache(iconCacheSize);
         mThumbnailCache = new BitmapLruCache(thumbnailCacheSize);
+        mActivityLabelCache = new StringLruCache(100);
         mLoader = new TaskResourceLoader(mLoadQueue, mApplicationIconCache, mThumbnailCache,
                 mDefaultThumbnail, mDefaultApplicationIcon);
     }
@@ -313,6 +319,7 @@
         RecentsConfiguration config = RecentsConfiguration.getInstance();
         Resources res = context.getResources();
         LinkedHashSet<Task> tasksToLoad = new LinkedHashSet<Task>();
+        ArrayList<Task> tasksToAdd = new ArrayList<Task>();
         TaskStack stack = new TaskStack();
         SpaceNode root = new SpaceNode();
         root.setStack(stack);
@@ -325,55 +332,80 @@
         int taskCount = tasks.size();
         for (int i = 0; i < taskCount; i++) {
             ActivityManager.RecentTaskInfo t = tasks.get(i);
-            ActivityInfo info = ssp.getActivityInfo(t.baseIntent.getComponent(), t.userId);
-            if (info == null) continue;
+            Task.TaskKey taskKey = new Task.TaskKey(t.persistentId, t.baseIntent, t.userId,
+                    t.firstActiveTime, t.lastActiveTime);
+            ComponentName cn = t.baseIntent.getComponent();
+            ActivityInfo info = null;
 
             ActivityManager.TaskDescription av = t.taskDescription;
-            String activityLabel = null;
+            String activityLabel  = null;
             Drawable activityIcon = mDefaultApplicationIcon;
             int activityColor = config.taskBarViewDefaultBackgroundColor;
+            boolean loadedActivityIcon = false;
             if (av != null) {
-                activityLabel = (av.getLabel() != null ? av.getLabel() : ssp.getActivityLabel(info));
-                activityIcon = (av.getIcon() != null) ?
+                activityLabel = av.getLabel();
+                activityIcon = mTaskDescriptionIconCache.getAndInvalidateIfModified(taskKey);
+                if (activityIcon == null) {
+                    activityIcon = (av.getIcon() != null) ?
                         ssp.getBadgedIcon(new BitmapDrawable(res, av.getIcon()), t.userId) : null;
+                    if (activityIcon != null) {
+                        mTaskDescriptionIconCache.put(taskKey, activityIcon);
+                    }
+                }
                 if (av.getPrimaryColor() != 0) {
                     activityColor = av.getPrimaryColor();
                 }
-            } else {
-                activityLabel = ssp.getActivityLabel(info);
+                loadedActivityIcon = (activityIcon != null);
+            }
+            // If there is no activity label, then try and read it from the label cache before
+            // loading it from the system
+            if (activityLabel == null) {
+                activityLabel = mActivityLabelCache.getAndInvalidateIfModified(taskKey);
+                if (activityLabel == null) {
+                    if (info == null) {
+                        info = ssp.getActivityInfo(cn, t.userId);
+                    }
+                    activityLabel = ssp.getActivityLabel(info);
+                    mActivityLabelCache.put(taskKey, activityLabel);
+                }
             }
 
             // Create a new task
-            Task task = new Task(t.persistentId, (t.id > -1), t.baseIntent, t.affiliatedTaskId,
-                    t.affiliatedTaskColor, activityLabel, activityIcon, activityColor, t.userId,
-                    t.firstActiveTime, t.lastActiveTime, (i == (taskCount - 1)),
+            Task task = new Task(taskKey, (t.id > -1), t.affiliatedTaskId, t.affiliatedTaskColor,
+                    activityLabel, activityIcon, activityColor, (i == (taskCount - 1)),
                     config.lockToAppEnabled);
 
             // Preload the specified number of apps
             if (i >= (taskCount - preloadCount)) {
-                // Load the icon from the cache if possible
-                task.applicationIcon = mApplicationIconCache.getAndInvalidateIfModified(task.key);
-                if (task.applicationIcon == null) {
-                    // Load the icon from the system
-                    task.applicationIcon = ssp.getActivityIcon(info, task.userId);
-                    if (task.applicationIcon != null) {
-                        mApplicationIconCache.put(task.key, task.applicationIcon);
+                // Load the icon from the cache if possible (only if we don't have an activity icon)
+                if (!loadedActivityIcon) {
+                    task.applicationIcon =
+                            mApplicationIconCache.getAndInvalidateIfModified(taskKey);
+                    if (task.applicationIcon == null) {
+                        // Load the icon from the system
+                        if (info == null) {
+                            info = ssp.getActivityInfo(cn, t.userId);
+                        }
+                        task.applicationIcon = ssp.getActivityIcon(info, taskKey.userId);
+                        if (task.applicationIcon != null) {
+                            mApplicationIconCache.put(taskKey, task.applicationIcon);
+                        }
                     }
-                }
-                if (task.applicationIcon == null) {
-                    // Either the task has changed since the last active time, or it was not
-                    // previously cached, so try and load the task anew.
-                    tasksToLoad.add(task);
+                    if (task.applicationIcon == null) {
+                        // Either the task has changed since the last active time, or it was not
+                        // previously cached, so try and load the task anew.
+                        tasksToLoad.add(task);
+                    }
                 }
 
                 // Load the thumbnail from the cache if possible
-                task.thumbnail = mThumbnailCache.getAndInvalidateIfModified(task.key);
+                task.thumbnail = mThumbnailCache.getAndInvalidateIfModified(taskKey);
                 if (task.thumbnail == null) {
                     // Load the thumbnail from the system
-                    task.thumbnail = ssp.getTaskThumbnail(task.key.id);
+                    task.thumbnail = ssp.getTaskThumbnail(taskKey.id);
                     if (task.thumbnail != null) {
                         task.thumbnail.setHasAlpha(false);
-                        mThumbnailCache.put(task.key, task.thumbnail);
+                        mThumbnailCache.put(taskKey, task.thumbnail);
                     }
                 }
                 if (task.thumbnail == null) {
@@ -384,10 +416,11 @@
             }
 
             // Add the task to the stack
-            stack.addTask(task);
+            tasksToAdd.add(task);
         }
 
         // Simulate the groupings that we describe
+        stack.setTasks(tasksToAdd);
         stack.createAffiliatedGroupings(config);
 
         // Start the task loader and add all the tasks we need to load
@@ -401,21 +434,29 @@
     }
 
     /** Creates a lightweight stack of the current recent tasks, without thumbnails and icons. */
-    public static TaskStack getShallowTaskStack(SystemServicesProxy ssp, int numTasks) {
+    public static TaskStack getShallowTaskStack(SystemServicesProxy ssp, int numTasks,
+            Resources resources) {
         RecentsConfiguration config = RecentsConfiguration.getInstance();
         List<ActivityManager.RecentTaskInfo> tasks = getRecentTasks(ssp, numTasks);
+        ArrayList<Task> tasksToAdd = new ArrayList<Task>();
         TaskStack stack = new TaskStack();
 
         int taskCount = tasks.size();
         for (int i = 0; i < taskCount; i++) {
             ActivityManager.RecentTaskInfo t = tasks.get(i);
-            ActivityInfo info = ssp.getActivityInfo(t.baseIntent.getComponent(), t.userId);
-            if (info == null) continue;
+            ActivityManager.TaskDescription av = t.taskDescription;
 
-            stack.addTask(new Task(t.persistentId, true, t.baseIntent, t.affiliatedTaskId,
-                    t.affiliatedTaskColor, null, null, 0, 0, t.firstActiveTime, t.lastActiveTime,
-                    (i == (taskCount - 1)), config.lockToAppEnabled));
+            BitmapDrawable icon = null;
+            if (av.getIcon() != null) {
+                icon = new BitmapDrawable(resources, av.getIcon());
+            }
+            Task.TaskKey taskKey = new Task.TaskKey(t.persistentId, t.baseIntent, t.userId,
+                    t.firstActiveTime, t.lastActiveTime);
+            tasksToAdd.add(new Task(taskKey, true, t.affiliatedTaskId, t.affiliatedTaskColor,
+                    av.getLabel(), icon, av.getPrimaryColor(), (i == (taskCount - 1)),
+                    config.lockToAppEnabled));
         }
+        stack.setTasks(tasksToAdd);
         stack.createAffiliatedGroupings(config);
         return stack;
     }
@@ -484,18 +525,23 @@
                 // We are leaving recents, so trim the data a bit
                 mThumbnailCache.trimToSize(mMaxThumbnailCacheSize / 2);
                 mApplicationIconCache.trimToSize(mMaxIconCacheSize / 2);
+                mTaskDescriptionIconCache.trimToSize(mMaxIconCacheSize / 2);
                 break;
             case ComponentCallbacks2.TRIM_MEMORY_RUNNING_LOW:
             case ComponentCallbacks2.TRIM_MEMORY_MODERATE:
                 // We are going to be low on memory
                 mThumbnailCache.trimToSize(mMaxThumbnailCacheSize / 4);
                 mApplicationIconCache.trimToSize(mMaxIconCacheSize / 4);
+                mTaskDescriptionIconCache.trimToSize(mMaxIconCacheSize / 4);
                 break;
             case ComponentCallbacks2.TRIM_MEMORY_RUNNING_CRITICAL:
             case ComponentCallbacks2.TRIM_MEMORY_COMPLETE:
                 // We are low on memory, so release everything
                 mThumbnailCache.evictAll();
                 mApplicationIconCache.evictAll();
+                mTaskDescriptionIconCache.evictAll();
+                // The cache is small, only clear the label cache when we are critical
+                mActivityLabelCache.evictAll();
                 break;
             default:
                 break;
diff --git a/packages/SystemUI/src/com/android/systemui/recents/model/StringLruCache.java b/packages/SystemUI/src/com/android/systemui/recents/model/StringLruCache.java
new file mode 100644
index 0000000..b06c454
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/recents/model/StringLruCache.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2014 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.systemui.recents.model;
+
+/**
+ * The String LRU cache.
+ */
+class StringLruCache extends KeyStoreLruCache<String> {
+    public StringLruCache(int cacheSize) {
+        super(cacheSize);
+    }
+
+    @Override
+    protected int computeSize(String s) {
+        // The cache size is measured in number of strings
+        return 1;
+    }
+}
\ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/systemui/recents/model/Task.java b/packages/SystemUI/src/com/android/systemui/recents/model/Task.java
index f6c3a7e..977db60 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/model/Task.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/model/Task.java
@@ -88,7 +88,6 @@
     public boolean isActive;
     public boolean lockToThisTask;
     public boolean lockToTaskEnabled;
-    public int userId;
 
     TaskCallbacks mCb;
 
@@ -96,13 +95,12 @@
         // Only used by RecentsService for task rect calculations.
     }
 
-    public Task(int id, boolean isActive, Intent intent, int taskAffiliation, int taskAffiliationColor,
-                String activityTitle, Drawable activityIcon, int colorPrimary, int userId,
-                long firstActiveTime, long lastActiveTime, boolean lockToThisTask,
-                boolean lockToTaskEnabled) {
-        boolean isInAffiliationGroup = (taskAffiliation != id);
+    public Task(TaskKey key, boolean isActive, int taskAffiliation, int taskAffiliationColor,
+                String activityTitle, Drawable activityIcon, int colorPrimary,
+                boolean lockToThisTask, boolean lockToTaskEnabled) {
+        boolean isInAffiliationGroup = (taskAffiliation != key.id);
         boolean hasAffiliationGroupColor = isInAffiliationGroup && (taskAffiliationColor != 0);
-        this.key = new TaskKey(id, intent, userId, firstActiveTime, lastActiveTime);
+        this.key = key;
         this.taskAffiliation = taskAffiliation;
         this.taskAffiliationColor = taskAffiliationColor;
         this.activityLabel = activityTitle;
@@ -113,7 +111,20 @@
         this.isActive = isActive;
         this.lockToThisTask = lockToTaskEnabled && lockToThisTask;
         this.lockToTaskEnabled = lockToTaskEnabled;
-        this.userId = userId;
+    }
+
+    /** Copies the other task. */
+    public void copyFrom(Task o) {
+        this.key = o.key;
+        this.taskAffiliation = o.taskAffiliation;
+        this.taskAffiliationColor = o.taskAffiliationColor;
+        this.activityLabel = o.activityLabel;
+        this.activityIcon = o.activityIcon;
+        this.colorPrimary = o.colorPrimary;
+        this.useLightOnPrimaryColor = o.useLightOnPrimaryColor;
+        this.isActive = o.isActive;
+        this.lockToThisTask = o.lockToThisTask;
+        this.lockToTaskEnabled = o.lockToTaskEnabled;
     }
 
     /** Set the callbacks */
diff --git a/packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java b/packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java
index 98bf151..1e47b50 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java
@@ -92,7 +92,10 @@
 
     /** Returns the index of this task in the list of filtered tasks */
     int indexOf(Task t) {
-        return mTaskIndices.get(t.key);
+        if (mTaskIndices.containsKey(t.key)) {
+            return mTaskIndices.get(t.key);
+        }
+        return -1;
     }
 
     /** Returns the size of the list of filtered tasks */
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java
index 07a7e74..47fda5b 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java
@@ -408,14 +408,26 @@
         int thumbnailHeight = transform.rect.height();
         if (task.thumbnail != null && thumbnailWidth > 0 && thumbnailHeight > 0 &&
                 task.thumbnail.getWidth() > 0 && task.thumbnail.getHeight() > 0) {
-            // Resize the thumbnail to the size of the view that we are animating from
-            Bitmap b = Bitmap.createBitmap(thumbnailWidth, thumbnailHeight,
-                    Bitmap.Config.ARGB_8888);
-            Canvas c = new Canvas(b);
-            c.drawBitmap(task.thumbnail,
-                    new Rect(0, 0, task.thumbnail.getWidth(), task.thumbnail.getHeight()),
-                    new Rect(0, 0, thumbnailWidth, thumbnailHeight), null);
-            c.setBitmap(null);
+            Bitmap b;
+            if (tv != null) {
+                // Disable any focused state before we draw the header
+                if (tv.isFocusedTask()) {
+                    tv.unsetFocusedTask();
+                }
+
+                b = Bitmap.createBitmap(thumbnailWidth, thumbnailHeight, Bitmap.Config.ARGB_8888);
+                if (Constants.DebugFlags.App.EnableTransitionThumbnailDebugMode) {
+                    b.eraseColor(0xFFff0000);
+                } else {
+                    Canvas c = new Canvas(b);
+                    c.scale(tv.getScaleX(), tv.getScaleY());
+                    tv.mHeaderView.draw(c);
+                    c.setBitmap(null);
+                }
+            } else {
+                // Notify the system to skip the thumbnail layer by using an ALPHA_8 bitmap
+                b = Bitmap.createBitmap(thumbnailWidth, thumbnailHeight, Bitmap.Config.ALPHA_8);
+            }
             ActivityOptions.OnAnimationStartedListener animStartedListener = null;
             if (lockToTask) {
                 animStartedListener = new ActivityOptions.OnAnimationStartedListener() {
@@ -434,7 +446,7 @@
                     }
                 };
             }
-            opts = ActivityOptions.makeThumbnailScaleUpAnimation(sourceView,
+            opts = ActivityOptions.makeThumbnailAspectScaleUpAnimation(sourceView,
                     b, offsetX, offsetY, animStartedListener);
         }
 
@@ -446,13 +458,6 @@
                     // Bring an active task to the foreground
                     ssp.moveTaskToFront(task.key.id, launchOpts);
                 } else {
-                    // Launch the activity anew with the desired animation
-                    Intent i = new Intent(task.key.baseIntent);
-                    i.addFlags(Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY
-                            | Intent.FLAG_ACTIVITY_TASK_ON_HOME);
-                    if (!Utilities.isDocument(i)) {
-                        i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-                    }
                     try {
                         ssp.startActivityFromRecents(task.key.id, launchOpts);
                         if (launchOpts == null && lockToTask) {
@@ -461,9 +466,6 @@
                     } catch (ActivityNotFoundException anfe) {
                         Console.logError(getContext(), "Could not start Activity");
                     }
-
-                    // And clean up the old task
-                    onTaskViewDismissed(task);
                 }
             }
         };
@@ -472,7 +474,15 @@
         if (tv == null) {
             post(launchRunnable);
         } else {
-            stackView.startLaunchTaskAnimation(tv, launchRunnable);
+            if (!task.group.isFrontMostTask(task)) {
+                // For affiliated tasks that are behind other tasks, we must animate the front cards
+                // out of view before starting the task transition
+                stackView.startLaunchTaskAnimation(tv, launchRunnable);
+            } else {
+                // Otherwise, we can start the task transition immediately
+                stackView.startLaunchTaskAnimation(tv, null);
+                postDelayed(launchRunnable, 17);
+            }
         }
     }
 
@@ -485,7 +495,7 @@
         intent.setComponent(intent.resolveActivity(getContext().getPackageManager()));
         TaskStackBuilder.create(getContext())
                 .addNextIntentWithParentStack(intent).startActivities(null,
-                new UserHandle(t.userId));
+                new UserHandle(t.key.userId));
     }
 
     @Override
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
index aee558f..861011f 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
@@ -460,7 +460,17 @@
     }
 
     /**
-     * This is called with the full window width and height to allow stack view children to 
+     * This is ONLY used from AlternateRecentsComponent to update the dummy stack view for purposes
+     * of getting the task rect to animate to.
+     */
+    public void updateMinMaxScrollForStack(TaskStack stack, boolean launchedWithAltTab,
+            boolean launchedFromHome) {
+        mStack = stack;
+        updateMinMaxScroll(false, launchedWithAltTab, launchedFromHome);
+    }
+
+    /**
+     * This is called with the full window width and height to allow stack view children to
      * perform the full screen transition down.
      */
     @Override
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewLayoutAlgorithm.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewLayoutAlgorithm.java
index f0bdfa2..31fc701 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewLayoutAlgorithm.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewLayoutAlgorithm.java
@@ -33,7 +33,7 @@
 public class TaskStackViewLayoutAlgorithm {
 
     // These are all going to change
-    static final float StackPeekMinScale = 0.825f; // The min scale of the last card in the peek area
+    static final float StackPeekMinScale = 0.8f; // The min scale of the last card in the peek area
 
     RecentsConfiguration mConfig;
 
@@ -157,7 +157,7 @@
     public TaskViewTransform getStackTransform(Task task, float stackScroll, TaskViewTransform transformOut,
             TaskViewTransform prevTransform) {
         // Return early if we have an invalid index
-        if (task == null) {
+        if (task == null || !mTaskProgressMap.containsKey(task.key)) {
             transformOut.reset();
             return transformOut;
         }
@@ -200,6 +200,15 @@
     }
 
     /**
+     * Returns the untransformed task view size.
+     */
+    public Rect getUntransformedTaskViewSize() {
+        Rect tvSize = new Rect(mTaskRect);
+        tvSize.offsetTo(0, 0);
+        return tvSize;
+    }
+
+    /**
      * Returns the scroll to such task top = 1f;
      */
     float getStackScrollForTask(Task t) {
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
index e514c90..dfbcce1 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
@@ -235,7 +235,6 @@
         int initialDim = getDim();
         if (mConfig.launchedFromAppWithScreenshot) {
             if (isTaskViewLaunchTargetTask) {
-                mHeaderView.prepareEnterRecentsAnimation();
                 // Hide the footer during the transition in, and animate it out afterwards?
                 if (mFooterView != null) {
                     mFooterView.animateFooterVisibility(false, 0);
@@ -246,8 +245,6 @@
 
         } else if (mConfig.launchedFromAppWithThumbnail) {
             if (isTaskViewLaunchTargetTask) {
-                // Hide the front most task bar view so we can animate it in
-                mHeaderView.prepareEnterRecentsAnimation();
                 // Hide the action button if it exists
                 mActionButtonView.setAlpha(0f);
                 // Set the dim to 0 so we can animate it in
@@ -306,7 +303,6 @@
                     mViewBounds.animateClipBottom(getMeasuredHeight() - (windowInsetTop + size), duration);
                 }
                 // Animate the task bar of the first task view
-                mHeaderView.startEnterRecentsAnimation(0, null);
                 animate()
                         .scaleX(taskScale)
                         .scaleY(taskScale)
@@ -352,9 +348,8 @@
 
         } else if (mConfig.launchedFromAppWithThumbnail) {
             if (mTask.isLaunchTarget) {
-                // Animate the task bar of the first task view
-                mHeaderView.startEnterRecentsAnimation(mConfig.taskBarEnterAnimDelay,
-                        mThumbnailView.enableTaskBarClipAsRunnable(mHeaderView));
+                // Enable the task bar clip
+                mThumbnailView.enableTaskBarClip(mHeaderView);
                 // Animate the dim/overlay
                 if (Constants.DebugFlags.App.EnableThumbnailAlphaOnFrontmost) {
                     // Animate the thumbnail alpha before the dim animation (to prevent updating the
@@ -475,14 +470,13 @@
     }
 
     /** Animates this task view as it exits recents */
-    void startLaunchTaskAnimation(final Runnable r, boolean isLaunchingTask,
+    void startLaunchTaskAnimation(final Runnable postAnimRunnable, boolean isLaunchingTask,
             boolean occludesLaunchTarget) {
         if (isLaunchingTask) {
-            // Disable the thumbnail clip and animate the bar out for the window animation out
-            mHeaderView.startLaunchTaskAnimation(mThumbnailView.disableTaskBarClipAsRunnable(), r,
-                    mIsFocused);
+            // Disable the thumbnail clip
+            mThumbnailView.disableTaskBarClip();
             // Animate the thumbnail alpha back into full opacity for the window animation out
-            mThumbnailView.startLaunchTaskAnimation();
+            mThumbnailView.startLaunchTaskAnimation(postAnimRunnable);
 
             // Animate the dim
             if (mDim > 0) {
@@ -493,7 +487,11 @@
             }
 
             // Animate the action button away
-            mActionButtonView.animate().alpha(0f)
+            float toScale = 0.9f;
+            mActionButtonView.animate()
+                    .alpha(0f)
+                    .scaleX(toScale)
+                    .scaleY(toScale)
                     .setStartDelay(0)
                     .setDuration(mConfig.taskBarExitAnimDuration)
                     .setInterpolator(mConfig.fastOutLinearInInterpolator)
@@ -706,22 +704,30 @@
     }
 
     /**
+     * Unsets the focused task explicitly.
+     */
+    void unsetFocusedTask() {
+        mIsFocused = false;
+        if (mFocusAnimationsEnabled) {
+            // Un-focus the header bar
+            mHeaderView.onTaskViewFocusChanged(false);
+        }
+
+        // Update the thumbnail alpha with the focus
+        mThumbnailView.onFocusChanged(false);
+        // Call the callback
+        mCb.onTaskViewFocusChanged(this, false);
+        invalidate();
+    }
+
+    /**
      * Updates the explicitly focused state when the view focus changes.
      */
     @Override
     protected void onFocusChanged(boolean gainFocus, int direction, Rect previouslyFocusedRect) {
         super.onFocusChanged(gainFocus, direction, previouslyFocusedRect);
         if (!gainFocus) {
-            mIsFocused = false;
-            if (mFocusAnimationsEnabled) {
-                // Un-focus the header bar
-                mHeaderView.onTaskViewFocusChanged(false);
-            }
-            // Update the thumbnail alpha with the focus
-            mThumbnailView.onFocusChanged(false);
-            // Call the callback
-            mCb.onTaskViewFocusChanged(this, false);
-            invalidate();
+            unsetFocusedTask();
         }
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java
index d39f64e..1743433 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java
@@ -49,7 +49,7 @@
 
 
 /* The task bar view */
-class TaskViewHeader extends FrameLayout {
+public class TaskViewHeader extends FrameLayout {
 
     RecentsConfiguration mConfig;
 
@@ -156,8 +156,11 @@
             // Draw the highlight at the top edge (but put the bottom edge just out of view)
             float offset = (float) Math.ceil(mConfig.taskViewHighlightPx / 2f);
             float radius = mConfig.taskViewRoundedCornerRadiusPx;
+            int count = canvas.save(Canvas.CLIP_SAVE_FLAG);
+            canvas.clipRect(0, 0, getMeasuredWidth(), getMeasuredHeight());
             canvas.drawRoundRect(-offset, 0f, (float) getMeasuredWidth() + offset,
                     getMeasuredHeight() + radius, radius, radius, sHighlightPaint);
+            canvas.restoreToCount(count);
         }
     }
 
@@ -178,7 +181,7 @@
     }
 
     /** Binds the bar view to the task */
-    void rebindToTask(Task t) {
+    public void rebindToTask(Task t) {
         // If an activity icon is defined, then we use that as the primary icon to show in the bar,
         // otherwise, we fall back to the application icon
         if (t.activityIcon != null) {
@@ -212,51 +215,6 @@
         mApplicationIcon.setImageDrawable(null);
     }
 
-    /** Prepares this task view for the enter-recents animations.  This is called earlier in the
-     * first layout because the actual animation into recents may take a long time. */
-    void prepareEnterRecentsAnimation() {
-        setVisibility(View.INVISIBLE);
-    }
-
-    /** Animates this task bar as it enters recents */
-    void startEnterRecentsAnimation(int delay, Runnable postAnimRunnable) {
-        // Animate the task bar of the first task view
-        setVisibility(View.VISIBLE);
-        setAlpha(0f);
-        animate()
-                .alpha(1f)
-                .setStartDelay(delay)
-                .setInterpolator(mConfig.linearOutSlowInInterpolator)
-                .setDuration(mConfig.taskBarEnterAnimDuration)
-                .withEndAction(postAnimRunnable)
-                .withLayer()
-                .start();
-    }
-
-    /** Animates this task bar as it exits recents */
-    void startLaunchTaskAnimation(Runnable preAnimRunnable, final Runnable postAnimRunnable,
-            boolean isFocused) {
-        if (isFocused) {
-            onTaskViewFocusChanged(false);
-        }
-
-        // Animate the task bar out of the first task view
-        animate()
-                .alpha(0f)
-                .setStartDelay(0)
-                .setInterpolator(mConfig.linearOutSlowInInterpolator)
-                .setDuration(mConfig.taskBarExitAnimDuration)
-                .withStartAction(preAnimRunnable)
-                .withEndAction(new Runnable() {
-                    @Override
-                    public void run() {
-                        post(postAnimRunnable);
-                    }
-                })
-                .withLayer()
-                .start();
-    }
-
     /** Animates this task bar dismiss button when launching a task. */
     void startLaunchTaskDismissAnimation() {
         if (mDismissButton.getVisibility() == View.VISIBLE) {
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewThumbnail.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewThumbnail.java
index f223bf3..fe36987 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewThumbnail.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewThumbnail.java
@@ -64,25 +64,10 @@
         setClipBounds(mClipRect);
     }
 
-    /** Convenience method to enable task bar clipping as a runnable. */
-    Runnable enableTaskBarClipAsRunnable(final View taskBar) {
-        return new Runnable() {
-            @Override
-            public void run() {
-                enableTaskBarClip(taskBar);
-            }
-        };
-    }
-
     /** Disables the task bar clipping. */
-    Runnable disableTaskBarClipAsRunnable() {
-        return new Runnable() {
-            @Override
-            public void run() {
-                mClipRect.set(0, 0, getMeasuredWidth(), getMeasuredHeight());
-                setClipBounds(mClipRect);
-            }
-        };
+    void disableTaskBarClip() {
+        mClipRect.set(0, 0, getMeasuredWidth(), getMeasuredHeight());
+        setClipBounds(mClipRect);
     }
 
     /** Binds the thumbnail view to the screenshot. */
@@ -140,8 +125,8 @@
     }
 
     /** Animates this task thumbnail as it exits recents */
-    void startLaunchTaskAnimation() {
-        startFadeAnimation(1f, 0, mConfig.taskBarExitAnimDuration, null);
+    void startLaunchTaskAnimation(Runnable postAnimRunnable) {
+        startFadeAnimation(1f, 0, mConfig.taskBarExitAnimDuration, postAnimRunnable);
     }
 
     /** Animates the thumbnail alpha. */
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index 0ddef48..df005a8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -21,7 +21,6 @@
 import android.animation.TimeInterpolator;
 import android.app.ActivityManager;
 import android.app.ActivityManagerNative;
-import android.app.ActivityThread;
 import android.app.Notification;
 import android.app.PendingIntent;
 import android.app.TaskStackBuilder;
@@ -32,16 +31,12 @@
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.content.pm.ApplicationInfo;
-import android.content.pm.IPackageManager;
-import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.pm.UserInfo;
 import android.content.res.Configuration;
 import android.database.ContentObserver;
-import android.graphics.Rect;
 import android.graphics.drawable.Drawable;
-import android.net.Uri;
 import android.os.AsyncTask;
 import android.os.Build;
 import android.os.Handler;
@@ -523,6 +518,11 @@
         }
     }
 
+    @Override
+    public String getCurrentMediaNotificationKey() {
+        return null;
+    }
+
     /**
      * Takes the necessary steps to prepare the status bar for starting an activity, then starts it.
      * @param action A dismiss action that is called if it's safe to start the activity.
@@ -579,7 +579,7 @@
     }
 
 
-    protected void applyLegacyRowBackground(StatusBarNotification sbn,
+    protected void applyColorsAndBackgrounds(StatusBarNotification sbn,
             NotificationData.Entry entry) {
         int version = 0;
         try {
@@ -602,6 +602,14 @@
                 entry.row.setTintColor(color);
             }
         }
+
+        if (entry.icon != null) {
+            if (version >= Build.VERSION_CODES.L) {
+                entry.icon.setColorFilter(mContext.getResources().getColor(android.R.color.white));
+            } else {
+                entry.icon.setColorFilter(null);
+            }
+        }
     }
 
     public boolean isMediaNotification(NotificationData.Entry entry) {
@@ -1250,7 +1258,7 @@
         entry.expandedPublic = publicViewLocal;
         entry.setBigContentView(bigContentViewLocal);
 
-        applyLegacyRowBackground(sbn, entry);
+        applyColorsAndBackgrounds(sbn, entry);
 
         // Restore previous flags.
         if (hasUserChangedExpansion) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java
index 7fefa64..7e37336 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java
@@ -98,6 +98,16 @@
 
         @Override
         public int compare(Entry a, Entry b) {
+            String mediaNotification = mEnvironment.getCurrentMediaNotificationKey();
+
+            // Upsort current media notification.
+            boolean aMedia = a.key.equals(mediaNotification);
+            boolean bMedia = b.key.equals(mediaNotification);
+            if (aMedia != bMedia) {
+                return aMedia ? -1 : 1;
+            }
+
+            // RankingMap as received from NoMan.
             if (mRankingMap != null) {
                 mRankingMap.getRanking(a.key, mRankingA);
                 mRankingMap.getRanking(b.key, mRankingB);
@@ -291,5 +301,6 @@
         public boolean shouldHideSensitiveContents(int userId);
         public boolean isDeviceProvisioned();
         public boolean isNotificationForCurrentProfiles(StatusBarNotification sbn);
+        public String getCurrentMediaNotificationKey();
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarTransitions.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarTransitions.java
index 50ddeb3..f3930ba 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarTransitions.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarTransitions.java
@@ -79,6 +79,7 @@
         setKeyButtonViewQuiescentAlpha(mView.getHomeButton(), alpha, animate);
         setKeyButtonViewQuiescentAlpha(mView.getRecentsButton(), alpha, animate);
         setKeyButtonViewQuiescentAlpha(mView.getMenuButton(), alpha, animate);
+        setKeyButtonViewQuiescentAlpha(mView.getImeSwitchButton(), alpha, animate);
 
         applyBackButtonQuiescentAlpha(mode, animate);
 
@@ -96,6 +97,7 @@
         backAlpha = maxVisibleQuiescentAlpha(backAlpha, mView.getHomeButton());
         backAlpha = maxVisibleQuiescentAlpha(backAlpha, mView.getRecentsButton());
         backAlpha = maxVisibleQuiescentAlpha(backAlpha, mView.getMenuButton());
+        backAlpha = maxVisibleQuiescentAlpha(backAlpha, mView.getImeSwitchButton());
         if (backAlpha > 0) {
             setKeyButtonViewQuiescentAlpha(mView.getBackButton(), backAlpha, animate);
         }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarViewTaskSwitchHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarViewTaskSwitchHelper.java
index c5f8303..b633453 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarViewTaskSwitchHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarViewTaskSwitchHelper.java
@@ -37,7 +37,7 @@
 
     public NavigationBarViewTaskSwitchHelper(Context context) {
         ViewConfiguration configuration = ViewConfiguration.get(context);
-        mScrollTouchSlop = configuration.getScaledTouchSlop();
+        mScrollTouchSlop = 4 * configuration.getScaledTouchSlop();
         mMinFlingVelocity = configuration.getScaledMinimumFlingVelocity();
         mTaskSwitcherDetector = new GestureDetector(context, this);
     }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index e1beb08..d3c3f56 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -58,7 +58,7 @@
     private static final int CAP_HEIGHT = 1456;
     private static final int FONT_HEIGHT = 2163;
 
-    private static final float HEADER_RUBBERBAND_FACTOR = 2.15f;
+    private static final float HEADER_RUBBERBAND_FACTOR = 2.05f;
     private static final float LOCK_ICON_ACTIVE_SCALE = 1.2f;
 
     private KeyguardAffordanceHelper mAfforanceHelper;
@@ -160,6 +160,8 @@
 
     private boolean mQsScrimEnabled = true;
     private boolean mLastAnnouncementWasQuickSettings;
+    private boolean mQsTouchAboveFalsingThreshold;
+    private int mQsFalsingThreshold;
 
     public NotificationPanelView(Context context, AttributeSet attrs) {
         super(context, attrs);
@@ -230,6 +232,8 @@
         mClockPositionAlgorithm.loadDimens(getResources());
         mNotificationScrimWaitDistance =
                 getResources().getDimensionPixelSize(R.dimen.notification_scrim_wait_distance);
+        mQsFalsingThreshold = getResources().getDimensionPixelSize(
+                R.dimen.qs_falsing_threshold);
     }
 
     public void updateResources() {
@@ -526,6 +530,7 @@
     private void resetDownStates(MotionEvent event) {
         if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
             mOnlyAffordanceInThisMotion = false;
+            mQsTouchAboveFalsingThreshold = mQsFullyExpanded;
         }
     }
 
@@ -546,6 +551,9 @@
     }
 
     private boolean flingExpandsQs(float vel) {
+        if (!mQsTouchAboveFalsingThreshold && mStatusBarState == StatusBarState.KEYGUARD) {
+            return false;
+        }
         if (Math.abs(vel) < mFlingAnimationUtils.getMinVelocityPxPerSecond()) {
             return getQsExpansionFraction() > 0.5f;
         } else {
@@ -690,6 +698,9 @@
             case MotionEvent.ACTION_MOVE:
                 final float h = y - mInitialTouchY;
                 setQsExpansion(h + mInitialHeightOnTouch);
+                if (h >= mQsFalsingThreshold) {
+                    mQsTouchAboveFalsingThreshold = true;
+                }
                 trackMovement(event);
                 break;
 
@@ -1665,7 +1676,7 @@
     @Override
     protected boolean fullyExpandedClearAllVisible() {
         return mNotificationStackScroller.isDismissViewNotGone()
-                && mNotificationStackScroller.isScrolledToBottom();
+                && mNotificationStackScroller.isScrolledToBottom() && !mTwoFingerQsExpand;
     }
 
     @Override
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 b175fd5..e818d23 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -68,6 +68,8 @@
     protected boolean mHintAnimationRunning;
     private boolean mOverExpandedBeforeFling;
     private float mOriginalIndicationY;
+    private boolean mTouchAboveFalsingThreshold;
+    private int mUnlockFalsingThreshold;
 
     private ValueAnimator mHeightAnimator;
     private ObjectAnimator mPeekAnimator;
@@ -183,6 +185,7 @@
         mTouchSlop = configuration.getScaledTouchSlop();
         mHintDistance = res.getDimension(R.dimen.hint_move_distance);
         mEdgeTapAreaWidth = res.getDimensionPixelSize(R.dimen.edge_tap_area_width);
+        mUnlockFalsingThreshold = res.getDimensionPixelSize(R.dimen.unlock_falsing_threshold);
     }
 
     private void trackMovement(MotionEvent event) {
@@ -234,6 +237,7 @@
                 mHasLayoutedSinceDown = false;
                 mUpdateFlingOnLayout = false;
                 mPeekTouching = mPanelClosedOnDown;
+                mTouchAboveFalsingThreshold = false;
                 if (mVelocityTracker == null) {
                     initVelocityTracker();
                 }
@@ -298,6 +302,9 @@
                     }
                     mJustPeeked = false;
                 }
+                if (-h >= mUnlockFalsingThreshold) {
+                    mTouchAboveFalsingThreshold = true;
+                }
                 if (!mJustPeeked && (!waitForTouchSlop || mTracking) && !isTrackingBlocked()) {
                     setExpandedHeightInternal(newHeight);
                 }
@@ -399,6 +406,7 @@
                 mPanelClosedOnDown = mExpandedHeight == 0.0f;
                 mHasLayoutedSinceDown = false;
                 mUpdateFlingOnLayout = false;
+                mTouchAboveFalsingThreshold = false;
                 initVelocityTracker();
                 trackMovement(event);
                 break;
@@ -471,6 +479,9 @@
      * @return whether a fling should expands the panel; contracts otherwise
      */
     protected boolean flingExpands(float vel, float vectorVel) {
+        if (!mTouchAboveFalsingThreshold && mStatusBar.isFalsingThresholdNeeded()) {
+            return true;
+        }
         if (Math.abs(vectorVel) < mFlingAnimationUtils.getMinVelocityPxPerSecond()) {
             return getExpandedFraction() > 0.5f;
         } else {
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 95232d4..21dc27e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -686,6 +686,7 @@
         mStackScroller = (NotificationStackScrollLayout) mStatusBarWindow.findViewById(
                 R.id.notification_stack_scroller);
         mStackScroller.setLongPressListener(getNotificationLongClicker());
+        mStackScroller.setPhoneStatusBar(this);
 
         mKeyguardIconOverflowContainer =
                 (NotificationOverflowContainer) LayoutInflater.from(mContext).inflate(
@@ -2053,6 +2054,17 @@
         return mNotificationPanel.isQsExpanded();
     }
 
+    public boolean isFalsingThresholdNeeded() {
+        boolean onKeyguard = getBarState() == StatusBarState.KEYGUARD;
+        boolean isMethodInSecure = mUnlockMethodCache.isMethodInsecure();
+        return onKeyguard && isMethodInSecure;
+    }
+
+    @Override  // NotificationData.Environment
+    public String getCurrentMediaNotificationKey() {
+        return mMediaNotificationKey;
+    }
+
     /**
      * All changes to the status bar and notifications funnel through here and are batched.
      */
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
index f427ec4..3338f6a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
@@ -298,9 +298,7 @@
      */
     public boolean onBackPressed() {
         if (mBouncer.isShowing()) {
-            mBouncer.hide(false /* destroyView */);
-            mPhoneStatusBar.showKeyguard();
-            updateStates();
+            reset();
             return true;
         }
         return false;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpNotificationView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpNotificationView.java
index 6ae076f..b2009c3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpNotificationView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpNotificationView.java
@@ -301,6 +301,11 @@
     }
 
     @Override
+    public boolean isAntiFalsingNeeded() {
+        return false;
+    }
+
+    @Override
     public void onChildDismissed(View v) {
         Log.v(TAG, "User swiped heads up to dismiss");
         mBar.onHeadsUpDismissed();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiAccessPointController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiAccessPointController.java
index 09e7472..b800fbf 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiAccessPointController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiAccessPointController.java
@@ -134,6 +134,9 @@
         final List<AccessPoint> aps = new ArrayList<AccessPoint>(scanResults.size());
         final ArraySet<String> ssids = new ArraySet<String>();
         for (ScanResult scanResult : scanResults) {
+            if (scanResult == null) {
+                continue;
+            }
             final String ssid = scanResult.SSID;
             if (TextUtils.isEmpty(ssid) || ssids.contains(ssid)) continue;
             if (!configured.containsKey(ssid)) continue;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
index 68a02cf..0aa1114 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
@@ -40,6 +40,7 @@
 import com.android.systemui.statusbar.ExpandableNotificationRow;
 import com.android.systemui.statusbar.ExpandableView;
 import com.android.systemui.statusbar.SpeedBumpView;
+import com.android.systemui.statusbar.phone.PhoneStatusBar;
 import com.android.systemui.statusbar.policy.ScrollAdapter;
 import com.android.systemui.statusbar.stack.StackScrollState.ViewState;
 
@@ -195,6 +196,7 @@
             return true;
         }
     };
+    private PhoneStatusBar mPhoneStatusBar;
 
     public NotificationStackScrollLayout(Context context) {
         this(context, null);
@@ -640,6 +642,11 @@
         return (veto != null && veto.getVisibility() != View.GONE);
     }
 
+    @Override
+    public boolean isAntiFalsingNeeded() {
+        return mPhoneStatusBar.isFalsingThresholdNeeded();
+    }
+
     private void setSwipingInProgress(boolean isSwiped) {
         mSwipingInProgress = isSwiped;
         if(isSwiped) {
@@ -2150,7 +2157,15 @@
     }
 
     public int getDismissViewHeight() {
-        return mDismissView.getHeight() + mPaddingBetweenElementsNormal;
+        int height = mDismissView.getHeight() + mPaddingBetweenElementsNormal;
+
+        // Hack: Accommodate for additional distance when we only have one notification and the
+        // dismiss all button.
+        if (getNotGoneChildCount() == 2 && getLastChildNotGone() == mDismissView
+                && getFirstChildNotGone() instanceof ActivatableNotificationView) {
+            height += mCollapseSecondCardPadding;
+        }
+        return height;
     }
 
     public float getBottomMostNotificationBottom() {
@@ -2177,6 +2192,10 @@
         mStackScrollAlgorithm.updateIsSmallScreen(mMaxLayoutHeight - qsMinHeight);
     }
 
+    public void setPhoneStatusBar(PhoneStatusBar phoneStatusBar) {
+        this.mPhoneStatusBar = phoneStatusBar;
+    }
+
     /**
      * A listener that is notified when some child locations might have changed.
      */
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index c57563b..5a836c8 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -2978,7 +2978,10 @@
             boolean immersiveSticky = (sysui & View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY) != 0;
             boolean navAllowedHidden = immersive || immersiveSticky;
             navTranslucent &= !immersiveSticky;  // transient trumps translucent
-            navTranslucent &= areTranslucentBarsAllowed();
+            boolean isKeyguardShowing = isStatusBarKeyguard() && !mHideLockScreen;
+            if (!isKeyguardShowing) {
+                navTranslucent &= areTranslucentBarsAllowed();
+            }
 
             // When the navigation bar isn't visible, we put up a fake
             // input window to catch all touch events.  This way we can
@@ -3102,7 +3105,9 @@
                 boolean statusBarTransient = (sysui & View.STATUS_BAR_TRANSIENT) != 0;
                 boolean statusBarTranslucent = (sysui
                         & (View.STATUS_BAR_TRANSLUCENT | View.SYSTEM_UI_TRANSPARENT)) != 0;
-                statusBarTranslucent &= areTranslucentBarsAllowed();
+                if (!isKeyguardShowing) {
+                    statusBarTranslucent &= areTranslucentBarsAllowed();
+                }
 
                 // If the status bar is hidden, we don't want to cause
                 // windows behind it to scroll.
@@ -5421,7 +5426,7 @@
                                         dock.resolveTypeIfNeeded(mContext.getContentResolver()),
                                         null, null, 0,
                                         ActivityManager.START_FLAG_ONLY_IF_NEEDED,
-                                        null, null, null, UserHandle.USER_CURRENT);
+                                        null, null, UserHandle.USER_CURRENT);
                         if (result == ActivityManager.START_RETURN_INTENT_TO_CALLER) {
                             return false;
                         }
@@ -5432,7 +5437,7 @@
                                 mHomeIntent.resolveTypeIfNeeded(mContext.getContentResolver()),
                                 null, null, 0,
                                 ActivityManager.START_FLAG_ONLY_IF_NEEDED,
-                                null, null, null, UserHandle.USER_CURRENT);
+                                null, null, UserHandle.USER_CURRENT);
                 if (result == ActivityManager.START_RETURN_INTENT_TO_CALLER) {
                     return false;
                 }
@@ -5611,7 +5616,7 @@
             vis = (vis & ~flags) | (oldVis & flags);
         }
 
-        if (!areTranslucentBarsAllowed()) {
+        if (!areTranslucentBarsAllowed() && transWin != mStatusBar) {
             vis &= ~(View.NAVIGATION_BAR_TRANSLUCENT | View.STATUS_BAR_TRANSLUCENT
                     | View.SYSTEM_UI_TRANSPARENT);
         }
diff --git a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
index b1f1954..4e2f52c 100644
--- a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
+++ b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
@@ -124,6 +124,8 @@
     //       when that accessibility services are bound.
     private static final int WAIT_FOR_USER_STATE_FULLY_INITIALIZED_MILLIS = 3000;
 
+    private static final int WAIT_WINDOWS_TIMEOUT_MILLIS = 5000;
+
     private static final String FUNCTION_REGISTER_UI_TEST_AUTOMATION_SERVICE =
         "registerUiTestAutomationService";
 
@@ -1367,6 +1369,8 @@
         if (mWindowsForAccessibilityCallback != null) {
             mWindowsForAccessibilityCallback = null;
             mWindowManagerService.setWindowsForAccessibilityCallback(null);
+            // Drop all windows we know about.
+            mSecurityPolicy.clearWindowsLocked();
         }
     }
 
@@ -1631,16 +1635,18 @@
                 pw.println("}]");
                 pw.println();
             }
-            final int windowCount = mSecurityPolicy.mWindows.size();
-            for (int j = 0; j < windowCount; j++) {
-                if (j > 0) {
-                    pw.append(',');
-                    pw.println();
+            if (mSecurityPolicy.mWindows != null) {
+                final int windowCount = mSecurityPolicy.mWindows.size();
+                for (int j = 0; j < windowCount; j++) {
+                    if (j > 0) {
+                        pw.append(',');
+                        pw.println();
+                    }
+                    pw.append("Window[");
+                    AccessibilityWindowInfo window = mSecurityPolicy.mWindows.get(j);
+                    pw.append(window.toString());
+                    pw.append(']');
                 }
-                pw.append("Window[");
-                AccessibilityWindowInfo window = mSecurityPolicy.mWindows.get(j);
-                pw.append(window.toString());
-                pw.append(']');
             }
         }
     }
@@ -1821,6 +1827,39 @@
         return -1;
     }
 
+    private void ensureWindowsAvailableTimed() {
+        synchronized (mLock) {
+            if (mSecurityPolicy.mWindows != null) {
+                return;
+            }
+            // If we have no registered callback, update the state we
+            // we may have to register one but it didn't happen yet.
+            if (mWindowsForAccessibilityCallback == null) {
+                UserState userState = getCurrentUserStateLocked();
+                onUserStateChangedLocked(userState);
+            }
+            // We have no windows but do not care about them, done.
+            if (mWindowsForAccessibilityCallback == null) {
+                return;
+            }
+
+            // Wait for the windows with a timeout.
+            final long startMillis = SystemClock.uptimeMillis();
+            while (mSecurityPolicy.mWindows == null) {
+                final long elapsedMillis = SystemClock.uptimeMillis() - startMillis;
+                final long remainMillis = WAIT_WINDOWS_TIMEOUT_MILLIS - elapsedMillis;
+                if (remainMillis <= 0) {
+                    return;
+                }
+                try {
+                    mLock.wait(remainMillis);
+                } catch (InterruptedException ie) {
+                    /* ignore */
+                }
+            }
+        }
+    }
+
     /**
      * This class represents an accessibility service. It stores all per service
      * data required for the service management, provides API for starting/stopping the
@@ -1876,9 +1915,6 @@
 
         final KeyEventDispatcher mKeyEventDispatcher = new KeyEventDispatcher();
 
-        final SparseArray<AccessibilityWindowInfo> mIntrospectedWindows =
-                new SparseArray<>();
-
         boolean mWasConnectedAndDied;
 
         // Handler only for dispatching accessibility events since we use event
@@ -1946,10 +1982,6 @@
                     & AccessibilityServiceInfo.FLAG_REQUEST_FILTER_KEY_EVENTS) != 0;
             mRetrieveInteractiveWindows = (info.flags
                     & AccessibilityServiceInfo.FLAG_RETRIEVE_INTERACTIVE_WINDOWS) != 0;
-
-            if (!mRetrieveInteractiveWindows) {
-                clearIntrospectedWindows();
-            }
         }
 
         /**
@@ -2065,6 +2097,7 @@
 
         @Override
         public List<AccessibilityWindowInfo> getWindows() {
+            ensureWindowsAvailableTimed();
             synchronized (mLock) {
                 // We treat calls from a profile as if made by its perent as profiles
                 // share the accessibility state of the parent. The call below
@@ -2087,7 +2120,6 @@
                     AccessibilityWindowInfo windowClone =
                             AccessibilityWindowInfo.obtain(window);
                     windowClone.setConnectionId(mId);
-                    mIntrospectedWindows.put(window.getId(), windowClone);
                     windows.add(windowClone);
                 }
                 return windows;
@@ -2096,6 +2128,7 @@
 
         @Override
         public AccessibilityWindowInfo getWindow(int windowId) {
+            ensureWindowsAvailableTimed();
             synchronized (mLock) {
                 // We treat calls from a profile as if made by its parent as profiles
                 // share the accessibility state of the parent. The call below
@@ -2115,7 +2148,6 @@
                 if (window != null) {
                     AccessibilityWindowInfo windowClone = AccessibilityWindowInfo.obtain(window);
                     windowClone.setConnectionId(mId);
-                    mIntrospectedWindows.put(windowId, windowClone);
                     return windowClone;
                 }
                 return null;
@@ -2607,19 +2639,10 @@
         }
 
         public void notifyClearAccessibilityNodeInfoCache() {
-            clearIntrospectedWindows();
             mInvocationHandler.sendEmptyMessage(
                     InvocationHandler.MSG_CLEAR_ACCESSIBILITY_CACHE);
         }
 
-        private void clearIntrospectedWindows() {
-            final int windowCount = mIntrospectedWindows.size();
-            for (int i = windowCount - 1; i >= 0; i--) {
-                mIntrospectedWindows.valueAt(i).recycle();
-                mIntrospectedWindows.removeAt(i);
-            }
-        }
-
         private void notifyGestureInternal(int gestureId) {
             final IAccessibilityServiceClient listener;
             synchronized (mLock) {
@@ -2955,6 +2978,9 @@
 
                 // Let the policy update the focused and active windows.
                 mSecurityPolicy.updateWindowsLocked(reportedWindows);
+
+                // Someone may be waiting for the windows - advertise it.
+                mLock.notifyAll();
             }
         }
 
@@ -3130,7 +3156,7 @@
             | AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED
             | AccessibilityEvent.TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY;
 
-        public final List<AccessibilityWindowInfo> mWindows = new ArrayList<>();
+        public List<AccessibilityWindowInfo> mWindows;
 
         public int mActiveWindowId = INVALID_WINDOW_ID;
         public int mFocusedWindowId = INVALID_WINDOW_ID;
@@ -3185,7 +3211,17 @@
             }
         }
 
+        public void clearWindowsLocked() {
+            List<AccessibilityWindowInfo> windows = Collections.emptyList();
+            updateWindowsLocked(windows);
+            mWindows = null;
+        }
+
         public void updateWindowsLocked(List<AccessibilityWindowInfo> windows) {
+            if (mWindows == null) {
+                mWindows = new ArrayList<>();
+            }
+
             final int oldWindowCount = mWindows.size();
             for (int i = oldWindowCount - 1; i >= 0; i--) {
                 mWindows.remove(i).recycle();
@@ -3231,6 +3267,9 @@
                     if (window.getId() == mActiveWindowId) {
                         window.setActive(true);
                     }
+                    if (window.getId() == mAccessibilityFocusedWindowId) {
+                        window.setAccessibilityFocused(true);
+                    }
                 }
             }
 
@@ -3298,7 +3337,7 @@
                         if (mAccessibilityFocusedWindowId != windowId) {
                             mMainHandler.obtainMessage(MainHandler.MSG_CLEAR_ACCESSIBILITY_FOCUS,
                                     mAccessibilityFocusedWindowId, 0).sendToTarget();
-                            mAccessibilityFocusedWindowId = windowId;
+                            mSecurityPolicy.setAccessibilityFocusedWindowLocked(windowId);
                             mAccessibilityFocusNodeId = nodeId;
                         }
                     }
@@ -3354,15 +3393,32 @@
         private void setActiveWindowLocked(int windowId) {
             if (mActiveWindowId != windowId) {
                 mActiveWindowId = windowId;
-                final int windowCount = mWindows.size();
-                for (int i = 0; i < windowCount; i++) {
-                    AccessibilityWindowInfo window = mWindows.get(i);
-                    window.setActive(window.getId() == windowId);
+                if (mWindows != null) {
+                    final int windowCount = mWindows.size();
+                    for (int i = 0; i < windowCount; i++) {
+                        AccessibilityWindowInfo window = mWindows.get(i);
+                        window.setActive(window.getId() == windowId);
+                    }
                 }
                 notifyWindowsChanged();
             }
         }
 
+        private void setAccessibilityFocusedWindowLocked(int windowId) {
+            if (mAccessibilityFocusedWindowId != windowId) {
+                mAccessibilityFocusedWindowId = windowId;
+                if (mWindows != null) {
+                    final int windowCount = mWindows.size();
+                    for (int i = 0; i < windowCount; i++) {
+                        AccessibilityWindowInfo window = mWindows.get(i);
+                        window.setAccessibilityFocused(window.getId() == windowId);
+                    }
+                }
+
+                notifyWindowsChanged();
+            }
+        }
+
         private void notifyWindowsChanged() {
             // Let the client know the windows changed.
             AccessibilityEvent event = AccessibilityEvent.obtain(
@@ -3444,11 +3500,13 @@
         }
 
         private AccessibilityWindowInfo findWindowById(int windowId) {
-            final int windowCount = mWindows.size();
-            for (int i = 0; i < windowCount; i++) {
-                AccessibilityWindowInfo window = mWindows.get(i);
-                if (window.getId() == windowId) {
-                    return window;
+            if (mWindows != null) {
+                final int windowCount = mWindows.size();
+                for (int i = 0; i < windowCount; i++) {
+                    AccessibilityWindowInfo window = mWindows.get(i);
+                    if (window.getId() == windowId) {
+                        return window;
+                    }
                 }
             }
             return null;
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index 8dd6420..8bb094b 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -1898,17 +1898,17 @@
                     break;
                 }
                 case NetworkMonitor.EVENT_PROVISIONING_NOTIFICATION: {
-                    NetworkAgentInfo nai = null;
-                    synchronized (mNetworkForNetId) {
-                        nai = mNetworkForNetId.get(msg.arg2);
-                    }
-                    if (nai == null) {
-                        loge("EVENT_PROVISIONING_NOTIFICATION from unknown NetworkMonitor");
-                        break;
-                    }
                     if (msg.arg1 == 0) {
                         setProvNotificationVisibleIntent(false, msg.arg2, 0, null, null);
                     } else {
+                        NetworkAgentInfo nai = null;
+                        synchronized (mNetworkForNetId) {
+                            nai = mNetworkForNetId.get(msg.arg2);
+                        }
+                        if (nai == null) {
+                            loge("EVENT_PROVISIONING_NOTIFICATION from unknown NetworkMonitor");
+                            break;
+                        }
                         setProvNotificationVisibleIntent(true, msg.arg2, nai.networkInfo.getType(),
                                 nai.networkInfo.getExtraInfo(), (PendingIntent)msg.obj);
                     }
diff --git a/services/core/java/com/android/server/Watchdog.java b/services/core/java/com/android/server/Watchdog.java
index 1ce073a..89e3f49 100644
--- a/services/core/java/com/android/server/Watchdog.java
+++ b/services/core/java/com/android/server/Watchdog.java
@@ -332,6 +332,7 @@
             final ArrayList<HandlerChecker> blockedCheckers;
             final String subject;
             final boolean allowRestart;
+            int debuggerWasConnected = 0;
             synchronized (this) {
                 long timeout = CHECK_INTERVAL;
                 // Make sure we (re)spin the checkers that have become idle within
@@ -341,17 +342,27 @@
                     hc.scheduleCheckLocked();
                 }
 
+                if (debuggerWasConnected > 0) {
+                    debuggerWasConnected--;
+                }
+
                 // NOTE: We use uptimeMillis() here because we do not want to increment the time we
                 // wait while asleep. If the device is asleep then the thing that we are waiting
                 // to timeout on is asleep as well and won't have a chance to run, causing a false
                 // positive on when to kill things.
                 long start = SystemClock.uptimeMillis();
                 while (timeout > 0) {
+                    if (Debug.isDebuggerConnected()) {
+                        debuggerWasConnected = 2;
+                    }
                     try {
                         wait(timeout);
                     } catch (InterruptedException e) {
                         Log.wtf(TAG, e);
                     }
+                    if (Debug.isDebuggerConnected()) {
+                        debuggerWasConnected = 2;
+                    }
                     timeout = CHECK_INTERVAL - (SystemClock.uptimeMillis() - start);
                 }
 
@@ -450,7 +461,12 @@
 
             // Only kill the process if the debugger is not attached.
             if (Debug.isDebuggerConnected()) {
+                debuggerWasConnected = 2;
+            }
+            if (debuggerWasConnected >= 2) {
                 Slog.w(TAG, "Debugger connected: Watchdog is *not* killing the system process");
+            } else if (debuggerWasConnected > 0) {
+                Slog.w(TAG, "Debugger was connected: Watchdog is *not* killing the system process");
             } else if (!allowRestart) {
                 Slog.w(TAG, "Restart not allowed: Watchdog is *not* killing the system process");
             } else {
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 62a212b..972a86d 100755
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -33,9 +33,11 @@
 
 import android.Manifest;
 import android.app.AppOpsManager;
+import android.app.ApplicationThreadNative;
 import android.app.IActivityContainer;
 import android.app.IActivityContainerCallback;
 import android.app.IAppTask;
+import android.app.ProfilerInfo;
 import android.app.admin.DevicePolicyManager;
 import android.app.usage.UsageEvents;
 import android.app.usage.UsageStatsManagerInternal;
@@ -282,9 +284,6 @@
 
     static final boolean IS_USER_BUILD = "user".equals(Build.TYPE);
 
-    // Maximum number of recent tasks that we can remember.
-    static final int MAX_RECENT_TASKS = ActivityManager.isLowRamDeviceStatic() ? 100 : 200;
-
     // Maximum number recent bitmaps to keep in memory.
     static final int MAX_RECENT_BITMAPS = 5;
 
@@ -1049,8 +1048,9 @@
     ProcessRecord mProfileProc = null;
     String mProfileFile;
     ParcelFileDescriptor mProfileFd;
-    int mProfileType = 0;
+    int mSamplingInterval = 0;
     boolean mAutoStopProfiler = false;
+    int mProfileType = 0;
     String mOpenGlTraceApp = null;
 
     static class ProcessChangeItem {
@@ -2831,8 +2831,7 @@
             if (proc.baseProcessTracker != null) {
                 proc.baseProcessTracker.reportCachedKill(proc.pkgList, proc.lastCachedPss);
             }
-            killUnneededProcessLocked(proc, Long.toString(proc.lastCachedPss)
-                    + "k from cached");
+            proc.kill(Long.toString(proc.lastCachedPss) + "k from cached", true);
         } else if (proc != null && !keepIfLarge
                 && mLastMemoryLevel > ProcessStats.ADJ_MEM_FACTOR_NORMAL
                 && proc.setProcState >= ActivityManager.PROCESS_STATE_CACHED_EMPTY) {
@@ -2841,8 +2840,7 @@
                 if (proc.baseProcessTracker != null) {
                     proc.baseProcessTracker.reportCachedKill(proc.pkgList, proc.lastCachedPss);
                 }
-                killUnneededProcessLocked(proc, Long.toString(proc.lastCachedPss)
-                        + "k from cached");
+                proc.kill(Long.toString(proc.lastCachedPss) + "k from cached", true);
             }
         }
         return proc;
@@ -3318,7 +3316,8 @@
                     intent.setComponent(new ComponentName(
                             ri.activityInfo.packageName, ri.activityInfo.name));
                     mStackSupervisor.startActivityLocked(null, intent, null, ri.activityInfo,
-                            null, null, null, null, 0, 0, 0, null, 0, null, false, null, null);
+                            null, null, null, null, 0, 0, 0, null, 0, null, false, null, null,
+                            null);
                 }
             }
         }
@@ -3443,33 +3442,30 @@
 
     @Override
     public final int startActivity(IApplicationThread caller, String callingPackage,
-            Intent intent, String resolvedType, IBinder resultTo,
-            String resultWho, int requestCode, int startFlags,
-            String profileFile, ParcelFileDescriptor profileFd, Bundle options) {
+            Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode,
+            int startFlags, ProfilerInfo profilerInfo, Bundle options) {
         return startActivityAsUser(caller, callingPackage, intent, resolvedType, resultTo,
-                resultWho, requestCode,
-                startFlags, profileFile, profileFd, options, UserHandle.getCallingUserId());
+            resultWho, requestCode, startFlags, profilerInfo, options,
+            UserHandle.getCallingUserId());
     }
 
     @Override
     public final int startActivityAsUser(IApplicationThread caller, String callingPackage,
-            Intent intent, String resolvedType, IBinder resultTo,
-            String resultWho, int requestCode, int startFlags,
-            String profileFile, ParcelFileDescriptor profileFd, Bundle options, int userId) {
+            Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode,
+            int startFlags, ProfilerInfo profilerInfo, Bundle options, int userId) {
         enforceNotIsolatedCaller("startActivity");
         userId = handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), userId,
                 false, ALLOW_FULL_ONLY, "startActivity", null);
         // TODO: Switch to user app stacks here.
-        return mStackSupervisor.startActivityMayWait(caller, -1, callingPackage, intent, resolvedType,
-                null, null, resultTo, resultWho, requestCode, startFlags, profileFile, profileFd,
-                null, null, options, userId, null);
+        return mStackSupervisor.startActivityMayWait(caller, -1, callingPackage, intent,
+                resolvedType, null, null, resultTo, resultWho, requestCode, startFlags,
+                profilerInfo, null, null, options, userId, null, null);
     }
 
     @Override
     public final int startActivityAsCaller(IApplicationThread caller, String callingPackage,
-            Intent intent, String resolvedType, IBinder resultTo,
-            String resultWho, int requestCode, int startFlags,
-            String profileFile, ParcelFileDescriptor profileFd, Bundle options) {
+            Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode,
+            int startFlags, ProfilerInfo profilerInfo, Bundle options) {
 
         // This is very dangerous -- it allows you to perform a start activity (including
         // permission grants) as any app that may launch one of your own activities.  So
@@ -3510,9 +3506,8 @@
         // TODO: Switch to user app stacks here.
         try {
             int ret = mStackSupervisor.startActivityMayWait(null, targetUid, targetPackage, intent,
-                    resolvedType, null, null, resultTo, resultWho, requestCode, startFlags,
-                    null, null, null, null, options, UserHandle.getUserId(sourceRecord.app.uid),
-                    null);
+                    resolvedType, null, null, resultTo, resultWho, requestCode, startFlags, null,
+                    null, null, options, UserHandle.getUserId(sourceRecord.app.uid), null, null);
             return ret;
         } catch (SecurityException e) {
             // XXX need to figure out how to propagate to original app.
@@ -3532,32 +3527,30 @@
 
     @Override
     public final WaitResult startActivityAndWait(IApplicationThread caller, String callingPackage,
-            Intent intent, String resolvedType, IBinder resultTo,
-            String resultWho, int requestCode, int startFlags, String profileFile,
-            ParcelFileDescriptor profileFd, Bundle options, int userId) {
+            Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode,
+            int startFlags, ProfilerInfo profilerInfo, Bundle options, int userId) {
         enforceNotIsolatedCaller("startActivityAndWait");
         userId = handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), userId,
                 false, ALLOW_FULL_ONLY, "startActivityAndWait", null);
         WaitResult res = new WaitResult();
         // TODO: Switch to user app stacks here.
         mStackSupervisor.startActivityMayWait(caller, -1, callingPackage, intent, resolvedType,
-                null, null, resultTo, resultWho, requestCode, startFlags, profileFile, profileFd,
-                res, null, options, userId, null);
+                null, null, resultTo, resultWho, requestCode, startFlags, profilerInfo, res, null,
+                options, userId, null, null);
         return res;
     }
 
     @Override
     public final int startActivityWithConfig(IApplicationThread caller, String callingPackage,
-            Intent intent, String resolvedType, IBinder resultTo,
-            String resultWho, int requestCode, int startFlags, Configuration config,
-            Bundle options, int userId) {
+            Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode,
+            int startFlags, Configuration config, Bundle options, int userId) {
         enforceNotIsolatedCaller("startActivityWithConfig");
         userId = handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), userId,
                 false, ALLOW_FULL_ONLY, "startActivityWithConfig", null);
         // TODO: Switch to user app stacks here.
         int ret = mStackSupervisor.startActivityMayWait(caller, -1, callingPackage, intent,
                 resolvedType, null, null, resultTo, resultWho, requestCode, startFlags,
-                null, null, null, config, options, userId, null);
+                null, null, config, options, userId, null, null);
         return ret;
     }
 
@@ -3596,8 +3589,8 @@
     @Override
     public int startVoiceActivity(String callingPackage, int callingPid, int callingUid,
             Intent intent, String resolvedType, IVoiceInteractionSession session,
-            IVoiceInteractor interactor, int startFlags, String profileFile,
-            ParcelFileDescriptor profileFd, Bundle options, int userId) {
+            IVoiceInteractor interactor, int startFlags, ProfilerInfo profilerInfo,
+            Bundle options, int userId) {
         if (checkCallingPermission(Manifest.permission.BIND_VOICE_INTERACTION)
                 != PackageManager.PERMISSION_GRANTED) {
             String msg = "Permission Denial: startVoiceActivity() from pid="
@@ -3614,8 +3607,8 @@
                 false, ALLOW_FULL_ONLY, "startVoiceActivity", null);
         // TODO: Switch to user app stacks here.
         return mStackSupervisor.startActivityMayWait(null, callingUid, callingPackage, intent,
-                resolvedType, session, interactor, null, null, 0, startFlags,
-                profileFile, profileFd, null, null, options, userId, null);
+                resolvedType, session, interactor, null, null, 0, startFlags, profilerInfo, null,
+                null, options, userId, null, null);
     }
 
     @Override
@@ -3713,7 +3706,7 @@
             int res = mStackSupervisor.startActivityLocked(r.app.thread, intent,
                     r.resolvedType, aInfo, null, null, resultTo != null ? resultTo.appToken : null,
                     resultWho, requestCode, -1, r.launchedFromUid, r.launchedFromPackage, 0,
-                    options, false, null, null);
+                    options, false, null, null, null);
             Binder.restoreCallingIdentity(origId);
 
             r.finishing = wasFinishing;
@@ -3732,36 +3725,42 @@
             Slog.w(TAG, msg);
             throw new SecurityException(msg);
         }
+        return startActivityFromRecentsInner(taskId, options);
+    }
+
+    final int startActivityFromRecentsInner(int taskId, Bundle options) {
+        final TaskRecord task;
         final int callingUid;
         final String callingPackage;
         final Intent intent;
         final int userId;
         synchronized (this) {
-            final TaskRecord task = recentTaskForIdLocked(taskId);
+            task = recentTaskForIdLocked(taskId);
             if (task == null) {
-                throw new ActivityNotFoundException("Task " + taskId + " not found.");
+                throw new IllegalArgumentException("Task " + taskId + " not found.");
             }
             callingUid = task.mCallingUid;
             callingPackage = task.mCallingPackage;
             intent = task.intent;
+            intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY);
             userId = task.userId;
         }
         return startActivityInPackage(callingUid, callingPackage, intent, null, null, null, 0, 0,
-                options, userId, null);
+                options, userId, null, task);
     }
 
     final int startActivityInPackage(int uid, String callingPackage,
             Intent intent, String resolvedType, IBinder resultTo,
             String resultWho, int requestCode, int startFlags, Bundle options, int userId,
-                    IActivityContainer container) {
+            IActivityContainer container, TaskRecord inTask) {
 
         userId = handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), userId,
                 false, ALLOW_FULL_ONLY, "startActivityInPackage", null);
 
         // TODO: Switch to user app stacks here.
-        int ret = mStackSupervisor.startActivityMayWait(null, uid, callingPackage, intent, resolvedType,
-                null, null, resultTo, resultWho, requestCode, startFlags,
-                null, null, null, null, options, userId, container);
+        int ret = mStackSupervisor.startActivityMayWait(null, uid, callingPackage, intent,
+                resolvedType, null, null, resultTo, resultWho, requestCode, startFlags,
+                null, null, null, options, userId, container, inTask);
         return ret;
     }
 
@@ -3802,8 +3801,8 @@
             if (tr.userId == userId) {
                 if(DEBUG_TASKS) Slog.i(TAG, "remove RecentTask " + tr
                         + " when finishing user" + userId);
-                tr.disposeThumbnail();
                 mRecentTasks.remove(i);
+                tr.removedFromRecents(mTaskPersister);
             }
         }
 
@@ -3811,25 +3810,385 @@
         mTaskPersister.wakeup(null, true);
     }
 
+    /**
+     * Update the recent tasks lists: make sure tasks should still be here (their
+     * applications / activities still exist), update their availability, fixup ordering
+     * of affiliations.
+     */
+    void cleanupRecentTasksLocked(int userId) {
+        final HashMap<ComponentName, ActivityInfo> availActCache = new HashMap<>();
+        final HashMap<String, ApplicationInfo> availAppCache = new HashMap<>();
+        final IPackageManager pm = AppGlobals.getPackageManager();
+        final ActivityInfo dummyAct = new ActivityInfo();
+        final ApplicationInfo dummyApp = new ApplicationInfo();
+
+        int N = mRecentTasks.size();
+
+        int[] users = userId == UserHandle.USER_ALL
+                ? getUsersLocked() : new int[] { userId };
+        for (int user : users) {
+            for (int i = 0; i < N; i++) {
+                TaskRecord task = mRecentTasks.get(i);
+                if (task.userId != user) {
+                    // Only look at tasks for the user ID of interest.
+                    continue;
+                }
+                if (task.autoRemoveRecents && task.getTopActivity() == null) {
+                    // This situation is broken, and we should just get rid of it now.
+                    mRecentTasks.remove(i);
+                    task.removedFromRecents(mTaskPersister);
+                    i--;
+                    N--;
+                    Slog.w(TAG, "Removing auto-remove without activity: " + task);
+                    continue;
+                }
+                // Check whether this activity is currently available.
+                if (task.realActivity != null) {
+                    ActivityInfo ai = availActCache.get(task.realActivity);
+                    if (ai == null) {
+                        try {
+                            ai = pm.getActivityInfo(task.realActivity,
+                                    PackageManager.GET_UNINSTALLED_PACKAGES
+                                    | PackageManager.GET_DISABLED_COMPONENTS, user);
+                        } catch (RemoteException e) {
+                            // Will never happen.
+                            continue;
+                        }
+                        if (ai == null) {
+                            ai = dummyAct;
+                        }
+                        availActCache.put(task.realActivity, ai);
+                    }
+                    if (ai == dummyAct) {
+                        // This could be either because the activity no longer exists, or the
+                        // app is temporarily gone.  For the former we want to remove the recents
+                        // entry; for the latter we want to mark it as unavailable.
+                        ApplicationInfo app = availAppCache.get(task.realActivity.getPackageName());
+                        if (app == null) {
+                            try {
+                                app = pm.getApplicationInfo(task.realActivity.getPackageName(),
+                                        PackageManager.GET_UNINSTALLED_PACKAGES
+                                        | PackageManager.GET_DISABLED_COMPONENTS, user);
+                            } catch (RemoteException e) {
+                                // Will never happen.
+                                continue;
+                            }
+                            if (app == null) {
+                                app = dummyApp;
+                            }
+                            availAppCache.put(task.realActivity.getPackageName(), app);
+                        }
+                        if (app == dummyApp || (app.flags&ApplicationInfo.FLAG_INSTALLED) == 0) {
+                            // Doesn't exist any more!  Good-bye.
+                            mRecentTasks.remove(i);
+                            task.removedFromRecents(mTaskPersister);
+                            i--;
+                            N--;
+                            Slog.w(TAG, "Removing no longer valid recent: " + task);
+                            continue;
+                        } else {
+                            // Otherwise just not available for now.
+                            if (task.isAvailable) {
+                                if (DEBUG_RECENTS) Slog.d(TAG, "Making recent unavailable: "
+                                        + task);
+                            }
+                            task.isAvailable = false;
+                        }
+                    } else {
+                        if (!ai.enabled || !ai.applicationInfo.enabled
+                                || (ai.applicationInfo.flags&ApplicationInfo.FLAG_INSTALLED) == 0) {
+                            if (task.isAvailable) {
+                                if (DEBUG_RECENTS) Slog.d(TAG, "Making recent unavailable: "
+                                        + task + " (enabled=" + ai.enabled + "/"
+                                        + ai.applicationInfo.enabled +  " flags="
+                                        + Integer.toHexString(ai.applicationInfo.flags) + ")");
+                            }
+                            task.isAvailable = false;
+                        } else {
+                            if (!task.isAvailable) {
+                                if (DEBUG_RECENTS) Slog.d(TAG, "Making recent available: "
+                                        + task);
+                            }
+                            task.isAvailable = true;
+                        }
+                    }
+                }
+            }
+        }
+
+        // Verify the affiliate chain for each task.
+        for (int i = 0; i < N; ) {
+            TaskRecord task = mRecentTasks.remove(i);
+            if (mTmpRecents.contains(task)) {
+                continue;
+            }
+            int affiliatedTaskId = task.mAffiliatedTaskId;
+            while (true) {
+                TaskRecord next = task.mNextAffiliate;
+                if (next == null) {
+                    break;
+                }
+                if (next.mAffiliatedTaskId != affiliatedTaskId) {
+                    Slog.e(TAG, "Error in Recents: next.affiliatedTaskId=" +
+                            next.mAffiliatedTaskId + " affiliatedTaskId=" + affiliatedTaskId);
+                    task.setNextAffiliate(null);
+                    if (next.mPrevAffiliate == task) {
+                        next.setPrevAffiliate(null);
+                    }
+                    break;
+                }
+                if (next.mPrevAffiliate != task) {
+                    Slog.e(TAG, "Error in Recents chain prev.mNextAffiliate=" +
+                            next.mPrevAffiliate + " task=" + task);
+                    next.setPrevAffiliate(null);
+                    task.setNextAffiliate(null);
+                    break;
+                }
+                if (!mRecentTasks.contains(next)) {
+                    Slog.e(TAG, "Error in Recents: next=" + next + " not in mRecentTasks");
+                    task.setNextAffiliate(null);
+                    // We know that next.mPrevAffiliate is always task, from above, so clear
+                    // its previous affiliate.
+                    next.setPrevAffiliate(null);
+                    break;
+                }
+                task = next;
+            }
+            // task is now the end of the list
+            do {
+                mRecentTasks.remove(task);
+                mRecentTasks.add(i++, task);
+                mTmpRecents.add(task);
+                task.inRecents = true;
+            } while ((task = task.mPrevAffiliate) != null);
+        }
+        mTmpRecents.clear();
+        // mRecentTasks is now in sorted, affiliated order.
+    }
+
+    private final boolean moveAffiliatedTasksToFront(TaskRecord task, int taskIndex) {
+        int N = mRecentTasks.size();
+        TaskRecord top = task;
+        int topIndex = taskIndex;
+        while (top.mNextAffiliate != null && topIndex > 0) {
+            top = top.mNextAffiliate;
+            topIndex--;
+        }
+        if (DEBUG_RECENTS) Slog.d(TAG, "addRecent: adding affilliates starting at "
+                + topIndex + " from intial " + taskIndex);
+        // Find the end of the chain, doing a sanity check along the way.
+        boolean sane = top.mAffiliatedTaskId == task.mAffiliatedTaskId;
+        int endIndex = topIndex;
+        TaskRecord prev = top;
+        while (endIndex < N) {
+            TaskRecord cur = mRecentTasks.get(endIndex);
+            if (DEBUG_RECENTS) Slog.d(TAG, "addRecent: looking at next chain @"
+                    + endIndex + " " + cur);
+            if (cur == top) {
+                // Verify start of the chain.
+                if (cur.mNextAffiliate != null || cur.mNextAffiliateTaskId != -1) {
+                    Slog.wtf(TAG, "Bad chain @" + endIndex
+                            + ": first task has next affiliate: " + prev);
+                    sane = false;
+                    break;
+                }
+            } else {
+                // Verify middle of the chain's next points back to the one before.
+                if (cur.mNextAffiliate != prev
+                        || cur.mNextAffiliateTaskId != prev.taskId) {
+                    Slog.wtf(TAG, "Bad chain @" + endIndex
+                            + ": middle task " + cur + " @" + endIndex
+                            + " has bad next affiliate "
+                            + cur.mNextAffiliate + " id " + cur.mNextAffiliateTaskId
+                            + ", expected " + prev);
+                    sane = false;
+                    break;
+                }
+            }
+            if (cur.mPrevAffiliateTaskId == -1) {
+                // Chain ends here.
+                if (cur.mPrevAffiliate != null) {
+                    Slog.wtf(TAG, "Bad chain @" + endIndex
+                            + ": last task " + cur + " has previous affiliate "
+                            + cur.mPrevAffiliate);
+                    sane = false;
+                }
+                if (DEBUG_RECENTS) Slog.d(TAG, "addRecent: end of chain @" + endIndex);
+                break;
+            } else {
+                // Verify middle of the chain's prev points to a valid item.
+                if (cur.mPrevAffiliate == null) {
+                    Slog.wtf(TAG, "Bad chain @" + endIndex
+                            + ": task " + cur + " has previous affiliate "
+                            + cur.mPrevAffiliate + " but should be id "
+                            + cur.mPrevAffiliate);
+                    sane = false;
+                    break;
+                }
+            }
+            if (cur.mAffiliatedTaskId != task.mAffiliatedTaskId) {
+                Slog.wtf(TAG, "Bad chain @" + endIndex
+                        + ": task " + cur + " has affiliated id "
+                        + cur.mAffiliatedTaskId + " but should be "
+                        + task.mAffiliatedTaskId);
+                sane = false;
+                break;
+            }
+            prev = cur;
+            endIndex++;
+            if (endIndex >= N) {
+                Slog.wtf(TAG, "Bad chain ran off index " + endIndex
+                        + ": last task " + prev);
+                sane = false;
+                break;
+            }
+        }
+        if (sane) {
+            if (endIndex < taskIndex) {
+                Slog.wtf(TAG, "Bad chain @" + endIndex
+                        + ": did not extend to task " + task + " @" + taskIndex);
+                sane = false;
+            }
+        }
+        if (sane) {
+            // All looks good, we can just move all of the affiliated tasks
+            // to the top.
+            for (int i=topIndex; i<=endIndex; i++) {
+                if (DEBUG_RECENTS) Slog.d(TAG, "addRecent: moving affiliated " + task
+                        + " from " + i + " to " + (i-topIndex));
+                TaskRecord cur = mRecentTasks.remove(i);
+                mRecentTasks.add(i-topIndex, cur);
+            }
+            if (DEBUG_RECENTS) Slog.d(TAG, "addRecent: done moving tasks  " +  topIndex
+                    + " to " + endIndex);
+            return true;
+        }
+
+        // Whoops, couldn't do it.
+        return false;
+    }
+
     final void addRecentTaskLocked(TaskRecord task) {
-        final int N = mRecentTasks.size();
+        final boolean isAffiliated = task.mAffiliatedTaskId != task.taskId
+                || task.mNextAffiliateTaskId != -1 || task.mPrevAffiliateTaskId != -1;
+
+        int N = mRecentTasks.size();
         // Quick case: check if the top-most recent task is the same.
-        if (N > 0 && mRecentTasks.get(0) == task) {
+        if (!isAffiliated && N > 0 && mRecentTasks.get(0) == task) {
+            if (DEBUG_RECENTS) Slog.d(TAG, "addRecent: already at top: " + task);
+            return;
+        }
+        // Another quick case: check if this is part of a set of affiliated
+        // tasks that are at the top.
+        if (isAffiliated && N > 0 && task.inRecents
+                && task.mAffiliatedTaskId == mRecentTasks.get(0).mAffiliatedTaskId) {
+            if (DEBUG_RECENTS) Slog.d(TAG, "addRecent: affiliated " + mRecentTasks.get(0)
+                    + " at top when adding " + task);
             return;
         }
         // Another quick case: never add voice sessions.
         if (task.voiceSession != null) {
+            if (DEBUG_RECENTS) Slog.d(TAG, "addRecent: not adding voice interaction " + task);
             return;
         }
 
+        boolean needAffiliationFix = false;
+
+        // Slightly less quick case: the task is already in recents, so all we need
+        // to do is move it.
+        if (task.inRecents) {
+            int taskIndex = mRecentTasks.indexOf(task);
+            if (taskIndex >= 0) {
+                if (!isAffiliated) {
+                    // Simple case: this is not an affiliated task, so we just move it to the front.
+                    mRecentTasks.remove(taskIndex);
+                    mRecentTasks.add(0, task);
+                    notifyTaskPersisterLocked(task, false);
+                    if (DEBUG_RECENTS) Slog.d(TAG, "addRecent: moving to top " + task
+                            + " from " + taskIndex);
+                    return;
+                } else {
+                    // More complicated: need to keep all affiliated tasks together.
+                    if (moveAffiliatedTasksToFront(task, taskIndex)) {
+                        // All went well.
+                        return;
+                    }
+
+                    // Uh oh...  something bad in the affiliation chain, try to rebuild
+                    // everything and then go through our general path of adding a new task.
+                    needAffiliationFix = true;
+                }
+            } else {
+                Slog.wtf(TAG, "Task with inRecent not in recents: " + task);
+                needAffiliationFix = true;
+            }
+        }
+
+        if (DEBUG_RECENTS) Slog.d(TAG, "addRecent: trimming tasks for " + task);
         trimRecentsForTask(task, true);
 
-        if (N >= MAX_RECENT_TASKS) {
+        N = mRecentTasks.size();
+        while (N >= ActivityManager.getMaxRecentTasksStatic()) {
             final TaskRecord tr = mRecentTasks.remove(N - 1);
-            tr.disposeThumbnail();
-            tr.closeRecentsChain();
+            tr.removedFromRecents(mTaskPersister);
+            N--;
         }
-        mRecentTasks.add(0, task);
+        task.inRecents = true;
+        if (!isAffiliated || needAffiliationFix) {
+            // If this is a simple non-affiliated task, or we had some failure trying to
+            // handle it as part of an affilated task, then just place it at the top.
+            mRecentTasks.add(0, task);
+        } else if (isAffiliated) {
+            // If this is a new affiliated task, then move all of the affiliated tasks
+            // to the front and insert this new one.
+            TaskRecord other = task.mNextAffiliate;
+            if (other == null) {
+                other = task.mPrevAffiliate;
+            }
+            if (other != null) {
+                int otherIndex = mRecentTasks.indexOf(other);
+                if (otherIndex >= 0) {
+                    // Insert new task at appropriate location.
+                    int taskIndex;
+                    if (other == task.mNextAffiliate) {
+                        // We found the index of our next affiliation, which is who is
+                        // before us in the list, so add after that point.
+                        taskIndex = otherIndex+1;
+                    } else {
+                        // We found the index of our previous affiliation, which is who is
+                        // after us in the list, so add at their position.
+                        taskIndex = otherIndex;
+                    }
+                    if (DEBUG_RECENTS) Slog.d(TAG, "addRecent: new affiliated task added at "
+                            + taskIndex + ": " + task);
+                    mRecentTasks.add(taskIndex, task);
+
+                    // Now move everything to the front.
+                    if (moveAffiliatedTasksToFront(task, taskIndex)) {
+                        // All went well.
+                        return;
+                    }
+
+                    // Uh oh...  something bad in the affiliation chain, try to rebuild
+                    // everything and then go through our general path of adding a new task.
+                    needAffiliationFix = true;
+                } else {
+                    if (DEBUG_RECENTS) Slog.d(TAG, "addRecent: couldn't find other affiliation "
+                            + other);
+                    needAffiliationFix = true;
+                }
+            } else {
+                if (DEBUG_RECENTS) Slog.d(TAG,
+                        "addRecent: adding affiliated task without next/prev:" + task);
+                needAffiliationFix = true;
+            }
+        }
+        if (DEBUG_RECENTS) Slog.d(TAG, "addRecent: adding " + task);
+
+        if (needAffiliationFix) {
+            if (DEBUG_RECENTS) Slog.d(TAG, "addRecent: regrouping affiliations");
+            cleanupRecentTasksLocked(task.userId);
+        }
     }
 
     /**
@@ -3883,7 +4242,7 @@
             tr.disposeThumbnail();
             mRecentTasks.remove(i);
             if (task != tr) {
-                tr.closeRecentsChain();
+                tr.removedFromRecents(mTaskPersister);
             }
             i--;
             N--;
@@ -4155,6 +4514,35 @@
     }
 
     @Override
+    public boolean releaseActivityInstance(IBinder token) {
+        synchronized(this) {
+            final long origId = Binder.clearCallingIdentity();
+            try {
+                ActivityRecord r = ActivityRecord.isInStackLocked(token);
+                if (r.task == null || r.task.stack == null) {
+                    return false;
+                }
+                return r.task.stack.safelyDestroyActivityLocked(r, "app-req");
+            } finally {
+                Binder.restoreCallingIdentity(origId);
+            }
+        }
+    }
+
+    @Override
+    public void releaseSomeActivities(IApplicationThread appInt) {
+        synchronized(this) {
+            final long origId = Binder.clearCallingIdentity();
+            try {
+                ProcessRecord app = getRecordForAppLocked(appInt);
+                mStackSupervisor.releaseSomeActivitiesLocked(app, "low-mem");
+            } finally {
+                Binder.restoreCallingIdentity(origId);
+            }
+        }
+    }
+
+    @Override
     public boolean willActivityBeVisible(IBinder token) {
         synchronized(this) {
             ActivityStack stack = ActivityRecord.getStackLocked(token);
@@ -4568,8 +4956,7 @@
                 // 0 == continue, -1 = kill process immediately
                 int res = mController.appEarlyNotResponding(app.processName, app.pid, annotation);
                 if (res < 0 && app.pid != MY_PID) {
-                    Process.killProcess(app.pid);
-                    Process.killProcessGroup(app.info.uid, app.pid);
+                    app.kill("anr", true);
                 }
             } catch (RemoteException e) {
                 mController = null;
@@ -4675,8 +5062,7 @@
                 int res = mController.appNotResponding(app.processName, app.pid, info.toString());
                 if (res != 0) {
                     if (res < 0 && app.pid != MY_PID) {
-                        Process.killProcess(app.pid);
-                        Process.killProcessGroup(app.info.uid, app.pid);
+                        app.kill("anr", true);
                     } else {
                         synchronized (this) {
                             mServices.scheduleServiceTimeoutLocked(app);
@@ -4696,7 +5082,7 @@
 
         synchronized (this) {
             if (!showBackground && !app.isInterestingToUserLocked() && app.pid != MY_PID) {
-                killUnneededProcessLocked(app, "background ANR");
+                app.kill("bg anr", true);
                 return;
             }
 
@@ -5420,8 +5806,7 @@
             if (app.isolated) {
                 mBatteryStatsService.removeIsolatedUid(app.uid, app.info.uid);
             }
-            killUnneededProcessLocked(app, reason);
-            Process.killProcessGroup(app.info.uid, app.pid);
+            app.kill(reason, true);
             handleAppDiedLocked(app, true, allowRestart);
             removeLruProcessLocked(app);
 
@@ -5469,7 +5854,7 @@
             checkAppInLaunchingProvidersLocked(app, true);
             // Take care of any services that are waiting for the process.
             mServices.processStartTimedOutLocked(app);
-            killUnneededProcessLocked(app, "start timeout");
+            app.kill("start timeout", true);
             if (mBackupTarget != null && mBackupTarget.app.pid == pid) {
                 Slog.w(TAG, "Unattached app died before backup, skipping");
                 try {
@@ -5581,11 +5966,13 @@
             }
             String profileFile = app.instrumentationProfileFile;
             ParcelFileDescriptor profileFd = null;
+            int samplingInterval = 0;
             boolean profileAutoStop = false;
             if (mProfileApp != null && mProfileApp.equals(processName)) {
                 mProfileProc = app;
                 profileFile = mProfileFile;
                 profileFd = mProfileFd;
+                samplingInterval = mSamplingInterval;
                 profileAutoStop = mAutoStopProfiler;
             }
             boolean enableOpenGlTrace = false;
@@ -5616,9 +6003,10 @@
             if (profileFd != null) {
                 profileFd = profileFd.dup();
             }
-            thread.bindApplication(processName, appInfo, providers,
-                    app.instrumentationClass, profileFile, profileFd, profileAutoStop,
-                    app.instrumentationArguments, app.instrumentationWatcher,
+            ProfilerInfo profilerInfo = profileFile == null ? null
+                    : new ProfilerInfo(profileFile, profileFd, samplingInterval, profileAutoStop);
+            thread.bindApplication(processName, appInfo, providers, app.instrumentationClass,
+                    profilerInfo, app.instrumentationArguments, app.instrumentationWatcher,
                     app.instrumentationUiAutomationConnection, testMode, enableOpenGlTrace,
                     isRestrictedBackupMode || !normalMode, app.persistent,
                     new Configuration(mConfiguration), app.compat, getCommonServicesLocked(),
@@ -6615,6 +7003,10 @@
         return false;
     }
 
+    /**
+     * @param uri This uri must NOT contain an embedded userId.
+     * @param userId The userId in which the uri is to be resolved.
+     */
     @Override
     public int checkUriPermission(Uri uri, int pid, int uid,
             final int modeFlags, int userId) {
@@ -6767,6 +7159,10 @@
         return targetUid;
     }
 
+    /**
+     * @param uri This uri must NOT contain an embedded userId.
+     * @param userId The userId in which the uri is to be resolved.
+     */
     @Override
     public int checkGrantUriPermission(int callingUid, String targetPkg, Uri uri,
             final int modeFlags, int userId) {
@@ -6951,6 +7347,10 @@
         grantUriPermissionUncheckedFromIntentLocked(needed, owner);
     }
 
+    /**
+     * @param uri This uri must NOT contain an embedded userId.
+     * @param userId The userId in which the uri is to be resolved.
+     */
     @Override
     public void grantUriPermission(IApplicationThread caller, String targetPkg, Uri uri,
             final int modeFlags, int userId) {
@@ -7053,6 +7453,10 @@
         }
     }
 
+    /**
+     * @param uri This uri must NOT contain an embedded userId.
+     * @param userId The userId in which the uri is to be resolved.
+     */
     @Override
     public void revokeUriPermission(IApplicationThread caller, Uri uri, final int modeFlags,
             int userId) {
@@ -7151,9 +7555,16 @@
         }
     }
 
+    /**
+     * @param uri This uri must NOT contain an embedded userId.
+     * @param sourceUserId The userId in which the uri is to be resolved.
+     * @param targetUserId The userId of the app that receives the grant.
+     */
     @Override
     public void grantUriPermissionFromOwner(IBinder token, int fromUid, String targetPkg, Uri uri,
             final int modeFlags, int sourceUserId, int targetUserId) {
+        targetUserId = handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(),
+                targetUserId, false, ALLOW_FULL_ONLY, "grantUriPermissionFromOwner", null);
         synchronized(this) {
             UriPermissionOwner owner = UriPermissionOwner.fromExternalToken(token);
             if (owner == null) {
@@ -7178,6 +7589,10 @@
         }
     }
 
+    /**
+     * @param uri This uri must NOT contain an embedded userId.
+     * @param userId The userId in which the uri is to be resolved.
+     */
     @Override
     public void revokeUriPermissionFromOwner(IBinder token, Uri uri, int mode, int userId) {
         synchronized(this) {
@@ -7318,6 +7733,10 @@
         }
     }
 
+    /**
+     * @param uri This uri must NOT contain an embedded userId.
+     * @param userId The userId in which the uri is to be resolved.
+     */
     @Override
     public void takePersistableUriPermission(Uri uri, final int modeFlags, int userId) {
         enforceNotIsolatedCaller("takePersistableUriPermission");
@@ -7360,6 +7779,10 @@
         }
     }
 
+    /**
+     * @param uri This uri must NOT contain an embedded userId.
+     * @param userId The userId in which the uri is to be resolved.
+     */
     @Override
     public void releasePersistableUriPermission(Uri uri, final int modeFlags, int userId) {
         enforceNotIsolatedCaller("releasePersistableUriPermission");
@@ -7622,8 +8045,6 @@
                     android.Manifest.permission.GET_DETAILED_TASKS)
                     == PackageManager.PERMISSION_GRANTED;
 
-            IPackageManager pm = AppGlobals.getPackageManager();
-
             final int N = mRecentTasks.size();
             ArrayList<ActivityManager.RecentTaskInfo> res
                     = new ArrayList<ActivityManager.RecentTaskInfo>(
@@ -7637,53 +8058,6 @@
             }
             includedUsers.add(Integer.valueOf(userId));
 
-            // Regroup affiliated tasks together.
-            for (int i = 0; i < N; ) {
-                TaskRecord task = mRecentTasks.remove(i);
-                if (mTmpRecents.contains(task)) {
-                    continue;
-                }
-                int affiliatedTaskId = task.mAffiliatedTaskId;
-                while (true) {
-                    TaskRecord next = task.mNextAffiliate;
-                    if (next == null) {
-                        break;
-                    }
-                    if (next.mAffiliatedTaskId != affiliatedTaskId) {
-                        Slog.e(TAG, "Error in Recents: next.affiliatedTaskId=" +
-                                next.mAffiliatedTaskId + " affiliatedTaskId=" + affiliatedTaskId);
-                        task.setNextAffiliate(null);
-                        if (next.mPrevAffiliate == task) {
-                            next.setPrevAffiliate(null);
-                        }
-                        break;
-                    }
-                    if (next.mPrevAffiliate != task) {
-                        Slog.e(TAG, "Error in Recents chain prev.mNextAffiliate=" +
-                                next.mPrevAffiliate + " task=" + task);
-                        next.setPrevAffiliate(null);
-                        break;
-                    }
-                    if (!mRecentTasks.contains(next)) {
-                        Slog.e(TAG, "Error in Recents: next=" + next + " not in mRecentTasks");
-                        task.setNextAffiliate(null);
-                        if (next.mPrevAffiliate == task) {
-                            next.setPrevAffiliate(null);
-                        }
-                        break;
-                    }
-                    task = next;
-                }
-                // task is now the end of the list
-                do {
-                    mRecentTasks.remove(task);
-                    mRecentTasks.add(i++, task);
-                    mTmpRecents.add(task);
-                } while ((task = task.mPrevAffiliate) != null);
-            }
-            mTmpRecents.clear();
-            // mRecentTasks is now in sorted, affiliated order.
-
             for (int i=0; i<N && maxNum > 0; i++) {
                 TaskRecord tr = mRecentTasks.get(i);
                 // Only add calling user or related users recent tasks
@@ -7711,41 +8085,29 @@
                             continue;
                         }
                     }
+                    if ((flags & ActivityManager.RECENT_IGNORE_HOME_STACK_TASKS) != 0) {
+                        if (tr.stack != null && tr.stack.isHomeStack()) {
+                            if (DEBUG_RECENTS) Slog.d(TAG, "Skipping, home stack task: " + tr);
+                            continue;
+                        }
+                    }
                     if (tr.autoRemoveRecents && tr.getTopActivity() == null) {
                         // Don't include auto remove tasks that are finished or finishing.
                         if (DEBUG_RECENTS) Slog.d(TAG, "Skipping, auto-remove without activity: "
                                 + tr);
                         continue;
                     }
+                    if ((flags&ActivityManager.RECENT_IGNORE_UNAVAILABLE) != 0
+                            && !tr.isAvailable) {
+                        if (DEBUG_RECENTS) Slog.d(TAG, "Skipping, unavail real act: " + tr);
+                        continue;
+                    }
 
                     ActivityManager.RecentTaskInfo rti = createRecentTaskInfoFromTaskRecord(tr);
                     if (!detailed) {
                         rti.baseIntent.replaceExtras((Bundle)null);
                     }
 
-                    if ((flags&ActivityManager.RECENT_IGNORE_UNAVAILABLE) != 0) {
-                        // Check whether this activity is currently available.
-                        try {
-                            if (rti.origActivity != null) {
-                                if (pm.getActivityInfo(rti.origActivity, 0, userId)
-                                        == null) {
-                                    if (DEBUG_RECENTS) Slog.d(TAG, "Skipping, unavail orig act: "
-                                            + tr);
-                                    continue;
-                                }
-                            } else if (rti.baseIntent != null) {
-                                if (pm.queryIntentActivities(rti.baseIntent,
-                                        null, 0, userId) == null) {
-                                    if (DEBUG_RECENTS) Slog.d(TAG, "Skipping, unavail intent: "
-                                            + tr);
-                                    continue;
-                                }
-                            }
-                        } catch (RemoteException e) {
-                            // Will never happen.
-                        }
-                    }
-
                     res.add(rti);
                     maxNum--;
                 }
@@ -7843,12 +8205,12 @@
                 }
 
                 final int N = mRecentTasks.size();
-                if (N >= (MAX_RECENT_TASKS-1)) {
+                if (N >= (ActivityManager.getMaxRecentTasksStatic()-1)) {
                     final TaskRecord tr = mRecentTasks.remove(N - 1);
-                    tr.disposeThumbnail();
-                    tr.closeRecentsChain();
+                    tr.removedFromRecents(mTaskPersister);
                 }
 
+                task.inRecents = true;
                 mRecentTasks.add(task);
                 r.task.stack.addTask(task, false, false);
 
@@ -7880,21 +8242,9 @@
         }
     }
 
-    private void killUnneededProcessLocked(ProcessRecord pr, String reason) {
-        if (!pr.killedByAm) {
-            Slog.i(TAG, "Killing " + pr.toShortString() + " (adj " + pr.setAdj + "): " + reason);
-            EventLog.writeEvent(EventLogTags.AM_KILL, pr.userId, pr.pid,
-                    pr.processName, pr.setAdj, reason);
-            pr.killedByAm = true;
-            Process.killProcessQuiet(pr.pid);
-            Process.killProcessGroup(pr.info.uid, pr.pid);
-        }
-    }
-
     private void cleanUpRemovedTaskLocked(TaskRecord tr, int flags) {
-        tr.disposeThumbnail();
         mRecentTasks.remove(tr);
-        tr.closeRecentsChain();
+        tr.removedFromRecents(mTaskPersister);
         final boolean killProcesses = (flags&ActivityManager.REMOVE_TASK_KILL_PROCESS) != 0;
         Intent baseIntent = new Intent(
                 tr.intent != null ? tr.intent : tr.affinityIntent);
@@ -7934,7 +8284,7 @@
                     continue;
                 }
                 if (pr.setSchedGroup == Process.THREAD_GROUP_BG_NONINTERACTIVE) {
-                    killUnneededProcessLocked(pr, "remove task");
+                    pr.kill("remove task", true);
                 } else {
                     pr.waitingToKill = "remove task";
                 }
@@ -7987,32 +8337,36 @@
 
         if (DEBUG_STACK) Slog.d(TAG, "moveTaskToFront: moving taskId=" + taskId);
         synchronized(this) {
-            if (!checkAppSwitchAllowedLocked(Binder.getCallingPid(),
-                    Binder.getCallingUid(), "Task to front")) {
-                ActivityOptions.abort(options);
+            moveTaskToFrontLocked(taskId, flags, options);
+        }
+    }
+
+    void moveTaskToFrontLocked(int taskId, int flags, Bundle options) {
+        if (!checkAppSwitchAllowedLocked(Binder.getCallingPid(),
+                Binder.getCallingUid(), "Task to front")) {
+            ActivityOptions.abort(options);
+            return;
+        }
+        final long origId = Binder.clearCallingIdentity();
+        try {
+            final TaskRecord task = mStackSupervisor.anyTaskForIdLocked(taskId);
+            if (task == null) {
                 return;
             }
-            final long origId = Binder.clearCallingIdentity();
-            try {
-                final TaskRecord task = mStackSupervisor.anyTaskForIdLocked(taskId);
-                if (task == null) {
-                    return;
-                }
-                if (mStackSupervisor.isLockTaskModeViolation(task)) {
-                    mStackSupervisor.showLockTaskToast();
-                    Slog.e(TAG, "moveTaskToFront: Attempt to violate Lock Task Mode");
-                    return;
-                }
-                final ActivityRecord prev = mStackSupervisor.topRunningActivityLocked();
-                if (prev != null && prev.isRecentsActivity()) {
-                    task.setTaskToReturnTo(ActivityRecord.RECENTS_ACTIVITY_TYPE);
-                }
-                mStackSupervisor.findTaskToMoveToFrontLocked(task, flags, options);
-            } finally {
-                Binder.restoreCallingIdentity(origId);
+            if (mStackSupervisor.isLockTaskModeViolation(task)) {
+                mStackSupervisor.showLockTaskToast();
+                Slog.e(TAG, "moveTaskToFront: Attempt to violate Lock Task Mode");
+                return;
             }
-            ActivityOptions.abort(options);
+            final ActivityRecord prev = mStackSupervisor.topRunningActivityLocked();
+            if (prev != null && prev.isRecentsActivity()) {
+                task.setTaskToReturnTo(ActivityRecord.RECENTS_ACTIVITY_TYPE);
+            }
+            mStackSupervisor.findTaskToMoveToFrontLocked(task, flags, options);
+        } finally {
+            Binder.restoreCallingIdentity(origId);
         }
+        ActivityOptions.abort(options);
     }
 
     @Override
@@ -9629,8 +9983,7 @@
         }
     }
 
-    void setProfileApp(ApplicationInfo app, String processName, String profileFile,
-            ParcelFileDescriptor profileFd, boolean autoStopProfiler) {
+    void setProfileApp(ApplicationInfo app, String processName, ProfilerInfo profilerInfo) {
         synchronized (this) {
             boolean isDebuggable = "1".equals(SystemProperties.get(SYSTEM_DEBUGGABLE, "0"));
             if (!isDebuggable) {
@@ -9639,7 +9992,7 @@
                 }
             }
             mProfileApp = processName;
-            mProfileFile = profileFile;
+            mProfileFile = profilerInfo.profileFile;
             if (mProfileFd != null) {
                 try {
                     mProfileFd.close();
@@ -9647,9 +10000,10 @@
                 }
                 mProfileFd = null;
             }
-            mProfileFd = profileFd;
+            mProfileFd = profilerInfo.profileFd;
+            mSamplingInterval = profilerInfo.samplingInterval;
+            mAutoStopProfiler = profilerInfo.autoStopProfiler;
             mProfileType = 0;
-            mAutoStopProfiler = autoStopProfiler;
         }
     }
 
@@ -9661,7 +10015,7 @@
         Settings.Global.putInt(
                 mContext.getContentResolver(),
                 Settings.Global.ALWAYS_FINISH_ACTIVITIES, enabled ? 1 : 0);
-        
+
         synchronized (this) {
             mAlwaysFinishActivities = enabled;
         }
@@ -10110,7 +10464,7 @@
                 }
                 int adj = proc.setAdj;
                 if (adj >= worstType && !proc.killedByAm) {
-                    killUnneededProcessLocked(proc, reason);
+                    proc.kill(reason, true);
                     killed = true;
                 }
             }
@@ -10154,7 +10508,7 @@
 
                 final int adj = proc.setAdj;
                 if (adj > belowAdj && !proc.killedByAm) {
-                    killUnneededProcessLocked(proc, reason);
+                    proc.kill(reason, true);
                     killed = true;
                 }
             }
@@ -10273,8 +10627,8 @@
                             && proc.setProcState <= ActivityManager.PROCESS_STATE_SERVICE) {
                         if (doKilling && proc.initialIdlePss != 0
                                 && proc.lastPss > ((proc.initialIdlePss*3)/2)) {
-                            killUnneededProcessLocked(proc, "idle maint (pss " + proc.lastPss
-                                    + " from " + proc.initialIdlePss + ")");
+                            proc.kill("idle maint (pss " + proc.lastPss
+                                    + " from " + proc.initialIdlePss + ")", true);
                         }
                     }
                 } else if (proc.setProcState < ActivityManager.PROCESS_STATE_HOME) {
@@ -10500,6 +10854,7 @@
                 if (!mRecentTasks.isEmpty()) {
                     mStackSupervisor.createStackForRestoredTaskHistory(mRecentTasks);
                 }
+                cleanupRecentTasksLocked(UserHandle.USER_ALL);
                 mTaskPersister.startPersisting();
             }
 
@@ -10743,7 +11098,7 @@
             }
             if (app.pid > 0 && app.pid != MY_PID) {
                 handleAppCrashLocked(app, null, null, null);
-                killUnneededProcessLocked(app, "user request after error");
+                app.kill("user request after error", true);
             }
         }
     }
@@ -11062,12 +11417,13 @@
      * Used by {@link Log} via {@link com.android.internal.os.RuntimeInit} to report serious errors.
      * @param app object of the crashing app, null for the system server
      * @param tag reported by the caller
+     * @param system whether this wtf is coming from the system
      * @param crashInfo describing the context of the error
      * @return true if the process should exit immediately (WTF is fatal)
      */
-    public boolean handleApplicationWtf(IBinder app, String tag,
-            ApplicationErrorReport.CrashInfo crashInfo) {
-        ProcessRecord r = findAppProcess(app, "WTF");
+    public boolean handleApplicationWtf(IBinder app, final String tag, boolean system,
+            final ApplicationErrorReport.CrashInfo crashInfo) {
+        final ProcessRecord r = findAppProcess(app, "WTF");
         final String processName = app == null ? "system_server"
                 : (r == null ? "unknown" : r.processName);
 
@@ -11077,6 +11433,19 @@
                 r == null ? -1 : r.info.flags,
                 tag, crashInfo.exceptionMessage);
 
+        if (system) {
+            // If this is coming from the system, we could very well have low-level
+            // system locks held, so we want to do this all asynchronously.  And we
+            // never want this to become fatal, so there is that too.
+            mHandler.post(new Runnable() {
+                @Override public void run() {
+                    addErrorToDropBox("wtf", r, processName, null, null, tag, null, null,
+                            crashInfo);
+                }
+            });
+            return false;
+        }
+
         addErrorToDropBox("wtf", r, processName, null, null, tag, null, null, crashInfo);
 
         if (r != null && r.pid != Process.myPid() &&
@@ -11247,6 +11616,7 @@
                     try {
                         java.lang.Process logcat = new ProcessBuilder("/system/bin/logcat",
                                 "-v", "time", "-b", "events", "-b", "system", "-b", "main",
+                                "-b", "crash",
                                 "-t", String.valueOf(lines)).redirectErrorStream(true).start();
 
                         try { logcat.getOutputStream().close(); } catch (IOException e) {}
@@ -11310,8 +11680,11 @@
                         } else {
                             Slog.w(TAG, "Force-killing crashed app " + name
                                     + " at watcher's request");
-                            Process.killProcess(pid);
                             if (r != null) {
+                                r.kill("crash", true);
+                            } else {
+                                // Huh.
+                                Process.killProcess(pid);
                                 Process.killProcessGroup(uid, pid);
                             }
                         }
@@ -12234,8 +12607,9 @@
                 }
                 pw.println("  mProfileApp=" + mProfileApp + " mProfileProc=" + mProfileProc);
                 pw.println("  mProfileFile=" + mProfileFile + " mProfileFd=" + mProfileFd);
-                pw.println("  mProfileType=" + mProfileType + " mAutoStopProfiler="
+                pw.println("  mSamplingInterval=" + mSamplingInterval + " mAutoStopProfiler="
                         + mAutoStopProfiler);
+                pw.println("  mProfileType=" + mProfileType);
             }
         }
         if (dumpPackage == null) {
@@ -13660,9 +14034,9 @@
                 if (!capp.persistent && capp.thread != null
                         && capp.pid != 0
                         && capp.pid != MY_PID) {
-                    killUnneededProcessLocked(capp, "depends on provider "
+                    capp.kill("depends on provider "
                             + cpr.name.flattenToShortString()
-                            + " in dying proc " + (proc != null ? proc.processName : "??"));
+                            + " in dying proc " + (proc != null ? proc.processName : "??"), true);
                 }
             } else if (capp.thread != null && conn.provider.provider != null) {
                 try {
@@ -14730,6 +15104,7 @@
         if (Intent.ACTION_PACKAGE_REMOVED.equals(intent.getAction())
                 || Intent.ACTION_PACKAGE_CHANGED.equals(intent.getAction())
                 || Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE.equals(intent.getAction())
+                || Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE.equals(intent.getAction())
                 || uidRemoved) {
             if (checkComponentPermission(
                     android.Manifest.permission.BROADCAST_PACKAGE_REMOVED,
@@ -14756,9 +15131,13 @@
                                 forceStopPackageLocked(pkg, -1, false, true, true, false, false, userId,
                                         "storage unmount");
                             }
+                            cleanupRecentTasksLocked(UserHandle.USER_ALL);
                             sendPackageBroadcastLocked(
                                     IApplicationThread.EXTERNAL_STORAGE_UNAVAILABLE, list, userId);
                         }
+                    } else if (Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE.equals(
+                            intent.getAction())) {
+                        cleanupRecentTasksLocked(UserHandle.USER_ALL);
                     } else {
                         Uri data = intent.getData();
                         String ssp;
@@ -16518,8 +16897,7 @@
                         stats.reportExcessiveWakeLocked(app.info.uid, app.processName,
                                 realtimeSince, wtimeUsed);
                     }
-                    killUnneededProcessLocked(app, "excessive wake held " + wtimeUsed
-                            + " during " + realtimeSince);
+                    app.kill("excessive wake held " + wtimeUsed + " during " + realtimeSince, true);
                     app.baseProcessTracker.reportExcessiveWake(app.pkgList);
                 } else if (doCpuKills && uptimeSince > 0
                         && ((cputimeUsed*100)/uptimeSince) >= 25) {
@@ -16527,8 +16905,7 @@
                         stats.reportExcessiveCpuLocked(app.info.uid, app.processName,
                                 uptimeSince, cputimeUsed);
                     }
-                    killUnneededProcessLocked(app, "excessive cpu " + cputimeUsed
-                            + " during " + uptimeSince);
+                    app.kill("excessive cpu " + cputimeUsed + " during " + uptimeSince, true);
                     app.baseProcessTracker.reportExcessiveCpu(app.pkgList);
                 } else {
                     app.lastWakeTime = wtime;
@@ -16563,7 +16940,7 @@
                     + " to " + app.curSchedGroup);
             if (app.waitingToKill != null &&
                     app.setSchedGroup == Process.THREAD_GROUP_BG_NONINTERACTIVE) {
-                killUnneededProcessLocked(app, app.waitingToKill);
+                app.kill(app.waitingToKill, true);
                 success = false;
             } else {
                 if (true) {
@@ -16943,19 +17320,19 @@
                         mNumCachedHiddenProcs++;
                         numCached++;
                         if (numCached > cachedProcessLimit) {
-                            killUnneededProcessLocked(app, "cached #" + numCached);
+                            app.kill("cached #" + numCached, true);
                         }
                         break;
                     case ActivityManager.PROCESS_STATE_CACHED_EMPTY:
                         if (numEmpty > ProcessList.TRIM_EMPTY_APPS
                                 && app.lastActivityTime < oldTime) {
-                            killUnneededProcessLocked(app, "empty for "
+                            app.kill("empty for "
                                     + ((oldTime + ProcessList.MAX_EMPTY_TIME - app.lastActivityTime)
-                                    / 1000) + "s");
+                                    / 1000) + "s", true);
                         } else {
                             numEmpty++;
                             if (numEmpty > emptyProcessLimit) {
-                                killUnneededProcessLocked(app, "empty #" + numEmpty);
+                                app.kill("empty #" + numEmpty, true);
                             }
                         }
                         break;
@@ -16971,7 +17348,7 @@
                     // definition not re-use the same process again, and it is
                     // good to avoid having whatever code was running in them
                     // left sitting around after no longer needed.
-                    killUnneededProcessLocked(app, "isolated not needed");
+                    app.kill("isolated not needed", true);
                 }
 
                 if (app.curProcState >= ActivityManager.PROCESS_STATE_HOME
@@ -17199,11 +17576,7 @@
                         + (app.thread != null ? app.thread.asBinder() : null)
                         + ")\n");
                     if (app.pid > 0 && app.pid != MY_PID) {
-                        EventLog.writeEvent(EventLogTags.AM_KILL, app.userId, app.pid,
-                                app.processName, app.setAdj, "empty");
-                        app.killedByAm = true;
-                        Process.killProcessQuiet(app.pid);
-                        Process.killProcessGroup(app.info.uid, app.pid);
+                        app.kill("empty", false);
                     } else {
                         try {
                             app.thread.scheduleExit();
@@ -17247,10 +17620,9 @@
         }
     }
 
-    private void stopProfilerLocked(ProcessRecord proc, String path, int profileType) {
+    private void stopProfilerLocked(ProcessRecord proc, int profileType) {
         if (proc == null || proc == mProfileProc) {
             proc = mProfileProc;
-            path = mProfileFile;
             profileType = mProfileType;
             clearProfilerLocked();
         }
@@ -17258,7 +17630,7 @@
             return;
         }
         try {
-            proc.thread.profilerControl(false, path, null, profileType);
+            proc.thread.profilerControl(false, null, profileType);
         } catch (RemoteException e) {
             throw new IllegalStateException("Process disappeared");
         }
@@ -17276,10 +17648,11 @@
         mProfileFile = null;
         mProfileType = 0;
         mAutoStopProfiler = false;
+        mSamplingInterval = 0;
     }
 
     public boolean profileControl(String process, int userId, boolean start,
-            String path, ParcelFileDescriptor fd, int profileType) throws RemoteException {
+            ProfilerInfo profilerInfo, int profileType) throws RemoteException {
 
         try {
             synchronized (this) {
@@ -17291,8 +17664,8 @@
                             + android.Manifest.permission.SET_ACTIVITY_WATCHER);
                 }
 
-                if (start && fd == null) {
-                    throw new IllegalArgumentException("null fd");
+                if (start && (profilerInfo == null || profilerInfo.profileFd == null)) {
+                    throw new IllegalArgumentException("null profile info or fd");
                 }
 
                 ProcessRecord proc = null;
@@ -17305,23 +17678,25 @@
                 }
 
                 if (start) {
-                    stopProfilerLocked(null, null, 0);
-                    setProfileApp(proc.info, proc.processName, path, fd, false);
+                    stopProfilerLocked(null, 0);
+                    setProfileApp(proc.info, proc.processName, profilerInfo);
                     mProfileProc = proc;
                     mProfileType = profileType;
+                    ParcelFileDescriptor fd = profilerInfo.profileFd;
                     try {
                         fd = fd.dup();
                     } catch (IOException e) {
                         fd = null;
                     }
-                    proc.thread.profilerControl(start, path, fd, profileType);
+                    profilerInfo.profileFd = fd;
+                    proc.thread.profilerControl(start, profilerInfo, profileType);
                     fd = null;
                     mProfileFd = null;
                 } else {
-                    stopProfilerLocked(proc, path, profileType);
-                    if (fd != null) {
+                    stopProfilerLocked(proc, profileType);
+                    if (profilerInfo != null && profilerInfo.profileFd != null) {
                         try {
-                            fd.close();
+                            profilerInfo.profileFd.close();
                         } catch (IOException e) {
                         }
                     }
@@ -17332,9 +17707,9 @@
         } catch (RemoteException e) {
             throw new IllegalStateException("Process disappeared");
         } finally {
-            if (fd != null) {
+            if (profilerInfo != null && profilerInfo.profileFd != null) {
                 try {
-                    fd.close();
+                    profilerInfo.profileFd.close();
                 } catch (IOException e) {
                 }
             }
@@ -17519,7 +17894,7 @@
         d.show();
     }
 
-    private boolean startUser(final int userId, boolean foreground) {
+    private boolean startUser(final int userId, final boolean foreground) {
         if (checkCallingPermission(INTERACT_ACROSS_USERS_FULL)
                 != PackageManager.PERMISSION_GRANTED) {
             String msg = "Permission Denial: switchUser() from pid="
@@ -17643,7 +18018,7 @@
                                     public void performReceive(Intent intent, int resultCode,
                                             String data, Bundle extras, boolean ordered,
                                             boolean sticky, int sendingUser) {
-                                        userInitialized(uss, userId);
+                                        onUserInitialized(uss, foreground, oldUserId, userId);
                                     }
                                 }, 0, null, null, null, AppOpsManager.OP_NONE,
                                 true, false, MY_PID, Process.SYSTEM_UID,
@@ -17655,15 +18030,9 @@
                 }
 
                 if (foreground) {
-                    boolean homeInFront = mStackSupervisor.switchUserLocked(userId, uss);
-                    if (homeInFront) {
-                        startHomeActivityLocked(userId);
-                    } else {
-                        mStackSupervisor.resumeTopActivitiesLocked();
+                    if (!uss.initializing) {
+                        moveUserToForeground(uss, oldUserId, userId);
                     }
-                    EventLogTags.writeAmSwitchUser(userId);
-                    getUserManagerLocked().userForeground(userId);
-                    sendUserSwitchBroadcastsLocked(oldUserId, userId);
                 } else {
                     mStackSupervisor.startBackgroundUserLocked(userId, uss);
                 }
@@ -17789,10 +18158,28 @@
                 oldUserId, newUserId, uss));
     }
 
-    void userInitialized(UserStartedState uss, int newUserId) {
+    void onUserInitialized(UserStartedState uss, boolean foreground, int oldUserId, int newUserId) {
+        synchronized (this) {
+            if (foreground) {
+                moveUserToForeground(uss, oldUserId, newUserId);
+            }
+        }
+
         completeSwitchAndInitalize(uss, newUserId, true, false);
     }
 
+    void moveUserToForeground(UserStartedState uss, int oldUserId, int newUserId) {
+        boolean homeInFront = mStackSupervisor.switchUserLocked(newUserId, uss);
+        if (homeInFront) {
+            startHomeActivityLocked(newUserId);
+        } else {
+            mStackSupervisor.resumeTopActivitiesLocked();
+        }
+        EventLogTags.writeAmSwitchUser(newUserId);
+        getUserManagerLocked().userForeground(newUserId);
+        sendUserSwitchBroadcastsLocked(oldUserId, newUserId);
+    }
+
     void continueUserSwitch(UserStartedState uss, int oldUserId, int newUserId) {
         completeSwitchAndInitalize(uss, newUserId, false, true);
     }
@@ -18255,14 +18642,15 @@
                 long origId = Binder.clearCallingIdentity();
                 try {
                     TaskRecord tr = recentTaskForIdLocked(mTaskId);
-                    if (tr != null) {
-                        // Only kill the process if we are not a new document
-                        int flags = tr.getBaseIntent().getFlags();
-                        boolean isDocument = (flags & Intent.FLAG_ACTIVITY_NEW_DOCUMENT) ==
-                                Intent.FLAG_ACTIVITY_NEW_DOCUMENT;
-                        removeTaskByIdLocked(mTaskId,
-                                !isDocument ? ActivityManager.REMOVE_TASK_KILL_PROCESS : 0);
+                    if (tr == null) {
+                        throw new IllegalArgumentException("Unable to find task ID " + mTaskId);
                     }
+                    // Only kill the process if we are not a new document
+                    int flags = tr.getBaseIntent().getFlags();
+                    boolean isDocument = (flags & Intent.FLAG_ACTIVITY_NEW_DOCUMENT) ==
+                            Intent.FLAG_ACTIVITY_NEW_DOCUMENT;
+                    removeTaskByIdLocked(mTaskId,
+                            !isDocument ? ActivityManager.REMOVE_TASK_KILL_PROCESS : 0);
                 } finally {
                     Binder.restoreCallingIdentity(origId);
                 }
@@ -18277,17 +18665,64 @@
                 long origId = Binder.clearCallingIdentity();
                 try {
                     TaskRecord tr = recentTaskForIdLocked(mTaskId);
-                    if (tr != null) {
-                        return createRecentTaskInfoFromTaskRecord(tr);
+                    if (tr == null) {
+                        throw new IllegalArgumentException("Unable to find task ID " + mTaskId);
                     }
+                    return createRecentTaskInfoFromTaskRecord(tr);
                 } finally {
                     Binder.restoreCallingIdentity(origId);
                 }
-                return null;
             }
         }
 
         @Override
+        public void moveToFront() {
+            checkCaller();
+
+            final TaskRecord tr;
+            synchronized (ActivityManagerService.this) {
+                tr = recentTaskForIdLocked(mTaskId);
+                if (tr == null) {
+                    throw new IllegalArgumentException("Unable to find task ID " + mTaskId);
+                }
+                if (tr.getRootActivity() != null) {
+                    long origId = Binder.clearCallingIdentity();
+                    try {
+                        moveTaskToFrontLocked(tr.taskId, 0, null);
+                        return;
+                    } finally {
+                        Binder.restoreCallingIdentity(origId);
+                    }
+                }
+            }
+
+            startActivityFromRecentsInner(tr.taskId, null);
+        }
+
+        @Override
+        public int startActivity(IBinder whoThread, String callingPackage,
+                Intent intent, String resolvedType, Bundle options) {
+            checkCaller();
+
+            int callingUser = UserHandle.getCallingUserId();
+            TaskRecord tr;
+            IApplicationThread appThread;
+            synchronized (ActivityManagerService.this) {
+                tr = recentTaskForIdLocked(mTaskId);
+                if (tr == null) {
+                    throw new IllegalArgumentException("Unable to find task ID " + mTaskId);
+                }
+                appThread = ApplicationThreadNative.asInterface(whoThread);
+                if (appThread == null) {
+                    throw new IllegalArgumentException("Bad app thread " + appThread);
+                }
+            }
+            return mStackSupervisor.startActivityMayWait(appThread, -1, callingPackage, intent,
+                    resolvedType, null, null, null, null, 0, 0, null, null,
+                    null, options, callingUser, null, tr);
+        }
+
+        @Override
         public void setExcludeFromRecents(boolean exclude) {
             checkCaller();
 
@@ -18295,14 +18730,15 @@
                 long origId = Binder.clearCallingIdentity();
                 try {
                     TaskRecord tr = recentTaskForIdLocked(mTaskId);
-                    if (tr != null) {
-                        Intent intent = tr.getBaseIntent();
-                        if (exclude) {
-                            intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
-                        } else {
-                            intent.setFlags(intent.getFlags()
-                                    & ~Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
-                        }
+                    if (tr == null) {
+                        throw new IllegalArgumentException("Unable to find task ID " + mTaskId);
+                    }
+                    Intent intent = tr.getBaseIntent();
+                    if (exclude) {
+                        intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
+                    } else {
+                        intent.setFlags(intent.getFlags()
+                                & ~Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
                     }
                 } finally {
                     Binder.restoreCallingIdentity(origId);
diff --git a/services/core/java/com/android/server/am/ActivityRecord.java b/services/core/java/com/android/server/am/ActivityRecord.java
index fcbe71e..77b4cc9 100755
--- a/services/core/java/com/android/server/am/ActivityRecord.java
+++ b/services/core/java/com/android/server/am/ActivityRecord.java
@@ -723,6 +723,22 @@
                                         + pendingOptions.getThumbnail().getHeight()));
                     }
                     break;
+                case ActivityOptions.ANIM_THUMBNAIL_ASPECT_SCALE_UP:
+                case ActivityOptions.ANIM_THUMBNAIL_ASPECT_SCALE_DOWN:
+                    service.mWindowManager.overridePendingAppTransitionAspectScaledThumb(
+                            pendingOptions.getThumbnail(),
+                            pendingOptions.getStartX(), pendingOptions.getStartY(),
+                            pendingOptions.getOnAnimationStartListener(),
+                            (animationType == ActivityOptions.ANIM_THUMBNAIL_ASPECT_SCALE_UP));
+                    if (intent.getSourceBounds() == null) {
+                        intent.setSourceBounds(new Rect(pendingOptions.getStartX(),
+                                pendingOptions.getStartY(),
+                                pendingOptions.getStartX()
+                                        + pendingOptions.getThumbnail().getWidth(),
+                                pendingOptions.getStartY()
+                                        + pendingOptions.getThumbnail().getHeight()));
+                    }
+                    break;
                 default:
                     Slog.e(TAG, "applyOptionsLocked: Unknown animationType=" + animationType);
                     break;
@@ -1054,6 +1070,24 @@
         return null;
     }
 
+    final boolean isDestroyable() {
+        if (finishing || app == null || state == ActivityState.DESTROYING
+                || state == ActivityState.DESTROYED) {
+            // This would be redundant.
+            return false;
+        }
+        if (task == null || task.stack == null || this == task.stack.mResumedActivity
+                || this == task.stack.mPausingActivity || !haveState || !stopped) {
+            // We're not ready for this kind of thing.
+            return false;
+        }
+        if (visible) {
+            // The user would notice this!
+            return false;
+        }
+        return true;
+    }
+
     private static String createImageFilename(long createTime, int taskId) {
         return String.valueOf(taskId) + ACTIVITY_ICON_SUFFIX + createTime +
                 TaskPersister.IMAGE_EXTENSION;
@@ -1153,7 +1187,7 @@
 
         final ActivityManagerService service = stackSupervisor.mService;
         final ActivityInfo aInfo = stackSupervisor.resolveActivity(intent, resolvedType, 0, null,
-                null, userId);
+                userId);
         if (aInfo == null) {
             throw new XmlPullParserException("restoreActivity resolver error. Intent=" + intent +
                     " resolvedType=" + resolvedType);
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index 41ed4ce7..be0afbb 100755
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -36,11 +36,13 @@
 import static com.android.server.am.ActivityStackSupervisor.DEBUG_ADD_REMOVE;
 import static com.android.server.am.ActivityStackSupervisor.DEBUG_APP;
 import static com.android.server.am.ActivityStackSupervisor.DEBUG_CONTAINERS;
+import static com.android.server.am.ActivityStackSupervisor.DEBUG_RELEASE;
 import static com.android.server.am.ActivityStackSupervisor.DEBUG_SAVED_STATE;
 import static com.android.server.am.ActivityStackSupervisor.DEBUG_SCREENSHOTS;
 import static com.android.server.am.ActivityStackSupervisor.DEBUG_STATES;
 import static com.android.server.am.ActivityStackSupervisor.HOME_STACK_ID;
 
+import android.util.ArraySet;
 import com.android.internal.app.IVoiceInteractor;
 import com.android.internal.os.BatteryStatsImpl;
 import com.android.server.Watchdog;
@@ -2910,7 +2912,7 @@
                     int res = mStackSupervisor.startActivityLocked(srec.app.thread, destIntent,
                             null, aInfo, null, null, parent.appToken, null,
                             0, -1, parent.launchedFromUid, parent.launchedFromPackage,
-                            0, null, true, null, null);
+                            0, null, true, null, null, null);
                     foundParentInTask = res == ActivityManager.START_SUCCESS;
                 } catch (RemoteException e) {
                     foundParentInTask = false;
@@ -3058,15 +3060,10 @@
                 if (!lastIsOpaque) {
                     continue;
                 }
-                // We can destroy this one if we have its icicle saved and
-                // it is not in the process of pausing/stopping/finishing.
-                if (r.app != null && r != mResumedActivity && r != mPausingActivity
-                        && r.haveState && !r.visible && r.stopped
-                        && r.state != ActivityState.DESTROYING
-                        && r.state != ActivityState.DESTROYED) {
+                if (r.isDestroyable()) {
                     if (DEBUG_SWITCH) Slog.v(TAG, "Destroying " + r + " in state " + r.state
                             + " resumed=" + mResumedActivity
-                            + " pausing=" + mPausingActivity);
+                            + " pausing=" + mPausingActivity + " for reason " + reason);
                     if (destroyActivityLocked(r, true, reason)) {
                         activityRemoved = true;
                     }
@@ -3078,6 +3075,60 @@
         }
     }
 
+    final boolean safelyDestroyActivityLocked(ActivityRecord r, String reason) {
+        if (r.isDestroyable()) {
+            if (DEBUG_SWITCH) Slog.v(TAG, "Destroying " + r + " in state " + r.state
+                    + " resumed=" + mResumedActivity
+                    + " pausing=" + mPausingActivity + " for reason " + reason);
+            return destroyActivityLocked(r, true, reason);
+        }
+        return false;
+    }
+
+    final int releaseSomeActivitiesLocked(ProcessRecord app, ArraySet<TaskRecord> tasks,
+            String reason) {
+        // Iterate over tasks starting at the back (oldest) first.
+        if (DEBUG_RELEASE) Slog.d(TAG, "Trying to release some activities in " + app);
+        int maxTasks = tasks.size() / 4;
+        if (maxTasks < 1) {
+            maxTasks = 1;
+        }
+        int numReleased = 0;
+        for (int taskNdx = 0; taskNdx < mTaskHistory.size() && maxTasks > 0; taskNdx++) {
+            final TaskRecord task = mTaskHistory.get(taskNdx);
+            if (!tasks.contains(task)) {
+                continue;
+            }
+            if (DEBUG_RELEASE) Slog.d(TAG, "Looking for activities to release in " + task);
+            int curNum = 0;
+            final ArrayList<ActivityRecord> activities = task.mActivities;
+            for (int actNdx = 0; actNdx < activities.size(); actNdx++) {
+                final ActivityRecord activity = activities.get(actNdx);
+                if (activity.app == app && activity.isDestroyable()) {
+                    if (DEBUG_RELEASE) Slog.v(TAG, "Destroying " + activity
+                            + " in state " + activity.state + " resumed=" + mResumedActivity
+                            + " pausing=" + mPausingActivity + " for reason " + reason);
+                    destroyActivityLocked(activity, true, reason);
+                    if (activities.get(actNdx) != activity) {
+                        // Was removed from list, back up so we don't miss the next one.
+                        actNdx--;
+                    }
+                    curNum++;
+                }
+            }
+            if (curNum > 0) {
+                numReleased += curNum;
+                maxTasks--;
+                if (mTaskHistory.get(taskNdx) != task) {
+                    // The entire task got removed, back up so we don't miss the next one.
+                    taskNdx--;
+                }
+            }
+        }
+        if (DEBUG_RELEASE) Slog.d(TAG, "Done releasing: did " + numReleased + " activities");
+        return numReleased;
+    }
+
     /**
      * Destroy the current CLIENT SIDE instance of an activity.  This may be
      * called both when actually finishing an activity, or when performing
@@ -3989,7 +4040,7 @@
                 // Task creator asked to remove this when done, or this task was a voice
                 // interaction, so it should not remain on the recent tasks list.
                 mService.mRecentTasks.remove(task);
-                task.closeRecentsChain();
+                task.removedFromRecents(mService.mTaskPersister);
             }
         }
 
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index 8aec392..9b32b65 100644
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -45,6 +45,7 @@
 import android.app.IActivityManager;
 import android.app.IApplicationThread;
 import android.app.PendingIntent;
+import android.app.ProfilerInfo;
 import android.app.ActivityManager.RunningTaskInfo;
 import android.app.IActivityManager.WaitResult;
 import android.app.ResultInfo;
@@ -84,6 +85,7 @@
 import android.provider.Settings;
 import android.provider.Settings.SettingNotFoundException;
 import android.service.voice.IVoiceInteractionSession;
+import android.util.ArraySet;
 import android.util.EventLog;
 import android.util.Slog;
 import android.util.SparseArray;
@@ -115,10 +117,11 @@
     static final boolean DEBUG_APP = DEBUG || false;
     static final boolean DEBUG_CONTAINERS = DEBUG || false;
     static final boolean DEBUG_IDLE = DEBUG || false;
-    static final boolean DEBUG_VISIBLE_BEHIND = DEBUG || false;
+    static final boolean DEBUG_RELEASE = DEBUG || false;
     static final boolean DEBUG_SAVED_STATE = DEBUG || false;
     static final boolean DEBUG_SCREENSHOTS = DEBUG || false;
     static final boolean DEBUG_STATES = DEBUG || false;
+    static final boolean DEBUG_VISIBLE_BEHIND = DEBUG || false;
 
     public static final int HOME_STACK_ID = 0;
 
@@ -732,7 +735,7 @@
     }
 
     ActivityInfo resolveActivity(Intent intent, String resolvedType, int startFlags,
-            String profileFile, ParcelFileDescriptor profileFd, int userId) {
+            ProfilerInfo profilerInfo, int userId) {
         // Collect information about the target of the Intent.
         ActivityInfo aInfo;
         try {
@@ -767,11 +770,9 @@
                 }
             }
 
-            if (profileFile != null) {
+            if (profilerInfo != null) {
                 if (!aInfo.processName.equals("system")) {
-                    mService.setProfileApp(aInfo.applicationInfo, aInfo.processName,
-                            profileFile, profileFd,
-                            (startFlags&ActivityManager.START_FLAG_AUTO_STOP_PROFILER) != 0);
+                    mService.setProfileApp(aInfo.applicationInfo, aInfo.processName, profilerInfo);
                 }
             }
         }
@@ -781,15 +782,15 @@
     void startHomeActivity(Intent intent, ActivityInfo aInfo) {
         moveHomeStackTaskToTop(HOME_ACTIVITY_TYPE);
         startActivityLocked(null, intent, null, aInfo, null, null, null, null, 0, 0, 0, null, 0,
-                null, false, null, null);
+                null, false, null, null, null);
     }
 
     final int startActivityMayWait(IApplicationThread caller, int callingUid,
             String callingPackage, Intent intent, String resolvedType,
             IVoiceInteractionSession voiceSession, IVoiceInteractor voiceInteractor,
-            IBinder resultTo, String resultWho, int requestCode, int startFlags, String profileFile,
-            ParcelFileDescriptor profileFd, WaitResult outResult, Configuration config,
-            Bundle options, int userId, IActivityContainer iContainer) {
+            IBinder resultTo, String resultWho, int requestCode, int startFlags,
+            ProfilerInfo profilerInfo, WaitResult outResult, Configuration config,
+            Bundle options, int userId, IActivityContainer iContainer, TaskRecord inTask) {
         // Refuse possible leaked file descriptors
         if (intent != null && intent.hasFileDescriptors()) {
             throw new IllegalArgumentException("File descriptors passed in Intent");
@@ -801,7 +802,7 @@
 
         // Collect information about the target of the Intent.
         ActivityInfo aInfo = resolveActivity(intent, resolvedType, startFlags,
-                profileFile, profileFd, userId);
+                profilerInfo, userId);
 
         ActivityContainer container = (ActivityContainer)iContainer;
         synchronized (mService) {
@@ -899,7 +900,7 @@
             int res = startActivityLocked(caller, intent, resolvedType, aInfo,
                     voiceSession, voiceInteractor, resultTo, resultWho,
                     requestCode, callingPid, callingUid, callingPackage, startFlags, options,
-                    componentSpecified, null, container);
+                    componentSpecified, null, container, inTask);
 
             Binder.restoreCallingIdentity(origId);
 
@@ -994,8 +995,7 @@
                     intent = new Intent(intent);
 
                     // Collect information about the target of the Intent.
-                    ActivityInfo aInfo = resolveActivity(intent, resolvedTypes[i],
-                            0, null, null, userId);
+                    ActivityInfo aInfo = resolveActivity(intent, resolvedTypes[i], 0, null, userId);
                     // TODO: New, check if this is correct
                     aInfo = mService.getActivityInfoForUser(aInfo, userId);
 
@@ -1014,7 +1014,7 @@
                     }
                     int res = startActivityLocked(caller, intent, resolvedTypes[i],
                             aInfo, null, null, resultTo, null, -1, callingPid, callingUid, callingPackage,
-                            0, theseOptions, componentSpecified, outActivity, null);
+                            0, theseOptions, componentSpecified, outActivity, null, null);
                     if (res < 0) {
                         return res;
                     }
@@ -1098,13 +1098,11 @@
             r.compat = mService.compatibilityInfoForPackageLocked(r.info.applicationInfo);
             String profileFile = null;
             ParcelFileDescriptor profileFd = null;
-            boolean profileAutoStop = false;
             if (mService.mProfileApp != null && mService.mProfileApp.equals(app.processName)) {
                 if (mService.mProfileProc == null || mService.mProfileProc == app) {
                     mService.mProfileProc = app;
                     profileFile = mService.mProfileFile;
                     profileFd = mService.mProfileFd;
-                    profileAutoStop = mService.mAutoStopProfiler;
                 }
             }
             app.hasShownUi = true;
@@ -1123,13 +1121,15 @@
                 }
             }
 
+            ProfilerInfo profilerInfo = profileFile != null
+                    ? new ProfilerInfo(profileFile, profileFd, mService.mSamplingInterval,
+                    mService.mAutoStopProfiler) : null;
             app.forceProcessStateUpTo(ActivityManager.PROCESS_STATE_TOP);
             app.thread.scheduleLaunchActivity(new Intent(r.intent), r.appToken,
-                    System.identityHashCode(r), r.info,
-                    new Configuration(mService.mConfiguration), r.compat, r.task.voiceInteractor,
-                    app.repProcState, r.icicle, r.persistentState, results, newIntents, !andResume,
-                    mService.isNextTransitionForward(), profileFile, profileFd, profileAutoStop
-            );
+                    System.identityHashCode(r), r.info, new Configuration(mService.mConfiguration),
+                    r.compat, r.task.voiceInteractor, app.repProcState, r.icicle, r.persistentState,
+                    results, newIntents, !andResume, mService.isNextTransitionForward(),
+                    profilerInfo);
 
             if ((app.info.flags&ApplicationInfo.FLAG_CANT_SAVE_STATE) != 0) {
                 // This may be a heavy-weight process!  Note that the package
@@ -1241,7 +1241,8 @@
             IVoiceInteractionSession voiceSession, IVoiceInteractor voiceInteractor,
             IBinder resultTo, String resultWho, int requestCode,
             int callingPid, int callingUid, String callingPackage, int startFlags, Bundle options,
-            boolean componentSpecified, ActivityRecord[] outActivity, ActivityContainer container) {
+            boolean componentSpecified, ActivityRecord[] outActivity, ActivityContainer container,
+            TaskRecord inTask) {
         int err = ActivityManager.START_SUCCESS;
 
         ProcessRecord callerApp = null;
@@ -1453,7 +1454,7 @@
         doPendingActivityLaunchesLocked(false);
 
         err = startActivityUncheckedLocked(r, sourceRecord, voiceSession, voiceInteractor,
-                startFlags, true, options);
+                startFlags, true, options, inTask);
 
         if (err < 0) {
             // If someone asked to have the keyguard dismissed on the next
@@ -1536,10 +1537,9 @@
         }
     }
 
-    final int startActivityUncheckedLocked(ActivityRecord r,
-            ActivityRecord sourceRecord,
+    final int startActivityUncheckedLocked(ActivityRecord r, ActivityRecord sourceRecord,
             IVoiceInteractionSession voiceSession, IVoiceInteractor voiceInteractor, int startFlags,
-            boolean doResume, Bundle options) {
+            boolean doResume, Bundle options, TaskRecord inTask) {
         final Intent intent = r.intent;
         final int callingUid = r.launchedFromUid;
 
@@ -1571,8 +1571,9 @@
             }
         }
 
-        final boolean launchTaskBehind = r.mLaunchTaskBehind &&
-                (launchFlags & Intent.FLAG_ACTIVITY_NEW_DOCUMENT) != 0;
+        final boolean launchTaskBehind = r.mLaunchTaskBehind
+                && !launchSingleTask && !launchSingleInstance
+                && (launchFlags & Intent.FLAG_ACTIVITY_NEW_DOCUMENT) != 0;
 
         if (r.resultTo != null && (launchFlags & Intent.FLAG_ACTIVITY_NEW_TASK) != 0) {
             // For whatever reason this activity is being launched into a new
@@ -1591,6 +1592,15 @@
             launchFlags |= Intent.FLAG_ACTIVITY_NEW_TASK;
         }
 
+        // If we are actually going to launch in to a new task, there are some cases where
+        // we further want to do multiple task.
+        if ((launchFlags & Intent.FLAG_ACTIVITY_NEW_TASK) != 0) {
+            if (launchTaskBehind
+                    || r.info.documentLaunchMode == ActivityInfo.DOCUMENT_LAUNCH_ALWAYS) {
+                launchFlags |= Intent.FLAG_ACTIVITY_MULTIPLE_TASK;
+            }
+        }
+
         // We'll invoke onUserLeaving before onPause only if the launching
         // activity did not explicitly state that this is an automated launch.
         mUserLeaving = (launchFlags & Intent.FLAG_ACTIVITY_NO_USER_ACTION) == 0;
@@ -1624,7 +1634,7 @@
         if (sourceRecord == null) {
             // This activity is not being started from another...  in this
             // case we -always- start a new task.
-            if ((launchFlags & Intent.FLAG_ACTIVITY_NEW_TASK) == 0) {
+            if ((launchFlags & Intent.FLAG_ACTIVITY_NEW_TASK) == 0 && inTask == null) {
                 Slog.w(TAG, "startActivity called from non-Activity context; forcing " +
                         "Intent.FLAG_ACTIVITY_NEW_TASK for: " + intent);
                 launchFlags |= Intent.FLAG_ACTIVITY_NEW_TASK;
@@ -1642,7 +1652,7 @@
 
         ActivityInfo newTaskInfo = null;
         Intent newTaskIntent = null;
-        final ActivityStack sourceStack;
+        ActivityStack sourceStack;
         if (sourceRecord != null) {
             if (sourceRecord.finishing) {
                 // If the source is finishing, we can't further count it as our source.  This
@@ -1666,12 +1676,51 @@
             sourceStack = null;
         }
 
-        intent.setFlags(launchFlags);
-
         boolean addingToTask = false;
         boolean movedHome = false;
         TaskRecord reuseTask = null;
         ActivityStack targetStack;
+
+        intent.setFlags(launchFlags);
+
+        // If the caller is not coming from another activity, but has given us an
+        // explicit task into which they would like us to launch the new activity,
+        // then let's see about doing that.
+        if (sourceRecord == null && inTask != null && inTask.stack != null && inTask.inRecents) {
+            // If this task is empty, then we are adding the first activity -- it
+            // determines the root, and must be launching as a NEW_TASK.
+            if (inTask.getRootActivity() == null) {
+                if ((launchFlags & Intent.FLAG_ACTIVITY_NEW_TASK) == 0
+                        && !launchSingleInstance && !launchSingleTask) {
+                    throw new IllegalStateException("Caller has inTask " + inTask
+                            + " but target is not a new task");
+                } else if (inTask.getBaseIntent() == null || !intent.getComponent().equals(
+                        inTask.getBaseIntent().getComponent())) {
+                    throw new IllegalStateException("Caller requested " + inTask + " is component "
+                            + inTask.getBaseIntent() + " but starting " + intent);
+                }
+                inTask.setIntent(r);
+
+            // If the task is not empty, then we are going to add the new activity on top
+            // of the task, so it can not be launching as a new task.
+            } else {
+                if ((launchFlags & Intent.FLAG_ACTIVITY_NEW_TASK) != 0
+                        || launchSingleInstance || launchSingleTask) {
+                    throw new IllegalStateException("Caller has inTask " + inTask
+                            + " but target is a new task");
+                }
+            }
+            sourceStack = inTask.stack;
+            reuseTask = inTask;
+        } else {
+            inTask = null;
+        }
+
+        // We may want to try to place the new activity in to an existing task.  We always
+        // do this if the target activity is singleTask or singleInstance; we will also do
+        // this if NEW_TASK has been requested, and there is not an additional qualifier telling
+        // us to still place it in a new task: multi task, always doc mode, or being asked to
+        // launch this as a new task behind the current one.
         if (((launchFlags & Intent.FLAG_ACTIVITY_NEW_TASK) != 0 &&
                 (launchFlags & Intent.FLAG_ACTIVITY_MULTIPLE_TASK) == 0)
                 || launchSingleInstance || launchSingleTask) {
@@ -1908,8 +1957,13 @@
                 Slog.e(TAG, "Attempted Lock Task Mode violation r=" + r);
                 return ActivityManager.START_RETURN_LOCK_TASK_MODE_VIOLATION;
             }
-            newTask = true;
-            targetStack = adjustStackFocus(r, newTask);
+            if (inTask == null) {
+                // If we have an incoming task, we are just going to use that.
+                newTask = true;
+                targetStack = adjustStackFocus(r, newTask);
+            } else {
+                targetStack = inTask.stack;
+            }
             if (!launchTaskBehind) {
                 targetStack.moveToFront();
             }
@@ -1986,6 +2040,20 @@
             if (DEBUG_TASKS) Slog.v(TAG, "Starting new activity " + r
                     + " in existing task " + r.task + " from source " + sourceRecord);
 
+        } else if (inTask != null) {
+            // The calling is asking that the new activity be started in an explicit
+            // task it has provided to us.
+            if (isLockTaskModeViolation(inTask)) {
+                Slog.e(TAG, "Attempted Lock Task Mode violation r=" + r);
+                return ActivityManager.START_RETURN_LOCK_TASK_MODE_VIOLATION;
+            }
+            targetStack = inTask.stack;
+            targetStack.moveToFront();
+            mWindowManager.moveTaskToTop(targetStack.topTask().taskId);
+            r.setTask(inTask, null);
+            if (DEBUG_TASKS) Slog.v(TAG, "Starting new activity " + r
+                    + " in explicit task " + r.task);
+
         } else {
             // This not being started from an existing activity, and not part
             // of a new task...  just put it in the top task, though these days
@@ -2023,7 +2091,7 @@
         while (!mPendingActivityLaunches.isEmpty()) {
             PendingActivityLaunch pal = mPendingActivityLaunches.remove(0);
             startActivityUncheckedLocked(pal.r, pal.sourceRecord, null, null, pal.startFlags,
-                    doResume && mPendingActivityLaunches.isEmpty(), null);
+                    doResume && mPendingActivityLaunches.isEmpty(), null, null);
         }
     }
 
@@ -2430,7 +2498,6 @@
                         r.userId, r.info.configChanges, task.voiceSession != null,
                         r.mLaunchTaskBehind);
             }
-            mWindowManager.addTask(taskId, stackId, false);
         }
         resumeHomeStackTask(HOME_ACTIVITY_TYPE, null);
     }
@@ -2726,6 +2793,64 @@
         }
     }
 
+    void releaseSomeActivitiesLocked(ProcessRecord app, String reason) {
+        // Examine all activities currently running in the process.
+        TaskRecord firstTask = null;
+        // Tasks is non-null only if two or more tasks are found.
+        ArraySet<TaskRecord> tasks = null;
+        if (DEBUG_RELEASE) Slog.d(TAG, "Trying to release some activities in " + app);
+        for (int i=0; i<app.activities.size(); i++) {
+            ActivityRecord r = app.activities.get(i);
+            // First, if we find an activity that is in the process of being destroyed,
+            // then we just aren't going to do anything for now; we want things to settle
+            // down before we try to prune more activities.
+            if (r.finishing || r.state == ActivityState.DESTROYING
+                    || r.state == ActivityState.DESTROYED) {
+                if (DEBUG_RELEASE) Slog.d(TAG, "Abort release; already destroying: " + r);
+                return;
+            }
+            // Don't consider any activies that are currently not in a state where they
+            // can be destroyed.
+            if (r.visible || !r.stopped || !r.haveState
+                    || r.state == ActivityState.RESUMED || r.state == ActivityState.PAUSING
+                    || r.state == ActivityState.PAUSED || r.state == ActivityState.STOPPING) {
+                if (DEBUG_RELEASE) Slog.d(TAG, "Not releasing in-use activity: " + r);
+                continue;
+            }
+            if (r.task != null) {
+                if (DEBUG_RELEASE) Slog.d(TAG, "Collecting release task " + r.task
+                        + " from " + r);
+                if (firstTask == null) {
+                    firstTask = r.task;
+                } else if (firstTask != r.task) {
+                    if (tasks == null) {
+                        tasks = new ArraySet<>();
+                        tasks.add(firstTask);
+                    }
+                    tasks.add(r.task);
+                }
+            }
+        }
+        if (tasks == null) {
+            if (DEBUG_RELEASE) Slog.d(TAG, "Didn't find two or more tasks to release");
+            return;
+        }
+        // If we have activities in multiple tasks that are in a position to be destroyed,
+        // let's iterate through the tasks and release the oldest one.
+        final int numDisplays = mActivityDisplays.size();
+        for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
+            final ArrayList<ActivityStack> stacks = mActivityDisplays.valueAt(displayNdx).mStacks;
+            // Step through all stacks starting from behind, to hit the oldest things first.
+            for (int stackNdx = 0; stackNdx < stacks.size(); stackNdx++) {
+                final ActivityStack stack = stacks.get(stackNdx);
+                // Try to release activities in this stack; if we manage to, we are done.
+                if (stack.releaseSomeActivitiesLocked(app, tasks, reason) > 0) {
+                    return;
+                }
+            }
+        }
+    }
+
     boolean switchUserLocked(int userId, UserStartedState uss) {
         mUserStackInFront.put(mCurrentUser, getFocusedStack().getStackId());
         final int restoreStackId = mUserStackInFront.get(userId, HOME_STACK_ID);
@@ -3498,8 +3623,8 @@
                     && "content".equals(intent.getData().getScheme())) {
                 mimeType = mService.getProviderMimeType(intent.getData(), userId);
             }
-            return startActivityMayWait(null, -1, null, intent, mimeType, null, null, null, null, 0, 0, null,
-                    null, null, null, null, userId, this);
+            return startActivityMayWait(null, -1, null, intent, mimeType, null, null, null, null, 0,
+                    0, null, null, null, null, userId, this, null);
         }
 
         @Override
@@ -3525,7 +3650,7 @@
                     resolvedType = mService.getProviderMimeType(intent.getData(), userId);
                 }
             }
-            ActivityInfo aInfo = resolveActivity(intent, resolvedType, 0, null, null, userId);
+            ActivityInfo aInfo = resolveActivity(intent, resolvedType, 0, null, userId);
             if (aInfo != null && (aInfo.flags & ActivityInfo.FLAG_ALLOW_EMBEDDED) == 0) {
                 throw new SecurityException(
                         "Attempt to embed activity that has not set allowEmbedded=\"true\"");
diff --git a/services/core/java/com/android/server/am/PendingIntentRecord.java b/services/core/java/com/android/server/am/PendingIntentRecord.java
index 98999e9..433ab60 100644
--- a/services/core/java/com/android/server/am/PendingIntentRecord.java
+++ b/services/core/java/com/android/server/am/PendingIntentRecord.java
@@ -254,7 +254,7 @@
                             } else {
                                 owner.startActivityInPackage(uid, key.packageName, finalIntent,
                                         resolvedType, resultTo, resultWho, requestCode, 0,
-                                        options, userId, container);
+                                        options, userId, container, null);
                             }
                         } catch (RuntimeException e) {
                             Slog.w(ActivityManagerService.TAG,
diff --git a/services/core/java/com/android/server/am/ProcessRecord.java b/services/core/java/com/android/server/am/ProcessRecord.java
index f1bcb60..0817dd8 100644
--- a/services/core/java/com/android/server/am/ProcessRecord.java
+++ b/services/core/java/com/android/server/am/ProcessRecord.java
@@ -17,6 +17,8 @@
 package com.android.server.am;
 
 import android.util.ArraySet;
+import android.util.EventLog;
+import android.util.Slog;
 import com.android.internal.app.ProcessStats;
 import com.android.internal.os.BatteryStatsImpl;
 
@@ -502,6 +504,21 @@
         return adj;
     }
 
+    void kill(String reason, boolean noisy) {
+        if (!killedByAm) {
+            if (noisy) {
+                Slog.i(ActivityManagerService.TAG, "Killing " + toShortString() + " (adj " + setAdj
+                        + "): " + reason);
+            }
+            EventLog.writeEvent(EventLogTags.AM_KILL, userId, pid, processName, setAdj, reason);
+            Process.killProcessQuiet(pid);
+            Process.killProcessGroup(info.uid, pid);
+            if (!persistent) {
+                killedByAm = true;
+            }
+        }
+    }
+
     public String toShortString() {
         if (shortStringName != null) {
             return shortStringName;
diff --git a/services/core/java/com/android/server/am/TaskPersister.java b/services/core/java/com/android/server/am/TaskPersister.java
index 0180db3..3cc406b 100644
--- a/services/core/java/com/android/server/am/TaskPersister.java
+++ b/services/core/java/com/android/server/am/TaskPersister.java
@@ -273,11 +273,14 @@
                         if (TAG_TASK.equals(name)) {
                             final TaskRecord task =
                                     TaskRecord.restoreFromXml(in, mStackSupervisor);
-                            if (true || DEBUG) Slog.d(TAG, "restoreTasksLocked: restored task=" +
+                            if (DEBUG) Slog.d(TAG, "restoreTasksLocked: restored task=" +
                                     task);
                             if (task != null) {
                                 task.isPersistable = true;
-                                mWriteQueue.add(new TaskWriteQueueItem(task));
+                                // XXX Don't add to write queue... there is no reason to write
+                                // out the stuff we just read, if we don't write it we will
+                                // read the same thing again.
+                                //mWriteQueue.add(new TaskWriteQueueItem(task));
                                 tasks.add(task);
                                 final int taskId = task.taskId;
                                 recoveredTaskIds.add(taskId);
@@ -486,24 +489,24 @@
                             } catch (XmlPullParserException e) {
                             }
                         }
-                        if (stringWriter != null) {
-                            // Write out xml file while not holding mService lock.
-                            FileOutputStream file = null;
-                            AtomicFile atomicFile = null;
-                            try {
-                                atomicFile = new AtomicFile(new File(sTasksDir, String.valueOf(
-                                        task.taskId) + RECENTS_FILENAME + TASK_EXTENSION));
-                                file = atomicFile.startWrite();
-                                file.write(stringWriter.toString().getBytes());
-                                file.write('\n');
-                                atomicFile.finishWrite(file);
-                            } catch (IOException e) {
-                                if (file != null) {
-                                    atomicFile.failWrite(file);
-                                }
-                                Slog.e(TAG, "Unable to open " + atomicFile + " for persisting. " +
-                                        e);
+                    }
+                    if (stringWriter != null) {
+                        // Write out xml file while not holding mService lock.
+                        FileOutputStream file = null;
+                        AtomicFile atomicFile = null;
+                        try {
+                            atomicFile = new AtomicFile(new File(sTasksDir, String.valueOf(
+                                    task.taskId) + RECENTS_FILENAME + TASK_EXTENSION));
+                            file = atomicFile.startWrite();
+                            file.write(stringWriter.toString().getBytes());
+                            file.write('\n');
+                            atomicFile.finishWrite(file);
+                        } catch (IOException e) {
+                            if (file != null) {
+                                atomicFile.failWrite(file);
                             }
+                            Slog.e(TAG, "Unable to open " + atomicFile + " for persisting. " +
+                                    e);
                         }
                     }
                 }
diff --git a/services/core/java/com/android/server/am/TaskRecord.java b/services/core/java/com/android/server/am/TaskRecord.java
index 7e42232..071db97 100644
--- a/services/core/java/com/android/server/am/TaskRecord.java
+++ b/services/core/java/com/android/server/am/TaskRecord.java
@@ -94,6 +94,8 @@
     ComponentName realActivity; // The actual activity component that started the task.
     long firstActiveTime;   // First time this task was active.
     long lastActiveTime;    // Last time this task was active, including sleep.
+    boolean inRecents;      // Actually in the recents list?
+    boolean isAvailable;    // Is the activity available to be launched?
     boolean rootWasReset;   // True if the intent at the root of the task had
                             // the FLAG_ACTIVITY_RESET_TASK_IF_NEEDED flag.
     boolean autoRemoveRecents;  // If true, we should automatically remove the task from
@@ -170,6 +172,7 @@
         mAffiliatedTaskId = _taskId;
         voiceSession = _voiceSession;
         voiceInteractor = _voiceInteractor;
+        isAvailable = true;
         mActivities = new ArrayList<ActivityRecord>();
         setIntent(_intent, info);
     }
@@ -184,6 +187,7 @@
         mAffiliatedTaskId = _taskId;
         voiceSession = null;
         voiceInteractor = null;
+        isAvailable = true;
         mActivities = new ArrayList<ActivityRecord>();
         setIntent(_intent, info);
 
@@ -191,8 +195,9 @@
         isPersistable = true;
         mCallingUid = info.applicationInfo.uid;
         mCallingPackage = info.packageName;
-        // Clamp to [1, 100].
-        maxRecents = Math.min(Math.max(info.maxRecents, 1), 100);
+        // Clamp to [1, max].
+        maxRecents = Math.min(Math.max(info.maxRecents, 1),
+                ActivityManager.getMaxAppRecentsLimitStatic());
 
         taskType = APPLICATION_ACTIVITY_TYPE;
         mTaskToReturnTo = HOME_ACTIVITY_TYPE;
@@ -224,6 +229,7 @@
         realActivity = _realActivity;
         origActivity = _origActivity;
         rootWasReset = _rootWasReset;
+        isAvailable = true;
         autoRemoveRecents = _autoRemoveRecents;
         askedCompatMode = _askedCompatMode;
         taskType = _taskType;
@@ -371,6 +377,15 @@
         setNextAffiliate(null);
     }
 
+    void removedFromRecents(TaskPersister persister) {
+        disposeThumbnail();
+        closeRecentsChain();
+        if (inRecents) {
+            inRecents = false;
+            persister.wakeup(this, false);
+        }
+    }
+
     void setTaskToAffiliateWith(TaskRecord taskToAffiliateWith) {
         closeRecentsChain();
         mAffiliatedTaskId = taskToAffiliateWith.mAffiliatedTaskId;
@@ -531,8 +546,9 @@
             isPersistable = r.isPersistable();
             mCallingUid = r.launchedFromUid;
             mCallingPackage = r.launchedFromPackage;
-            // Clamp to [1, 100].
-            maxRecents = Math.min(Math.max(r.info.maxRecents, 1), 100);
+            // Clamp to [1, max].
+            maxRecents = Math.min(Math.max(r.info.maxRecents, 1),
+                    ActivityManager.getMaxAppRecentsLimitStatic());
         } else {
             // Otherwise make all added activities match this one.
             r.mActivityType = taskType;
@@ -1062,8 +1078,10 @@
             pw.print(prefix); pw.print("realActivity=");
             pw.println(realActivity.flattenToShortString());
         }
-        if (autoRemoveRecents || taskType != 0 || mTaskToReturnTo != 0 || numFullscreen != 0) {
+        if (autoRemoveRecents || isPersistable || taskType != 0 || mTaskToReturnTo != 0
+                || numFullscreen != 0) {
             pw.print(prefix); pw.print("autoRemoveRecents="); pw.print(autoRemoveRecents);
+                    pw.print(" isPersistable="); pw.print(isPersistable);
                     pw.print(" numFullscreen="); pw.print(numFullscreen);
                     pw.print(" taskType="); pw.print(taskType);
                     pw.print(" mTaskToReturnTo="); pw.println(mTaskToReturnTo);
@@ -1073,22 +1091,41 @@
                     pw.print(" mNeverRelinquishIdentity="); pw.print(mNeverRelinquishIdentity);
                     pw.print(" mReuseTask="); pw.println(mReuseTask);
         }
+        if (mAffiliatedTaskId != taskId || mPrevAffiliateTaskId != -1 || mPrevAffiliate != null
+                || mNextAffiliateTaskId != -1 || mNextAffiliate != null) {
+            pw.print(prefix); pw.print("affiliation="); pw.print(mAffiliatedTaskId);
+                    pw.print(" prevAffiliation="); pw.print(mPrevAffiliateTaskId);
+                    pw.print(" (");
+                    if (mPrevAffiliate == null) {
+                        pw.print("null");
+                    } else {
+                        pw.print(Integer.toHexString(System.identityHashCode(mPrevAffiliate)));
+                    }
+                    pw.print(") nextAffiliation="); pw.print(mNextAffiliateTaskId);
+                    pw.print(" (");
+                    if (mNextAffiliate == null) {
+                        pw.print("null");
+                    } else {
+                        pw.print(Integer.toHexString(System.identityHashCode(mNextAffiliate)));
+                    }
+                    pw.println(")");
+        }
         pw.print(prefix); pw.print("Activities="); pw.println(mActivities);
-        if (!askedCompatMode) {
-            pw.print(prefix); pw.print("askedCompatMode="); pw.println(askedCompatMode);
+        if (!askedCompatMode || !inRecents || !isAvailable) {
+            pw.print(prefix); pw.print("askedCompatMode="); pw.print(askedCompatMode);
+                    pw.print(" inRecents="); pw.print(inRecents);
+                    pw.print(" isAvailable="); pw.println(isAvailable);
         }
         pw.print(prefix); pw.print("lastThumbnail="); pw.print(mLastThumbnail);
-                pw.print(" lastThumbnailFile="); pw.print(mLastThumbnailFile);
-                pw.print(" lastDescription="); pw.println(lastDescription);
+                pw.print(" lastThumbnailFile="); pw.println(mLastThumbnailFile);
+        if (lastDescription != null) {
+            pw.print(prefix); pw.print("lastDescription="); pw.println(lastDescription);
+        }
         pw.print(prefix); pw.print("hasBeenVisible="); pw.print(hasBeenVisible);
                 pw.print(" firstActiveTime="); pw.print(lastActiveTime);
                 pw.print(" lastActiveTime="); pw.print(lastActiveTime);
                 pw.print(" (inactive for ");
                 pw.print((getInactiveDuration()/1000)); pw.println("s)");
-        pw.print(prefix); pw.print("isPersistable="); pw.print(isPersistable);
-                pw.print(" affiliation="); pw.print(mAffiliatedTaskId);
-                pw.print(" prevAffiliation="); pw.print(mPrevAffiliateTaskId);
-                pw.print(" nextAffiliation="); pw.println(mNextAffiliateTaskId);
     }
 
     @Override
diff --git a/services/core/java/com/android/server/connectivity/Vpn.java b/services/core/java/com/android/server/connectivity/Vpn.java
index 94aa421..afc2a39 100644
--- a/services/core/java/com/android/server/connectivity/Vpn.java
+++ b/services/core/java/com/android/server/connectivity/Vpn.java
@@ -17,6 +17,7 @@
 package com.android.server.connectivity;
 
 import static android.Manifest.permission.BIND_VPN_SERVICE;
+import static android.os.UserHandle.PER_USER_RANGE;
 import static android.system.OsConstants.AF_INET;
 import static android.system.OsConstants.AF_INET6;
 
@@ -84,6 +85,8 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
+import java.util.SortedSet;
+import java.util.TreeSet;
 import java.util.concurrent.atomic.AtomicInteger;
 
 /**
@@ -120,38 +123,39 @@
     private List<UidRange> mVpnUsers = null;
     private BroadcastReceiver mUserIntentReceiver = null;
 
-    private final int mUserId;
+    // Handle of user initiating VPN.
+    private final int mUserHandle;
 
     public Vpn(Looper looper, Context context, INetworkManagementService netService,
-            IConnectivityManager connService, int userId) {
+            IConnectivityManager connService, int userHandle) {
         mContext = context;
         mNetd = netService;
         mConnService = connService;
-        mUserId = userId;
+        mUserHandle = userHandle;
         mLooper = looper;
 
         mPackage = VpnConfig.LEGACY_VPN;
-        mOwnerUID = getAppUid(mPackage);
+        mOwnerUID = getAppUid(mPackage, mUserHandle);
 
         try {
             netService.registerObserver(mObserver);
         } catch (RemoteException e) {
             Log.wtf(TAG, "Problem registering observer", e);
         }
-        if (userId == UserHandle.USER_OWNER) {
+        if (userHandle == UserHandle.USER_OWNER) {
             // Owner's VPN also needs to handle restricted users
             mUserIntentReceiver = new BroadcastReceiver() {
                 @Override
                 public void onReceive(Context context, Intent intent) {
                     final String action = intent.getAction();
-                    final int userId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE,
+                    final int userHandle = intent.getIntExtra(Intent.EXTRA_USER_HANDLE,
                             UserHandle.USER_NULL);
-                    if (userId == UserHandle.USER_NULL) return;
+                    if (userHandle == UserHandle.USER_NULL) return;
 
                     if (Intent.ACTION_USER_ADDED.equals(action)) {
-                        onUserAdded(userId);
+                        onUserAdded(userHandle);
                     } else if (Intent.ACTION_USER_REMOVED.equals(action)) {
-                        onUserRemoved(userId);
+                        onUserRemoved(userHandle);
                     }
                 }
             };
@@ -272,7 +276,7 @@
 
         Log.i(TAG, "Switched from " + mPackage + " to " + newPackage);
         mPackage = newPackage;
-        mOwnerUID = getAppUid(newPackage);
+        mOwnerUID = getAppUid(newPackage, mUserHandle);
         token = Binder.clearCallingIdentity();
         try {
             mNetd.allowProtect(mOwnerUID);
@@ -320,14 +324,14 @@
                 packageName) == AppOpsManager.MODE_ALLOWED;
     }
 
-    private int getAppUid(String app) {
+    private int getAppUid(String app, int userHandle) {
         if (VpnConfig.LEGACY_VPN.equals(app)) {
             return Process.myUid();
         }
         PackageManager pm = mContext.getPackageManager();
         int result;
         try {
-            result = pm.getPackageUid(app, mUserId);
+            result = pm.getPackageUid(app, userHandle);
         } catch (NameNotFoundException e) {
             result = -1;
         }
@@ -400,9 +404,9 @@
             mNetworkAgent.blockAddressFamily(AF_INET6);
         }
 
-        addVpnUserLocked(mUserId);
+        addVpnUserLocked(mUserHandle);
         // If we are owner assign all Restricted Users to this VPN
-        if (mUserId == UserHandle.USER_OWNER) {
+        if (mUserHandle == UserHandle.USER_OWNER) {
             token = Binder.clearCallingIdentity();
             List<UserInfo> users;
             try {
@@ -459,13 +463,13 @@
         long token = Binder.clearCallingIdentity();
         try {
             // Restricted users are not allowed to create VPNs, they are tied to Owner
-            UserInfo user = mgr.getUserInfo(mUserId);
+            UserInfo user = mgr.getUserInfo(mUserHandle);
             if (user.isRestricted() || mgr.hasUserRestriction(UserManager.DISALLOW_CONFIG_VPN)) {
                 throw new SecurityException("Restricted users cannot establish VPNs");
             }
 
             ResolveInfo info = AppGlobals.getPackageManager().resolveService(intent,
-                                                                        null, 0, mUserId);
+                                                                        null, 0, mUserHandle);
             if (info == null) {
                 throw new SecurityException("Cannot find " + config.user);
             }
@@ -504,7 +508,7 @@
             }
             Connection connection = new Connection();
             if (!mContext.bindServiceAsUser(intent, connection, Context.BIND_AUTO_CREATE,
-                        new UserHandle(mUserId))) {
+                        new UserHandle(mUserHandle))) {
                 throw new IllegalStateException("Cannot bind " + config.user);
             }
 
@@ -562,41 +566,92 @@
         return mVpnUsers != null;
     }
 
+    // Note: Return type guarantees results are deduped and sorted, which callers require.
+    private SortedSet<Integer> getAppsUids(List<String> packageNames, int userHandle) {
+        SortedSet<Integer> uids = new TreeSet<Integer>();
+        for (String app : packageNames) {
+            int uid = getAppUid(app, userHandle);
+            if (uid != -1) uids.add(uid);
+        }
+        return uids;
+    }
+
     // Note: This function adds to mVpnUsers but does not publish list to NetworkAgent.
-    private void addVpnUserLocked(int user) {
+    private void addVpnUserLocked(int userHandle) {
         if (!isRunningLocked()) {
             throw new IllegalStateException("VPN is not active");
         }
 
-        // add the user
-        mVpnUsers.add(UidRange.createForUser(user));
+        if (mConfig.allowedApplications != null) {
+            // Add ranges covering all UIDs for allowedApplications.
+            int start = -1, stop = -1;
+            for (int uid : getAppsUids(mConfig.allowedApplications, userHandle)) {
+                if (start == -1) {
+                    start = uid;
+                } else if (uid != stop + 1) {
+                    mVpnUsers.add(new UidRange(start, stop));
+                    start = uid;
+                }
+                stop = uid;
+            }
+            if (start != -1) mVpnUsers.add(new UidRange(start, stop));
+        } else if (mConfig.disallowedApplications != null) {
+            // Add all ranges for user skipping UIDs for disallowedApplications.
+            final UidRange userRange = UidRange.createForUser(userHandle);
+            int start = userRange.start;
+            for (int uid : getAppsUids(mConfig.disallowedApplications, userHandle)) {
+                if (uid == start) {
+                    start++;
+                } else {
+                    mVpnUsers.add(new UidRange(start, uid - 1));
+                    start = uid + 1;
+                }
+            }
+            if (start <= userRange.stop) mVpnUsers.add(new UidRange(start, userRange.stop));
+        } else {
+            // Add all UIDs for the user.
+            mVpnUsers.add(UidRange.createForUser(userHandle));
+        }
 
         prepareStatusIntent();
     }
 
-    private void removeVpnUserLocked(int user) {
+    // Returns the subset of the full list of active UID ranges the VPN applies to (mVpnUsers) that
+    // apply to userHandle.
+    private List<UidRange> uidRangesForUser(int userHandle) {
+        final UidRange userRange = UidRange.createForUser(userHandle);
+        final List<UidRange> ranges = new ArrayList<UidRange>();
+        for (UidRange range : mVpnUsers) {
+            if (range.start >= userRange.start && range.stop <= userRange.stop) {
+                ranges.add(range);
+            }
+        }
+        return ranges;
+    }
+
+    private void removeVpnUserLocked(int userHandle) {
         if (!isRunningLocked()) {
             throw new IllegalStateException("VPN is not active");
         }
-        UidRange uidRange = UidRange.createForUser(user);
+        final List<UidRange> ranges = uidRangesForUser(userHandle);
         if (mNetworkAgent != null) {
-            mNetworkAgent.removeUidRanges(new UidRange[] { uidRange });
+            mNetworkAgent.removeUidRanges(ranges.toArray(new UidRange[ranges.size()]));
         }
-        mVpnUsers.remove(uidRange);
+        mVpnUsers.removeAll(ranges);
         mStatusIntent = null;
     }
 
-    private void onUserAdded(int userId) {
+    private void onUserAdded(int userHandle) {
         // If the user is restricted tie them to the owner's VPN
         synchronized(Vpn.this) {
             UserManager mgr = UserManager.get(mContext);
-            UserInfo user = mgr.getUserInfo(userId);
+            UserInfo user = mgr.getUserInfo(userHandle);
             if (user.isRestricted()) {
                 try {
-                    addVpnUserLocked(userId);
+                    addVpnUserLocked(userHandle);
                     if (mNetworkAgent != null) {
-                        UidRange uidRange = UidRange.createForUser(userId);
-                        mNetworkAgent.addUidRanges(new UidRange[] { uidRange });
+                        final List<UidRange> ranges = uidRangesForUser(userHandle);
+                        mNetworkAgent.addUidRanges(ranges.toArray(new UidRange[ranges.size()]));
                     }
                 } catch (Exception e) {
                     Log.wtf(TAG, "Failed to add restricted user to owner", e);
@@ -605,14 +660,14 @@
         }
     }
 
-    private void onUserRemoved(int userId) {
+    private void onUserRemoved(int userHandle) {
         // clean up if restricted
         synchronized(Vpn.this) {
             UserManager mgr = UserManager.get(mContext);
-            UserInfo user = mgr.getUserInfo(userId);
+            UserInfo user = mgr.getUserInfo(userHandle);
             if (user.isRestricted()) {
                 try {
-                    removeVpnUserLocked(userId);
+                    removeVpnUserLocked(userHandle);
                 } catch (Exception e) {
                     Log.wtf(TAG, "Failed to remove restricted user to owner", e);
                 }
@@ -787,7 +842,7 @@
             throw new IllegalStateException("KeyStore isn't unlocked");
         }
         UserManager mgr = UserManager.get(mContext);
-        UserInfo user = mgr.getUserInfo(mUserId);
+        UserInfo user = mgr.getUserInfo(mUserHandle);
         if (user.isRestricted() || mgr.hasUserRestriction(UserManager.DISALLOW_CONFIG_VPN)) {
             throw new SecurityException("Restricted users cannot establish VPNs");
         }
diff --git a/services/core/java/com/android/server/content/ContentService.java b/services/core/java/com/android/server/content/ContentService.java
index 64d3dc5..165148b 100644
--- a/services/core/java/com/android/server/content/ContentService.java
+++ b/services/core/java/com/android/server/content/ContentService.java
@@ -255,7 +255,7 @@
             for (int i=0; i<numCalls; i++) {
                 ObserverCall oc = calls.get(i);
                 try {
-                    oc.mObserver.onChange(oc.mSelfChange, uri);
+                    oc.mObserver.onChange(oc.mSelfChange, uri, userHandle);
                     if (Log.isLoggable(TAG, Log.VERBOSE)) {
                         Log.v(TAG, "Notified " + oc.mObserver + " of " + "update at " + uri);
                     }
diff --git a/services/core/java/com/android/server/content/SyncManager.java b/services/core/java/com/android/server/content/SyncManager.java
index 949019e..9e169d9 100644
--- a/services/core/java/com/android/server/content/SyncManager.java
+++ b/services/core/java/com/android/server/content/SyncManager.java
@@ -152,7 +152,10 @@
      */
     private static final int DELAY_RETRY_SYNC_IN_PROGRESS_IN_SECONDS = 10;
 
-    private static final int INITIALIZATION_UNBIND_DELAY_MS = 5000;
+    /**
+     * How long to wait before considering an active sync to have timed-out, and cancelling it.
+     */
+    private static final long ACTIVE_SYNC_TIMEOUT_MILLIS = 30L * 60 * 1000;  // 30 mins.
 
     private static final String SYNC_WAKE_LOCK_PREFIX = "*sync*/";
     private static final String HANDLE_SYNC_ALARM_WAKE_LOCK = "SyncManagerHandleSyncAlarm";
@@ -851,6 +854,31 @@
         mSyncHandler.sendMessage(msg);
     }
 
+    /**
+     * Post a delayed message to the handler that will result in the cancellation of the provided
+     * running sync's context.
+     */
+    private void postSyncExpiryMessage(ActiveSyncContext activeSyncContext) {
+        if (Log.isLoggable(TAG, Log.VERBOSE)) {
+            Log.v(TAG, "posting MESSAGE_SYNC_EXPIRED in " +
+                    (ACTIVE_SYNC_TIMEOUT_MILLIS/1000) + "s");
+        }
+        Message msg = mSyncHandler.obtainMessage();
+        msg.what = SyncHandler.MESSAGE_SYNC_EXPIRED;
+        msg.obj = activeSyncContext;
+        mSyncHandler.sendMessageDelayed(msg, ACTIVE_SYNC_TIMEOUT_MILLIS);
+    }
+
+    /**
+     * Remove any time-outs previously posted for the provided active sync.
+     */
+    private void removeSyncExpiryMessage(ActiveSyncContext activeSyncContext) {
+        if (Log.isLoggable(TAG, Log.VERBOSE)) {
+            Log.v(TAG, "removing all MESSAGE_SYNC_EXPIRED for " + activeSyncContext.toString());
+        }
+        mSyncHandler.removeMessages(SyncHandler.MESSAGE_SYNC_EXPIRED, activeSyncContext);
+    }
+
     class SyncHandlerMessagePayload {
         public final ActiveSyncContext activeSyncContext;
         public final SyncResult syncResult;
@@ -1902,6 +1930,8 @@
         private static final int MESSAGE_SERVICE_CONNECTED = 4;
         private static final int MESSAGE_SERVICE_DISCONNECTED = 5;
         private static final int MESSAGE_CANCEL = 6;
+        /** Posted delayed in order to expire syncs that are long-running. */
+        private static final int MESSAGE_SYNC_EXPIRED = 7;
 
         public final SyncNotificationInfo mSyncNotificationInfo = new SyncNotificationInfo();
         private Long mAlarmScheduleTime = null;
@@ -2000,10 +2030,21 @@
                 // to also take into account the periodic syncs.
                 earliestFuturePollTime = scheduleReadyPeriodicSyncs();
                 switch (msg.what) {
+                    case SyncHandler.MESSAGE_SYNC_EXPIRED:
+                        ActiveSyncContext expiredContext = (ActiveSyncContext) msg.obj;
+                        if (Log.isLoggable(TAG, Log.DEBUG)) {
+                            Log.d(TAG, "handleSyncHandlerMessage: MESSAGE_SYNC_EXPIRED: expiring "
+                                    + expiredContext);
+                        }
+                        cancelActiveSync(expiredContext.mSyncOperation.target,
+                                expiredContext.mSyncOperation.extras);
+                        nextPendingSyncTime = maybeStartNextSyncLocked();
+                        break;
+
                     case SyncHandler.MESSAGE_CANCEL: {
                         SyncStorageEngine.EndPoint payload = (SyncStorageEngine.EndPoint) msg.obj;
                         Bundle extras = msg.peekData();
-                        if (Log.isLoggable(TAG, Log.VERBOSE)) {
+                        if (Log.isLoggable(TAG, Log.DEBUG)) {
                             Log.d(TAG, "handleSyncHandlerMessage: MESSAGE_SERVICE_CANCEL: "
                                     + payload + " bundle: " + extras);
                         }
@@ -2653,6 +2694,13 @@
                     new ActiveSyncContext(op, insertStartSyncEvent(op), targetUid);
             activeSyncContext.mSyncInfo = mSyncStorageEngine.addActiveSync(activeSyncContext);
             mActiveSyncContexts.add(activeSyncContext);
+            if (!activeSyncContext.mSyncOperation.isInitialization() &&
+                    !activeSyncContext.mSyncOperation.isExpedited() &&
+                    !activeSyncContext.mSyncOperation.isManual() &&
+                    !activeSyncContext.mSyncOperation.isIgnoreSettings()) {
+                // Post message to expire this sync if it runs for too long.
+                postSyncExpiryMessage(activeSyncContext);
+            }
             if (Log.isLoggable(TAG, Log.VERBOSE)) {
                 Log.v(TAG, "dispatchSyncOperation: starting " + activeSyncContext);
             }
@@ -2757,9 +2805,7 @@
                 } else {
                     Log.d(TAG, "failed sync operation " + syncOperation + ", " + syncResult);
                     // the operation failed so increase the backoff time
-                    if (!syncResult.syncAlreadyInProgress) {
-                        increaseBackoffSetting(syncOperation);
-                    }
+                    increaseBackoffSetting(syncOperation);
                     // reschedule the sync if so indicated by the syncResult
                     maybeRescheduleSync(syncResult, syncOperation);
                     historyMessage = ContentResolver.syncErrorToString(
@@ -2768,7 +2814,6 @@
                     downstreamActivity = 0;
                     upstreamActivity = 0;
                 }
-
                 setDelayUntilTime(syncOperation, syncResult.delayUntil);
             } else {
                 if (isLoggable) {
@@ -2794,7 +2839,6 @@
 
             stopSyncEvent(activeSyncContext.mHistoryRowId, syncOperation, historyMessage,
                     upstreamActivity, downstreamActivity, elapsedTime);
-
             // Check for full-resync and schedule it after closing off the last sync.
             if (info.target_provider) {
                 if (syncResult != null && syncResult.tooManyDeletions) {
@@ -2833,6 +2877,7 @@
             mActiveSyncContexts.remove(activeSyncContext);
             mSyncStorageEngine.removeActiveSync(activeSyncContext.mSyncInfo,
                     activeSyncContext.mSyncOperation.target.userId);
+            removeSyncExpiryMessage(activeSyncContext);
         }
 
         /**
diff --git a/services/core/java/com/android/server/content/SyncOperation.java b/services/core/java/com/android/server/content/SyncOperation.java
index 9a4abce..35827cc 100644
--- a/services/core/java/com/android/server/content/SyncOperation.java
+++ b/services/core/java/com/android/server/content/SyncOperation.java
@@ -273,6 +273,14 @@
         return extras.getBoolean(ContentResolver.SYNC_EXTRAS_DISALLOW_METERED, false);
     }
 
+    public boolean isManual() {
+        return extras.getBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, false);
+    }
+
+    public boolean isIgnoreSettings() {
+        return extras.getBoolean(ContentResolver.SYNC_EXTRAS_IGNORE_SETTINGS, false);
+    }
+
     /** Changed in V3. */
     public static String toKey(SyncStorageEngine.EndPoint info, Bundle extras) {
         StringBuilder sb = new StringBuilder();
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecController.java b/services/core/java/com/android/server/hdmi/HdmiCecController.java
index cf06ca8..827b3ed 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecController.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecController.java
@@ -99,6 +99,11 @@
     // Stores the local CEC devices in the system. Device type is used for key.
     private final SparseArray<HdmiCecLocalDevice> mLocalDevices = new SparseArray<>();
 
+    @IoThreadOnly
+    private final HdmiLogger mIoThreadLogger = new HdmiLogger(TAG);
+    @ServiceThreadOnly
+    private final HdmiLogger mServiceThreadLogger = new HdmiLogger(TAG);
+
     // Private constructor.  Use HdmiCecController.create().
     private HdmiCecController(HdmiControlService service) {
         mService = service;
@@ -202,6 +207,9 @@
         }
 
         final int assignedAddress = logicalAddress;
+        mIoThreadLogger.debug(
+                String.format("New logical address for device [%d]: [preferred:%d, assigned:%d]",
+                        deviceType, preferredAddress, assignedAddress));
         if (callback != null) {
             runOnServiceThread(new Runnable() {
                 @Override
@@ -438,6 +446,7 @@
                         allocated.add(address);
                     }
                 }
+                mIoThreadLogger.debug("DevicePollingResult:" + allocated);
                 if (callback != null) {
                     runOnServiceThread(new Runnable() {
                         @Override
@@ -539,6 +548,7 @@
         runOnIoThread(new Runnable() {
             @Override
             public void run() {
+                mIoThreadLogger.debug("SendCommand:" + cecMessage);
                 byte[] body = buildBody(cecMessage.getOpcode(), cecMessage.getParams());
                 int i = 0;
                 int errorCode = Constants.SEND_RESULT_SUCCESS;
@@ -572,7 +582,9 @@
     @ServiceThreadOnly
     private void handleIncomingCecCommand(int srcAddress, int dstAddress, byte[] body) {
         assertRunOnServiceThread();
-        onReceiveCommand(HdmiCecMessageBuilder.of(srcAddress, dstAddress, body));
+        HdmiCecMessage command = HdmiCecMessageBuilder.of(srcAddress, dstAddress, body);
+        mServiceThreadLogger.debug("ReceiveCommand:" + command);
+        onReceiveCommand(command);
     }
 
     /**
@@ -581,6 +593,8 @@
     @ServiceThreadOnly
     private void handleHotplug(int port, boolean connected) {
         assertRunOnServiceThread();
+        mServiceThreadLogger.debug(
+                "Hotplug event:[port:" + port + " , connected:" + connected + "]");
         mService.onHotplug(port, connected);
     }
 
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecKeycode.java b/services/core/java/com/android/server/hdmi/HdmiCecKeycode.java
index aed5dcc..61c9424 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecKeycode.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecKeycode.java
@@ -394,4 +394,12 @@
         }
         return false;
     }
+
+    /**
+     * Returns {@code true} if given Android keycode is supported, otherwise {@code false}.
+     */
+    static boolean isSupportedKeycode(int androidKeycode) {
+        return HdmiCecKeycode.androidKeyToCecKey(androidKeycode)
+                != HdmiCecKeycode.UNSUPPORTED_KEYCODE;
+  }
 }
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
index 10a47d8..cd56cfc 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
@@ -119,6 +119,8 @@
     // other CEC devices since they might not have logical address.
     private final ArraySet<Integer> mCecSwitches = new ArraySet<Integer>();
 
+    private final HdmiLogger mSafeLogger = new HdmiLogger(TAG);
+
     HdmiCecLocalDeviceTv(HdmiControlService service) {
         super(service, HdmiDeviceInfo.DEVICE_TV);
         mPrevPortId = Constants.INVALID_PORT_ID;
@@ -342,6 +344,10 @@
     @ServiceThreadOnly
     protected void sendKeyEvent(int keyCode, boolean isPressed) {
         assertRunOnServiceThread();
+        if (!HdmiCecKeycode.isSupportedKeycode(keyCode)) {
+            Slog.w(TAG, "Unsupported key: " + keyCode);
+            return;
+        }
         List<SendKeyAction> action = getActions(SendKeyAction.class);
         if (!action.isEmpty()) {
             action.get(0).processKeyEvent(keyCode, isPressed);
@@ -694,6 +700,9 @@
 
     // # Seq 25
     void setSystemAudioMode(boolean on, boolean updateSetting) {
+        mSafeLogger.debug(String.format("System Audio Mode change[old:%b new:%b]",
+                mSystemAudioActivated, on));
+
         if (updateSetting) {
             mService.writeBooleanSetting(Global.HDMI_SYSTEM_AUDIO_ENABLED, on);
         }
@@ -707,7 +716,6 @@
     }
 
     private void updateAudioManagerForSystemAudio(boolean on) {
-        // TODO: remove output device, once update AudioManager api.
         mService.getAudioManager().setHdmiSystemAudioSupported(on);
     }
 
@@ -927,6 +935,7 @@
     protected boolean handleSetSystemAudioMode(HdmiCecMessage message) {
         assertRunOnServiceThread();
         if (!isMessageForSystemAudio(message)) {
+            mSafeLogger.warning("Invalid <Set System Audio Mode> message:" + message);
             return false;
         }
         SystemAudioActionFromAvr action = new SystemAudioActionFromAvr(this,
@@ -940,6 +949,7 @@
     protected boolean handleSystemAudioModeStatus(HdmiCecMessage message) {
         assertRunOnServiceThread();
         if (!isMessageForSystemAudio(message)) {
+            mSafeLogger.warning("Invalid <System Audio Mode Status> message:" + message);
             return false;
         }
         setSystemAudioMode(HdmiUtils.parseCommandParamSystemAudioStatus(message), true);
@@ -988,13 +998,10 @@
     }
 
     private boolean isMessageForSystemAudio(HdmiCecMessage message) {
-        if (message.getSource() != Constants.ADDR_AUDIO_SYSTEM
-                || message.getDestination() != Constants.ADDR_TV
-                || getAvrDeviceInfo() == null) {
-            Slog.w(TAG, "Skip abnormal CecMessage: " + message);
-            return false;
-        }
-        return true;
+        return message.getSource() == Constants.ADDR_AUDIO_SYSTEM
+                && (message.getDestination() == Constants.ADDR_TV
+                        || message.getDestination() == Constants.ADDR_BROADCAST)
+                && getAvrDeviceInfo() != null;
     }
 
     /**
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecMessage.java b/services/core/java/com/android/server/hdmi/HdmiCecMessage.java
index 433e93f..fd0ff9d 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecMessage.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecMessage.java
@@ -103,26 +103,146 @@
         switch (opcode) {
             case Constants.MESSAGE_FEATURE_ABORT:
                 return "Feature Abort";
+            case Constants.MESSAGE_IMAGE_VIEW_ON:
+                return "Image View On";
+            case Constants.MESSAGE_TUNER_STEP_INCREMENT:
+                return "Tuner Step Increment";
+            case Constants.MESSAGE_TUNER_STEP_DECREMENT:
+                return "Tuner Step Decrement";
+            case Constants.MESSAGE_TUNER_DEVICE_STATUS:
+                return "Tuner Device Staus";
+            case Constants.MESSAGE_GIVE_TUNER_DEVICE_STATUS:
+                return "Give Tuner Device Status";
+            case Constants.MESSAGE_RECORD_ON:
+                return "Record On";
+            case Constants.MESSAGE_RECORD_STATUS:
+                return "Record Status";
+            case Constants.MESSAGE_RECORD_OFF:
+                return "Record Off";
+            case Constants.MESSAGE_TEXT_VIEW_ON:
+                return "Text View On";
+            case Constants.MESSAGE_RECORD_TV_SCREEN:
+                return "Record Tv Screen";
+            case Constants.MESSAGE_GIVE_DECK_STATUS:
+                return "Give Deck Status";
+            case Constants.MESSAGE_DECK_STATUS:
+                return "Deck Status";
+            case Constants.MESSAGE_SET_MENU_LANGUAGE:
+                return "Set Menu Language";
+            case Constants.MESSAGE_CLEAR_ANALOG_TIMER:
+                return "Clear Analog Timer";
+            case Constants.MESSAGE_SET_ANALOG_TIMER:
+                return "Set Analog Timer";
+            case Constants.MESSAGE_TIMER_STATUS:
+                return "Timer Status";
+            case Constants.MESSAGE_STANDBY:
+                return "Standby";
+            case Constants.MESSAGE_PLAY:
+                return "Play";
+            case Constants.MESSAGE_DECK_CONTROL:
+                return "Deck Control";
+            case Constants.MESSAGE_TIMER_CLEARED_STATUS:
+                return "Timer Cleared Status";
+            case Constants.MESSAGE_USER_CONTROL_PRESSED:
+                return "User Control Pressed";
+            case Constants.MESSAGE_USER_CONTROL_RELEASED:
+                return "User Control Release";
+            case Constants.MESSAGE_GIVE_OSD_NAME:
+                return "Give Osd Name";
+            case Constants.MESSAGE_SET_OSD_NAME:
+                return "Set Osd Name";
+            case Constants.MESSAGE_SET_OSD_STRING:
+                return "Set Osd String";
+            case Constants.MESSAGE_SET_TIMER_PROGRAM_TITLE:
+                return "Set Timer Program Title";
+            case Constants.MESSAGE_SYSTEM_AUDIO_MODE_REQUEST:
+                return "System Audio Mode Request";
+            case Constants.MESSAGE_GIVE_AUDIO_STATUS:
+                return "Give Audio Status";
+            case Constants.MESSAGE_SET_SYSTEM_AUDIO_MODE:
+                return "Set System Audio Mode";
+            case Constants.MESSAGE_REPORT_AUDIO_STATUS:
+                return "Report Audio Status";
+            case Constants.MESSAGE_GIVE_SYSTEM_AUDIO_MODE_STATUS:
+                return "Give System Audio Mode Status";
+            case Constants.MESSAGE_SYSTEM_AUDIO_MODE_STATUS:
+                return "System Audio Mode Status";
+            case Constants.MESSAGE_ROUTING_CHANGE:
+                return "Routing Change";
+            case Constants.MESSAGE_ROUTING_INFORMATION:
+                return "Routing Information";
+            case Constants.MESSAGE_ACTIVE_SOURCE:
+                return "Active Source";
+            case Constants.MESSAGE_GIVE_PHYSICAL_ADDRESS:
+                return "Give Physical Address";
+            case Constants.MESSAGE_REPORT_PHYSICAL_ADDRESS:
+                return "Report Physical Address";
+            case Constants.MESSAGE_REQUEST_ACTIVE_SOURCE:
+                return "Request Active Source";
+            case Constants.MESSAGE_SET_STREAM_PATH:
+                return "Set Stream Path";
+            case Constants.MESSAGE_DEVICE_VENDOR_ID:
+                return "Device Vendor Id";
+            case Constants.MESSAGE_VENDOR_COMMAND:
+                return "Vendor Commandn";
+            case Constants.MESSAGE_VENDOR_REMOTE_BUTTON_DOWN:
+                return "Vendor Remote Button Down";
+            case Constants.MESSAGE_VENDOR_REMOTE_BUTTON_UP:
+                return "Vendor Remote Button Up";
+            case Constants.MESSAGE_GIVE_DEVICE_VENDOR_ID:
+                return "Give Device Vendor Id";
+            case Constants.MESSAGE_MENU_REQUEST:
+                return "Menu REquest";
+            case Constants.MESSAGE_MENU_STATUS:
+                return "Menu Status";
+            case Constants.MESSAGE_GIVE_DEVICE_POWER_STATUS:
+                return "Give Device Power Status";
+            case Constants.MESSAGE_REPORT_POWER_STATUS:
+                return "Report Power Status";
+            case Constants.MESSAGE_GET_MENU_LANGUAGE:
+                return "Get Menu Language";
+            case Constants.MESSAGE_SELECT_ANALOG_SERVICE:
+                return "Select Analog Service";
+            case Constants.MESSAGE_SELECT_DIGITAL_SERVICE:
+                return "Select Digital Service";
+            case Constants.MESSAGE_SET_DIGITAL_TIMER:
+                return "Set Digital Timer";
+            case Constants.MESSAGE_CLEAR_DIGITAL_TIMER:
+                return "Clear Digital Timer";
+            case Constants.MESSAGE_SET_AUDIO_RATE:
+                return "Set Audio Rate";
+            case Constants.MESSAGE_INACTIVE_SOURCE:
+                return "InActive Source";
             case Constants.MESSAGE_CEC_VERSION:
-                return "CEC Version";
-            case Constants.MESSAGE_REQUEST_ARC_INITIATION:
-                return "Request ARC Initiation";
-            case Constants.MESSAGE_REQUEST_ARC_TERMINATION:
-                return "Request ARC Termination";
+                return "Cec Version";
+            case Constants.MESSAGE_GET_CEC_VERSION:
+                return "Get Cec Version";
+            case Constants.MESSAGE_VENDOR_COMMAND_WITH_ID:
+                return "Vendor Command With Id";
+            case Constants.MESSAGE_CLEAR_EXTERNAL_TIMER:
+                return "Clear External Timer";
+            case Constants.MESSAGE_SET_EXTERNAL_TIMER:
+                return "Set External Timer";
+            case Constants.MESSAGE_REPORT_SHORT_AUDIO_DESCRIPTOR:
+                return "Repot Short Audio Descriptor";
+            case Constants.MESSAGE_REQUEST_SHORT_AUDIO_DESCRIPTOR:
+                return "Request Short Audio Descriptor";
+            case Constants.MESSAGE_INITIATE_ARC:
+                return "Initiate ARC";
             case Constants.MESSAGE_REPORT_ARC_INITIATED:
                 return "Report ARC Initiated";
             case Constants.MESSAGE_REPORT_ARC_TERMINATED:
                 return "Report ARC Terminated";
-            case Constants.MESSAGE_TEXT_VIEW_ON:
-                return "Text View On";
-            case Constants.MESSAGE_ACTIVE_SOURCE:
-                return "Active Source";
-            case Constants.MESSAGE_GIVE_DEVICE_POWER_STATUS:
-                return "Give Device Power Status";
-            case Constants.MESSAGE_VENDOR_COMMAND:
-                return "Vendor Command";
-            case Constants.MESSAGE_VENDOR_COMMAND_WITH_ID:
-                return "Vendor Command With ID";
+            case Constants.MESSAGE_REQUEST_ARC_INITIATION:
+                return "Request ARC Initiation";
+            case Constants.MESSAGE_REQUEST_ARC_TERMINATION:
+                return "Request ARC Termination";
+            case Constants.MESSAGE_TERMINATE_ARC:
+                return "Terminate ARC";
+            case Constants.MESSAGE_CDC_MESSAGE:
+                return "Cdc Message";
+            case Constants.MESSAGE_ABORT:
+                return "Abort";
             default:
                 return String.format("Opcode: %02X", opcode);
         }
diff --git a/services/core/java/com/android/server/hdmi/HdmiLogger.java b/services/core/java/com/android/server/hdmi/HdmiLogger.java
index cb72bc1..ee9379d 100644
--- a/services/core/java/com/android/server/hdmi/HdmiLogger.java
+++ b/services/core/java/com/android/server/hdmi/HdmiLogger.java
@@ -31,13 +31,14 @@
     // Logging duration for same error message.
     private static final long ERROR_LOG_DURATTION_MILLIS = 20 * 1000;  // 20s
 
+    private static final boolean DEBUG = false;
+
     // Key (String): log message.
     // Value (Pair(Long, Integer)): a pair of last log time millis and the number of logMessage.
     // Cache for warning.
     private final HashMap<String, Pair<Long, Integer>> mWarningTimingCache = new HashMap<>();
     // Cache for error.
     private final HashMap<String, Pair<Long, Integer>> mErrorTimingCache = new HashMap<>();
-
     private final String mTag;
 
     HdmiLogger(String tag) {
@@ -45,41 +46,54 @@
     }
 
     void warning(String logMessage) {
-        long curTime = SystemClock.uptimeMillis();
-        Pair<Long, Integer> timing = mWarningTimingCache.get(logMessage);
-        if (shouldLogNow(timing, curTime)) {
-            Slog.w(mTag, buildMessage(logMessage, timing));
-            mWarningTimingCache.put(logMessage, new Pair<>(curTime, 1));
-        } else {
-            increaseLogCount(mWarningTimingCache, logMessage);
+        String log = updateLog(mWarningTimingCache, logMessage);
+        if (!log.isEmpty()) {
+            Slog.w(mTag, log);
         }
     }
 
     void error(String logMessage) {
-        long curTime = SystemClock.uptimeMillis();
-        Pair<Long, Integer> timing = mErrorTimingCache.get(logMessage);
-        if (shouldLogNow(timing, curTime)) {
-            Slog.e(mTag, buildMessage(logMessage, timing));
-            mErrorTimingCache.put(logMessage, new Pair<>(curTime, 1));
-        } else {
-            increaseLogCount(mErrorTimingCache, logMessage);
+        String log = updateLog(mErrorTimingCache, logMessage);
+        if (!log.isEmpty()) {
+            Slog.e(mTag, log);
         }
     }
 
-    private String buildMessage(String message, @Nullable Pair<Long, Integer> timing) {
-        return new StringBuilder()
-            .append("[").append(timing == null ? 1 : timing.second).append("]:")
-            .append(message).toString();
+    void debug(String logMessage) {
+        if (!DEBUG) {
+            return;
+        }
+        Slog.d(mTag, logMessage);
     }
 
-    private void increaseLogCount(HashMap<String, Pair<Long, Integer>> cache, String message) {
+    private static String updateLog(HashMap<String, Pair<Long, Integer>> cache, String logMessage) {
+        long curTime = SystemClock.uptimeMillis();
+        Pair<Long, Integer> timing = cache.get(logMessage);
+        if (shouldLogNow(timing, curTime)) {
+            String log = buildMessage(logMessage, timing);
+            cache.put(logMessage, new Pair<>(curTime, 1));
+            return log;
+        } else {
+            increaseLogCount(cache, logMessage);
+        }
+        return "";
+    }
+
+    private static String buildMessage(String message, @Nullable Pair<Long, Integer> timing) {
+        return new StringBuilder()
+                .append("[").append(timing == null ? 1 : timing.second).append("]:")
+                .append(message).toString();
+    }
+
+    private static void increaseLogCount(HashMap<String, Pair<Long, Integer>> cache,
+            String message) {
         Pair<Long, Integer> timing = cache.get(message);
         if (timing != null) {
             cache.put(message, new Pair<>(timing.first, timing.second + 1));
         }
     }
 
-    private boolean shouldLogNow(@Nullable Pair<Long, Integer> timing, long curTime) {
+    private static boolean shouldLogNow(@Nullable Pair<Long, Integer> timing, long curTime) {
         return timing == null || curTime - timing.first > ERROR_LOG_DURATTION_MILLIS;
     }
 }
diff --git a/services/core/java/com/android/server/hdmi/SetArcTransmissionStateAction.java b/services/core/java/com/android/server/hdmi/SetArcTransmissionStateAction.java
index c1c6b91..30519f3 100644
--- a/services/core/java/com/android/server/hdmi/SetArcTransmissionStateAction.java
+++ b/services/core/java/com/android/server/hdmi/SetArcTransmissionStateAction.java
@@ -92,7 +92,7 @@
 
     private void setArcStatus(boolean enabled) {
         boolean wasEnabled = tv().setArcStatus(enabled);
-        Slog.i(TAG, "Change arc status [old:" + wasEnabled + " ,new:" + enabled);
+        Slog.i(TAG, "Change arc status [old:" + wasEnabled + ", new:" + enabled + "]");
 
         // If enabled before and set to "disabled" and send <Report Arc Terminated> to
         // av reciever.
diff --git a/services/core/java/com/android/server/notification/GlobalSortKeyComparator.java b/services/core/java/com/android/server/notification/GlobalSortKeyComparator.java
new file mode 100644
index 0000000..ce976d2
--- /dev/null
+++ b/services/core/java/com/android/server/notification/GlobalSortKeyComparator.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2014 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.server.notification;
+
+import java.util.Comparator;
+
+/**
+ * Sorts notifications by their global sort key.
+ */
+public class GlobalSortKeyComparator implements Comparator<NotificationRecord> {
+    @Override
+    public int compare(NotificationRecord left, NotificationRecord right) {
+        if (left.getGlobalSortKey() == null) {
+            throw new IllegalStateException("Missing left global sort key: " + left);
+        }
+        if (right.getGlobalSortKey() == null) {
+            throw new IllegalStateException("Missing right global sort key: " + right);
+        }
+        return left.getGlobalSortKey().compareTo(right.getGlobalSortKey());
+    }
+}
diff --git a/services/core/java/com/android/server/notification/GroupedNotificationComparator.java b/services/core/java/com/android/server/notification/GroupedNotificationComparator.java
deleted file mode 100644
index 608d55c..0000000
--- a/services/core/java/com/android/server/notification/GroupedNotificationComparator.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2014 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.server.notification;
-
-import android.text.TextUtils;
-import android.util.Log;
-
-/**
- * Sorts notifications, accounting for groups and sort keys.
- */
-public class GroupedNotificationComparator extends NotificationComparator {
-    private static final String TAG = "GroupedNotificationComparator";
-
-    @Override
-    public int compare(NotificationRecord left, NotificationRecord right) {
-        // "recently intrusive" is an ad hoc group that temporarily claims noisy notifications
-        if (left.isRecentlyIntrusive() != right.isRecentlyIntrusive()) {
-            return left.isRecentlyIntrusive() ? -1 : 1;
-        }
-
-        final NotificationRecord leftProxy = left.getRankingProxy();
-        if (leftProxy == null) {
-            throw new RuntimeException("left proxy cannot be null: " + left.getKey());
-        }
-        final NotificationRecord rightProxy = right.getRankingProxy();
-        if (rightProxy == null) {
-            throw new RuntimeException("right proxy cannot be null: " + right.getKey());
-        }
-        final String leftSortKey = left.getNotification().getSortKey();
-        final String rightSortKey = right.getNotification().getSortKey();
-        if (leftProxy != rightProxy) {
-            // between groups, compare proxies
-            return Integer.compare(leftProxy.getAuthoritativeRank(),
-                    rightProxy.getAuthoritativeRank());
-        } else if (TextUtils.isEmpty(leftSortKey) || TextUtils.isEmpty(rightSortKey)) {
-            // missing sort keys, use prior rank
-            return Integer.compare(left.getAuthoritativeRank(),
-                    right.getAuthoritativeRank());
-        } else {
-            // use sort keys within group
-            return leftSortKey.compareTo(rightSortKey);
-        }
-    }
-}
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index 6fd4eb7..8c0d2c9 100644
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -1605,55 +1605,66 @@
             @Override
             public void run() {
 
-                // === Scoring ===
-
-                // 0. Sanitize inputs
-                notification.priority = clamp(notification.priority, Notification.PRIORITY_MIN,
-                        Notification.PRIORITY_MAX);
-                // Migrate notification flags to scores
-                if (0 != (notification.flags & Notification.FLAG_HIGH_PRIORITY)) {
-                    if (notification.priority < Notification.PRIORITY_MAX) {
-                        notification.priority = Notification.PRIORITY_MAX;
-                    }
-                } else if (SCORE_ONGOING_HIGHER &&
-                        0 != (notification.flags & Notification.FLAG_ONGOING_EVENT)) {
-                    if (notification.priority < Notification.PRIORITY_HIGH) {
-                        notification.priority = Notification.PRIORITY_HIGH;
-                    }
-                }
-
-                // 1. initial score: buckets of 10, around the app [-20..20]
-                final int score = notification.priority * NOTIFICATION_PRIORITY_MULTIPLIER;
-
-                // 2. extract ranking signals from the notification data
-                final StatusBarNotification n = new StatusBarNotification(
-                        pkg, opPkg, id, tag, callingUid, callingPid, score, notification,
-                        user);
-                NotificationRecord r = new NotificationRecord(n, score);
-                NotificationRecord old = mNotificationsByKey.get(n.getKey());
-                if (old != null) {
-                    // Retain ranking information from previous record
-                    r.copyRankingInformation(old);
-                }
-                mRankingHelper.extractSignals(r);
-
-                // 3. Apply local rules
-
-                // blocked apps
-                if (ENABLE_BLOCKED_NOTIFICATIONS && !noteNotificationOp(pkg, callingUid)) {
-                    if (!isSystemNotification) {
-                        r.score = JUNK_SCORE;
-                        Slog.e(TAG, "Suppressing notification from package " + pkg
-                                + " by user request.");
-                    }
-                }
-
-                if (r.score < SCORE_DISPLAY_THRESHOLD) {
-                    // Notification will be blocked because the score is too low.
-                    return;
-                }
-
                 synchronized (mNotificationList) {
+
+                    // === Scoring ===
+
+                    // 0. Sanitize inputs
+                    notification.priority = clamp(notification.priority, Notification.PRIORITY_MIN,
+                            Notification.PRIORITY_MAX);
+                    // Migrate notification flags to scores
+                    if (0 != (notification.flags & Notification.FLAG_HIGH_PRIORITY)) {
+                        if (notification.priority < Notification.PRIORITY_MAX) {
+                            notification.priority = Notification.PRIORITY_MAX;
+                        }
+                    } else if (SCORE_ONGOING_HIGHER &&
+                            0 != (notification.flags & Notification.FLAG_ONGOING_EVENT)) {
+                        if (notification.priority < Notification.PRIORITY_HIGH) {
+                            notification.priority = Notification.PRIORITY_HIGH;
+                        }
+                    }
+
+                    // 1. initial score: buckets of 10, around the app [-20..20]
+                    final int score = notification.priority * NOTIFICATION_PRIORITY_MULTIPLIER;
+
+                    // 2. extract ranking signals from the notification data
+                    final StatusBarNotification n = new StatusBarNotification(
+                            pkg, opPkg, id, tag, callingUid, callingPid, score, notification,
+                            user);
+                    NotificationRecord r = new NotificationRecord(n, score);
+                    NotificationRecord old = mNotificationsByKey.get(n.getKey());
+                    if (old != null) {
+                        // Retain ranking information from previous record
+                        r.copyRankingInformation(old);
+                    }
+                    mRankingHelper.extractSignals(r);
+
+                    // 3. Apply local rules
+
+                    // blocked apps
+                    if (ENABLE_BLOCKED_NOTIFICATIONS && !noteNotificationOp(pkg, callingUid)) {
+                        if (!isSystemNotification) {
+                            r.score = JUNK_SCORE;
+                            Slog.e(TAG, "Suppressing notification from package " + pkg
+                                    + " by user request.");
+                        }
+                    }
+
+                    if (r.score < SCORE_DISPLAY_THRESHOLD) {
+                        // Notification will be blocked because the score is too low.
+                        return;
+                    }
+
+                    // Clear out group children of the old notification if the update causes the
+                    // group summary to go away. This happens when the old notification was a
+                    // summary and the new one isn't, or when the old notification was a summary
+                    // and its group key changed.
+                    if (old != null && old.getNotification().isGroupSummary() &&
+                            (!notification.isGroupSummary() ||
+                                    !old.getGroupKey().equals(r.getGroupKey()))) {
+                        cancelGroupChildrenLocked(old, callingUid, callingPid, null);
+                    }
+
                     int index = indexOfNotificationLocked(n.getKey());
                     if (index < 0) {
                         mNotificationList.add(r);
@@ -1678,24 +1689,7 @@
                     }
 
                     applyZenModeLocked(r);
-
-                    try {
-                        mRankingHelper.sort(mNotificationList);
-                    } catch (RuntimeException ex) {
-                        // Don't crash the system server if something bad happened.
-                        Log.e(TAG, "Extreme badness during notification sort", ex);
-                        Log.e(TAG, "Current notification list: ");
-                        for (int ii=0; ii < mNotificationList.size(); ii++) {
-                            NotificationRecord nr = mNotificationList.get(ii);
-                            Log.e(TAG, String.format(
-                                    "  [%d] %s (group %s, rank %d, sortkey %s, proxy %s)",
-                                    ii, nr, nr.getGroupKey(), nr.getAuthoritativeRank(),
-                                    nr.getNotification().getSortKey(),
-                                    nr.getRankingProxy()));
-                        }
-                        // STOPSHIP: remove once b/16626175 is found
-                        throw ex;
-                    }
+                    mRankingHelper.sort(mNotificationList);
 
                     if (notification.icon != 0) {
                         StatusBarNotification oldSbn = (old != null) ? old.sbn : null;
@@ -2404,10 +2398,9 @@
         final int N = mNotificationList.size();
         for (int i = N - 1; i >= 0; i--) {
             NotificationRecord childR = mNotificationList.get(i);
-            Notification childN = childR.getNotification();
             StatusBarNotification childSbn = childR.sbn;
-            if (childR.getUserId() == userId && pkg.equals(childSbn.getPackageName()) &&
-                    n.getGroup().equals(childN.getGroup())) {
+            if (childR.getNotification().isGroupChild() &&
+                    childR.getGroupKey().equals(r.getGroupKey())) {
                 EventLogTags.writeNotificationCancel(callingUid, callingPid,
                         pkg, childSbn.getId(), childSbn.getTag(), userId, 0, 0,
                         REASON_GROUP_SUMMARY_CANCELED, listenerName);
diff --git a/services/core/java/com/android/server/notification/NotificationRecord.java b/services/core/java/com/android/server/notification/NotificationRecord.java
index 0186b8c..f2bd676 100644
--- a/services/core/java/com/android/server/notification/NotificationRecord.java
+++ b/services/core/java/com/android/server/notification/NotificationRecord.java
@@ -63,9 +63,8 @@
     public boolean isUpdate;
     private int mPackagePriority;
 
-    // The record that ranking should use for comparisons outside the group.
-    private NotificationRecord mRankingProxy;
     private int mAuthoritativeRank;
+    private String mGlobalSortKey;
 
     @VisibleForTesting
     public NotificationRecord(StatusBarNotification sbn, int score)
@@ -81,9 +80,8 @@
         mRecentlyIntrusive = previous.mRecentlyIntrusive;
         mPackagePriority = previous.mPackagePriority;
         mIntercept = previous.mIntercept;
-        mRankingProxy = previous.mRankingProxy;
         mRankingTimeMs = calculateRankingTimeMs(previous.getRankingTimeMs());
-        // Don't copy mGroupKey, recompute it, in case it has changed
+        // Don't copy mGlobalSortKey, recompute it.
     }
 
     public Notification getNotification() { return sbn.getNotification(); }
@@ -158,7 +156,7 @@
         pw.println(prefix + "  mRecentlyIntrusive=" + mRecentlyIntrusive);
         pw.println(prefix + "  mPackagePriority=" + mPackagePriority);
         pw.println(prefix + "  mIntercept=" + mIntercept);
-        pw.println(prefix + "  mRankingProxy=" + getRankingProxy().getKey());
+        pw.println(prefix + "  mGlobalSortKey=" + mGlobalSortKey);
         pw.println(prefix + "  mRankingTimeMs=" + mRankingTimeMs);
     }
 
@@ -265,12 +263,12 @@
         return sbn.getPostTime();
     }
 
-    public NotificationRecord getRankingProxy() {
-        return mRankingProxy;
+    public void setGlobalSortKey(String globalSortKey) {
+        mGlobalSortKey = globalSortKey;
     }
 
-    public void setRankingProxy(NotificationRecord proxy) {
-        mRankingProxy = proxy;
+    public String getGlobalSortKey() {
+        return mGlobalSortKey;
     }
 
     public void setAuthoritativeRank(int authoritativeRank) {
diff --git a/services/core/java/com/android/server/notification/RankingHelper.java b/services/core/java/com/android/server/notification/RankingHelper.java
index d59e17b..01188af 100644
--- a/services/core/java/com/android/server/notification/RankingHelper.java
+++ b/services/core/java/com/android/server/notification/RankingHelper.java
@@ -17,12 +17,12 @@
 
 import android.app.Notification;
 import android.content.Context;
-import android.net.Uri;
 import android.os.Handler;
 import android.os.Message;
 import android.os.UserHandle;
 import android.text.TextUtils;
 import android.util.ArrayMap;
+import android.util.Log;
 import android.util.Slog;
 import android.util.SparseIntArray;
 import org.xmlpull.v1.XmlPullParser;
@@ -33,6 +33,7 @@
 import java.io.PrintWriter;
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.Comparator;
 import java.util.concurrent.TimeUnit;
 
 public class RankingHelper implements RankingConfig {
@@ -51,7 +52,7 @@
 
     private final NotificationSignalExtractor[] mSignalExtractors;
     private final NotificationComparator mPreliminaryComparator = new NotificationComparator();
-    private final NotificationComparator mFinalComparator = new GroupedNotificationComparator();
+    private final GlobalSortKeyComparator mFinalComparator = new GlobalSortKeyComparator();
 
     // Package name to uid, to priority. Would be better as Table<String, Int, Int>
     private final ArrayMap<String, SparseIntArray> mPackagePriorities;
@@ -168,34 +169,75 @@
 
     public void sort(ArrayList<NotificationRecord> notificationList) {
         final int N = notificationList.size();
-        // clear group proxies
+        // clear global sort keys
         for (int i = N - 1; i >= 0; i--) {
-            notificationList.get(i).setRankingProxy(null);
+            notificationList.get(i).setGlobalSortKey(null);
         }
 
-        // rank each record individually
-        Collections.sort(notificationList, mPreliminaryComparator);
-
-        // record inidivdual ranking result and nominate proxies for each group
-        for (int i = N - 1; i >= 0; i--) {
-            final NotificationRecord record = notificationList.get(i);
-            record.setAuthoritativeRank(i);
-            final String groupKey = record.getGroupKey();
-            boolean isGroupSummary = record.getNotification().getGroup() != null
-                    && (record.getNotification().flags & Notification.FLAG_GROUP_SUMMARY) != 0;
-            if (isGroupSummary || mProxyByGroupTmp.get(groupKey) == null) {
-                mProxyByGroupTmp.put(groupKey, record);
+        try {
+            // rank each record individually
+            Collections.sort(notificationList, mPreliminaryComparator);
+        } catch (RuntimeException ex) {
+            // Don't crash the system server if something bad happened.
+            Log.e(TAG, "Extreme badness during notification sort", ex);
+            Log.e(TAG, "Current notification list: ");
+            for (int i = 0; i < N; i++) {
+                NotificationRecord nr = notificationList.get(i);
+                Log.e(TAG, String.format(
+                        "  [%d] %s (group %s, rank %d, sortkey %s)",
+                        i, nr, nr.getGroupKey(), nr.getAuthoritativeRank(),
+                        nr.getNotification().getSortKey()));
             }
+            // STOPSHIP: remove once b/16626175 is found
+            throw ex;
         }
-        // assign nominated proxies to each notification
-        for (int i = 0; i < N; i++) {
-            final NotificationRecord record = notificationList.get(i);
-            record.setRankingProxy(mProxyByGroupTmp.get(record.getGroupKey()));
+
+        synchronized (mProxyByGroupTmp) {
+            // record individual ranking result and nominate proxies for each group
+            for (int i = N - 1; i >= 0; i--) {
+                final NotificationRecord record = notificationList.get(i);
+                record.setAuthoritativeRank(i);
+                final String groupKey = record.getGroupKey();
+                boolean isGroupSummary = record.getNotification().isGroupSummary();
+                if (isGroupSummary || !mProxyByGroupTmp.containsKey(groupKey)) {
+                    mProxyByGroupTmp.put(groupKey, record);
+                }
+            }
+            // assign global sort key:
+            //   is_recently_intrusive:group_rank:is_group_summary:group_sort_key:rank
+            for (int i = 0; i < N; i++) {
+                final NotificationRecord record = notificationList.get(i);
+                NotificationRecord groupProxy = mProxyByGroupTmp.get(record.getGroupKey());
+                String groupSortKey = record.getNotification().getSortKey();
+
+                // We need to make sure the developer provided group sort key (gsk) is handled
+                // correctly:
+                //   gsk="" < gsk=non-null-string < gsk=null
+                //
+                // We enforce this by using different prefixes for these three cases.
+                String groupSortKeyPortion;
+                if (groupSortKey == null) {
+                    groupSortKeyPortion = "nsk";
+                } else if (groupSortKey.equals("")) {
+                    groupSortKeyPortion = "esk";
+                } else {
+                    groupSortKeyPortion = "gsk=" + groupSortKey;
+                }
+
+                boolean isGroupSummary = record.getNotification().isGroupSummary();
+                record.setGlobalSortKey(
+                        String.format("intrsv=%c:grnk=0x%04x:gsmry=%c:%s:rnk=0x%04x",
+                        record.isRecentlyIntrusive() ? '0' : '1',
+                        groupProxy.getAuthoritativeRank(),
+                        isGroupSummary ? '0' : '1',
+                        groupSortKeyPortion,
+                        record.getAuthoritativeRank()));
+            }
+            mProxyByGroupTmp.clear();
         }
+
         // Do a second ranking pass, using group proxies
         Collections.sort(notificationList, mFinalComparator);
-
-        mProxyByGroupTmp.clear();
     }
 
     public int indexOf(ArrayList<NotificationRecord> notificationList, NotificationRecord target) {
diff --git a/services/core/java/com/android/server/pm/Installer.java b/services/core/java/com/android/server/pm/Installer.java
index d1e03ec..694669c 100644
--- a/services/core/java/com/android/server/pm/Installer.java
+++ b/services/core/java/com/android/server/pm/Installer.java
@@ -61,17 +61,7 @@
             return -1;
         }
 
-        StringBuilder builder = new StringBuilder("patchoat");
-        builder.append(' ');
-        builder.append(apkPath);
-        builder.append(' ');
-        builder.append(uid);
-        builder.append(isPublic ? " 1" : " 0");
-        builder.append(' ');
-        builder.append(pkgName);
-        builder.append(' ');
-        builder.append(instructionSet);
-        return mInstaller.execute(builder.toString());
+        return mInstaller.patchoat(apkPath, uid, isPublic, pkgName, instructionSet);
     }
 
     public int patchoat(String apkPath, int uid, boolean isPublic, String instructionSet) {
@@ -93,23 +83,13 @@
     }
 
     public int dexopt(String apkPath, int uid, boolean isPublic, String pkgName,
-            String instructionSet) {
+            String instructionSet, boolean vmSafeMode) {
         if (!isValidInstructionSet(instructionSet)) {
             Slog.e(TAG, "Invalid instruction set: " + instructionSet);
             return -1;
         }
 
-        StringBuilder builder = new StringBuilder("dexopt");
-        builder.append(' ');
-        builder.append(apkPath);
-        builder.append(' ');
-        builder.append(uid);
-        builder.append(isPublic ? " 1" : " 0");
-        builder.append(' ');
-        builder.append(pkgName);
-        builder.append(' ');
-        builder.append(instructionSet);
-        return mInstaller.execute(builder.toString());
+        return mInstaller.dexopt(apkPath, uid, isPublic, pkgName, instructionSet, vmSafeMode);
     }
 
     public int idmap(String targetApkPath, String overlayApkPath, int uid) {
diff --git a/services/core/java/com/android/server/pm/PackageInstallerService.java b/services/core/java/com/android/server/pm/PackageInstallerService.java
index 6f60d24..3f7a607 100644
--- a/services/core/java/com/android/server/pm/PackageInstallerService.java
+++ b/services/core/java/com/android/server/pm/PackageInstallerService.java
@@ -456,6 +456,8 @@
             throw new SecurityException("User restriction prevents installing");
         }
 
+        // TODO: double check all possible install flags
+
         if ((callingUid == Process.SHELL_UID) || (callingUid == Process.ROOT_UID)) {
             installerPackageName = "com.android.shell";
 
@@ -578,6 +580,17 @@
         return sessionId;
     }
 
+    @Override
+    public void abandonSession(int sessionId) {
+        synchronized (mSessions) {
+            final PackageInstallerSession session = mSessions.get(sessionId);
+            if (session == null || !isCallingUidOwner(session)) {
+                throw new SecurityException("Caller has no access to session " + sessionId);
+            }
+            session.abandon();
+        }
+    }
+
     private void checkInternalStorage(long sizeBytes) throws IOException {
         if (sizeBytes <= 0) return;
 
@@ -606,10 +619,7 @@
     public IPackageInstallerSession openSession(int sessionId) {
         synchronized (mSessions) {
             final PackageInstallerSession session = mSessions.get(sessionId);
-            if (session == null) {
-                throw new IllegalStateException("Missing session " + sessionId);
-            }
-            if (!isCallingUidOwner(session)) {
+            if (session == null || !isCallingUidOwner(session)) {
                 throw new SecurityException("Caller has no access to session " + sessionId);
             }
             session.open();
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index f06992a..5093f97 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -251,7 +251,6 @@
     // package apks to install directory.
     private static final String INSTALL_PACKAGE_SUFFIX = "-";
 
-    static final int SCAN_MONITOR = 1<<0;
     static final int SCAN_NO_DEX = 1<<1;
     static final int SCAN_FORCE_DEX = 1<<2;
     static final int SCAN_UPDATE_SIGNATURE = 1<<3;
@@ -262,6 +261,7 @@
     static final int SCAN_BOOTING = 1<<8;
     static final int SCAN_TRUSTED_OVERLAY = 1<<9;
     static final int SCAN_DELETE_DATA_ON_FAILURES = 1<<10;
+    static final int SCAN_REPLACING = 1<<11;
 
     static final int REMOVE_CHATTY = 1<<16;
 
@@ -353,12 +353,6 @@
     // the suffix "LI".
     final Object mInstallLock = new Object();
 
-    // These are the directories in the 3rd party applications installed dir
-    // that we have currently loaded packages from.  Keys are the application's
-    // installed zip file (absolute codePath), and values are Package.
-    final HashMap<String, PackageParser.Package> mAppDirs =
-            new HashMap<String, PackageParser.Package>();
-
     // ----------------------------------------------------------------
 
     // Keys are String (package name), values are Package.  This also serves
@@ -1374,7 +1368,7 @@
 
             // Set flag to monitor and not change apk file paths when
             // scanning install directories.
-            int scanMode = SCAN_MONITOR | SCAN_NO_PATHS | SCAN_DEFER_DEX | SCAN_BOOTING;
+            int scanFlags = SCAN_NO_PATHS | SCAN_DEFER_DEX | SCAN_BOOTING;
 
             final HashSet<String> alreadyDexOpted = new HashSet<String>();
 
@@ -1532,24 +1526,24 @@
             // overlay packages if they reside in VENDOR_OVERLAY_DIR.
             File vendorOverlayDir = new File(VENDOR_OVERLAY_DIR);
             scanDirLI(vendorOverlayDir, PackageParser.PARSE_IS_SYSTEM
-                    | PackageParser.PARSE_IS_SYSTEM_DIR, scanMode | SCAN_TRUSTED_OVERLAY, 0);
+                    | PackageParser.PARSE_IS_SYSTEM_DIR, scanFlags | SCAN_TRUSTED_OVERLAY, 0);
 
             // Find base frameworks (resource packages without code).
             scanDirLI(frameworkDir, PackageParser.PARSE_IS_SYSTEM
                     | PackageParser.PARSE_IS_SYSTEM_DIR
                     | PackageParser.PARSE_IS_PRIVILEGED,
-                    scanMode | SCAN_NO_DEX, 0);
+                    scanFlags | SCAN_NO_DEX, 0);
 
             // Collected privileged system packages.
             File privilegedAppDir = new File(Environment.getRootDirectory(), "priv-app");
             scanDirLI(privilegedAppDir, PackageParser.PARSE_IS_SYSTEM
                     | PackageParser.PARSE_IS_SYSTEM_DIR
-                    | PackageParser.PARSE_IS_PRIVILEGED, scanMode, 0);
+                    | PackageParser.PARSE_IS_PRIVILEGED, scanFlags, 0);
 
             // Collect ordinary system packages.
             File systemAppDir = new File(Environment.getRootDirectory(), "app");
             scanDirLI(systemAppDir, PackageParser.PARSE_IS_SYSTEM
-                    | PackageParser.PARSE_IS_SYSTEM_DIR, scanMode, 0);
+                    | PackageParser.PARSE_IS_SYSTEM_DIR, scanFlags, 0);
 
             // Collect all vendor packages.
             File vendorAppDir = new File("/vendor/app");
@@ -1559,12 +1553,12 @@
                 // failed to look up canonical path, continue with original one
             }
             scanDirLI(vendorAppDir, PackageParser.PARSE_IS_SYSTEM
-                    | PackageParser.PARSE_IS_SYSTEM_DIR, scanMode, 0);
+                    | PackageParser.PARSE_IS_SYSTEM_DIR, scanFlags, 0);
 
             // Collect all OEM packages.
             File oemAppDir = new File(Environment.getOemDirectory(), "app");
             scanDirLI(oemAppDir, PackageParser.PARSE_IS_SYSTEM
-                    | PackageParser.PARSE_IS_SYSTEM_DIR, scanMode, 0);
+                    | PackageParser.PARSE_IS_SYSTEM_DIR, scanFlags, 0);
 
             if (DEBUG_UPGRADE) Log.v(TAG, "Running installd update commands");
             mInstaller.moveFiles();
@@ -1636,10 +1630,10 @@
             if (!mOnlyCore) {
                 EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_PMS_DATA_SCAN_START,
                         SystemClock.uptimeMillis());
-                scanDirLI(mAppInstallDir, 0, scanMode, 0);
+                scanDirLI(mAppInstallDir, 0, scanFlags, 0);
 
                 scanDirLI(mDrmAppPrivateInstallDir, PackageParser.PARSE_FORWARD_LOCK,
-                        scanMode, 0);
+                        scanFlags, 0);
 
                 /**
                  * Remove disable package settings for any updated system
@@ -4077,7 +4071,7 @@
         return true;
     }
 
-    private void scanDirLI(File dir, int flags, int scanMode, long currentTime) {
+    private void scanDirLI(File dir, int parseFlags, int scanFlags, long currentTime) {
         final File[] files = dir.listFiles();
         if (ArrayUtils.isEmpty(files)) {
             Log.d(TAG, "No files in app dir " + dir);
@@ -4085,8 +4079,8 @@
         }
 
         if (DEBUG_PACKAGE_SCANNING) {
-            Log.d(TAG, "Scanning app dir " + dir + " scanMode=" + scanMode
-                    + " flags=0x" + Integer.toHexString(flags));
+            Log.d(TAG, "Scanning app dir " + dir + " scanFlags=" + scanFlags
+                    + " flags=0x" + Integer.toHexString(parseFlags));
         }
 
         for (File file : files) {
@@ -4097,13 +4091,13 @@
                 continue;
             }
             try {
-                scanPackageLI(file, flags | PackageParser.PARSE_MUST_BE_APK,
-                        scanMode, currentTime, null);
+                scanPackageLI(file, parseFlags | PackageParser.PARSE_MUST_BE_APK,
+                        scanFlags, currentTime, null);
             } catch (PackageManagerException e) {
                 Slog.w(TAG, "Failed to parse " + file + ": " + e.getMessage());
 
                 // Delete invalid userdata apps
-                if ((flags & PackageParser.PARSE_IS_SYSTEM) == 0 &&
+                if ((parseFlags & PackageParser.PARSE_IS_SYSTEM) == 0 &&
                         e.error == PackageManager.INSTALL_FAILED_INVALID_APK) {
                     Slog.w(TAG, "Deleting invalid package at " + file);
                     if (file.isDirectory()) {
@@ -4180,7 +4174,7 @@
      *  Scan a package and return the newly parsed package.
      *  Returns null in case of errors and the error code is stored in mLastScanError
      */
-    private PackageParser.Package scanPackageLI(File scanFile, int parseFlags, int scanMode,
+    private PackageParser.Package scanPackageLI(File scanFile, int parseFlags, int scanFlags,
             long currentTime, UserHandle user) throws PackageManagerException {
         if (DEBUG_INSTALL) Slog.d(TAG, "Parsing: " + scanFile);
         parseFlags |= mDefParseFlags;
@@ -4189,7 +4183,7 @@
         pp.setOnlyCoreApps(mOnlyCore);
         pp.setDisplayMetrics(mMetrics);
 
-        if ((scanMode & SCAN_TRUSTED_OVERLAY) != 0) {
+        if ((scanFlags & SCAN_TRUSTED_OVERLAY) != 0) {
             parseFlags |= PackageParser.PARSE_TRUSTED_OVERLAY;
         }
 
@@ -4376,7 +4370,7 @@
         pkg.applicationInfo.setSplitResourcePaths(pkg.splitCodePaths);
 
         // Note that we invoke the following method only if we are about to unpack an application
-        PackageParser.Package scannedPkg = scanPackageLI(pkg, parseFlags, scanMode
+        PackageParser.Package scannedPkg = scanPackageLI(pkg, parseFlags, scanFlags
                 | SCAN_UPDATE_SIGNATURE, currentTime, user);
 
         /*
@@ -4634,6 +4628,8 @@
             return DEX_OPT_SKIPPED;
         }
 
+        final boolean vmSafeMode = (pkg.applicationInfo.flags & ApplicationInfo.FLAG_VM_SAFE_MODE) != 0;
+
         final List<String> paths = pkg.getAllCodePathsExcludingResourceOnly();
         boolean performedDexOpt = false;
         // There are three basic cases here:
@@ -4657,10 +4653,11 @@
                             pkg.packageName, dexCodeInstructionSet, defer);
                     if (forceDex || (!defer && isDexOptNeeded == DexFile.DEXOPT_NEEDED)) {
                         Log.i(TAG, "Running dexopt on: " + path + " pkg="
-                                + pkg.applicationInfo.packageName + " isa=" + dexCodeInstructionSet);
+                                + pkg.applicationInfo.packageName + " isa=" + dexCodeInstructionSet
+                                + " vmSafeMode=" + vmSafeMode);
                         final int sharedGid = UserHandle.getSharedAppGid(pkg.applicationInfo.uid);
                         final int ret = mInstaller.dexopt(path, sharedGid, !isForwardLocked(pkg),
-                                pkg.packageName, dexCodeInstructionSet);
+                                pkg.packageName, dexCodeInstructionSet, vmSafeMode);
 
                         if (ret < 0) {
                             // Don't bother running dexopt again if we failed, it will probably
@@ -5023,8 +5020,7 @@
     }
 
     private PackageParser.Package scanPackageLI(PackageParser.Package pkg, int parseFlags,
-            int scanMode, long currentTime, UserHandle user)
-            throws PackageManagerException {
+            int scanFlags, long currentTime, UserHandle user) throws PackageManagerException {
         final File scanFile = new File(pkg.codePath);
         if (pkg.applicationInfo.getCodePath() == null ||
                 pkg.applicationInfo.getResourcePath() == null) {
@@ -5278,7 +5274,7 @@
             // that conflict with existing packages.  Only do this if the
             // package isn't already installed, since we don't want to break
             // things that are installed.
-            if ((scanMode&SCAN_NEW_INSTALL) != 0) {
+            if ((scanFlags & SCAN_NEW_INSTALL) != 0) {
                 final int N = pkg.providers.size();
                 int i;
                 for (i=0; i<N; i++) {
@@ -5322,7 +5318,7 @@
         final String pkgName = pkg.packageName;
         
         final long scanFileTime = scanFile.lastModified();
-        final boolean forceDex = (scanMode&SCAN_FORCE_DEX) != 0;
+        final boolean forceDex = (scanFlags & SCAN_FORCE_DEX) != 0;
         pkg.applicationInfo.processName = fixProcessName(
                 pkg.applicationInfo.packageName,
                 pkg.applicationInfo.processName,
@@ -5368,7 +5364,7 @@
                         }
                     }
                     if (!recovered && ((parseFlags&PackageParser.PARSE_IS_SYSTEM) != 0
-                            || (scanMode&SCAN_BOOTING) != 0)) {
+                            || (scanFlags&SCAN_BOOTING) != 0)) {
                         // If this is a system app, we can at least delete its
                         // current data so the application will still work.
                         int ret = removeDataDirsLI(pkgName);
@@ -5655,7 +5651,7 @@
                     " secondary=" + pkg.applicationInfo.secondaryCpuAbi);
         }
 
-        if ((scanMode&SCAN_BOOTING) == 0 && pkgSetting.sharedUser != null) {
+        if ((scanFlags&SCAN_BOOTING) == 0 && pkgSetting.sharedUser != null) {
             // We don't do this here during boot because we can do it all
             // at once after scanning all existing packages.
             //
@@ -5663,13 +5659,13 @@
             // we can avoid redundant dexopts, and also to make sure we've got the
             // code and package path correct.
             adjustCpuAbisForSharedUserLPw(pkgSetting.sharedUser.packages,
-                    pkg, forceDex, (scanMode & SCAN_DEFER_DEX) != 0);
+                    pkg, forceDex, (scanFlags & SCAN_DEFER_DEX) != 0);
         }
 
-        if ((scanMode&SCAN_NO_DEX) == 0) {
-            if (performDexOptLI(pkg, null /* instruction sets */, forceDex, (scanMode&SCAN_DEFER_DEX) != 0, false)
+        if ((scanFlags&SCAN_NO_DEX) == 0) {
+            if (performDexOptLI(pkg, null /* instruction sets */, forceDex, (scanFlags&SCAN_DEFER_DEX) != 0, false)
                     == DEX_OPT_FAILED) {
-                if ((scanMode & SCAN_DELETE_DATA_ON_FAILURES) != 0) {
+                if ((scanFlags & SCAN_DELETE_DATA_ON_FAILURES) != 0) {
                     removeDataDirsLI(pkg.packageName);
                 }
 
@@ -5729,7 +5725,7 @@
                                     + name + " that is not declared on system image; skipping");
                         }
                     }
-                    if ((scanMode&SCAN_BOOTING) == 0) {
+                    if ((scanFlags&SCAN_BOOTING) == 0) {
                         // If we are not booting, we need to update any applications
                         // that are clients of our shared library.  If we are booting,
                         // this will all be done once the scan is complete.
@@ -5743,13 +5739,13 @@
         // if these fail, we should abort the install since installing the library will
         // result in some apps being broken.
         if (clientLibPkgs != null) {
-            if ((scanMode&SCAN_NO_DEX) == 0) {
+            if ((scanFlags&SCAN_NO_DEX) == 0) {
                 for (int i=0; i<clientLibPkgs.size(); i++) {
                     PackageParser.Package clientPkg = clientLibPkgs.get(i);
                     if (performDexOptLI(clientPkg, null /* instruction sets */,
-                            forceDex, (scanMode&SCAN_DEFER_DEX) != 0, false)
+                            forceDex, (scanFlags&SCAN_DEFER_DEX) != 0, false)
                             == DEX_OPT_FAILED) {
-                        if ((scanMode & SCAN_DELETE_DATA_ON_FAILURES) != 0) {
+                        if ((scanFlags & SCAN_DELETE_DATA_ON_FAILURES) != 0) {
                             removeDataDirsLI(pkg.packageName);
                         }
 
@@ -5763,21 +5759,7 @@
         // Request the ActivityManager to kill the process(only for existing packages)
         // so that we do not end up in a confused state while the user is still using the older
         // version of the application while the new one gets installed.
-        if ((parseFlags & PackageManager.INSTALL_REPLACE_EXISTING) != 0) {
-            // If the package lives in an asec, tell everyone that the container is going
-            // away so they can clean up any references to its resources (which would prevent
-            // vold from being able to unmount the asec)
-            if (isForwardLocked(pkg) || isExternal(pkg)) {
-                if (DEBUG_INSTALL) {
-                    Slog.i(TAG, "upgrading pkg " + pkg + " is ASEC-hosted -> UNAVAILABLE");
-                }
-                final int[] uidArray = new int[] { pkg.applicationInfo.uid };
-                final ArrayList<String> pkgList = new ArrayList<String>(1);
-                pkgList.add(pkg.applicationInfo.packageName);
-                sendResourcesChangedBroadcast(false, true, pkgList, uidArray, null);
-            }
-
-            // Post the request that it be killed now that the going-away broadcast is en route
+        if ((scanFlags & SCAN_REPLACING) != 0) {
             killApplication(pkg.applicationInfo.packageName,
                         pkg.applicationInfo.uid, "update pkg");
         }
@@ -5793,10 +5775,8 @@
 
         // writer
         synchronized (mPackages) {
-            // We don't expect installation to fail beyond this point,
-            if ((scanMode&SCAN_MONITOR) != 0) {
-                mAppDirs.put(pkg.codePath, pkg);
-            }
+            // We don't expect installation to fail beyond this point
+
             // Add the new setting to mSettings
             mSettings.insertPackageSettingLPw(pkgSetting, pkg);
             // Add the new setting to mPackages
@@ -5814,7 +5794,7 @@
             if (currentTime != 0) {
                 if (pkgSetting.firstInstallTime == 0) {
                     pkgSetting.firstInstallTime = pkgSetting.lastUpdateTime = currentTime;
-                } else if ((scanMode&SCAN_UPDATE_TIME) != 0) {
+                } else if ((scanFlags&SCAN_UPDATE_TIME) != 0) {
                     pkgSetting.lastUpdateTime = currentTime;
                 }
             } else if (pkgSetting.firstInstallTime == 0) {
@@ -6485,10 +6465,6 @@
         // writer
         synchronized (mPackages) {
             mPackages.remove(ps.name);
-            if (ps.codePathString != null) {
-                mAppDirs.remove(ps.codePathString);
-            }
-
             final PackageParser.Package pkg = ps.pkg;
             if (pkg != null) {
                 cleanPackageDataStructuresLILPw(pkg, chatty);
@@ -6505,9 +6481,6 @@
         // writer
         synchronized (mPackages) {
             mPackages.remove(pkg.applicationInfo.packageName);
-            if (pkg.codePath != null) {
-                mAppDirs.remove(pkg.codePath);
-            }
             cleanPackageDataStructuresLILPw(pkg, chatty);
         }
     }
@@ -7745,8 +7718,8 @@
     }
 
     @Override
-    public void installPackage(String originPath, IPackageInstallObserver2 observer, int flags,
-            String installerPackageName, VerificationParams verificationParams,
+    public void installPackage(String originPath, IPackageInstallObserver2 observer,
+            int installFlags, String installerPackageName, VerificationParams verificationParams,
             String packageAbiOverride) {
         mContext.enforceCallingOrSelfPermission(android.Manifest.permission.INSTALL_PACKAGES,
                 null);
@@ -7764,27 +7737,28 @@
         }
 
         UserHandle user;
-        if ((flags&PackageManager.INSTALL_ALL_USERS) != 0) {
+        if ((installFlags & PackageManager.INSTALL_ALL_USERS) != 0) {
             user = UserHandle.ALL;
         } else {
             user = new UserHandle(UserHandle.getUserId(uid));
         }
 
-        final int filteredFlags;
+        final int filteredInstallFlags;
         if (uid == Process.SHELL_UID || uid == 0) {
             if (DEBUG_INSTALL) {
                 Slog.v(TAG, "Install from ADB");
             }
-            filteredFlags = flags | PackageManager.INSTALL_FROM_ADB;
+            filteredInstallFlags = installFlags | PackageManager.INSTALL_FROM_ADB;
         } else {
-            filteredFlags = flags & ~PackageManager.INSTALL_FROM_ADB;
+            filteredInstallFlags = installFlags & ~PackageManager.INSTALL_FROM_ADB;
         }
 
         verificationParams.setInstallerUid(uid);
 
+        final OriginInfo origin = OriginInfo.fromUntrustedFile(originFile);
+
         final Message msg = mHandler.obtainMessage(INIT_COPY);
-        final OriginInfo origin = new OriginInfo(originFile, null, false);
-        msg.obj = new InstallParams(origin, observer, filteredFlags,
+        msg.obj = new InstallParams(origin, observer, filteredInstallFlags,
                 installerPackageName, verificationParams, user, packageAbiOverride);
         mHandler.sendMessage(msg);
     }
@@ -7795,8 +7769,14 @@
         final VerificationParams verifParams = new VerificationParams(null, params.originatingUri,
                 params.referrerUri, installerUid, null);
 
+        final OriginInfo origin;
+        if (stagedDir != null) {
+            origin = OriginInfo.fromStagedFile(stagedDir);
+        } else {
+            origin = OriginInfo.fromStagedContainer(stagedCid);
+        }
+
         final Message msg = mHandler.obtainMessage(INIT_COPY);
-        final OriginInfo origin = new OriginInfo(stagedDir, stagedCid, true);
         msg.obj = new InstallParams(origin, observer, params.installFlags,
                 installerPackageName, verifParams, user, params.abiOverride);
         mHandler.sendMessage(msg);
@@ -8158,7 +8138,7 @@
      *
      * @return true if verification should be performed
      */
-    private boolean isVerificationEnabled(int userId, int flags) {
+    private boolean isVerificationEnabled(int userId, int installFlags) {
         if (!DEFAULT_VERIFY_ENABLE) {
             return false;
         }
@@ -8166,7 +8146,7 @@
         boolean ensureVerifyAppsEnabled = isUserRestricted(userId, UserManager.ENSURE_VERIFY_APPS);
 
         // Check if installing from ADB
-        if ((flags & PackageManager.INSTALL_FROM_ADB) != 0) {
+        if ((installFlags & PackageManager.INSTALL_FROM_ADB) != 0) {
             // Do not run verification in a test harness environment
             if (ActivityManager.isRunningInTestHarness()) {
                 return false;
@@ -8285,7 +8265,7 @@
                 if (res.returnCode == PackageManager.INSTALL_SUCCEEDED) {
                     args.doPreInstall(res.returnCode);
                     synchronized (mInstallLock) {
-                        installPackageLI(args, true, res);
+                        installPackageLI(args, res);
                     }
                     args.doPostInstall(res.returnCode, res.uid);
                 }
@@ -8506,13 +8486,40 @@
          */
         final boolean staged;
 
+        /**
+         * Flag indicating that {@link #file} or {@link #cid} is an already
+         * installed app that is being moved.
+         */
+        final boolean existing;
+
         final String resolvedPath;
         final File resolvedFile;
 
-        public OriginInfo(File file, String cid, boolean staged) {
+        static OriginInfo fromNothing() {
+            return new OriginInfo(null, null, false, false);
+        }
+
+        static OriginInfo fromUntrustedFile(File file) {
+            return new OriginInfo(file, null, false, false);
+        }
+
+        static OriginInfo fromExistingFile(File file) {
+            return new OriginInfo(file, null, false, true);
+        }
+
+        static OriginInfo fromStagedFile(File file) {
+            return new OriginInfo(file, null, true, false);
+        }
+
+        static OriginInfo fromStagedContainer(String cid) {
+            return new OriginInfo(null, cid, true, false);
+        }
+
+        private OriginInfo(File file, String cid, boolean staged, boolean existing) {
             this.file = file;
             this.cid = cid;
             this.staged = staged;
+            this.existing = existing;
 
             if (cid != null) {
                 resolvedPath = PackageHelper.getSdDir(cid);
@@ -8530,20 +8537,20 @@
     class InstallParams extends HandlerParams {
         final OriginInfo origin;
         final IPackageInstallObserver2 observer;
-        int flags;
+        int installFlags;
         final String installerPackageName;
         final VerificationParams verificationParams;
         private InstallArgs mArgs;
         private int mRet;
         final String packageAbiOverride;
 
-        InstallParams(OriginInfo origin, IPackageInstallObserver2 observer, int flags,
+        InstallParams(OriginInfo origin, IPackageInstallObserver2 observer, int installFlags,
                 String installerPackageName, VerificationParams verificationParams, UserHandle user,
                 String packageAbiOverride) {
             super(user);
             this.origin = origin;
             this.observer = observer;
-            this.flags = flags;
+            this.installFlags = installFlags;
             this.installerPackageName = installerPackageName;
             this.verificationParams = verificationParams;
             this.packageAbiOverride = packageAbiOverride;
@@ -8562,17 +8569,17 @@
             return verificationParams.getManifestDigest();
         }
 
-        private int installLocationPolicy(PackageInfoLite pkgLite, int flags) {
+        private int installLocationPolicy(PackageInfoLite pkgLite) {
             String packageName = pkgLite.packageName;
             int installLocation = pkgLite.installLocation;
-            boolean onSd = (flags & PackageManager.INSTALL_EXTERNAL) != 0;
+            boolean onSd = (installFlags & PackageManager.INSTALL_EXTERNAL) != 0;
             // reader
             synchronized (mPackages) {
                 PackageParser.Package pkg = mPackages.get(packageName);
                 if (pkg != null) {
-                    if ((flags & PackageManager.INSTALL_REPLACE_EXISTING) != 0) {
+                    if ((installFlags & PackageManager.INSTALL_REPLACE_EXISTING) != 0) {
                         // Check for downgrading.
-                        if ((flags & PackageManager.INSTALL_ALLOW_DOWNGRADE) == 0) {
+                        if ((installFlags & PackageManager.INSTALL_ALLOW_DOWNGRADE) == 0) {
                             if (pkgLite.versionCode < pkg.mVersionCode) {
                                 Slog.w(TAG, "Can't install update of " + packageName
                                         + " update version " + pkgLite.versionCode
@@ -8633,18 +8640,18 @@
             // If we're already staged, we've firmly committed to an install location
             if (origin.staged) {
                 if (origin.file != null) {
-                    flags |= PackageManager.INSTALL_INTERNAL;
-                    flags &= ~PackageManager.INSTALL_EXTERNAL;
+                    installFlags |= PackageManager.INSTALL_INTERNAL;
+                    installFlags &= ~PackageManager.INSTALL_EXTERNAL;
                 } else if (origin.cid != null) {
-                    flags |= PackageManager.INSTALL_EXTERNAL;
-                    flags &= ~PackageManager.INSTALL_INTERNAL;
+                    installFlags |= PackageManager.INSTALL_EXTERNAL;
+                    installFlags &= ~PackageManager.INSTALL_INTERNAL;
                 } else {
                     throw new IllegalStateException("Invalid stage location");
                 }
             }
 
-            final boolean onSd = (flags & PackageManager.INSTALL_EXTERNAL) != 0;
-            final boolean onInt = (flags & PackageManager.INSTALL_INTERNAL) != 0;
+            final boolean onSd = (installFlags & PackageManager.INSTALL_EXTERNAL) != 0;
+            final boolean onInt = (installFlags & PackageManager.INSTALL_INTERNAL) != 0;
 
             PackageInfoLite pkgLite = null;
 
@@ -8653,7 +8660,7 @@
                 Slog.w(TAG, "Conflicting flags specified for installing on both internal and external");
                 ret = PackageManager.INSTALL_FAILED_INVALID_INSTALL_LOCATION;
             } else {
-                pkgLite = mContainerService.getMinimalPackageInfo(origin.resolvedPath, flags,
+                pkgLite = mContainerService.getMinimalPackageInfo(origin.resolvedPath, installFlags,
                         packageAbiOverride);
 
                 /*
@@ -8672,7 +8679,7 @@
 
                     if (mInstaller.freeCache(sizeBytes + lowThreshold) >= 0) {
                         pkgLite = mContainerService.getMinimalPackageInfo(origin.resolvedPath,
-                                flags, packageAbiOverride);
+                                installFlags, packageAbiOverride);
                     }
 
                     /*
@@ -8706,20 +8713,20 @@
                     ret = PackageManager.INSTALL_FAILED_MEDIA_UNAVAILABLE;
                 } else {
                     // Override with defaults if needed.
-                    loc = installLocationPolicy(pkgLite, flags);
+                    loc = installLocationPolicy(pkgLite);
                     if (loc == PackageHelper.RECOMMEND_FAILED_VERSION_DOWNGRADE) {
                         ret = PackageManager.INSTALL_FAILED_VERSION_DOWNGRADE;
                     } else if (!onSd && !onInt) {
                         // Override install location with flags
                         if (loc == PackageHelper.RECOMMEND_INSTALL_EXTERNAL) {
                             // Set the flag to install on external media.
-                            flags |= PackageManager.INSTALL_EXTERNAL;
-                            flags &= ~PackageManager.INSTALL_INTERNAL;
+                            installFlags |= PackageManager.INSTALL_EXTERNAL;
+                            installFlags &= ~PackageManager.INSTALL_INTERNAL;
                         } else {
                             // Make sure the flag for installing on external
                             // media is unset
-                            flags |= PackageManager.INSTALL_INTERNAL;
-                            flags &= ~PackageManager.INSTALL_EXTERNAL;
+                            installFlags |= PackageManager.INSTALL_INTERNAL;
+                            installFlags &= ~PackageManager.INSTALL_EXTERNAL;
                         }
                     }
                 }
@@ -8735,7 +8742,7 @@
                  */
                 int userIdentifier = getUser().getIdentifier();
                 if (userIdentifier == UserHandle.USER_ALL
-                        && ((flags & PackageManager.INSTALL_FROM_ADB) != 0)) {
+                        && ((installFlags & PackageManager.INSTALL_FROM_ADB) != 0)) {
                     userIdentifier = UserHandle.USER_OWNER;
                 }
 
@@ -8745,7 +8752,8 @@
                  */
                 final int requiredUid = mRequiredVerifierPackage == null ? -1
                         : getPackageUid(mRequiredVerifierPackage, userIdentifier);
-                if (requiredUid != -1 && isVerificationEnabled(userIdentifier, flags)) {
+                if (!origin.existing && requiredUid != -1
+                        && isVerificationEnabled(userIdentifier, installFlags)) {
                     final Intent verification = new Intent(
                             Intent.ACTION_PACKAGE_NEEDS_VERIFICATION);
                     verification.setDataAndType(Uri.fromFile(new File(origin.resolvedPath)),
@@ -8769,7 +8777,8 @@
                     verification.putExtra(PackageManager.EXTRA_VERIFICATION_INSTALLER_PACKAGE,
                             installerPackageName);
 
-                    verification.putExtra(PackageManager.EXTRA_VERIFICATION_INSTALL_FLAGS, flags);
+                    verification.putExtra(PackageManager.EXTRA_VERIFICATION_INSTALL_FLAGS,
+                            installFlags);
 
                     verification.putExtra(PackageManager.EXTRA_VERIFICATION_PACKAGE_NAME,
                             pkgLite.packageName);
@@ -8886,122 +8895,21 @@
         }
 
         public boolean isForwardLocked() {
-            return (flags & PackageManager.INSTALL_FORWARD_LOCK) != 0;
-        }
-    }
-
-    /*
-     * Utility class used in movePackage api.
-     * srcArgs and targetArgs are not set for invalid flags and make
-     * sure to do null checks when invoking methods on them.
-     * We probably want to return ErrorPrams for both failed installs
-     * and moves.
-     */
-    class MoveParams extends HandlerParams {
-        final IPackageMoveObserver observer;
-        final int flags;
-        final String packageName;
-        final InstallArgs srcArgs;
-        final InstallArgs targetArgs;
-        int uid;
-        int mRet;
-
-        MoveParams(InstallArgs srcArgs, IPackageMoveObserver observer, int flags,
-                String packageName, String[] instructionSets, int uid, UserHandle user) {
-            super(user);
-            this.srcArgs = srcArgs;
-            this.observer = observer;
-            this.flags = flags;
-            this.packageName = packageName;
-            this.uid = uid;
-            if (srcArgs != null) {
-                final String codePath = srcArgs.getCodePath();
-                targetArgs = createInstallArgsForMoveTarget(codePath, flags, packageName,
-                        instructionSets);
-            } else {
-                targetArgs = null;
-            }
-        }
-
-        @Override
-        public String toString() {
-            return "MoveParams{"
-                + Integer.toHexString(System.identityHashCode(this))
-                + " " + packageName + "}";
-        }
-
-        public void handleStartCopy() throws RemoteException {
-            mRet = PackageManager.INSTALL_FAILED_INSUFFICIENT_STORAGE;
-            // Check for storage space on target medium
-            if (!targetArgs.checkFreeStorage(mContainerService)) {
-                Log.w(TAG, "Insufficient storage to install");
-                return;
-            }
-
-            mRet = srcArgs.doPreCopy();
-            if (mRet != PackageManager.INSTALL_SUCCEEDED) {
-                return;
-            }
-
-            mRet = targetArgs.copyApk(mContainerService, false);
-            if (mRet != PackageManager.INSTALL_SUCCEEDED) {
-                srcArgs.doPostCopy(uid);
-                return;
-            }
-
-            mRet = srcArgs.doPostCopy(uid);
-            if (mRet != PackageManager.INSTALL_SUCCEEDED) {
-                return;
-            }
-
-            mRet = targetArgs.doPreInstall(mRet);
-            if (mRet != PackageManager.INSTALL_SUCCEEDED) {
-                return;
-            }
-
-            if (DEBUG_SD_INSTALL) {
-                StringBuilder builder = new StringBuilder();
-                if (srcArgs != null) {
-                    builder.append("src: ");
-                    builder.append(srcArgs.getCodePath());
-                }
-                if (targetArgs != null) {
-                    builder.append(" target : ");
-                    builder.append(targetArgs.getCodePath());
-                }
-                Log.i(TAG, builder.toString());
-            }
-        }
-
-        @Override
-        void handleReturnCode() {
-            targetArgs.doPostInstall(mRet, uid);
-            int currentStatus = PackageManager.MOVE_FAILED_INTERNAL_ERROR;
-            if (mRet == PackageManager.INSTALL_SUCCEEDED) {
-                currentStatus = PackageManager.MOVE_SUCCEEDED;
-            } else if (mRet == PackageManager.INSTALL_FAILED_INSUFFICIENT_STORAGE){
-                currentStatus = PackageManager.MOVE_FAILED_INSUFFICIENT_STORAGE;
-            }
-            processPendingMove(this, currentStatus);
-        }
-
-        @Override
-        void handleServiceError() {
-            mRet = PackageManager.INSTALL_FAILED_INTERNAL_ERROR;
+            return (installFlags & PackageManager.INSTALL_FORWARD_LOCK) != 0;
         }
     }
 
     /**
      * Used during creation of InstallArgs
      *
-     * @param flags package installation flags
+     * @param installFlags package installation flags
      * @return true if should be installed on external storage
      */
-    private static boolean installOnSd(int flags) {
-        if ((flags & PackageManager.INSTALL_INTERNAL) != 0) {
+    private static boolean installOnSd(int installFlags) {
+        if ((installFlags & PackageManager.INSTALL_INTERNAL) != 0) {
             return false;
         }
-        if ((flags & PackageManager.INSTALL_EXTERNAL) != 0) {
+        if ((installFlags & PackageManager.INSTALL_EXTERNAL) != 0) {
             return true;
         }
         return false;
@@ -9010,15 +8918,15 @@
     /**
      * Used during creation of InstallArgs
      *
-     * @param flags package installation flags
+     * @param installFlags package installation flags
      * @return true if should be installed as forward locked
      */
-    private static boolean installForwardLocked(int flags) {
-        return (flags & PackageManager.INSTALL_FORWARD_LOCK) != 0;
+    private static boolean installForwardLocked(int installFlags) {
+        return (installFlags & PackageManager.INSTALL_FORWARD_LOCK) != 0;
     }
 
     private InstallArgs createInstallArgs(InstallParams params) {
-        if (installOnSd(params.flags) || params.isForwardLocked()) {
+        if (installOnSd(params.installFlags) || params.isForwardLocked()) {
             return new AsecInstallArgs(params);
         } else {
             return new FileInstallArgs(params);
@@ -9029,13 +8937,13 @@
      * Create args that describe an existing installed package. Typically used
      * when cleaning up old installs, or used as a move source.
      */
-    private InstallArgs createInstallArgsForExisting(int flags, String codePath,
+    private InstallArgs createInstallArgsForExisting(int installFlags, String codePath,
             String resourcePath, String nativeLibraryRoot, String[] instructionSets) {
         final boolean isInAsec;
-        if (installOnSd(flags)) {
+        if (installOnSd(installFlags)) {
             /* Apps on SD card are always in ASEC containers. */
             isInAsec = true;
-        } else if (installForwardLocked(flags)
+        } else if (installForwardLocked(installFlags)
                 && !codePath.startsWith(mDrmAppPrivateInstallDir.getAbsolutePath())) {
             /*
              * Forward-locked apps are only in ASEC containers if they're the
@@ -9048,33 +8956,20 @@
 
         if (isInAsec) {
             return new AsecInstallArgs(codePath, instructionSets,
-                    installOnSd(flags), installForwardLocked(flags));
+                    installOnSd(installFlags), installForwardLocked(installFlags));
         } else {
             return new FileInstallArgs(codePath, resourcePath, nativeLibraryRoot,
                     instructionSets);
         }
     }
 
-    private InstallArgs createInstallArgsForMoveTarget(String codePath, int flags, String pkgName,
-            String[] instructionSets) {
-        final File codeFile = new File(codePath);
-        if (installOnSd(flags) || installForwardLocked(flags)) {
-            String cid = getNextCodePath(codePath, pkgName, "/"
-                    + AsecInstallArgs.RES_FILE_NAME);
-            return new AsecInstallArgs(codeFile, cid, instructionSets, installOnSd(flags),
-                    installForwardLocked(flags));
-        } else {
-            return new FileInstallArgs(codeFile, instructionSets);
-        }
-    }
-
     static abstract class InstallArgs {
         /** @see InstallParams#origin */
         final OriginInfo origin;
 
         final IPackageInstallObserver2 observer;
         // Always refers to PackageManager flags only
-        final int flags;
+        final int installFlags;
         final String installerPackageName;
         final ManifestDigest manifestDigest;
         final UserHandle user;
@@ -9085,11 +8980,11 @@
         // if we move dex files under the common app path.
         /* nullable */ String[] instructionSets;
 
-        InstallArgs(OriginInfo origin, IPackageInstallObserver2 observer, int flags,
+        InstallArgs(OriginInfo origin, IPackageInstallObserver2 observer, int installFlags,
                 String installerPackageName, ManifestDigest manifestDigest, UserHandle user,
                 String[] instructionSets, String abiOverride) {
             this.origin = origin;
-            this.flags = flags;
+            this.installFlags = installFlags;
             this.observer = observer;
             this.installerPackageName = installerPackageName;
             this.manifestDigest = manifestDigest;
@@ -9140,7 +9035,11 @@
         }
 
         protected boolean isFwdLocked() {
-            return (flags & PackageManager.INSTALL_FORWARD_LOCK) != 0;
+            return (installFlags & PackageManager.INSTALL_FORWARD_LOCK) != 0;
+        }
+
+        protected boolean isExternal() {
+            return (installFlags & PackageManager.INSTALL_EXTERNAL) != 0;
         }
 
         UserHandle getUser() {
@@ -9166,7 +9065,7 @@
 
         /** New install */
         FileInstallArgs(InstallParams params) {
-            super(params.origin, params.observer, params.flags,
+            super(params.origin, params.observer, params.installFlags,
                     params.installerPackageName, params.getManifestDigest(), params.getUser(),
                     null /* instruction sets */, params.packageAbiOverride);
             if (isFwdLocked()) {
@@ -9177,18 +9076,13 @@
         /** Existing install */
         FileInstallArgs(String codePath, String resourcePath, String legacyNativeLibraryPath,
                 String[] instructionSets) {
-            super(new OriginInfo(null, null, false), null, 0, null, null, null, instructionSets, null);
+            super(OriginInfo.fromNothing(), null, 0, null, null, null, instructionSets, null);
             this.codeFile = (codePath != null) ? new File(codePath) : null;
             this.resourceFile = (resourcePath != null) ? new File(resourcePath) : null;
             this.legacyNativeLibraryPath = (legacyNativeLibraryPath != null) ?
                     new File(legacyNativeLibraryPath) : null;
         }
 
-        /** New install from existing */
-        FileInstallArgs(File originFile, String[] instructionSets) {
-            super(new OriginInfo(originFile, null, false), null, 0, null, null, null, instructionSets, null);
-        }
-
         boolean checkFreeStorage(IMediaContainerService imcs) throws RemoteException {
             final long sizeBytes = imcs.calculateInstalledSize(origin.file.getAbsolutePath(),
                     isFwdLocked(), abiOverride);
@@ -9432,7 +9326,7 @@
 
         /** New install */
         AsecInstallArgs(InstallParams params) {
-            super(params.origin, params.observer, params.flags,
+            super(params.origin, params.observer, params.installFlags,
                     params.installerPackageName, params.getManifestDigest(),
                     params.getUser(), null /* instruction sets */,
                     params.packageAbiOverride);
@@ -9441,7 +9335,7 @@
         /** Existing install */
         AsecInstallArgs(String fullCodePath, String[] instructionSets,
                         boolean isExternal, boolean isForwardLocked) {
-            super(new OriginInfo(null, null, false), null, (isExternal ? INSTALL_EXTERNAL : 0)
+            super(OriginInfo.fromNothing(), null, (isExternal ? INSTALL_EXTERNAL : 0)
                     | (isForwardLocked ? INSTALL_FORWARD_LOCK : 0), null, null, null,
                     instructionSets, null);
             // Hackily pretend we're still looking at a full code path
@@ -9458,22 +9352,13 @@
         }
 
         AsecInstallArgs(String cid, String[] instructionSets, boolean isForwardLocked) {
-            super(new OriginInfo(null, null, false), null, (isAsecExternal(cid) ? INSTALL_EXTERNAL : 0)
+            super(OriginInfo.fromNothing(), null, (isAsecExternal(cid) ? INSTALL_EXTERNAL : 0)
                     | (isForwardLocked ? INSTALL_FORWARD_LOCK : 0), null, null, null,
                     instructionSets, null);
             this.cid = cid;
             setMountPath(PackageHelper.getSdDir(cid));
         }
 
-        /** New install from existing */
-        AsecInstallArgs(File originPackageFile, String cid, String[] instructionSets,
-                boolean isExternal, boolean isForwardLocked) {
-            super(new OriginInfo(originPackageFile, null, false), null, (isExternal ? INSTALL_EXTERNAL : 0)
-                    | (isForwardLocked ? INSTALL_FORWARD_LOCK : 0), null, null, null,
-                    instructionSets, null);
-            this.cid = cid;
-        }
-
         void createCopyFile() {
             cid = mInstallerService.allocateExternalStageCidLegacy();
         }
@@ -9493,10 +9378,6 @@
             return (sizeBytes <= storage.getStorageBytesUntilLow(target));
         }
 
-        private final boolean isExternal() {
-            return (flags & PackageManager.INSTALL_EXTERNAL) != 0;
-        }
-
         int copyApk(IMediaContainerService imcs, boolean temp) throws RemoteException {
             if (origin.staged) {
                 Slog.d(TAG, origin.cid + " already staged; skipping copy");
@@ -9903,7 +9784,7 @@
      * Install a non-existing package.
      */
     private void installNewPackageLI(PackageParser.Package pkg,
-            int parseFlags, int scanMode, UserHandle user,
+            int parseFlags, int scanFlags, UserHandle user,
             String installerPackageName, PackageInstalledInfo res) {
         // Remember this for later, in case we need to rollback this install
         String pkgName = pkg.packageName;
@@ -9921,7 +9802,7 @@
                         + mSettings.mRenamedPackages.get(pkgName));
                 return;
             }
-            if (mPackages.containsKey(pkgName) || mAppDirs.containsKey(pkg.codePath)) {
+            if (mPackages.containsKey(pkgName)) {
                 // Don't allow installation over an existing package with the same name.
                 res.setError(INSTALL_FAILED_ALREADY_EXISTS, "Attempt to re-install " + pkgName
                         + " without first uninstalling.");
@@ -9930,7 +9811,7 @@
         }
 
         try {
-            PackageParser.Package newPackage = scanPackageLI(pkg, parseFlags, scanMode,
+            PackageParser.Package newPackage = scanPackageLI(pkg, parseFlags, scanFlags,
                     System.currentTimeMillis(), user);
 
             updateSettingsLI(newPackage, installerPackageName, null, null, res);
@@ -9966,7 +9847,7 @@
     }
 
     private void replacePackageLI(PackageParser.Package pkg,
-            int parseFlags, int scanMode, UserHandle user,
+            int parseFlags, int scanFlags, UserHandle user,
             String installerPackageName, PackageInstalledInfo res) {
         PackageParser.Package oldPackage;
         String pkgName = pkg.packageName;
@@ -10005,16 +9886,16 @@
 
         boolean sysPkg = (isSystemApp(oldPackage));
         if (sysPkg) {
-            replaceSystemPackageLI(oldPackage, pkg, parseFlags, scanMode,
+            replaceSystemPackageLI(oldPackage, pkg, parseFlags, scanFlags,
                     user, allUsers, perUserInstalled, installerPackageName, res);
         } else {
-            replaceNonSystemPackageLI(oldPackage, pkg, parseFlags, scanMode,
+            replaceNonSystemPackageLI(oldPackage, pkg, parseFlags, scanFlags,
                     user, allUsers, perUserInstalled, installerPackageName, res);
         }
     }
 
     private void replaceNonSystemPackageLI(PackageParser.Package deletedPackage,
-            PackageParser.Package pkg, int parseFlags, int scanMode, UserHandle user,
+            PackageParser.Package pkg, int parseFlags, int scanFlags, UserHandle user,
             int[] allUsers, boolean[] perUserInstalled,
             String installerPackageName, PackageInstalledInfo res) {
         String pkgName = deletedPackage.packageName;
@@ -10037,11 +9918,24 @@
             res.setError(INSTALL_FAILED_REPLACE_COULDNT_DELETE, "replaceNonSystemPackageLI");
             deletedPkg = false;
         } else {
-            // Successfully deleted the old package. Now proceed with re-installation
+            // Successfully deleted the old package; proceed with replace.
+
+            // If deleted package lived in a container, give users a chance to
+            // relinquish resources before killing.
+            if (isForwardLocked(deletedPackage) || isExternal(deletedPackage)) {
+                if (DEBUG_INSTALL) {
+                    Slog.i(TAG, "upgrading pkg " + deletedPackage + " is ASEC-hosted -> UNAVAILABLE");
+                }
+                final int[] uidArray = new int[] { deletedPackage.applicationInfo.uid };
+                final ArrayList<String> pkgList = new ArrayList<String>(1);
+                pkgList.add(deletedPackage.applicationInfo.packageName);
+                sendResourcesChangedBroadcast(false, true, pkgList, uidArray, null);
+            }
+
             deleteCodeCacheDirsLI(pkgName);
             try {
                 final PackageParser.Package newPackage = scanPackageLI(pkg, parseFlags,
-                        scanMode | SCAN_UPDATE_TIME, System.currentTimeMillis(), user);
+                        scanFlags | SCAN_UPDATE_TIME, System.currentTimeMillis(), user);
                 updateSettingsLI(newPackage, installerPackageName, allUsers, perUserInstalled, res);
                 updatedSettings = true;
             } catch (PackageManagerException e) {
@@ -10071,10 +9965,9 @@
                 int oldParseFlags  = mDefParseFlags | PackageParser.PARSE_CHATTY |
                         (isForwardLocked(deletedPackage) ? PackageParser.PARSE_FORWARD_LOCK : 0) |
                         (oldOnSd ? PackageParser.PARSE_ON_SDCARD : 0);
-                int oldScanMode = (oldOnSd ? 0 : SCAN_MONITOR) | SCAN_UPDATE_SIGNATURE
-                        | SCAN_UPDATE_TIME;
+                int oldScanFlags = SCAN_UPDATE_SIGNATURE | SCAN_UPDATE_TIME;
                 try {
-                    scanPackageLI(restoreFile, oldParseFlags, oldScanMode, origUpdateTime, null);
+                    scanPackageLI(restoreFile, oldParseFlags, oldScanFlags, origUpdateTime, null);
                 } catch (PackageManagerException e) {
                     Slog.e(TAG, "Failed to restore package : " + pkgName + " after failed upgrade: "
                             + e.getMessage());
@@ -10094,14 +9987,13 @@
     }
 
     private void replaceSystemPackageLI(PackageParser.Package deletedPackage,
-            PackageParser.Package pkg, int parseFlags, int scanMode, UserHandle user,
+            PackageParser.Package pkg, int parseFlags, int scanFlags, UserHandle user,
             int[] allUsers, boolean[] perUserInstalled,
             String installerPackageName, PackageInstalledInfo res) {
         if (DEBUG_INSTALL) Slog.d(TAG, "replaceSystemPackageLI: new=" + pkg
                 + ", old=" + deletedPackage);
         boolean updatedSettings = false;
-        parseFlags |= PackageManager.INSTALL_REPLACE_EXISTING |
-                PackageParser.PARSE_IS_SYSTEM;
+        parseFlags |= PackageParser.PARSE_IS_SYSTEM;
         if ((deletedPackage.applicationInfo.flags&ApplicationInfo.FLAG_PRIVILEGED) != 0) {
             parseFlags |= PackageParser.PARSE_IS_PRIVILEGED;
         }
@@ -10155,7 +10047,7 @@
 
         PackageParser.Package newPackage = null;
         try {
-            newPackage = scanPackageLI(pkg, parseFlags, scanMode, 0, user);
+            newPackage = scanPackageLI(pkg, parseFlags, scanFlags, 0, user);
             if (newPackage.mExtras != null) {
                 final PackageSetting newPkgSetting = (PackageSetting) newPackage.mExtras;
                 newPkgSetting.firstInstallTime = oldPkgSetting.firstInstallTime;
@@ -10187,7 +10079,7 @@
             }
             // Add back the old system package
             try {
-                scanPackageLI(oldPkg, parseFlags, SCAN_MONITOR | SCAN_UPDATE_SIGNATURE, 0, user);
+                scanPackageLI(oldPkg, parseFlags, SCAN_UPDATE_SIGNATURE, 0, user);
             } catch (PackageManagerException e) {
                 Slog.e(TAG, "Failed to restore original package: " + e.getMessage());
             }
@@ -10203,33 +10095,6 @@
         }
     }
 
-    // Utility method used to move dex files during install.
-    private int moveDexFilesLI(String oldCodePath, PackageParser.Package newPackage) {
-        // TODO: extend to move split APK dex files
-        if ((newPackage.applicationInfo.flags&ApplicationInfo.FLAG_HAS_CODE) != 0) {
-            final String[] instructionSets = getAppDexInstructionSets(newPackage.applicationInfo);
-            String[] dexCodeInstructionSets = getDexCodeInstructionSets(instructionSets);
-            for (String dexCodeInstructionSet : dexCodeInstructionSets) {
-                int retCode = mInstaller.movedex(oldCodePath, newPackage.baseCodePath,
-                        dexCodeInstructionSet);
-                if (retCode != 0) {
-                /*
-                 * Programs may be lazily run through dexopt, so the
-                 * source may not exist. However, something seems to
-                 * have gone wrong, so note that dexopt needs to be
-                 * run again and remove the source file. In addition,
-                 * remove the target to make sure there isn't a stale
-                 * file from a previous version of the package.
-                 */
-                    newPackage.mDexOptPerformed.clear();
-                    mInstaller.rmdex(oldCodePath, dexCodeInstructionSet);
-                    mInstaller.rmdex(newPackage.baseCodePath, dexCodeInstructionSet);
-                }
-            }
-        }
-        return PackageManager.INSTALL_SUCCEEDED;
-    }
-
     private void updateSettingsLI(PackageParser.Package newPackage, String installerPackageName,
             int[] allUsers, boolean[] perUserInstalled,
             PackageInstalledInfo res) {
@@ -10289,21 +10154,20 @@
         }
     }
 
-    private void installPackageLI(InstallArgs args, boolean newInstall, PackageInstalledInfo res) {
-        int pFlags = args.flags;
+    private void installPackageLI(InstallArgs args, PackageInstalledInfo res) {
+        final int installFlags = args.installFlags;
         String installerPackageName = args.installerPackageName;
         File tmpPackageFile = new File(args.getCodePath());
-        boolean forwardLocked = ((pFlags & PackageManager.INSTALL_FORWARD_LOCK) != 0);
-        boolean onSd = ((pFlags & PackageManager.INSTALL_EXTERNAL) != 0);
+        boolean forwardLocked = ((installFlags & PackageManager.INSTALL_FORWARD_LOCK) != 0);
+        boolean onSd = ((installFlags & PackageManager.INSTALL_EXTERNAL) != 0);
         boolean replace = false;
-        int scanMode = (onSd ? 0 : SCAN_MONITOR) | SCAN_FORCE_DEX | SCAN_UPDATE_SIGNATURE
-                | (newInstall ? SCAN_NEW_INSTALL : 0);
+        final int scanFlags = SCAN_NEW_INSTALL | SCAN_FORCE_DEX | SCAN_UPDATE_SIGNATURE;
         // Result object to be returned
         res.returnCode = PackageManager.INSTALL_SUCCEEDED;
 
         if (DEBUG_INSTALL) Slog.d(TAG, "installPackageLI: path=" + tmpPackageFile);
         // Retrieve PackageSettings and parse package
-        int parseFlags = mDefParseFlags | PackageParser.PARSE_CHATTY
+        final int parseFlags = mDefParseFlags | PackageParser.PARSE_CHATTY
                 | (forwardLocked ? PackageParser.PARSE_FORWARD_LOCK : 0)
                 | (onSd ? PackageParser.PARSE_ON_SDCARD : 0);
         PackageParser pp = new PackageParser();
@@ -10323,7 +10187,7 @@
 
         String pkgName = res.name = pkg.packageName;
         if ((pkg.applicationInfo.flags&ApplicationInfo.FLAG_TEST_ONLY) != 0) {
-            if ((pFlags&PackageManager.INSTALL_ALLOW_TEST) == 0) {
+            if ((installFlags & PackageManager.INSTALL_ALLOW_TEST) == 0) {
                 res.setError(INSTALL_FAILED_TEST_ONLY, "installPackageLI");
                 return;
             }
@@ -10392,7 +10256,7 @@
             }
 
             // Check if installing already existing package
-            if ((pFlags&PackageManager.INSTALL_REPLACE_EXISTING) != 0) {
+            if ((installFlags & PackageManager.INSTALL_REPLACE_EXISTING) != 0) {
                 String oldName = mSettings.mRenamedPackages.get(pkgName);
                 if (pkg.mOriginalPackages != null
                         && pkg.mOriginalPackages.contains(oldName)
@@ -10438,11 +10302,11 @@
         }
 
         if (replace) {
-            replacePackageLI(pkg, parseFlags, scanMode, args.user,
+            replacePackageLI(pkg, parseFlags, scanFlags | SCAN_REPLACING, args.user,
                     installerPackageName, res);
         } else {
-            installNewPackageLI(pkg, parseFlags, scanMode | SCAN_DELETE_DATA_ON_FAILURES, args.user,
-                    installerPackageName, res);
+            installNewPackageLI(pkg, parseFlags, scanFlags | SCAN_DELETE_DATA_ON_FAILURES,
+                    args.user, installerPackageName, res);
         }
         synchronized (mPackages) {
             final PackageSetting ps = mSettings.mPackages.get(pkgName);
@@ -10878,7 +10742,7 @@
 
         final PackageParser.Package newPkg;
         try {
-            newPkg = scanPackageLI(disabledPs.codePath, parseFlags, SCAN_MONITOR | SCAN_NO_PATHS, 0, null);
+            newPkg = scanPackageLI(disabledPs.codePath, parseFlags, SCAN_NO_PATHS, 0, null);
         } catch (PackageManagerException e) {
             Slog.w(TAG, "Failed to restore system package:" + newPs.name + ": " + e.getMessage());
             return false;
@@ -12977,12 +12841,18 @@
         mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MOVE_PACKAGE, null);
         UserHandle user = new UserHandle(UserHandle.getCallingUserId());
         int returnCode = PackageManager.MOVE_SUCCEEDED;
-        int currFlags = 0;
-        int newFlags = 0;
+        int currInstallFlags = 0;
+        int newInstallFlags = 0;
+
+        File codeFile = null;
+        String installerPackageName = null;
+        String packageAbiOverride = null;
+
         // reader
         synchronized (mPackages) {
-            PackageParser.Package pkg = mPackages.get(packageName);
-            if (pkg == null) {
+            final PackageParser.Package pkg = mPackages.get(packageName);
+            final PackageSetting ps = mSettings.mPackages.get(packageName);
+            if (pkg == null || ps == null) {
                 returnCode = PackageManager.MOVE_FAILED_DOESNT_EXIST;
             } else {
                 // Disable moving fwd locked apps and system packages
@@ -12999,18 +12869,18 @@
                         Slog.w(TAG, "Ambigous flags specified for move location.");
                         returnCode = PackageManager.MOVE_FAILED_INVALID_LOCATION;
                     } else {
-                        newFlags = (flags & PackageManager.MOVE_EXTERNAL_MEDIA) != 0 ? PackageManager.INSTALL_EXTERNAL
-                                : PackageManager.INSTALL_INTERNAL;
-                        currFlags = isExternal(pkg) ? PackageManager.INSTALL_EXTERNAL
-                                : PackageManager.INSTALL_INTERNAL;
+                        newInstallFlags = (flags & PackageManager.MOVE_EXTERNAL_MEDIA) != 0
+                                ? PackageManager.INSTALL_EXTERNAL : PackageManager.INSTALL_INTERNAL;
+                        currInstallFlags = isExternal(pkg)
+                                ? PackageManager.INSTALL_EXTERNAL : PackageManager.INSTALL_INTERNAL;
 
-                        if (newFlags == currFlags) {
+                        if (newInstallFlags == currInstallFlags) {
                             Slog.w(TAG, "No move required. Trying to move to same location");
                             returnCode = PackageManager.MOVE_FAILED_INVALID_LOCATION;
                         } else {
                             if (isForwardLocked(pkg)) {
-                                currFlags |= PackageManager.INSTALL_FORWARD_LOCK;
-                                newFlags |= PackageManager.INSTALL_FORWARD_LOCK;
+                                currInstallFlags |= PackageManager.INSTALL_FORWARD_LOCK;
+                                newInstallFlags |= PackageManager.INSTALL_FORWARD_LOCK;
                             }
                         }
                     }
@@ -13018,217 +12888,56 @@
                         pkg.mOperationPending = true;
                     }
                 }
-            }
 
-            /*
-             * TODO this next block probably shouldn't be inside the lock. We
-             * can't guarantee these won't change after this is fired off
-             * anyway.
-             */
-            if (returnCode != PackageManager.MOVE_SUCCEEDED) {
-                processPendingMove(new MoveParams(null, observer, 0, packageName, null, -1, user),
-                        returnCode);
-            } else {
-                Message msg = mHandler.obtainMessage(INIT_COPY);
-                final String[] instructionSets = getAppDexInstructionSets(pkg.applicationInfo);
-                final boolean multiArch = isMultiArch(pkg.applicationInfo);
-                InstallArgs srcArgs = createInstallArgsForExisting(currFlags,
-                        pkg.applicationInfo.getCodePath(), pkg.applicationInfo.getResourcePath(),
-                        pkg.applicationInfo.nativeLibraryRootDir, instructionSets);
-                MoveParams mp = new MoveParams(srcArgs, observer, newFlags, packageName,
-                        instructionSets, pkg.applicationInfo.uid, user);
-                msg.obj = mp;
-                mHandler.sendMessage(msg);
+                codeFile = new File(pkg.codePath);
+                installerPackageName = ps.installerPackageName;
+                packageAbiOverride = ps.cpuAbiOverrideString;
             }
         }
-    }
 
-    private void processPendingMove(final MoveParams mp, final int currentStatus) {
-        // Queue up an async operation since the package deletion may take a
-        // little while.
-        mHandler.post(new Runnable() {
-            public void run() {
-                // TODO fix this; this does nothing.
-                mHandler.removeCallbacks(this);
-                int returnCode = currentStatus;
-                if (currentStatus == PackageManager.MOVE_SUCCEEDED) {
-                    int uidArr[] = null;
-                    ArrayList<String> pkgList = null;
-                    synchronized (mPackages) {
-                        PackageParser.Package pkg = mPackages.get(mp.packageName);
-                        if (pkg == null) {
-                            Slog.w(TAG, " Package " + mp.packageName
-                                    + " doesn't exist. Aborting move");
-                            returnCode = PackageManager.MOVE_FAILED_DOESNT_EXIST;
-                        } else if (!mp.srcArgs.getCodePath().equals(
-                                pkg.applicationInfo.getCodePath())) {
-                            Slog.w(TAG, "Package " + mp.packageName + " code path changed from "
-                                    + mp.srcArgs.getCodePath() + " to "
-                                    + pkg.applicationInfo.getCodePath()
-                                    + " Aborting move and returning error");
-                            returnCode = PackageManager.MOVE_FAILED_INTERNAL_ERROR;
-                        } else {
-                            uidArr = new int[] {
-                                pkg.applicationInfo.uid
-                            };
-                            pkgList = new ArrayList<String>();
-                            pkgList.add(mp.packageName);
-                        }
-                    }
-                    if (returnCode == PackageManager.MOVE_SUCCEEDED) {
-                        // Send resources unavailable broadcast
-                        sendResourcesChangedBroadcast(false, true, pkgList, uidArr, null);
-                        // Update package code and resource paths
-                        synchronized (mInstallLock) {
-                            synchronized (mPackages) {
-                                PackageParser.Package pkg = mPackages.get(mp.packageName);
-                                // Recheck for package again.
-                                if (pkg == null) {
-                                    Slog.w(TAG, " Package " + mp.packageName
-                                            + " doesn't exist. Aborting move");
-                                    returnCode = PackageManager.MOVE_FAILED_DOESNT_EXIST;
-                                } else if (!mp.srcArgs.getCodePath().equals(
-                                        pkg.applicationInfo.getCodePath())) {
-                                    Slog.w(TAG, "Package " + mp.packageName
-                                            + " code path changed from " + mp.srcArgs.getCodePath()
-                                            + " to " + pkg.applicationInfo.getCodePath()
-                                            + " Aborting move and returning error");
-                                    returnCode = PackageManager.MOVE_FAILED_INTERNAL_ERROR;
-                                } else {
-                                    final String oldCodePath = pkg.codePath;
-                                    final String newCodePath = mp.targetArgs.getCodePath();
-                                    final String newResPath = mp.targetArgs.getResourcePath();
-                                    // TODO: This assumes the new style of installation.
-                                    // should we look at legacyNativeLibraryPath ?
-                                    final String newNativeRoot = new File(pkg.codePath, LIB_DIR_NAME).getAbsolutePath();
-                                    final File newNativeDir = new File(newNativeRoot);
+        if (returnCode != PackageManager.MOVE_SUCCEEDED) {
+            try {
+                observer.packageMoved(packageName, returnCode);
+            } catch (RemoteException ignored) {
+            }
+            return;
+        }
 
-                                    if (!isForwardLocked(pkg) && !isExternal(pkg)) {
-                                        // TODO(multiArch): Fix this so that it looks at the existing
-                                        // recorded CPU abis from the package. There's no need for a separate
-                                        // round of ABI scanning here.
-                                        NativeLibraryHelper.Handle handle = null;
-                                        try {
-                                            handle = NativeLibraryHelper.Handle.create(
-                                                    new File(newCodePath));
-                                            final int abi = NativeLibraryHelper.findSupportedAbi(
-                                                    handle, Build.SUPPORTED_ABIS);
-                                            if (abi >= 0) {
-                                                NativeLibraryHelper.copyNativeBinaries(handle,
-                                                        newNativeDir, Build.SUPPORTED_ABIS[abi]);
-                                            }
-                                        } catch (IOException ioe) {
-                                            Slog.w(TAG, "Unable to extract native libs for package :"
-                                                    + mp.packageName, ioe);
-                                            returnCode = PackageManager.MOVE_FAILED_INTERNAL_ERROR;
-                                        } finally {
-                                            IoUtils.closeQuietly(handle);
-                                        }
-                                    }
+        final IPackageInstallObserver2 installObserver = new IPackageInstallObserver2.Stub() {
+            @Override
+            public void onUserActionRequired(Intent intent) throws RemoteException {
+                throw new IllegalStateException();
+            }
 
-                                    final int[] users = sUserManager.getUserIds();
-                                    if (returnCode == PackageManager.MOVE_SUCCEEDED) {
-                                        for (int user : users) {
-                                            // TODO(multiArch): Fix this so that it links to the
-                                            // correct directory. We're currently pointing to root. but we
-                                            // must point to the arch specific subdirectory (if applicable).
-                                            //
-                                            // TODO(multiArch): Bogus reference to nativeLibraryDir.
-                                            if (mInstaller.linkNativeLibraryDirectory(pkg.packageName,
-                                                    newNativeRoot, user) < 0) {
-                                                returnCode = PackageManager.MOVE_FAILED_INSUFFICIENT_STORAGE;
-                                            }
-                                        }
-                                    }
-
-                                    if (returnCode == PackageManager.MOVE_SUCCEEDED) {
-                                        pkg.codePath = newCodePath;
-                                        pkg.baseCodePath = newCodePath;
-                                        // Move dex files around
-                                        if (moveDexFilesLI(oldCodePath, pkg) != PackageManager.INSTALL_SUCCEEDED) {
-                                            // Moving of dex files failed. Set
-                                            // error code and abort move.
-                                            pkg.codePath = oldCodePath;
-                                            pkg.baseCodePath = oldCodePath;
-                                            returnCode = PackageManager.MOVE_FAILED_INSUFFICIENT_STORAGE;
-                                        }
-                                    }
-
-                                    if (returnCode == PackageManager.MOVE_SUCCEEDED) {
-                                        pkg.applicationInfo.setCodePath(newCodePath);
-                                        pkg.applicationInfo.setBaseCodePath(newCodePath);
-                                        pkg.applicationInfo.setSplitCodePaths(null);
-                                        pkg.applicationInfo.setResourcePath(newResPath);
-                                        pkg.applicationInfo.setBaseResourcePath(newResPath);
-                                        pkg.applicationInfo.setSplitResourcePaths(null);
-
-                                        PackageSetting ps = (PackageSetting) pkg.mExtras;
-                                        ps.codePath = new File(pkg.applicationInfo.getCodePath());
-                                        ps.codePathString = ps.codePath.getPath();
-                                        ps.resourcePath = new File(pkg.applicationInfo.getResourcePath());
-                                        ps.resourcePathString = ps.resourcePath.getPath();
-
-                                        // Note that we don't have to recalculate the primary and secondary
-                                        // CPU ABIs because they must already have been calculated during the
-                                        // initial install of the app.
-                                        ps.legacyNativeLibraryPathString = null;
-
-                                        // Set the application info flag
-                                        // correctly.
-                                        if ((mp.flags & PackageManager.INSTALL_EXTERNAL) != 0) {
-                                            pkg.applicationInfo.flags |= ApplicationInfo.FLAG_EXTERNAL_STORAGE;
-                                        } else {
-                                            pkg.applicationInfo.flags &= ~ApplicationInfo.FLAG_EXTERNAL_STORAGE;
-                                        }
-                                        ps.setFlags(pkg.applicationInfo.flags);
-                                        mAppDirs.remove(oldCodePath);
-                                        mAppDirs.put(newCodePath, pkg);
-                                        // Persist settings
-                                        mSettings.writeLPr();
-                                    }
-                                }
-                            }
-                        }
-                        // Send resources available broadcast
-                        sendResourcesChangedBroadcast(true, false, pkgList, uidArr, null);
-                    }
-                }
-                if (returnCode != PackageManager.MOVE_SUCCEEDED) {
-                    // Clean up failed installation
-                    if (mp.targetArgs != null) {
-                        mp.targetArgs.doPostInstall(PackageManager.INSTALL_FAILED_INTERNAL_ERROR,
-                                -1);
-                    }
-                } else {
-                    // Force a gc to clear things up.
-                    Runtime.getRuntime().gc();
-                    // Delete older code
-                    synchronized (mInstallLock) {
-                        mp.srcArgs.doPostDeleteLI(true);
-                    }
-                }
-
-                // Allow more operations on this file if we didn't fail because
-                // an operation was already pending for this package.
-                if (returnCode != PackageManager.MOVE_FAILED_OPERATION_PENDING) {
-                    synchronized (mPackages) {
-                        PackageParser.Package pkg = mPackages.get(mp.packageName);
-                        if (pkg != null) {
-                            pkg.mOperationPending = false;
-                       }
-                   }
-                }
-
-                IPackageMoveObserver observer = mp.observer;
-                if (observer != null) {
-                    try {
-                        observer.packageMoved(mp.packageName, returnCode);
-                    } catch (RemoteException e) {
-                        Log.i(TAG, "Observer no longer exists.");
-                    }
+            @Override
+            public void onPackageInstalled(String basePackageName, int returnCode, String msg,
+                    Bundle extras) throws RemoteException {
+                Slog.d(TAG, "Install result for move: "
+                        + PackageManager.installStatusToString(returnCode, msg));
+                final int status = PackageManager.installStatusToPublicStatus(returnCode);
+                switch (status) {
+                    case PackageInstaller.STATUS_SUCCESS:
+                        observer.packageMoved(packageName, PackageManager.MOVE_SUCCEEDED);
+                        break;
+                    case PackageInstaller.STATUS_FAILURE_STORAGE:
+                        observer.packageMoved(packageName, PackageManager.MOVE_FAILED_INSUFFICIENT_STORAGE);
+                        break;
+                    default:
+                        observer.packageMoved(packageName, PackageManager.MOVE_FAILED_INTERNAL_ERROR);
+                        break;
                 }
             }
-        });
+        };
+
+        // Treat a move like reinstalling an existing app, which ensures that we
+        // process everythign uniformly, like unpacking native libraries.
+        newInstallFlags |= PackageManager.INSTALL_REPLACE_EXISTING;
+
+        final Message msg = mHandler.obtainMessage(INIT_COPY);
+        final OriginInfo origin = OriginInfo.fromExistingFile(codeFile);
+        msg.obj = new InstallParams(origin, installObserver, newInstallFlags,
+                installerPackageName, null, user, packageAbiOverride);
+        mHandler.sendMessage(msg);
     }
 
     @Override
diff --git a/services/core/java/com/android/server/trust/TrustAgentWrapper.java b/services/core/java/com/android/server/trust/TrustAgentWrapper.java
index 4c080cb..b1c918d 100644
--- a/services/core/java/com/android/server/trust/TrustAgentWrapper.java
+++ b/services/core/java/com/android/server/trust/TrustAgentWrapper.java
@@ -51,7 +51,7 @@
 public class TrustAgentWrapper {
     private static final String EXTRA_COMPONENT_NAME = "componentName";
     private static final String TRUST_EXPIRED_ACTION = "android.server.trust.TRUST_EXPIRED_ACTION";
-    private static final String PERMISSION = "android.permission.PROVIDE_TRUST_AGENT";
+    private static final String PERMISSION = android.Manifest.permission.PROVIDE_TRUST_AGENT;
     private static final boolean DEBUG = false;
     private static final String TAG = "TrustAgentWrapper";
 
@@ -81,6 +81,7 @@
     private ITrustAgentService mTrustAgentService;
     private boolean mBound;
     private long mScheduledRestartUptimeMillis;
+    private long mMaximumTimeToLock; // from DevicePolicyManager
 
     // Trust state
     private boolean mTrusted;
@@ -90,6 +91,7 @@
     private IBinder mSetTrustAgentFeaturesToken;
     private AlarmManager mAlarmManager;
     private final Intent mAlarmIntent;
+    private PendingIntent mAlarmPendingIntent;
 
     private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
         @Override
@@ -118,10 +120,25 @@
                     boolean initiatedByUser = msg.arg1 != 0;
                     long durationMs = msg.getData().getLong(DATA_DURATION);
                     if (durationMs > 0) {
-                        long expiration = SystemClock.elapsedRealtime() + durationMs;
-                        PendingIntent op = PendingIntent.getBroadcast(mContext, 0, mAlarmIntent,
+                        final long duration;
+                        if (mMaximumTimeToLock != 0) {
+                            // Enforce DevicePolicyManager timeout.  This is here as a safeguard to
+                            // ensure trust agents are evaluating trust state at least as often as
+                            // the policy dictates. Admins that want more guarantees should be using
+                            // DevicePolicyManager#KEYGUARD_DISABLE_TRUST_AGENTS.
+                            duration = Math.min(durationMs, mMaximumTimeToLock);
+                            if (DEBUG) {
+                                Log.v(TAG, "DPM lock timeout in effect. Timeout adjusted from "
+                                    + durationMs + " to " + duration);
+                            }
+                        } else {
+                            duration = durationMs;
+                        }
+                        long expiration = SystemClock.elapsedRealtime() + duration;
+                        mAlarmPendingIntent = PendingIntent.getBroadcast(mContext, 0, mAlarmIntent,
                                 PendingIntent.FLAG_CANCEL_CURRENT);
-                        mAlarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, expiration, op);
+                        mAlarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, expiration,
+                                mAlarmPendingIntent);
                     }
                     mTrustManagerService.mArchive.logGrantTrust(mUserId, mName,
                             (mMessage != null ? mMessage.toString() : null),
@@ -244,12 +261,13 @@
 
         mAlarmIntent = new Intent(TRUST_EXPIRED_ACTION).putExtra(EXTRA_COMPONENT_NAME, mName);
         mAlarmIntent.setData(Uri.parse(mAlarmIntent.toUri(Intent.URI_INTENT_SCHEME)));
+        mAlarmIntent.setPackage(context.getPackageName());
 
         final IntentFilter alarmFilter = new IntentFilter(TRUST_EXPIRED_ACTION);
         alarmFilter.addDataScheme(mAlarmIntent.getScheme());
         final String pathUri = mAlarmIntent.toUri(Intent.URI_INTENT_SCHEME);
         alarmFilter.addDataPath(pathUri, PatternMatcher.PATTERN_LITERAL);
-        mContext.registerReceiver(mBroadcastReceiver, alarmFilter);
+        mContext.registerReceiver(mBroadcastReceiver, alarmFilter, PERMISSION, null);
 
         // Schedules a restart for when connecting times out. If the connection succeeds,
         // the restart is canceled in mCallback's onConnected.
@@ -319,6 +337,17 @@
                                 mSetTrustAgentFeaturesToken);
                     }
                 }
+                final long maxTimeToLock = dpm.getMaximumTimeToLock(null);
+                if (maxTimeToLock != mMaximumTimeToLock) {
+                    // If the timeout changes, cancel the alarm and send a timeout event to have
+                    // the agent re-evaluate trust.
+                    mMaximumTimeToLock = maxTimeToLock;
+                    if (mAlarmPendingIntent != null) {
+                        mAlarmManager.cancel(mAlarmPendingIntent);
+                        mAlarmPendingIntent = null;
+                        mHandler.sendEmptyMessage(MSG_TRUST_TIMEOUT);
+                    }
+                }
             }
         } catch (RemoteException e) {
             onError(e);
diff --git a/services/core/java/com/android/server/tv/TvInputHardwareManager.java b/services/core/java/com/android/server/tv/TvInputHardwareManager.java
index fa991c2..77ab33b 100644
--- a/services/core/java/com/android/server/tv/TvInputHardwareManager.java
+++ b/services/core/java/com/android/server/tv/TvInputHardwareManager.java
@@ -1021,7 +1021,9 @@
             synchronized (mLock) {
                 for (int i = 0; i < mConnections.size(); ++i) {
                     TvInputHardwareImpl impl = mConnections.valueAt(i).getHardwareImplLocked();
-                    impl.handleAudioSinkUpdated();
+                    if (impl != null) {
+                        impl.handleAudioSinkUpdated();
+                    }
                 }
             }
         }
diff --git a/services/core/java/com/android/server/tv/TvInputManagerService.java b/services/core/java/com/android/server/tv/TvInputManagerService.java
index 6481944..27023ad 100644
--- a/services/core/java/com/android/server/tv/TvInputManagerService.java
+++ b/services/core/java/com/android/server/tv/TvInputManagerService.java
@@ -146,6 +146,7 @@
         PackageMonitor monitor = new PackageMonitor() {
             @Override
             public void onSomePackagesChanged() {
+                if (DEBUG) Slog.d(TAG, "onSomePackagesChanged()");
                 synchronized (mLock) {
                     buildTvInputListLocked(mCurrentUserId);
                 }
@@ -179,7 +180,7 @@
                 try {
                     results = mContentResolver.applyBatch(TvContract.AUTHORITY, operations);
                 } catch (RemoteException | OperationApplicationException e) {
-                    Slog.e(TAG, "error in applyBatch" + e);
+                    Slog.e(TAG, "error in applyBatch", e);
                 }
 
                 if (DEBUG) {
@@ -216,7 +217,9 @@
         UserState userState = getUserStateLocked(userId);
         userState.packageSet.clear();
 
-        if (DEBUG) Slog.d(TAG, "buildTvInputList");
+        if (DEBUG) {
+            Slog.d(TAG, "buildTvInputList");
+        }
         PackageManager pm = mContext.getPackageManager();
         List<ResolveInfo> services = pm.queryIntentServices(
                 new Intent(TvInputService.SERVICE_INTERFACE),
@@ -246,7 +249,7 @@
                 try {
                     inputList.add(TvInputInfo.createTvInputInfo(mContext, ri));
                 } catch (XmlPullParserException | IOException e) {
-                    Slog.e(TAG, "Failed to load TV input " + si.name, e);
+                    Slog.e(TAG, "failed to load TV input " + si.name, e);
                     continue;
                 }
             }
@@ -258,7 +261,9 @@
 
         Map<String, TvInputState> inputMap = new HashMap<String, TvInputState>();
         for (TvInputInfo info : inputList) {
-            if (DEBUG) Slog.d(TAG, "add " + info.getId());
+            if (DEBUG) {
+                Slog.d(TAG, "add " + info.getId());
+            }
             TvInputState state = userState.inputMap.get(info.getId());
             if (state == null) {
                 state = new TvInputState();
@@ -275,6 +280,11 @@
 
         for (String inputId : userState.inputMap.keySet()) {
             if (!inputMap.containsKey(inputId)) {
+                TvInputInfo info = userState.inputMap.get(inputId).mInfo;
+                ServiceState serviceState = userState.serviceStateMap.get(info.getComponent());
+                if (serviceState != null) {
+                    abortPendingCreateSessionRequestsLocked(serviceState, inputId, userId);
+                }
                 notifyInputRemovedLocked(userState, inputId);
             }
         }
@@ -342,7 +352,13 @@
             }
             userState.serviceStateMap.clear();
 
+            // Clear everything else.
+            userState.inputMap.clear();
+            userState.packageSet.clear();
+            userState.ratingSystemXmlUriSet.clear();
             userState.clientStateMap.clear();
+            userState.callbackSet.clear();
+            userState.mainSessionToken = null;
 
             mUserStates.remove(userId);
         }
@@ -447,13 +463,29 @@
         }
     }
 
+    private void abortPendingCreateSessionRequestsLocked(ServiceState serviceState,
+            String inputId, int userId) {
+        // Let clients know the create session requests are failed.
+        UserState userState = getUserStateLocked(userId);
+        for (IBinder sessionToken : serviceState.mSessionTokens) {
+            SessionState sessionState = userState.sessionStateMap.get(sessionToken);
+            if (sessionState.mSession == null && (inputId == null
+                    || sessionState.mInfo.getId().equals(inputId))) {
+                removeSessionStateLocked(sessionToken, sessionState.mUserId);
+                sendSessionTokenToClientLocked(sessionState.mClient,
+                        sessionState.mInfo.getId(), null, null, sessionState.mSeq);
+            }
+        }
+        updateServiceConnectionLocked(serviceState.mComponent, userId);
+    }
+
     private ClientState createClientStateLocked(IBinder clientToken, int userId) {
         UserState userState = getUserStateLocked(userId);
         ClientState clientState = new ClientState(clientToken, userId);
         try {
             clientToken.linkToDeath(clientState, 0);
         } catch (RemoteException e) {
-            Slog.e(TAG, "Client is already died.");
+            Slog.e(TAG, "client process has already died", e);
         }
         userState.clientStateMap.put(clientToken, clientState);
         return clientState;
@@ -487,7 +519,7 @@
                         try {
                             session.asBinder().linkToDeath(sessionState, 0);
                         } catch (RemoteException e) {
-                            Slog.e(TAG, "Session is already died.");
+                            Slog.e(TAG, "session process has already died", e);
                         }
 
                         IBinder clientToken = sessionState.mClient.asBinder();
@@ -521,7 +553,7 @@
                         // originated from.
                         sessionState.mClient.onChannelRetuned(channelUri, sessionState.mSeq);
                     } catch (RemoteException e) {
-                        Slog.e(TAG, "error in onChannelRetuned");
+                        Slog.e(TAG, "error in onChannelRetuned", e);
                     }
                 }
             }
@@ -538,7 +570,7 @@
                     try {
                         sessionState.mClient.onTracksChanged(tracks, sessionState.mSeq);
                     } catch (RemoteException e) {
-                        Slog.e(TAG, "error in onTracksChanged");
+                        Slog.e(TAG, "error in onTracksChanged", e);
                     }
                 }
             }
@@ -555,7 +587,7 @@
                     try {
                         sessionState.mClient.onTrackSelected(type, trackId, sessionState.mSeq);
                     } catch (RemoteException e) {
-                        Slog.e(TAG, "error in onTrackSelected");
+                        Slog.e(TAG, "error in onTrackSelected", e);
                     }
                 }
             }
@@ -572,7 +604,7 @@
                     try {
                         sessionState.mClient.onVideoAvailable(sessionState.mSeq);
                     } catch (RemoteException e) {
-                        Slog.e(TAG, "error in onVideoAvailable");
+                        Slog.e(TAG, "error in onVideoAvailable", e);
                     }
                 }
             }
@@ -589,7 +621,7 @@
                     try {
                         sessionState.mClient.onVideoUnavailable(reason, sessionState.mSeq);
                     } catch (RemoteException e) {
-                        Slog.e(TAG, "error in onVideoUnavailable");
+                        Slog.e(TAG, "error in onVideoUnavailable", e);
                     }
                 }
             }
@@ -606,7 +638,7 @@
                     try {
                         sessionState.mClient.onContentAllowed(sessionState.mSeq);
                     } catch (RemoteException e) {
-                        Slog.e(TAG, "error in onContentAllowed");
+                        Slog.e(TAG, "error in onContentAllowed", e);
                     }
                 }
             }
@@ -623,7 +655,7 @@
                     try {
                         sessionState.mClient.onContentBlocked(rating, sessionState.mSeq);
                     } catch (RemoteException e) {
-                        Slog.e(TAG, "error in onContentBlocked");
+                        Slog.e(TAG, "error in onContentBlocked", e);
                     }
                 }
             }
@@ -642,7 +674,7 @@
                         sessionState.mClient.onLayoutSurface(left, top, right, bottom,
                                 sessionState.mSeq);
                     } catch (RemoteException e) {
-                        Slog.e(TAG, "error in onLayoutSurface");
+                        Slog.e(TAG, "error in onLayoutSurface", e);
                     }
                 }
             }
@@ -660,7 +692,7 @@
                         sessionState.mClient.onSessionEvent(eventType, eventArgs,
                                 sessionState.mSeq);
                     } catch (RemoteException e) {
-                        Slog.e(TAG, "error in onSessionEvent");
+                        Slog.e(TAG, "error in onSessionEvent", e);
                     }
                 }
             }
@@ -682,8 +714,8 @@
             IBinder sessionToken, InputChannel channel, int seq) {
         try {
             client.onSessionCreated(inputId, sessionToken, channel, seq);
-        } catch (RemoteException exception) {
-            Slog.e(TAG, "error in onSessionCreated", exception);
+        } catch (RemoteException e) {
+            Slog.e(TAG, "error in onSessionCreated", e);
         }
     }
 
@@ -697,7 +729,7 @@
             try {
                 sessionState.mSession.release();
             } catch (RemoteException e) {
-                Slog.w(TAG, "session is already disapeared", e);
+                Slog.e(TAG, "session process has already died", e);
             }
             sessionState.mSession = null;
         }
@@ -727,6 +759,10 @@
             clientState.mSessionTokens.remove(sessionToken);
             if (clientState.isEmpty()) {
                 userState.clientStateMap.remove(sessionState.mClient.asBinder());
+                if (userState.clientStateMap.isEmpty()) {
+                    // No longer need to keep the callbacks since there is no client.
+                    userState.callbackSet.clear();
+                }
             }
         }
 
@@ -767,26 +803,26 @@
 
     private void notifyInputAddedLocked(UserState userState, String inputId) {
         if (DEBUG) {
-            Slog.d(TAG, "notifyInputAdded: inputId = " + inputId);
+            Slog.d(TAG, "notifyInputAddedLocked(inputId=" + inputId + ")");
         }
         for (ITvInputManagerCallback callback : userState.callbackSet) {
             try {
                 callback.onInputAdded(inputId);
             } catch (RemoteException e) {
-                Slog.e(TAG, "Failed to report added input to callback.");
+                Slog.e(TAG, "failed to report added input to callback", e);
             }
         }
     }
 
     private void notifyInputRemovedLocked(UserState userState, String inputId) {
         if (DEBUG) {
-            Slog.d(TAG, "notifyInputRemovedLocked: inputId = " + inputId);
+            Slog.d(TAG, "notifyInputRemovedLocked(inputId=" + inputId + ")");
         }
         for (ITvInputManagerCallback callback : userState.callbackSet) {
             try {
                 callback.onInputRemoved(inputId);
             } catch (RemoteException e) {
-                Slog.e(TAG, "Failed to report removed input to callback.");
+                Slog.e(TAG, "failed to report removed input to callback", e);
             }
         }
     }
@@ -794,22 +830,22 @@
     private void notifyInputStateChangedLocked(UserState userState, String inputId,
             int state, ITvInputManagerCallback targetCallback) {
         if (DEBUG) {
-            Slog.d(TAG, "notifyInputStateChangedLocked: inputId = " + inputId
-                    + "; state = " + state);
+            Slog.d(TAG, "notifyInputStateChangedLocked(inputId=" + inputId
+                    + ", state=" + state + ")");
         }
         if (targetCallback == null) {
             for (ITvInputManagerCallback callback : userState.callbackSet) {
                 try {
                     callback.onInputStateChanged(inputId, state);
                 } catch (RemoteException e) {
-                    Slog.e(TAG, "Failed to report state change to callback.");
+                    Slog.e(TAG, "failed to report state change to callback", e);
                 }
             }
         } else {
             try {
                 targetCallback.onInputStateChanged(inputId, state);
             } catch (RemoteException e) {
-                Slog.e(TAG, "Failed to report state change to callback.");
+                Slog.e(TAG, "failed to report state change to callback", e);
             }
         }
     }
@@ -890,8 +926,22 @@
             final long identity = Binder.clearCallingIdentity();
             try {
                 synchronized (mLock) {
-                    UserState userState = getUserStateLocked(resolvedUserId);
+                    final UserState userState = getUserStateLocked(resolvedUserId);
                     userState.callbackSet.add(callback);
+                    try {
+                        callback.asBinder().linkToDeath(new IBinder.DeathRecipient() {
+                            @Override
+                            public void binderDied() {
+                                synchronized (mLock) {
+                                    if (userState.callbackSet != null) {
+                                        userState.callbackSet.remove(callback);
+                                    }
+                                }
+                            }
+                        }, 0);
+                    } catch (RemoteException e) {
+                        Slog.e(TAG, "client process has already died", e);
+                    }
                     for (TvInputState state : userState.inputMap.values()) {
                         notifyInputStateChangedLocked(userState, state.mInfo.getId(),
                                 state.mState, callback);
@@ -1019,13 +1069,12 @@
         }
 
         private void ensureParentalControlsPermission() {
-            // STOPSHIP: Uncomment when b/16984416 is resolved.
-            //if (mContext.checkCallingPermission(
-            //        android.Manifest.permission.MODIFY_PARENTAL_CONTROLS)
-            //        != PackageManager.PERMISSION_GRANTED) {
-            //    throw new SecurityException(
-            //            "The caller does not have parental controls permission");
-            //}
+            if (mContext.checkCallingPermission(
+                    android.Manifest.permission.MODIFY_PARENTAL_CONTROLS)
+                    != PackageManager.PERMISSION_GRANTED) {
+                throw new SecurityException(
+                        "The caller does not have parental controls permission");
+            }
         }
 
         @Override
@@ -1038,7 +1087,13 @@
             try {
                 synchronized (mLock) {
                     UserState userState = getUserStateLocked(resolvedUserId);
-                    TvInputInfo info = userState.inputMap.get(inputId).mInfo;
+                    TvInputState inputState = userState.inputMap.get(inputId);
+                    if (inputState == null) {
+                        Slog.w(TAG, "Failed to find input state for inputId=" + inputId);
+                        sendSessionTokenToClientLocked(client, inputId, null, null, seq);
+                        return;
+                    }
+                    TvInputInfo info = inputState.mInfo;
                     ServiceState serviceState = userState.serviceStateMap.get(info.getComponent());
                     if (serviceState == null) {
                         serviceState = new ServiceState(info.getComponent(), resolvedUserId);
@@ -1076,7 +1131,7 @@
         @Override
         public void releaseSession(IBinder sessionToken, int userId) {
             if (DEBUG) {
-                Slog.d(TAG, "releaseSession(): " + sessionToken);
+                Slog.d(TAG, "releaseSession(sessionToken=" + sessionToken + ")");
             }
             final int callingUid = Binder.getCallingUid();
             final int resolvedUserId = resolveCallingUserId(Binder.getCallingPid(), callingUid,
@@ -1094,7 +1149,7 @@
         @Override
         public void setMainSession(IBinder sessionToken, int userId) {
             if (DEBUG) {
-                Slog.d(TAG, "setMainSession(): " + sessionToken);
+                Slog.d(TAG, "setMainSession(sessionToken=" + sessionToken + ")");
             }
             final int callingUid = Binder.getCallingUid();
             final int resolvedUserId = resolveCallingUserId(Binder.getCallingPid(), callingUid,
@@ -1263,7 +1318,7 @@
                         getSessionLocked(sessionToken, callingUid, resolvedUserId)
                                 .requestUnblockContent(unblockedRating);
                     } catch (RemoteException e) {
-                        Slog.e(TAG, "error in unblockContent", e);
+                        Slog.e(TAG, "error in requestUnblockContent", e);
                     }
                 }
             } finally {
@@ -1324,7 +1379,7 @@
                         getSessionLocked(sessionToken, callingUid, resolvedUserId)
                                 .appPrivateCommand(command, data);
                     } catch (RemoteException e) {
-                        Slog.e(TAG, "error in sendAppPrivateCommand", e);
+                        Slog.e(TAG, "error in appPrivateCommand", e);
                     }
                 }
             } finally {
@@ -1489,7 +1544,7 @@
                 synchronized (mLock) {
                     UserState userState = getUserStateLocked(resolvedUserId);
                     if (userState.inputMap.get(inputId) == null) {
-                        Slog.e(TAG, "Input not found for " + inputId);
+                        Slog.e(TAG, "input not found for " + inputId);
                         return false;
                     }
                     for (SessionState sessionState : userState.sessionStateMap.values()) {
@@ -1898,15 +1953,7 @@
                     serviceState.mService = null;
                     serviceState.mCallback = null;
 
-                    // Send null tokens for not finishing create session events.
-                    for (IBinder sessionToken : serviceState.mSessionTokens) {
-                        SessionState sessionState = userState.sessionStateMap.get(sessionToken);
-                        if (sessionState.mSession == null) {
-                            removeSessionStateLocked(sessionToken, sessionState.mUserId);
-                            sendSessionTokenToClientLocked(sessionState.mClient,
-                                    sessionState.mInfo.getId(), null, null, sessionState.mSeq);
-                        }
-                    }
+                    abortPendingCreateSessionRequestsLocked(serviceState, null, mUserId);
 
                     for (TvInputState inputState : userState.inputMap.values()) {
                         if (inputState.mInfo.getComponent().equals(component)) {
@@ -1914,7 +1961,6 @@
                                     INPUT_STATE_DISCONNECTED, null);
                         }
                     }
-                    updateServiceConnectionLocked(mComponent, mUserId);
                 }
             }
         }
@@ -1986,7 +2032,7 @@
                     buildTvInputListLocked(mUserId);
                     mTvInputHardwareManager.removeTvInput(inputId);
                 } else {
-                    Slog.e(TAG, "TvInputInfo with inputId=" + inputId + " not found.");
+                    Slog.e(TAG, "failed to remove input " + inputId);
                 }
             }
         }
diff --git a/services/core/java/com/android/server/wm/AppTransition.java b/services/core/java/com/android/server/wm/AppTransition.java
index 4dc76de..aabb8f7 100644
--- a/services/core/java/com/android/server/wm/AppTransition.java
+++ b/services/core/java/com/android/server/wm/AppTransition.java
@@ -19,7 +19,6 @@
 import android.content.Context;
 import android.content.res.Configuration;
 import android.graphics.Bitmap;
-import android.graphics.Point;
 import android.graphics.Rect;
 import android.os.Debug;
 import android.os.Handler;
@@ -111,11 +110,14 @@
      * The new window will show briefly and then be gone. */
     public static final int TRANSIT_TASK_OPEN_BEHIND = 16;
 
+    /** Fraction of animation at which the recents thumbnail stays completely transparent */
+    private static final float RECENTS_THUMBNAIL_FADEIN_FRACTION = 0.7f;
     /** Fraction of animation at which the recents thumbnail becomes completely transparent */
-    private static final float RECENTS_THUMBNAIL_FADEOUT_FRACTION = 0.25f;
+    private static final float RECENTS_THUMBNAIL_FADEOUT_FRACTION = 0.3f;
 
     private static final int DEFAULT_APP_TRANSITION_DURATION = 250;
-    private static final int THUMBNAIL_APP_TRANSITION_DURATION = 275;
+    private static final int THUMBNAIL_APP_TRANSITION_DURATION = 300;
+    private static final int THUMBNAIL_APP_TRANSITION_ALPHA_DURATION = 325;
 
     private final Context mContext;
     private final Handler mH;
@@ -127,6 +129,8 @@
     private static final int NEXT_TRANSIT_TYPE_SCALE_UP = 2;
     private static final int NEXT_TRANSIT_TYPE_THUMBNAIL_SCALE_UP = 3;
     private static final int NEXT_TRANSIT_TYPE_THUMBNAIL_SCALE_DOWN = 4;
+    private static final int NEXT_TRANSIT_TYPE_THUMBNAIL_ASPECT_SCALE_UP = 5;
+    private static final int NEXT_TRANSIT_TYPE_THUMBNAIL_ASPECT_SCALE_DOWN = 6;
     private int mNextAppTransitionType = NEXT_TRANSIT_TYPE_NONE;
 
     // These are the possible states for the enter/exit activities during a thumbnail transition
@@ -146,6 +150,7 @@
     private int mNextAppTransitionStartY;
     private int mNextAppTransitionStartWidth;
     private int mNextAppTransitionStartHeight;
+    private Rect mNextAppTransitionInsets = new Rect();
 
     private Rect mTmpFromClipRect = new Rect();
     private Rect mTmpToClipRect = new Rect();
@@ -158,7 +163,8 @@
 
     private final int mConfigShortAnimTime;
     private final Interpolator mDecelerateInterpolator;
-    private final Interpolator mThumbnailFadeoutInterpolator;
+    private final Interpolator mThumbnailFadeInInterpolator;
+    private final Interpolator mThumbnailFadeOutInterpolator;
     private final Interpolator mThumbnailFastOutSlowInInterpolator;
 
     private int mCurrentUserId = 0;
@@ -172,14 +178,25 @@
                 com.android.internal.R.interpolator.decelerate_cubic);
         mThumbnailFastOutSlowInInterpolator = AnimationUtils.loadInterpolator(context,
                 com.android.internal.R.interpolator.fast_out_slow_in);
-        mThumbnailFadeoutInterpolator = new Interpolator() {
+        mThumbnailFadeInInterpolator = new Interpolator() {
+            @Override
+            public float getInterpolation(float input) {
+                // Linear response for first fraction, then complete after that.
+                if (input < RECENTS_THUMBNAIL_FADEIN_FRACTION) {
+                    return 0f;
+                }
+                return (input - RECENTS_THUMBNAIL_FADEIN_FRACTION) /
+                        (1f - RECENTS_THUMBNAIL_FADEIN_FRACTION);
+            }
+        };
+        mThumbnailFadeOutInterpolator = new Interpolator() {
             @Override
             public float getInterpolation(float input) {
                 // Linear response for first fraction, then complete after that.
                 if (input < RECENTS_THUMBNAIL_FADEOUT_FRACTION) {
                     return input / RECENTS_THUMBNAIL_FADEOUT_FRACTION;
                 }
-                return 1.0f;
+                return 1f;
             }
         };
     }
@@ -233,9 +250,23 @@
         return mNextAppTransitionThumbnail;
     }
 
-    void getStartingPoint(Point outPoint) {
-        outPoint.x = mNextAppTransitionStartX;
-        outPoint.y = mNextAppTransitionStartY;
+    /** Returns whether the next thumbnail transition is aspect scaled up. */
+    boolean isNextThumbnailTransitionAspectScaled() {
+        return mNextAppTransitionType == NEXT_TRANSIT_TYPE_THUMBNAIL_ASPECT_SCALE_UP ||
+                mNextAppTransitionType == NEXT_TRANSIT_TYPE_THUMBNAIL_ASPECT_SCALE_DOWN;
+    }
+
+    /** Returns whether the next thumbnail transition is scaling up. */
+    boolean isNextThumbnailTransitionScaleUp() {
+        return mNextAppTransitionScaleUp;
+    }
+
+    int getStartingX() {
+        return mNextAppTransitionStartX;
+    }
+
+    int getStartingY() {
+        return mNextAppTransitionStartY;
     }
 
     void prepare() {
@@ -372,7 +403,7 @@
             scale.setInterpolator(mDecelerateInterpolator);
 
             Animation alpha = new AlphaAnimation(0, 1);
-            alpha.setInterpolator(mThumbnailFadeoutInterpolator);
+            alpha.setInterpolator(mThumbnailFadeOutInterpolator);
 
             AnimationSet set = new AnimationSet(false);
             set.addAnimation(scale);
@@ -417,7 +448,9 @@
      */
     Animation prepareThumbnailAnimationWithDuration(Animation a, int appWidth, int appHeight,
             int duration, Interpolator interpolator) {
-        a.setDuration(duration);
+        if (duration > 0) {
+            a.setDuration(duration);
+        }
         a.setFillAfter(true);
         a.setInterpolator(interpolator);
         a.initialize(appWidth, appHeight, appWidth, appHeight);
@@ -468,50 +501,73 @@
      * This animation runs for the thumbnail that gets cross faded with the enter/exit activity
      * when a thumbnail is specified with the activity options.
      */
-    Animation createThumbnailScaleAnimationLocked(int appWidth, int appHeight, int transit) {
+    Animation createThumbnailAspectScaleAnimationLocked(int appWidth, int appHeight,
+            int deviceWidth, int transit) {
         Animation a;
         final int thumbWidthI = mNextAppTransitionThumbnail.getWidth();
         final float thumbWidth = thumbWidthI > 0 ? thumbWidthI : 1;
         final int thumbHeightI = mNextAppTransitionThumbnail.getHeight();
         final float thumbHeight = thumbHeightI > 0 ? thumbHeightI : 1;
 
+        float scaleW = deviceWidth / thumbWidth;
+        float unscaledWidth = deviceWidth;
+        float unscaledHeight = thumbHeight * scaleW;
+        float unscaledStartY = mNextAppTransitionStartY - (unscaledHeight - thumbHeight) / 2f;
         if (mNextAppTransitionScaleUp) {
-            // Animation for the thumbnail zooming from its initial size to the full screen
-            float scaleW = appWidth / thumbWidth;
-            float scaleH = appHeight / thumbHeight;
-            Animation scale = new ScaleAnimation(1, scaleW, 1, scaleH,
-                    computePivot(mNextAppTransitionStartX, 1 / scaleW),
-                    computePivot(mNextAppTransitionStartY, 1 / scaleH));
-            scale.setInterpolator(mDecelerateInterpolator);
-
+            // Animation up from the thumbnail to the full screen
+            Animation scale = new ScaleAnimation(1f, scaleW, 1f, scaleW,
+                    mNextAppTransitionStartX + (thumbWidth / 2f),
+                    mNextAppTransitionStartY + (thumbHeight / 2f));
+            scale.setInterpolator(mThumbnailFastOutSlowInInterpolator);
+            scale.setDuration(THUMBNAIL_APP_TRANSITION_DURATION);
             Animation alpha = new AlphaAnimation(1, 0);
-            alpha.setInterpolator(mThumbnailFadeoutInterpolator);
+            alpha.setInterpolator(mThumbnailFadeOutInterpolator);
+            alpha.setDuration(THUMBNAIL_APP_TRANSITION_ALPHA_DURATION);
+            Animation translate = new TranslateAnimation(0, 0, 0, -unscaledStartY +
+                    mNextAppTransitionInsets.top);
+            translate.setInterpolator(mThumbnailFastOutSlowInInterpolator);
+            translate.setDuration(THUMBNAIL_APP_TRANSITION_DURATION);
 
             // This AnimationSet uses the Interpolators assigned above.
             AnimationSet set = new AnimationSet(false);
             set.addAnimation(scale);
             set.addAnimation(alpha);
+            set.addAnimation(translate);
             a = set;
         } else {
-            // Animation for the thumbnail zooming down from the full screen to its final size
-            float scaleW = appWidth / thumbWidth;
-            float scaleH = appHeight / thumbHeight;
-            a = new ScaleAnimation(scaleW, 1, scaleH, 1,
-                    computePivot(mNextAppTransitionStartX, 1 / scaleW),
-                    computePivot(mNextAppTransitionStartY, 1 / scaleH));
-        }
+            // Animation down from the full screen to the thumbnail
+            Animation scale = new ScaleAnimation(scaleW, 1f, scaleW, 1f,
+                    mNextAppTransitionStartX + (thumbWidth / 2f),
+                    mNextAppTransitionStartY + (thumbHeight / 2f));
+            scale.setInterpolator(mThumbnailFastOutSlowInInterpolator);
+            scale.setDuration(THUMBNAIL_APP_TRANSITION_DURATION);
+            Animation alpha = new AlphaAnimation(0f, 1f);
+            alpha.setInterpolator(mThumbnailFadeInInterpolator);
+            alpha.setDuration(THUMBNAIL_APP_TRANSITION_ALPHA_DURATION);
+            Animation translate = new TranslateAnimation(0, 0, -unscaledStartY +
+                    mNextAppTransitionInsets.top, 0);
+            translate.setInterpolator(mThumbnailFastOutSlowInInterpolator);
+            translate.setDuration(THUMBNAIL_APP_TRANSITION_DURATION);
 
-        return prepareThumbnailAnimation(a, appWidth, appHeight, transit);
+            // This AnimationSet uses the Interpolators assigned above.
+            AnimationSet set = new AnimationSet(false);
+            set.addAnimation(scale);
+            set.addAnimation(alpha);
+            set.addAnimation(translate);
+            a = set;
+
+        }
+        return prepareThumbnailAnimationWithDuration(a, appWidth, appHeight, 0,
+                mThumbnailFastOutSlowInInterpolator);
     }
 
     /**
      * This alternate animation is created when we are doing a thumbnail transition, for the
      * activity that is leaving, and the activity that is entering.
      */
-    Animation createAlternateThumbnailEnterExitAnimationLocked(int thumbTransitState, int appWidth,
-                                                    int appHeight, int orientation, int transit,
-                                                    Rect containingFrame, Rect contentInsets,
-                                                    boolean isFullScreen) {
+    Animation createAspectScaledThumbnailEnterExitAnimationLocked(int thumbTransitState,
+            int appWidth, int appHeight, int orientation, int transit, Rect containingFrame,
+            Rect contentInsets, boolean isFullScreen) {
         Animation a;
         final int thumbWidthI = mNextAppTransitionThumbnail.getWidth();
         final float thumbWidth = thumbWidthI > 0 ? thumbWidthI : 1;
@@ -524,7 +580,7 @@
 
         switch (thumbTransitState) {
             case THUMBNAIL_TRANSITION_ENTER_SCALE_UP: {
-                // Entering app scales up with the thumbnail
+                // App window scaling up to become full screen
                 if (orientation == Configuration.ORIENTATION_PORTRAIT) {
                     // In portrait, we scale the width and clip to the top/left square
                     scale = thumbWidth / appWidth;
@@ -550,16 +606,15 @@
                     mTmpFromClipRect.right = (mTmpFromClipRect.left + unscaledThumbWidth);
                     mTmpToClipRect.set(containingFrame);
                 }
+                mNextAppTransitionInsets.set(contentInsets);
 
                 Animation scaleAnim = new ScaleAnimation(scale, 1, scale, 1,
                         computePivot(mNextAppTransitionStartX, scale),
                         computePivot(mNextAppTransitionStartY, scale));
-                Animation alphaAnim = new AlphaAnimation(1, 1);
                 Animation clipAnim = new ClipRectAnimation(mTmpFromClipRect, mTmpToClipRect);
                 Animation translateAnim = new TranslateAnimation(0, 0, -scaledTopDecor, 0);
 
                 AnimationSet set = new AnimationSet(true);
-                set.addAnimation(alphaAnim);
                 set.addAnimation(clipAnim);
                 set.addAnimation(scaleAnim);
                 set.addAnimation(translateAnim);
@@ -567,26 +622,29 @@
                 break;
             }
             case THUMBNAIL_TRANSITION_EXIT_SCALE_UP: {
-                // Exiting app while the thumbnail is scaling up should fade
+                // Previous app window during the scale up
                 if (transit == TRANSIT_WALLPAPER_INTRA_OPEN) {
-                    // Fade out while bringing up selected activity. This keeps the
-                    // current activity from showing through a launching wallpaper
+                    // Fade out the source activity if we are animating to a wallpaper
                     // activity.
                     a = new AlphaAnimation(1, 0);
                 } else {
-                    // noop animation
                     a = new AlphaAnimation(1, 1);
                 }
                 break;
             }
             case THUMBNAIL_TRANSITION_ENTER_SCALE_DOWN: {
-                // Entering the other app, it should just be visible while we scale the thumbnail
-                // down above it
-                a = new AlphaAnimation(1, 1);
+                // Target app window during the scale down
+                if (transit == TRANSIT_WALLPAPER_INTRA_OPEN) {
+                    // Fade in the destination activity if we are animating from a wallpaper
+                    // activity.
+                    a = new AlphaAnimation(0, 1);
+                } else {
+                    a = new AlphaAnimation(1, 1);
+                }
                 break;
             }
             case THUMBNAIL_TRANSITION_EXIT_SCALE_DOWN: {
-                // Exiting the current app, the app should scale down with the thumbnail
+                // App window scaling down from full screen
                 if (orientation == Configuration.ORIENTATION_PORTRAIT) {
                     // In portrait, we scale the width and clip to the top/left square
                     scale = thumbWidth / appWidth;
@@ -612,16 +670,15 @@
                     }
                     mTmpToClipRect.right = (mTmpToClipRect.left + unscaledThumbWidth);
                 }
+                mNextAppTransitionInsets.set(contentInsets);
 
                 Animation scaleAnim = new ScaleAnimation(1, scale, 1, scale,
                         computePivot(mNextAppTransitionStartX, scale),
                         computePivot(mNextAppTransitionStartY, scale));
-                Animation alphaAnim = new AlphaAnimation(1, 1);
                 Animation clipAnim = new ClipRectAnimation(mTmpFromClipRect, mTmpToClipRect);
                 Animation translateAnim = new TranslateAnimation(0, 0, 0, -scaledTopDecor);
 
                 AnimationSet set = new AnimationSet(true);
-                set.addAnimation(alphaAnim);
                 set.addAnimation(clipAnim);
                 set.addAnimation(scaleAnim);
                 set.addAnimation(translateAnim);
@@ -639,6 +696,46 @@
     }
 
     /**
+     * This animation runs for the thumbnail that gets cross faded with the enter/exit activity
+     * when a thumbnail is specified with the activity options.
+     */
+    Animation createThumbnailScaleAnimationLocked(int appWidth, int appHeight, int transit) {
+        Animation a;
+        final int thumbWidthI = mNextAppTransitionThumbnail.getWidth();
+        final float thumbWidth = thumbWidthI > 0 ? thumbWidthI : 1;
+        final int thumbHeightI = mNextAppTransitionThumbnail.getHeight();
+        final float thumbHeight = thumbHeightI > 0 ? thumbHeightI : 1;
+
+        if (mNextAppTransitionScaleUp) {
+            // Animation for the thumbnail zooming from its initial size to the full screen
+            float scaleW = appWidth / thumbWidth;
+            float scaleH = appHeight / thumbHeight;
+            Animation scale = new ScaleAnimation(1, scaleW, 1, scaleH,
+                    computePivot(mNextAppTransitionStartX, 1 / scaleW),
+                    computePivot(mNextAppTransitionStartY, 1 / scaleH));
+            scale.setInterpolator(mDecelerateInterpolator);
+
+            Animation alpha = new AlphaAnimation(1, 0);
+            alpha.setInterpolator(mThumbnailFadeOutInterpolator);
+
+            // This AnimationSet uses the Interpolators assigned above.
+            AnimationSet set = new AnimationSet(false);
+            set.addAnimation(scale);
+            set.addAnimation(alpha);
+            a = set;
+        } else {
+            // Animation for the thumbnail zooming down from the full screen to its final size
+            float scaleW = appWidth / thumbWidth;
+            float scaleH = appHeight / thumbHeight;
+            a = new ScaleAnimation(scaleW, 1, scaleH, 1,
+                    computePivot(mNextAppTransitionStartX, 1 / scaleW),
+                    computePivot(mNextAppTransitionStartY, 1 / scaleH));
+        }
+
+        return prepareThumbnailAnimation(a, appWidth, appHeight, transit);
+    }
+
+    /**
      * This animation is created when we are doing a thumbnail transition, for the activity that is
      * leaving, and the activity that is entering.
      */
@@ -747,12 +844,26 @@
                 mNextAppTransitionType == NEXT_TRANSIT_TYPE_THUMBNAIL_SCALE_DOWN) {
             mNextAppTransitionScaleUp =
                     (mNextAppTransitionType == NEXT_TRANSIT_TYPE_THUMBNAIL_SCALE_UP);
-            a = createAlternateThumbnailEnterExitAnimationLocked(
+            a = createThumbnailEnterExitAnimationLocked(getThumbnailTransitionState(enter),
+                    appWidth, appHeight, transit);
+            if (DEBUG_APP_TRANSITIONS || DEBUG_ANIM) {
+                String animName = mNextAppTransitionScaleUp ?
+                        "ANIM_THUMBNAIL_SCALE_UP" : "ANIM_THUMBNAIL_SCALE_DOWN";
+                Slog.v(TAG, "applyAnimation:"
+                        + " anim=" + a + " nextAppTransition=" + animName
+                        + " transit=" + transit + " isEntrance=" + enter
+                        + " Callers=" + Debug.getCallers(3));
+            }
+        } else if (mNextAppTransitionType == NEXT_TRANSIT_TYPE_THUMBNAIL_ASPECT_SCALE_UP ||
+                mNextAppTransitionType == NEXT_TRANSIT_TYPE_THUMBNAIL_ASPECT_SCALE_DOWN) {
+            mNextAppTransitionScaleUp =
+                    (mNextAppTransitionType == NEXT_TRANSIT_TYPE_THUMBNAIL_ASPECT_SCALE_UP);
+            a = createAspectScaledThumbnailEnterExitAnimationLocked(
                     getThumbnailTransitionState(enter), appWidth, appHeight, orientation,
                     transit, containingFrame, contentInsets, isFullScreen);
             if (DEBUG_APP_TRANSITIONS || DEBUG_ANIM) {
                 String animName = mNextAppTransitionScaleUp ?
-                        "ANIM_THUMBNAIL_SCALE_UP" : "ANIM_THUMBNAIL_SCALE_DOWN";
+                        "ANIM_THUMBNAIL_ASPECT_SCALE_UP" : "ANIM_THUMBNAIL_ASPECT_SCALE_DOWN";
                 Slog.v(TAG, "applyAnimation:"
                         + " anim=" + a + " nextAppTransition=" + animName
                         + " transit=" + transit + " isEntrance=" + enter
@@ -881,6 +992,23 @@
         }
     }
 
+    void overridePendingAppTransitionAspectScaledThumb(Bitmap srcThumb, int startX, int startY,
+            IRemoteCallback startedCallback, boolean scaleUp) {
+        if (isTransitionSet()) {
+            mNextAppTransitionType = scaleUp ? NEXT_TRANSIT_TYPE_THUMBNAIL_ASPECT_SCALE_UP
+                    : NEXT_TRANSIT_TYPE_THUMBNAIL_ASPECT_SCALE_DOWN;
+            mNextAppTransitionPackage = null;
+            mNextAppTransitionThumbnail = srcThumb;
+            mNextAppTransitionScaleUp = scaleUp;
+            mNextAppTransitionStartX = startX;
+            mNextAppTransitionStartY = startY;
+            postAnimationCallback();
+            mNextAppTransitionCallback = startedCallback;
+        } else {
+            postAnimationCallback();
+        }
+    }
+
     @Override
     public String toString() {
         return "mNextAppTransition=0x" + Integer.toHexString(mNextAppTransition);
@@ -966,6 +1094,10 @@
                 return "NEXT_TRANSIT_TYPE_THUMBNAIL_SCALE_UP";
             case NEXT_TRANSIT_TYPE_THUMBNAIL_SCALE_DOWN:
                 return "NEXT_TRANSIT_TYPE_THUMBNAIL_SCALE_DOWN";
+            case NEXT_TRANSIT_TYPE_THUMBNAIL_ASPECT_SCALE_UP:
+                return "NEXT_TRANSIT_TYPE_THUMBNAIL_ASPECT_SCALE_UP";
+            case NEXT_TRANSIT_TYPE_THUMBNAIL_ASPECT_SCALE_DOWN:
+                return "NEXT_TRANSIT_TYPE_THUMBNAIL_ASPECT_SCALE_DOWN";
             default:
                 return "unknown type=" + mNextAppTransitionType;
         }
@@ -998,6 +1130,8 @@
                 break;
             case NEXT_TRANSIT_TYPE_THUMBNAIL_SCALE_UP:
             case NEXT_TRANSIT_TYPE_THUMBNAIL_SCALE_DOWN:
+            case NEXT_TRANSIT_TYPE_THUMBNAIL_ASPECT_SCALE_UP:
+            case NEXT_TRANSIT_TYPE_THUMBNAIL_ASPECT_SCALE_DOWN:
                 pw.print("  mNextAppTransitionThumbnail=");
                         pw.print(mNextAppTransitionThumbnail);
                         pw.print(" mNextAppTransitionStartX=");
diff --git a/services/core/java/com/android/server/wm/AppWindowAnimator.java b/services/core/java/com/android/server/wm/AppWindowAnimator.java
index 5b05d53..ef74205 100644
--- a/services/core/java/com/android/server/wm/AppWindowAnimator.java
+++ b/services/core/java/com/android/server/wm/AppWindowAnimator.java
@@ -64,8 +64,17 @@
     int thumbnailX;
     int thumbnailY;
     int thumbnailLayer;
+    int thumbnailForceAboveLayer;
     Animation thumbnailAnimation;
     final Transformation thumbnailTransformation = new Transformation();
+    // This flag indicates that the destruction of the thumbnail surface is synchronized with
+    // another animation, so do not pre-emptively destroy the thumbnail surface when the animation
+    // completes
+    boolean deferThumbnailDestruction;
+    // This is the thumbnail surface that has been bestowed upon this animator, and when the
+    // surface for this animator's animation is complete, we will destroy the thumbnail surface
+    // as well.  Do not animate or do anything with this surface.
+    SurfaceControl deferredThumbnail;
 
     /** WindowStateAnimator from mAppAnimator.allAppWindows as of last performLayout */
     ArrayList<WindowStateAnimator> mAllAppWinAnimators = new ArrayList<WindowStateAnimator>();
@@ -121,7 +130,9 @@
             animation = null;
             animating = true;
         }
-        clearThumbnail();
+        if (!deferThumbnailDestruction) {
+            clearThumbnail();
+        }
         if (mAppToken.deferClearAllDrawn) {
             mAppToken.allDrawn = false;
             mAppToken.deferClearAllDrawn = false;
@@ -135,6 +146,13 @@
         }
     }
 
+    public void clearDeferredThumbnail() {
+        if (deferredThumbnail != null) {
+            deferredThumbnail.destroy();
+            deferredThumbnail = null;
+        }
+    }
+
     void updateLayers() {
         final int N = mAppToken.allAppWindows.size();
         final int adj = animLayerAdjustment;
@@ -184,10 +202,14 @@
                 + "][" + tmpFloats[Matrix.MSKEW_X]
                 + "," + tmpFloats[Matrix.MSCALE_Y] + "]", null);
         thumbnail.setAlpha(thumbnailTransformation.getAlpha());
-        // The thumbnail is layered below the window immediately above this
-        // token's anim layer.
-        thumbnail.setLayer(thumbnailLayer + WindowManagerService.WINDOW_LAYER_MULTIPLIER
-                - WindowManagerService.LAYER_OFFSET_THUMBNAIL);
+        if (thumbnailForceAboveLayer > 0) {
+            thumbnail.setLayer(thumbnailForceAboveLayer + 1);
+        } else {
+            // The thumbnail is layered below the window immediately above this
+            // token's anim layer.
+            thumbnail.setLayer(thumbnailLayer + WindowManagerService.WINDOW_LAYER_MULTIPLIER
+                    - WindowManagerService.LAYER_OFFSET_THUMBNAIL);
+        }
         thumbnail.setMatrix(tmpFloats[Matrix.MSCALE_X], tmpFloats[Matrix.MSKEW_Y],
                 tmpFloats[Matrix.MSKEW_X], tmpFloats[Matrix.MSCALE_Y]);
     }
@@ -202,7 +224,9 @@
             TAG, "Stepped animation in " + mAppToken + ": more=" + more + ", xform=" + transformation);
         if (!more) {
             animation = null;
-            clearThumbnail();
+            if (!deferThumbnailDestruction) {
+                clearThumbnail();
+            }
             if (WindowManagerService.DEBUG_ANIM) Slog.v(
                 TAG, "Finished animation in " + mAppToken + " @ " + currentTime);
         }
diff --git a/services/core/java/com/android/server/wm/WindowAnimator.java b/services/core/java/com/android/server/wm/WindowAnimator.java
index 4edd5cf..81cd602 100644
--- a/services/core/java/com/android/server/wm/WindowAnimator.java
+++ b/services/core/java/com/android/server/wm/WindowAnimator.java
@@ -248,6 +248,10 @@
 
         mForceHiding = KEYGUARD_NOT_SHOWN;
 
+        final WindowState imeTarget = mService.mInputMethodTarget;
+        final boolean showImeOverKeyguard = imeTarget != null && imeTarget.isVisibleNow() &&
+                (imeTarget.getAttrs().flags & FLAG_SHOW_WHEN_LOCKED) != 0;
+
         for (int i = windows.size() - 1; i >= 0; i--) {
             WindowState win = windows.get(i);
             WindowStateAnimator winAnimator = win.mWinAnimator;
@@ -312,7 +316,8 @@
                             + " hidden=" + win.mRootToken.hidden
                             + " anim=" + win.mWinAnimator.mAnimation);
                 } else if (mPolicy.canBeForceHidden(win, win.mAttrs)) {
-                    final boolean hideWhenLocked = (flags & FLAG_SHOW_WHEN_LOCKED) == 0;
+                    final boolean hideWhenLocked = (flags & FLAG_SHOW_WHEN_LOCKED) == 0 &&
+                            !(win.mIsImWindow && showImeOverKeyguard);
                     final boolean changed;
                     if (((mForceHiding == KEYGUARD_ANIMATING_IN)
                                 && (!winAnimator.isAnimating() || hideWhenLocked))
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 32f3707..e144bde 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -95,7 +95,6 @@
 import android.provider.Settings;
 import android.util.DisplayMetrics;
 import android.util.EventLog;
-import android.util.FloatMath;
 import android.util.Log;
 import android.util.SparseArray;
 import android.util.Pair;
@@ -4038,6 +4037,15 @@
     }
 
     @Override
+    public void overridePendingAppTransitionAspectScaledThumb(Bitmap srcThumb, int startX,
+            int startY, IRemoteCallback startedCallback, boolean scaleUp) {
+        synchronized(mWindowMap) {
+            mAppTransition.overridePendingAppTransitionAspectScaledThumb(srcThumb, startX,
+                    startY, startedCallback, scaleUp);
+        }
+    }
+
+    @Override
     public void executeAppTransition() {
         if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
                 "executeAppTransition()")) {
@@ -8893,7 +8901,9 @@
             }
 
             AppWindowToken topOpeningApp = null;
+            AppWindowToken topClosingApp = null;
             int topOpeningLayer = 0;
+            int topClosingLayer = 0;
 
             NN = mOpeningApps.size();
             for (i=0; i<NN; i++) {
@@ -8901,8 +8911,8 @@
                 final AppWindowAnimator appAnimator = wtoken.mAppAnimator;
                 if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "Now opening app" + wtoken);
                 appAnimator.clearThumbnail();
-                wtoken.inPendingTransaction = false;
                 appAnimator.animation = null;
+                wtoken.inPendingTransaction = false;
                 setTokenVisibilityLocked(wtoken, animLp, true, transit, false, voiceInteraction);
                 wtoken.updateReportedVisibilityLocked();
                 wtoken.waitingToShow = false;
@@ -8931,10 +8941,11 @@
             NN = mClosingApps.size();
             for (i=0; i<NN; i++) {
                 AppWindowToken wtoken = mClosingApps.valueAt(i);
+                final AppWindowAnimator appAnimator = wtoken.mAppAnimator;
                 if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "Now closing app " + wtoken);
-                wtoken.mAppAnimator.clearThumbnail();
+                appAnimator.clearThumbnail();
+                appAnimator.animation = null;
                 wtoken.inPendingTransaction = false;
-                wtoken.mAppAnimator.animation = null;
                 setTokenVisibilityLocked(wtoken, animLp, false, transit, false, voiceInteraction);
                 wtoken.updateReportedVisibilityLocked();
                 wtoken.waitingToHide = false;
@@ -8943,14 +8954,30 @@
                 // gotten drawn.
                 wtoken.allDrawn = true;
                 wtoken.deferClearAllDrawn = false;
+
+                if (animLp != null) {
+                    int layer = -1;
+                    for (int j=0; j<wtoken.windows.size(); j++) {
+                        WindowState win = wtoken.windows.get(j);
+                        if (win.mWinAnimator.mAnimLayer > layer) {
+                            layer = win.mWinAnimator.mAnimLayer;
+                        }
+                    }
+                    if (topClosingApp == null || layer > topClosingLayer) {
+                        topClosingApp = wtoken;
+                        topClosingLayer = layer;
+                    }
+                }
             }
 
-            boolean useAlternateThumbnailAnimation = true;
-            AppWindowAnimator appAnimator =
-                    topOpeningApp == null ? null : topOpeningApp.mAppAnimator;
+            AppWindowAnimator openingAppAnimator = (topOpeningApp == null) ? null :
+                    topOpeningApp.mAppAnimator;
+            AppWindowAnimator closingAppAnimator = (topClosingApp == null) ? null :
+                    topClosingApp.mAppAnimator;
             Bitmap nextAppTransitionThumbnail = mAppTransition.getNextAppTransitionThumbnail();
-            if (!useAlternateThumbnailAnimation && nextAppTransitionThumbnail != null
-                    && appAnimator != null && appAnimator.animation != null) {
+            if (nextAppTransitionThumbnail != null
+                    && openingAppAnimator != null && openingAppAnimator.animation != null &&
+                    nextAppTransitionThumbnail.getConfig() != Config.ALPHA_8) {
                 // This thumbnail animation is very special, we need to have
                 // an extra surface with the thumbnail included with the animation.
                 Rect dirty = new Rect(0, 0, nextAppTransitionThumbnail.getWidth(),
@@ -8959,34 +8986,61 @@
                     // TODO(multi-display): support other displays
                     final DisplayContent displayContent = getDefaultDisplayContentLocked();
                     final Display display = displayContent.getDisplay();
+                    final DisplayInfo displayInfo = displayContent.getDisplayInfo();
+
+                    // Create a new surface for the thumbnail
                     SurfaceControl surfaceControl = new SurfaceControl(mFxSession,
-                            "thumbnail anim",
-                            dirty.width(), dirty.height(),
+                            "thumbnail anim", dirty.width(), dirty.height(),
                             PixelFormat.TRANSLUCENT, SurfaceControl.HIDDEN);
                     surfaceControl.setLayerStack(display.getLayerStack());
-                    appAnimator.thumbnail = surfaceControl;
-                    if (SHOW_TRANSACTIONS) Slog.i(TAG, "  THUMBNAIL " + surfaceControl + ": CREATE");
+                    if (SHOW_TRANSACTIONS) {
+                        Slog.i(TAG, "  THUMBNAIL " + surfaceControl + ": CREATE");
+                    }
+
+                    // Draw the thumbnail onto the surface
                     Surface drawSurface = new Surface();
                     drawSurface.copyFrom(surfaceControl);
                     Canvas c = drawSurface.lockCanvas(dirty);
                     c.drawBitmap(nextAppTransitionThumbnail, 0, 0, null);
                     drawSurface.unlockCanvasAndPost(c);
                     drawSurface.release();
-                    appAnimator.thumbnailLayer = topOpeningLayer;
-                    DisplayInfo displayInfo = getDefaultDisplayInfoLocked();
-                    Animation anim = mAppTransition.createThumbnailScaleAnimationLocked(
-                            displayInfo.appWidth, displayInfo.appHeight, transit);
-                    appAnimator.thumbnailAnimation = anim;
+
+                    // Get the thumbnail animation
+                    Animation anim;
+                    if (mAppTransition.isNextThumbnailTransitionAspectScaled()) {
+                        // For the new aspect-scaled transition, we want it to always show
+                        // above the animating opening/closing window, and we want to
+                        // synchronize its thumbnail surface with the surface for the
+                        // open/close animation (only on the way down)
+                        anim = mAppTransition.createThumbnailAspectScaleAnimationLocked(
+                                displayInfo.appWidth, displayInfo.appHeight,
+                                displayInfo.logicalWidth, transit);
+                        openingAppAnimator.thumbnailForceAboveLayer = Math.max(topOpeningLayer,
+                                topClosingLayer);
+                        openingAppAnimator.deferThumbnailDestruction =
+                                !mAppTransition.isNextThumbnailTransitionScaleUp();
+                        if (openingAppAnimator.deferThumbnailDestruction) {
+                            if (closingAppAnimator != null &&
+                                    closingAppAnimator.animation != null) {
+                                closingAppAnimator.deferredThumbnail = surfaceControl;
+                            }
+                        }
+                    } else {
+                        anim = mAppTransition.createThumbnailScaleAnimationLocked(
+                                displayInfo.appWidth, displayInfo.appHeight, transit);
+                    }
                     anim.restrictDuration(MAX_ANIMATION_DURATION);
                     anim.scaleCurrentDuration(getTransitionAnimationScaleLocked());
-                    Point p = new Point();
-                    mAppTransition.getStartingPoint(p);
-                    appAnimator.thumbnailX = p.x;
-                    appAnimator.thumbnailY = p.y;
+
+                    openingAppAnimator.thumbnail = surfaceControl;
+                    openingAppAnimator.thumbnailLayer = topOpeningLayer;
+                    openingAppAnimator.thumbnailAnimation = anim;
+                    openingAppAnimator.thumbnailX = mAppTransition.getStartingX();
+                    openingAppAnimator.thumbnailY = mAppTransition.getStartingY();
                 } catch (OutOfResourcesException e) {
                     Slog.e(TAG, "Can't allocate thumbnail/Canvas surface w=" + dirty.width()
                             + " h=" + dirty.height(), e);
-                    appAnimator.clearThumbnail();
+                    openingAppAnimator.clearThumbnail();
                 }
             }
 
diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java
index 7bf090a..38433ae 100644
--- a/services/core/java/com/android/server/wm/WindowStateAnimator.java
+++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java
@@ -902,6 +902,11 @@
             mWin.mHasSurface = false;
             mDrawState = NO_SURFACE;
         }
+
+        // Destroy any deferred thumbnail surfaces
+        if (mAppAnimator != null) {
+            mAppAnimator.clearDeferredThumbnail();
+        }
     }
 
     void destroyDeferredSurfaceLocked() {
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index a3c10fd..0f2aabc 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -132,8 +132,6 @@
             "com.android.server.usb.UsbService$Lifecycle";
     private static final String WIFI_SERVICE_CLASS =
             "com.android.server.wifi.WifiService";
-    private static final String WIFI_PASSPOINT_SERVICE_CLASS =
-            "com.android.server.wifi.passpoint.WifiPasspointService";
     private static final String WIFI_P2P_SERVICE_CLASS =
             "com.android.server.wifi.p2p.WifiP2pService";
     private static final String ETHERNET_SERVICE_CLASS =
@@ -665,7 +663,6 @@
                 }
 
                 mSystemServiceManager.startService(WIFI_P2P_SERVICE_CLASS);
-                mSystemServiceManager.startService(WIFI_PASSPOINT_SERVICE_CLASS);
                 mSystemServiceManager.startService(WIFI_SERVICE_CLASS);
                 mSystemServiceManager.startService(
                             "com.android.server.wifi.WifiScanningService");
diff --git a/services/print/java/com/android/server/print/PrintManagerService.java b/services/print/java/com/android/server/print/PrintManagerService.java
index 6a56de0..ce91f3d 100644
--- a/services/print/java/com/android/server/print/PrintManagerService.java
+++ b/services/print/java/com/android/server/print/PrintManagerService.java
@@ -17,14 +17,14 @@
 package com.android.server.print;
 
 import android.Manifest;
+import android.app.ActivityManager;
+import android.app.ActivityManagerNative;
 import android.app.Notification;
 import android.app.NotificationManager;
 import android.app.PendingIntent;
-import android.content.BroadcastReceiver;
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
-import android.content.IntentFilter;
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
 import android.content.pm.ServiceInfo;
@@ -81,10 +81,13 @@
     }
 
     @Override
-    public void onBootPhase(int phase) {
-        if (phase == PHASE_THIRD_PARTY_APPS_CAN_START) {
-            mPrintManagerImpl.systemRunning();
-        }
+    public void onStartUser(int userHandle) {
+        mPrintManagerImpl.handleUserStarted(userHandle);
+    }
+
+    @Override
+    public void onStopUser(int userHandle) {
+        mPrintManagerImpl.handleUserStopped(userHandle);
     }
 
     class PrintManagerImpl extends IPrintManager.Stub {
@@ -101,9 +104,7 @@
 
         private final UserManager mUserManager;
 
-        private final SparseArray<UserState> mUserStates = new SparseArray<UserState>();
-
-        private int mCurrentUserId = UserHandle.USER_OWNER;
+        private final SparseArray<UserState> mUserStates = new SparseArray<>();
 
         PrintManagerImpl(Context context) {
             mContext = context;
@@ -112,22 +113,6 @@
             registerBroadcastReceivers();
         }
 
-        public void systemRunning() {
-            BackgroundThread.getHandler().post(new Runnable() {
-                @Override
-                public void run() {
-                    final UserState userState;
-                    synchronized (mLock) {
-                        userState = getCurrentUserStateLocked();
-                    }
-                    // This is the first time we switch to this user after boot, so
-                    // now is the time to remove obsolete print jobs since they
-                    // are from the last boot and no application would query them.
-                    userState.removeObsoletePrintJobs();
-                }
-            });
-        }
-
         @Override
         public Bundle print(String printJobName, IPrintDocumentAdapter adapter,
                 PrintAttributes attributes, String packageName, int appId, int userId) {
@@ -137,7 +122,7 @@
             final String resolvedPackageName;
             synchronized (mLock) {
                 // Only the current group members can start new print jobs.
-                if (resolveCallingProfileParentLocked(resolvedUserId) != mCurrentUserId) {
+                if (resolveCallingProfileParentLocked(resolvedUserId) != getCurrentUserId()) {
                     return null;
                 }
                 resolvedAppId = resolveCallingAppEnforcingPermissions(appId);
@@ -160,7 +145,7 @@
             final UserState userState;
             synchronized (mLock) {
                 // Only the current group members can query for state of print jobs.
-                if (resolveCallingProfileParentLocked(resolvedUserId) != mCurrentUserId) {
+                if (resolveCallingProfileParentLocked(resolvedUserId) != getCurrentUserId()) {
                     return null;
                 }
                 resolvedAppId = resolveCallingAppEnforcingPermissions(appId);
@@ -181,7 +166,7 @@
             final UserState userState;
             synchronized (mLock) {
                 // Only the current group members can query for state of a print job.
-                if (resolveCallingProfileParentLocked(resolvedUserId) != mCurrentUserId) {
+                if (resolveCallingProfileParentLocked(resolvedUserId) != getCurrentUserId()) {
                     return null;
                 }
                 resolvedAppId = resolveCallingAppEnforcingPermissions(appId);
@@ -202,7 +187,7 @@
             final UserState userState;
             synchronized (mLock) {
                 // Only the current group members can cancel a print job.
-                if (resolveCallingProfileParentLocked(resolvedUserId) != mCurrentUserId) {
+                if (resolveCallingProfileParentLocked(resolvedUserId) != getCurrentUserId()) {
                     return;
                 }
                 resolvedAppId = resolveCallingAppEnforcingPermissions(appId);
@@ -223,7 +208,7 @@
             final UserState userState;
             synchronized (mLock) {
                 // Only the current group members can restart a print job.
-                if (resolveCallingProfileParentLocked(resolvedUserId) != mCurrentUserId) {
+                if (resolveCallingProfileParentLocked(resolvedUserId) != getCurrentUserId()) {
                     return;
                 }
                 resolvedAppId = resolveCallingAppEnforcingPermissions(appId);
@@ -243,7 +228,7 @@
             final UserState userState;
             synchronized (mLock) {
                 // Only the current group members can get enabled services.
-                if (resolveCallingProfileParentLocked(resolvedUserId) != mCurrentUserId) {
+                if (resolveCallingProfileParentLocked(resolvedUserId) != getCurrentUserId()) {
                     return null;
                 }
                 userState = getOrCreateUserStateLocked(resolvedUserId);
@@ -262,7 +247,7 @@
             final UserState userState;
             synchronized (mLock) {
                 // Only the current group members can get installed services.
-                if (resolveCallingProfileParentLocked(resolvedUserId) != mCurrentUserId) {
+                if (resolveCallingProfileParentLocked(resolvedUserId) != getCurrentUserId()) {
                     return null;
                 }
                 userState = getOrCreateUserStateLocked(resolvedUserId);
@@ -282,7 +267,7 @@
             final UserState userState;
             synchronized (mLock) {
                 // Only the current group members can create a discovery session.
-                if (resolveCallingProfileParentLocked(resolvedUserId) != mCurrentUserId) {
+                if (resolveCallingProfileParentLocked(resolvedUserId) != getCurrentUserId()) {
                     return;
                 }
                 userState = getOrCreateUserStateLocked(resolvedUserId);
@@ -302,7 +287,7 @@
             final UserState userState;
             synchronized (mLock) {
                 // Only the current group members can destroy a discovery session.
-                if (resolveCallingProfileParentLocked(resolvedUserId) != mCurrentUserId) {
+                if (resolveCallingProfileParentLocked(resolvedUserId) != getCurrentUserId()) {
                     return;
                 }
                 userState = getOrCreateUserStateLocked(resolvedUserId);
@@ -322,7 +307,7 @@
             final UserState userState;
             synchronized (mLock) {
                 // Only the current group members can start discovery.
-                if (resolveCallingProfileParentLocked(resolvedUserId) != mCurrentUserId) {
+                if (resolveCallingProfileParentLocked(resolvedUserId) != getCurrentUserId()) {
                     return;
                 }
                 userState = getOrCreateUserStateLocked(resolvedUserId);
@@ -341,7 +326,7 @@
             final UserState userState;
             synchronized (mLock) {
                 // Only the current group members can stop discovery.
-                if (resolveCallingProfileParentLocked(resolvedUserId) != mCurrentUserId) {
+                if (resolveCallingProfileParentLocked(resolvedUserId) != getCurrentUserId()) {
                     return;
                 }
                 userState = getOrCreateUserStateLocked(resolvedUserId);
@@ -360,7 +345,7 @@
             final UserState userState;
             synchronized (mLock) {
                 // Only the current group members can validate printers.
-                if (resolveCallingProfileParentLocked(resolvedUserId) != mCurrentUserId) {
+                if (resolveCallingProfileParentLocked(resolvedUserId) != getCurrentUserId()) {
                     return;
                 }
                 userState = getOrCreateUserStateLocked(resolvedUserId);
@@ -379,7 +364,7 @@
             final UserState userState;
             synchronized (mLock) {
                 // Only the current group members can start printer tracking.
-                if (resolveCallingProfileParentLocked(resolvedUserId) != mCurrentUserId) {
+                if (resolveCallingProfileParentLocked(resolvedUserId) != getCurrentUserId()) {
                     return;
                 }
                 userState = getOrCreateUserStateLocked(resolvedUserId);
@@ -398,7 +383,7 @@
             final UserState userState;
             synchronized (mLock) {
                 // Only the current group members can stop printer tracking.
-                if (resolveCallingProfileParentLocked(resolvedUserId) != mCurrentUserId) {
+                if (resolveCallingProfileParentLocked(resolvedUserId) != getCurrentUserId()) {
                     return;
                 }
                 userState = getOrCreateUserStateLocked(resolvedUserId);
@@ -419,7 +404,7 @@
             final UserState userState;
             synchronized (mLock) {
                 // Only the current group members can add a print job listener.
-                if (resolveCallingProfileParentLocked(resolvedUserId) != mCurrentUserId) {
+                if (resolveCallingProfileParentLocked(resolvedUserId) != getCurrentUserId()) {
                     return;
                 }
                 resolvedAppId = resolveCallingAppEnforcingPermissions(appId);
@@ -440,7 +425,7 @@
             final UserState userState;
             synchronized (mLock) {
                 // Only the current group members can remove a print job listener.
-                if (resolveCallingProfileParentLocked(resolvedUserId) != mCurrentUserId) {
+                if (resolveCallingProfileParentLocked(resolvedUserId) != getCurrentUserId()) {
                     return;
                 }
                 userState = getOrCreateUserStateLocked(resolvedUserId);
@@ -484,11 +469,19 @@
                     Settings.Secure.ENABLED_PRINT_SERVICES);
             ContentObserver observer = new ContentObserver(BackgroundThread.getHandler()) {
                 @Override
-                public void onChange(boolean selfChange, Uri uri) {
+                public void onChange(boolean selfChange, Uri uri, int userId) {
                     if (enabledPrintServicesUri.equals(uri)) {
                         synchronized (mLock) {
-                            UserState userState = getCurrentUserStateLocked();
-                            userState.updateIfNeededLocked();
+                            if (userId != UserHandle.USER_ALL) {
+                                UserState userState = getOrCreateUserStateLocked(userId);
+                                userState.updateIfNeededLocked();
+                            } else {
+                                final int userCount = mUserStates.size();
+                                for (int i = 0; i < userCount; i++) {
+                                    UserState userState = mUserStates.valueAt(i);
+                                    userState.updateIfNeededLocked();
+                                }
+                            }
                         }
                     }
                 }
@@ -622,27 +615,6 @@
             // package changes
             monitor.register(mContext, BackgroundThread.getHandler().getLooper(),
                     UserHandle.ALL, true);
-
-            // user changes
-            IntentFilter intentFilter = new IntentFilter();
-            intentFilter.addAction(Intent.ACTION_USER_SWITCHED);
-            intentFilter.addAction(Intent.ACTION_USER_REMOVED);
-
-            mContext.registerReceiverAsUser(new BroadcastReceiver() {
-                @Override
-                public void onReceive(Context context, Intent intent) {
-                    String action = intent.getAction();
-                    if (Intent.ACTION_USER_SWITCHED.equals(action)) {
-                        switchUser(intent.getIntExtra(Intent.EXTRA_USER_HANDLE, 0));
-                    } else if (Intent.ACTION_USER_REMOVED.equals(action)) {
-                        removeUser(intent.getIntExtra(Intent.EXTRA_USER_HANDLE, 0));
-                    }
-                }
-            }, UserHandle.ALL, intentFilter, null, BackgroundThread.getHandler());
-        }
-
-        private UserState getCurrentUserStateLocked() {
-            return getOrCreateUserStateLocked(mCurrentUserId);
         }
 
         private UserState getOrCreateUserStateLocked(int userId) {
@@ -654,20 +626,11 @@
             return userState;
         }
 
-        private void switchUser(int newUserId) {
+        private void handleUserStarted(int userId) {
             UserState userState;
             synchronized (mLock) {
-                if (newUserId == mCurrentUserId) {
-                    return;
-                }
-                mCurrentUserId = newUserId;
-                userState = mUserStates.get(mCurrentUserId);
-                if (userState == null) {
-                    userState = getCurrentUserStateLocked();
-                    userState.updateIfNeededLocked();
-                } else {
-                    userState.updateIfNeededLocked();
-                }
+                userState = getOrCreateUserStateLocked(userId);
+                userState.updateIfNeededLocked();
             }
             // This is the first time we switch to this user after boot, so
             // now is the time to remove obsolete print jobs since they
@@ -675,18 +638,18 @@
             userState.removeObsoletePrintJobs();
         }
 
-        private void removeUser(int removedUserId) {
+        private void handleUserStopped(int userId) {
             synchronized (mLock) {
-                UserState userState = mUserStates.get(removedUserId);
+                UserState userState = mUserStates.get(userId);
                 if (userState != null) {
                     userState.destroyLocked();
-                    mUserStates.remove(removedUserId);
+                    mUserStates.remove(userId);
                 }
             }
         }
 
         private int resolveCallingProfileParentLocked(int userId) {
-            if (userId != mCurrentUserId) {
+            if (userId != getCurrentUserId()) {
                 final long identity = Binder.clearCallingIdentity();
                 try {
                     UserInfo parent = mUserManager.getProfileParent(userId);
@@ -723,28 +686,11 @@
         }
 
         private int resolveCallingUserEnforcingPermissions(int userId) {
-            final int callingUid = Binder.getCallingUid();
-            if (callingUid == 0 || callingUid == Process.SYSTEM_UID
-                    || callingUid == Process.SHELL_UID) {
-                return userId;
-            }
-            final int callingUserId = UserHandle.getUserId(callingUid);
-            if (callingUserId == userId) {
-                return userId;
-            }
-            if (mContext.checkCallingPermission(Manifest.permission.INTERACT_ACROSS_USERS_FULL)
-                    != PackageManager.PERMISSION_GRANTED
-                &&  mContext.checkCallingPermission(Manifest.permission.INTERACT_ACROSS_USERS)
-                    != PackageManager.PERMISSION_GRANTED) {
-                if (userId == UserHandle.USER_CURRENT_OR_SELF) {
-                    return callingUserId;
-                }
-                throw new SecurityException("Call from user " + callingUserId + " as user "
-                    + userId + " without permission INTERACT_ACROSS_USERS or "
-                    + "INTERACT_ACROSS_USERS_FULL not allowed.");
-            }
-            if (userId == UserHandle.USER_CURRENT || userId == UserHandle.USER_CURRENT_OR_SELF) {
-                return mCurrentUserId;
+            try {
+                return ActivityManagerNative.getDefault().handleIncomingUser(Binder.getCallingPid(),
+                        Binder.getCallingUid(), userId, true, true, "", null);
+            } catch (RemoteException re) {
+                // Shouldn't happen, local.
             }
             return userId;
         }
@@ -764,6 +710,15 @@
             return null;
         }
 
+        private int getCurrentUserId () {
+            final long identity = Binder.clearCallingIdentity();
+            try {
+                return ActivityManager.getCurrentUser();
+            } finally {
+                Binder.restoreCallingIdentity(identity);
+            }
+        }
+
         private void showEnableInstalledPrintServiceNotification(ComponentName component,
                 String label, int userId) {
             UserHandle userHandle = new UserHandle(userId);
diff --git a/services/usage/java/com/android/server/usage/IntervalStats.java b/services/usage/java/com/android/server/usage/IntervalStats.java
index 43027ad..dc036e2 100644
--- a/services/usage/java/com/android/server/usage/IntervalStats.java
+++ b/services/usage/java/com/android/server/usage/IntervalStats.java
@@ -18,8 +18,8 @@
 import android.app.usage.TimeSparseArray;
 import android.app.usage.UsageEvents;
 import android.app.usage.UsageStats;
-import android.content.ComponentName;
 import android.util.ArrayMap;
+import android.util.ArraySet;
 
 class IntervalStats {
     public long beginTime;
@@ -28,10 +28,11 @@
     public final ArrayMap<String, UsageStats> stats = new ArrayMap<>();
     public TimeSparseArray<UsageEvents.Event> events;
 
-    // Maps flattened string representations of component names to ComponentName.
-    // This helps save memory from using many duplicate ComponentNames and
-    // parse time when reading XML.
-    private final ArrayMap<String, ComponentName> mComponentNames = new ArrayMap<>();
+    // A string cache. This is important as when we're parsing XML files, we don't want to
+    // keep hundreds of strings that have the same contents. We will read the string
+    // and only keep it if it's not in the cache. The GC will take care of the
+    // strings that had identical copies in the cache.
+    private final ArraySet<String> mStringCache = new ArraySet<>();
 
     UsageStats getOrCreateUsageStats(String packageName) {
         UsageStats usageStats = stats.get(packageName);
@@ -63,19 +64,21 @@
         endTime = timeStamp;
     }
 
-    /**
-     * Return a ComponentName for the given string representation. This will use a cached
-     * copy of the ComponentName if possible, otherwise it will parse and add it to the
-     * internal cache.
-     */
-    ComponentName getCachedComponentName(String str) {
-        ComponentName name = mComponentNames.get(str);
-        if (name == null) {
-            name = ComponentName.unflattenFromString(str);
-            if (name != null) {
-                mComponentNames.put(str, name);
-            }
+    private String getCachedStringRef(String str) {
+        final int index = mStringCache.indexOf(str);
+        if (index < 0) {
+            mStringCache.add(str);
+            return str;
         }
-        return name;
+        return mStringCache.valueAt(index);
+    }
+
+    UsageEvents.Event buildEvent(String packageName, String className) {
+        UsageEvents.Event event = new UsageEvents.Event();
+        event.mPackage = getCachedStringRef(packageName);
+        if (className != null) {
+            event.mClass = getCachedStringRef(className);
+        }
+        return event;
     }
 }
diff --git a/services/usage/java/com/android/server/usage/UsageStatsService.java b/services/usage/java/com/android/server/usage/UsageStatsService.java
index 82e837d..0e8b427 100644
--- a/services/usage/java/com/android/server/usage/UsageStatsService.java
+++ b/services/usage/java/com/android/server/usage/UsageStatsService.java
@@ -354,7 +354,8 @@
             }
 
             UsageEvents.Event event = new UsageEvents.Event();
-            event.mComponent = component;
+            event.mPackage = component.getPackageName();
+            event.mClass = component.getClassName();
             event.mTimeStamp = timeStamp;
             event.mEventType = eventType;
             mHandler.obtainMessage(MSG_REPORT_EVENT, userId, 0, event).sendToTarget();
diff --git a/services/usage/java/com/android/server/usage/UsageStatsXmlV1.java b/services/usage/java/com/android/server/usage/UsageStatsXmlV1.java
index 916601b..374429a 100644
--- a/services/usage/java/com/android/server/usage/UsageStatsXmlV1.java
+++ b/services/usage/java/com/android/server/usage/UsageStatsXmlV1.java
@@ -37,6 +37,8 @@
     private static final String END_TIME_ATTR = "endTime";
     private static final String PACKAGE_TAG = "package";
     private static final String NAME_ATTR = "name";
+    private static final String PACKAGE_ATTR = "package";
+    private static final String CLASS_ATTR = "class";
     private static final String TOTAL_TIME_ACTIVE_ATTR = "totalTimeActive";
     private static final String LAST_TIME_ACTIVE_ATTR = "lastTimeActive";
     private static final String LAST_EVENT_ATTR = "lastEvent";
@@ -80,18 +82,27 @@
             return null;
         }
 
-        final String componentName = XmlUtils.readStringAttribute(parser, NAME_ATTR);
-        if (componentName == null) {
-            throw new ProtocolException("no " + NAME_ATTR + " attribute present");
+        String packageName = XmlUtils.readStringAttribute(parser, PACKAGE_ATTR);
+        String className;
+        if (packageName == null) {
+            // Try getting the component name if it exists.
+            final String componentName = XmlUtils.readStringAttribute(parser, NAME_ATTR);
+            if (componentName == null) {
+                throw new ProtocolException("no " + NAME_ATTR + " or " + PACKAGE_ATTR +
+                        " attribute present");
+            }
+            ComponentName component = ComponentName.unflattenFromString(componentName);
+            if (component == null) {
+                throw new ProtocolException("ComponentName " + componentName + " is invalid");
+            }
+
+            packageName = component.getPackageName();
+            className = component.getClassName();
+        } else {
+            className = XmlUtils.readStringAttribute(parser, CLASS_ATTR);
         }
 
-        ComponentName component = statsOut.getCachedComponentName(componentName);
-        if (component == null) {
-            throw new ProtocolException("ComponentName " + componentName + " is invalid");
-        }
-
-        UsageEvents.Event event = new UsageEvents.Event();
-        event.mComponent = component;
+        UsageEvents.Event event = statsOut.buildEvent(packageName, className);
         event.mEventType = XmlUtils.readIntAttribute(parser, TYPE_ATTR);
         event.mTimeStamp = XmlUtils.readLongAttribute(parser, TIME_ATTR);
         XmlUtils.skipCurrentTag(parser);
@@ -112,7 +123,10 @@
     private static void writeEvent(FastXmlSerializer serializer, UsageEvents.Event event)
             throws IOException {
         serializer.startTag(null, EVENT_LOG_TAG);
-        serializer.attribute(null, NAME_ATTR, event.getComponent().flattenToString());
+        serializer.attribute(null, PACKAGE_ATTR, event.mPackage);
+        if (event.mClass != null) {
+            serializer.attribute(null, CLASS_ATTR, event.mClass);
+        }
         serializer.attribute(null, TYPE_ATTR, Integer.toString(event.getEventType()));
         serializer.attribute(null, TIME_ATTR, Long.toString(event.getTimeStamp()));
         serializer.endTag(null, EVENT_LOG_TAG);
diff --git a/services/usage/java/com/android/server/usage/UserUsageStatsService.java b/services/usage/java/com/android/server/usage/UserUsageStatsService.java
index e489fb3..6951590 100644
--- a/services/usage/java/com/android/server/usage/UserUsageStatsService.java
+++ b/services/usage/java/com/android/server/usage/UserUsageStatsService.java
@@ -20,7 +20,6 @@
 import android.app.usage.UsageEvents;
 import android.app.usage.UsageStats;
 import android.app.usage.UsageStatsManager;
-import android.content.ComponentName;
 import android.util.ArraySet;
 import android.util.Slog;
 
@@ -114,7 +113,7 @@
 
     void reportEvent(UsageEvents.Event event) {
         if (DEBUG) {
-            Slog.d(TAG, mLogPrefix + "Got usage event for " + event.getComponent().getPackageName()
+            Slog.d(TAG, mLogPrefix + "Got usage event for " + event.mPackage
                     + "[" + event.getTimeStamp() + "]: "
                     + eventToString(event.getEventType()));
         }
@@ -130,7 +129,7 @@
         mCurrentStats[UsageStatsManager.INTERVAL_DAILY].events.put(event.getTimeStamp(), event);
 
         for (IntervalStats stats : mCurrentStats) {
-            stats.update(event.getComponent().getPackageName(), event.getTimeStamp(),
+            stats.update(event.mPackage, event.getTimeStamp(),
                     event.getEventType());
         }
 
@@ -203,17 +202,21 @@
                 return null;
             }
 
-            ArraySet<ComponentName> names = new ArraySet<>();
+            ArraySet<String> names = new ArraySet<>();
             ArrayList<UsageEvents.Event> results = new ArrayList<>();
             final int size = events.size();
             for (int i = startIndex; i < size; i++) {
                 if (events.keyAt(i) >= endTime) {
                     break;
                 }
-                names.add(events.valueAt(i).getComponent());
-                results.add(events.valueAt(i));
+                final UsageEvents.Event event = events.valueAt(i);
+                names.add(event.mPackage);
+                if (event.mClass != null) {
+                    names.add(event.mClass);
+                }
+                results.add(event);
             }
-            ComponentName[] table = names.toArray(new ComponentName[names.size()]);
+            String[] table = names.toArray(new String[names.size()]);
             Arrays.sort(table);
             return new UsageEvents(results, table);
         }
diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
index c0e536a..b36b611 100644
--- a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
+++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
@@ -253,7 +253,7 @@
             intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
             return mAm.startVoiceActivity(mComponent.getPackageName(), callingPid, callingUid,
                     intent, resolvedType, mActiveSession.mSession, mActiveSession.mInteractor,
-                    0, null, null, null, mUser);
+                    0, null, null, mUser);
         } catch (RemoteException e) {
             throw new IllegalStateException("Unexpected remote error", e);
         }
diff --git a/telecomm/java/android/telecomm/RemoteConnection.java b/telecomm/java/android/telecomm/RemoteConnection.java
index 20d1574..8c86b15 100644
--- a/telecomm/java/android/telecomm/RemoteConnection.java
+++ b/telecomm/java/android/telecomm/RemoteConnection.java
@@ -298,7 +298,7 @@
      * @return The children of this {@code RemoteConnection} if this {@code RemoteConnection} is
      * a conference, or an empty {@code List} otherwise.
      */
-    public List<RemoteConnection> getChildren() { return null; }
+    public List<RemoteConnection> getChildren() { return new ArrayList<>(); }
 
     /**
      * Obtains the state of this {@code RemoteConnection}.
diff --git a/telecomm/java/android/telecomm/TelecommManager.java b/telecomm/java/android/telecomm/TelecommManager.java
index 178a25f..868282f 100644
--- a/telecomm/java/android/telecomm/TelecommManager.java
+++ b/telecomm/java/android/telecomm/TelecommManager.java
@@ -24,6 +24,7 @@
 
 import com.android.internal.telecomm.ITelecommService;
 
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -298,7 +299,7 @@
         } catch (RemoteException e) {
             Log.e(TAG, "Error calling ITelecommService#getOutgoingPhoneAccounts", e);
         }
-        return null;
+        return new ArrayList<>();
     }
 
     /**
diff --git a/telephony/java/com/android/ims/internal/IImsCallSession.aidl b/telephony/java/com/android/ims/internal/IImsCallSession.aidl
index ba4cb01..98b2d8a9 100644
--- a/telephony/java/com/android/ims/internal/IImsCallSession.aidl
+++ b/telephony/java/com/android/ims/internal/IImsCallSession.aidl
@@ -16,6 +16,7 @@
 
 package com.android.ims.internal;
 
+import android.os.Message;
 import com.android.ims.ImsCallProfile;
 import com.android.ims.ImsStreamMediaProfile;
 import com.android.ims.internal.IImsCallSessionListener;
@@ -206,10 +207,10 @@
      * event 0 ~ 9 maps to decimal value 0 ~ 9, '*' to 10, '#' to 11, event 'A' ~ 'D' to 12 ~ 15,
      * and event flash to 16. Currently, event flash is not supported.
      *
-     * @param code the DTMF to send. Value 0 to 15 (inclusive) are valid inputs.
-     * @param duration the interval in milli-seconds between the DTMFs
+     * @param c the DTMF to send. '0' ~ '9', 'A' ~ 'D', '*', '#' are valid inputs.
+     * @param result.
      */
-    void sendDtmf(int code, int duration);
+    void sendDtmf(char c, in Message result);
 
     /**
      * Sends an USSD message.
diff --git a/telephony/java/com/android/internal/telephony/TelephonyIntents.java b/telephony/java/com/android/internal/telephony/TelephonyIntents.java
index 5954947..85ceefd 100644
--- a/telephony/java/com/android/internal/telephony/TelephonyIntents.java
+++ b/telephony/java/com/android/internal/telephony/TelephonyIntents.java
@@ -266,7 +266,7 @@
 
     /**
      * Activity Action: Start this activity to invoke the carrier setup app.
-     * To filter the intent, see {@link #CATEGORY_MCCMNC_PREFIX}.
+     * The carrier app must be signed using a certificate that matches the UICC access rules.
      *
      * <p class="note">Callers of this should hold the android.permission.INVOKE_CARRIER_SETUP
      * permission.</p>
@@ -274,13 +274,6 @@
     public static final String ACTION_CARRIER_SETUP = "android.intent.action.ACTION_CARRIER_SETUP";
 
     /**
-     * A <em>prefix</em> for the MCC/MNC filtering used with {@link #ACTION_CARRIER_SETUP}.
-     * The MCC/MNC will be concatenated (zero-padded to 3 digits each) to create a final
-     * string of the form: {@code android.intent.category.MCCMNC_310260}
-     */
-    public static final String CATEGORY_MCCMNC_PREFIX = "android.intent.category.MCCMNC_";
-
-    /**
      * Broadcast Action: A "secret code" has been entered in the dialer. Secret codes are
      * of the form {@code *#*#<code>#*#*}. The intent will have the data URI:
      *
diff --git a/tests/ActivityTests/AndroidManifest.xml b/tests/ActivityTests/AndroidManifest.xml
index c0898d30..3fb547d 100644
--- a/tests/ActivityTests/AndroidManifest.xml
+++ b/tests/ActivityTests/AndroidManifest.xml
@@ -31,6 +31,11 @@
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
+        <activity android:name="SpamActivity" android:label="Spam!"
+                android:documentLaunchMode="always">
+        </activity>
+        <activity android:name="DocActivity" android:label="Some doc">
+        </activity>
         <service android:name="SingleUserService"
             android:singleUser="true" android:exported="true">
         </service>
diff --git a/tests/ActivityTests/src/com/google/android/test/activity/ActivityTestMain.java b/tests/ActivityTests/src/com/google/android/test/activity/ActivityTestMain.java
index 7f3aa77..ea0db56 100644
--- a/tests/ActivityTests/src/com/google/android/test/activity/ActivityTestMain.java
+++ b/tests/ActivityTests/src/com/google/android/test/activity/ActivityTestMain.java
@@ -21,6 +21,7 @@
 
 import android.app.Activity;
 import android.app.ActivityManager;
+import android.app.ActivityOptions;
 import android.app.AlertDialog;
 import android.content.ActivityNotFoundException;
 import android.content.BroadcastReceiver;
@@ -29,13 +30,15 @@
 import android.content.Intent;
 import android.content.ServiceConnection;
 import android.graphics.BitmapFactory;
+import android.net.Uri;
 import android.os.Bundle;
+import android.os.Handler;
 import android.os.IBinder;
+import android.os.Message;
 import android.os.RemoteException;
 import android.os.UserHandle;
 import android.os.UserManager;
 import android.graphics.Bitmap;
-import android.view.WindowManager;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.TextView;
@@ -60,6 +63,28 @@
 
     ArrayList<ServiceConnection> mConnections = new ArrayList<ServiceConnection>();
 
+    static final int MSG_SPAM = 1;
+
+    final Handler mHandler = new Handler() {
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what) {
+                case MSG_SPAM: {
+                    boolean fg = msg.arg1 != 0;
+                    Intent intent = new Intent(ActivityTestMain.this, SpamActivity.class);
+                    Bundle options = null;
+                    if (fg) {
+                        ActivityOptions opts = ActivityOptions.makeLaunchTaskBehindAnimation();
+                        options = opts.toBundle();
+                    }
+                    startActivity(intent, options);
+                    scheduleSpam(!fg);
+                } break;
+            }
+            super.handleMessage(msg);
+        }
+    };
+
     class BroadcastResultReceiver extends BroadcastReceiver {
         @Override
         public void onReceive(Context context, Intent intent) {
@@ -143,7 +168,8 @@
     @Override
     public boolean onCreateOptionsMenu(Menu menu) {
         menu.add("Animate!").setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
-            @Override public boolean onMenuItemClick(MenuItem item) {
+            @Override
+            public boolean onMenuItemClick(MenuItem item) {
                 AlertDialog.Builder builder = new AlertDialog.Builder(ActivityTestMain.this,
                         R.style.SlowDialog);
                 builder.setTitle("This is a title");
@@ -316,6 +342,49 @@
                 return true;
             }
         });
+        menu.add("Open Doc").setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
+            @Override public boolean onMenuItemClick(MenuItem item) {
+                ActivityManager.AppTask task = findDocTask();
+                if (task == null) {
+                    Intent intent = new Intent(ActivityTestMain.this, DocActivity.class);
+                    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT
+                            | Intent.FLAG_ACTIVITY_MULTIPLE_TASK
+                            | Intent.FLAG_ACTIVITY_RETAIN_IN_RECENTS);
+                    startActivity(intent);
+                } else {
+                    task.moveToFront();
+                }
+                return true;
+            }
+        });
+        menu.add("Stack Doc").setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
+            @Override public boolean onMenuItemClick(MenuItem item) {
+                ActivityManager.AppTask task = findDocTask();
+                if (task != null) {
+                    ActivityManager.RecentTaskInfo recent = task.getTaskInfo();
+                    Intent intent = new Intent(ActivityTestMain.this, DocActivity.class);
+                    if (recent.id >= 0) {
+                        // Stack on top.
+                        intent.putExtra(DocActivity.LABEL, "Stacked");
+                        task.startActivity(ActivityTestMain.this, intent, null);
+                    } else {
+                        // Start root activity.
+                        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT
+                                | Intent.FLAG_ACTIVITY_MULTIPLE_TASK
+                                | Intent.FLAG_ACTIVITY_RETAIN_IN_RECENTS);
+                        intent.putExtra(DocActivity.LABEL, "New Root");
+                        task.startActivity(ActivityTestMain.this, intent, null);
+                    }
+                }
+                return true;
+            }
+        });
+        menu.add("Spam!").setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
+            @Override public boolean onMenuItemClick(MenuItem item) {
+                scheduleSpam(false);
+                return true;
+            }
+        });
         return true;
     }
 
@@ -342,6 +411,12 @@
         mConnections.clear();
     }
 
+    @Override
+    protected void onDestroy() {
+        super.onDestroy();
+        mHandler.removeMessages(MSG_SPAM);
+    }
+
     void addAppRecents(int count) {
         ActivityManager am = (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE);
         Intent intent = new Intent(Intent.ACTION_MAIN);
@@ -371,7 +446,31 @@
             }
         }
     }
-     private View scrollWrap(View view) {
+
+    ActivityManager.AppTask findDocTask() {
+        ActivityManager am = (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE);
+        List<ActivityManager.AppTask> tasks = am.getAppTasks();
+        if (tasks != null) {
+            for (int i=0; i<tasks.size(); i++) {
+                ActivityManager.AppTask task = tasks.get(i);
+                ActivityManager.RecentTaskInfo recent = task.getTaskInfo();
+                if (recent.baseIntent != null
+                        && recent.baseIntent.getComponent().getClassName().equals(
+                                DocActivity.class.getCanonicalName())) {
+                    return task;
+                }
+            }
+        }
+        return null;
+    }
+
+    void scheduleSpam(boolean fg) {
+        mHandler.removeMessages(MSG_SPAM);
+        Message msg = mHandler.obtainMessage(MSG_SPAM, fg ? 1 : 0, 0);
+        mHandler.sendMessageDelayed(msg, 500);
+    }
+
+    private View scrollWrap(View view) {
         ScrollView scroller = new ScrollView(this);
         scroller.addView(view, new ScrollView.LayoutParams(ScrollView.LayoutParams.MATCH_PARENT,
                 ScrollView.LayoutParams.MATCH_PARENT));
diff --git a/tests/ActivityTests/src/com/google/android/test/activity/DocActivity.java b/tests/ActivityTests/src/com/google/android/test/activity/DocActivity.java
new file mode 100644
index 0000000..6330c79
--- /dev/null
+++ b/tests/ActivityTests/src/com/google/android/test/activity/DocActivity.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2014 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.google.android.test.activity;
+
+import android.app.Activity;
+import android.app.ActivityManager;
+import android.os.Bundle;
+
+public class DocActivity extends Activity {
+    static final String LABEL = "label";
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        String label = getIntent().getStringExtra(LABEL);
+        if (label != null) {
+            setTaskDescription(new ActivityManager.TaskDescription(label));
+            setTitle(label);
+        }
+    }
+}
diff --git a/tests/ActivityTests/src/com/google/android/test/activity/SpamActivity.java b/tests/ActivityTests/src/com/google/android/test/activity/SpamActivity.java
new file mode 100644
index 0000000..e5de559
--- /dev/null
+++ b/tests/ActivityTests/src/com/google/android/test/activity/SpamActivity.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2014 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.google.android.test.activity;
+
+import android.app.Activity;
+import android.os.Bundle;
+
+public class SpamActivity extends Activity {
+    byte[] mBytes;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        // Chew up some RAM -- 8 megs worth.
+        mBytes = new byte[8*1024*1024];
+    }
+}
diff --git a/tests/AppLaunch/src/com/android/tests/applaunch/AppLaunch.java b/tests/AppLaunch/src/com/android/tests/applaunch/AppLaunch.java
index a209d6c..8b8d604 100644
--- a/tests/AppLaunch/src/com/android/tests/applaunch/AppLaunch.java
+++ b/tests/AppLaunch/src/com/android/tests/applaunch/AppLaunch.java
@@ -344,7 +344,7 @@
                 }
 
                 mResult = mAm.startActivityAndWait(null, null, mLaunchIntent, mimeType,
-                        null, null, 0, mLaunchIntent.getFlags(), null, null, null,
+                        null, null, 0, mLaunchIntent.getFlags(), null, null,
                         UserHandle.USER_CURRENT);
             } catch (RemoteException e) {
                 Log.w(TAG, "Error launching app", e);
diff --git a/tests/FrameworkPerf/src/com/android/frameworkperf/FrameworkPerfActivity.java b/tests/FrameworkPerf/src/com/android/frameworkperf/FrameworkPerfActivity.java
index 6633787..78e360b 100644
--- a/tests/FrameworkPerf/src/com/android/frameworkperf/FrameworkPerfActivity.java
+++ b/tests/FrameworkPerf/src/com/android/frameworkperf/FrameworkPerfActivity.java
@@ -20,6 +20,7 @@
 import android.content.ComponentName;
 import android.content.Intent;
 import android.content.ServiceConnection;
+import android.graphics.Color;
 import android.os.Binder;
 import android.os.Bundle;
 import android.os.Handler;
@@ -199,6 +200,7 @@
         mLocalCheckBox = (CheckBox)findViewById(R.id.local);
 
         mLog = (TextView)findViewById(R.id.log);
+        mLog.setTextColor(Color.RED);
 
         PowerManager pm = (PowerManager)getSystemService(POWER_SERVICE);
         mPartialWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "Scheduler");
diff --git a/tests/MemoryUsage/src/com/android/tests/memoryusage/MemoryUsageTest.java b/tests/MemoryUsage/src/com/android/tests/memoryusage/MemoryUsageTest.java
index f582a91..a7e3bec 100644
--- a/tests/MemoryUsage/src/com/android/tests/memoryusage/MemoryUsageTest.java
+++ b/tests/MemoryUsage/src/com/android/tests/memoryusage/MemoryUsageTest.java
@@ -318,7 +318,7 @@
                 }
 
                 mAm.startActivityAndWait(null, null, mLaunchIntent, mimeType,
-                        null, null, 0, mLaunchIntent.getFlags(), null, null, null,
+                        null, null, 0, mLaunchIntent.getFlags(), null, null,
                         UserHandle.USER_CURRENT_OR_SELF);
             } catch (RemoteException e) {
                 Log.w(TAG, "Error launching app", e);
diff --git a/tests/UsageStatsTest/src/com/android/tests/usagestats/UsageLogActivity.java b/tests/UsageStatsTest/src/com/android/tests/usagestats/UsageLogActivity.java
index 5d8fc9e..5f62ad8 100644
--- a/tests/UsageStatsTest/src/com/android/tests/usagestats/UsageLogActivity.java
+++ b/tests/UsageStatsTest/src/com/android/tests/usagestats/UsageLogActivity.java
@@ -108,7 +108,7 @@
                 holder = (ViewHolder) convertView.getTag();
             }
 
-            holder.packageName.setText(mEvents.get(position).getComponent().toShortString());
+            holder.packageName.setText(mEvents.get(position).getPackageName());
             String state;
             switch (mEvents.get(position).getEventType()) {
                 case UsageEvents.Event.MOVE_TO_FOREGROUND:
diff --git a/tools/aapt/AaptConfig.cpp b/tools/aapt/AaptConfig.cpp
index 69a9c7f..32a0cd3 100644
--- a/tools/aapt/AaptConfig.cpp
+++ b/tools/aapt/AaptConfig.cpp
@@ -255,6 +255,8 @@
                 != ResTable_config::SCREENLONG_ANY
             || config->density != ResTable_config::DENSITY_DEFAULT) {
         minSdk = SDK_DONUT;
+    } else if ((config->density == ResTable_config::DENSITY_ANY)) {
+        minSdk = SDK_L;
     }
 
     if (minSdk > config->sdkVersion) {
@@ -477,6 +479,11 @@
         return true;
     }
 
+    if (strcmp(name, "anydpi") == 0) {
+        if (out) out->density = ResTable_config::DENSITY_ANY;
+        return true;
+    }
+
     if (strcmp(name, "nodpi") == 0) {
         if (out) out->density = ResTable_config::DENSITY_NONE;
         return true;
diff --git a/tools/aapt/Bundle.h b/tools/aapt/Bundle.h
index 1439f14..af49461 100644
--- a/tools/aapt/Bundle.h
+++ b/tools/aapt/Bundle.h
@@ -24,6 +24,7 @@
     SDK_HONEYCOMB_MR2 = 13,
     SDK_ICE_CREAM_SANDWICH = 14,
     SDK_ICE_CREAM_SANDWICH_MR1 = 15,
+    SDK_L = 21,
 };
 
 /*
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp
index b394671..a0f0a08 100644
--- a/tools/aapt/Command.cpp
+++ b/tools/aapt/Command.cpp
@@ -2488,10 +2488,12 @@
         if (bundle->getCustomPackage() == NULL) {
             // Write the R.java file into the appropriate class directory
             // e.g. gen/com/foo/app/R.java
-            err = writeResourceSymbols(bundle, assets, assets->getPackage(), true);
+            err = writeResourceSymbols(bundle, assets, assets->getPackage(), true,
+                    bundle->getBuildSharedLibrary());
         } else {
             const String8 customPkg(bundle->getCustomPackage());
-            err = writeResourceSymbols(bundle, assets, customPkg, true);
+            err = writeResourceSymbols(bundle, assets, customPkg, true,
+                    bundle->getBuildSharedLibrary());
         }
         if (err < 0) {
             goto bail;
@@ -2505,7 +2507,7 @@
             char* packageString = strtok(libs.lockBuffer(libs.length()), ":");
             while (packageString != NULL) {
                 // Write the R.java file out with the correct package name
-                err = writeResourceSymbols(bundle, assets, String8(packageString), true);
+                err = writeResourceSymbols(bundle, assets, String8(packageString), true, false);
                 if (err < 0) {
                     goto bail;
                 }
@@ -2514,11 +2516,11 @@
             libs.unlockBuffer();
         }
     } else {
-        err = writeResourceSymbols(bundle, assets, assets->getPackage(), false);
+        err = writeResourceSymbols(bundle, assets, assets->getPackage(), false, false);
         if (err < 0) {
             goto bail;
         }
-        err = writeResourceSymbols(bundle, assets, assets->getSymbolsPrivatePackage(), true);
+        err = writeResourceSymbols(bundle, assets, assets->getSymbolsPrivatePackage(), true, false);
         if (err < 0) {
             goto bail;
         }
diff --git a/tools/aapt/IndentPrinter.h b/tools/aapt/IndentPrinter.h
new file mode 100644
index 0000000..6fc94bc
--- /dev/null
+++ b/tools/aapt/IndentPrinter.h
@@ -0,0 +1,63 @@
+#ifndef __INDENT_PRINTER_H
+#define __INDENT_PRINTER_H
+
+class IndentPrinter {
+public:
+    IndentPrinter(FILE* stream, int indentSize=2)
+        : mStream(stream)
+        , mIndentSize(indentSize)
+        , mIndent(0)
+        , mNeedsIndent(true) {
+    }
+
+    void indent(int amount = 1) {
+        mIndent += amount;
+        if (mIndent < 0) {
+            mIndent = 0;
+        }
+    }
+
+    void print(const char* fmt, ...) {
+        doIndent();
+        va_list args;
+        va_start(args, fmt);
+        vfprintf(mStream, fmt, args);
+        va_end(args);
+    }
+
+    void println(const char* fmt, ...) {
+        doIndent();
+        va_list args;
+        va_start(args, fmt);
+        vfprintf(mStream, fmt, args);
+        va_end(args);
+        fputs("\n", mStream);
+        mNeedsIndent = true;
+    }
+
+    void println() {
+        doIndent();
+        fputs("\n", mStream);
+        mNeedsIndent = true;
+    }
+
+private:
+    void doIndent() {
+        if (mNeedsIndent) {
+            int numSpaces = mIndent * mIndentSize;
+            while (numSpaces > 0) {
+                fputs(" ", mStream);
+                numSpaces--;
+            }
+            mNeedsIndent = false;
+        }
+    }
+
+    FILE* mStream;
+    const int mIndentSize;
+    int mIndent;
+    bool mNeedsIndent;
+};
+
+#endif // __INDENT_PRINTER_H
+
diff --git a/tools/aapt/Main.h b/tools/aapt/Main.h
index 34c4496..dd40b20 100644
--- a/tools/aapt/Main.h
+++ b/tools/aapt/Main.h
@@ -49,7 +49,8 @@
     const sp<AaptAssets>& assets, sp<ApkBuilder>& builder);
 
 extern android::status_t writeResourceSymbols(Bundle* bundle,
-    const sp<AaptAssets>& assets, const String8& pkgName, bool includePrivate);
+        const sp<AaptAssets>& assets, const String8& pkgName,
+        bool includePrivate, bool emitCallback);
 
 extern android::status_t writeProguardFile(Bundle* bundle, const sp<AaptAssets>& assets);
 
diff --git a/tools/aapt/Resource.cpp b/tools/aapt/Resource.cpp
index 1d93b89..7979a1d 100644
--- a/tools/aapt/Resource.cpp
+++ b/tools/aapt/Resource.cpp
@@ -3,18 +3,17 @@
 //
 // Build resource files from raw assets.
 //
-#include "Main.h"
 #include "AaptAssets.h"
-#include "StringPool.h"
-#include "XMLNode.h"
-#include "ResourceTable.h"
-#include "Images.h"
-
+#include "CacheUpdater.h"
 #include "CrunchCache.h"
 #include "FileFinder.h"
-#include "CacheUpdater.h"
-
+#include "Images.h"
+#include "IndentPrinter.h"
+#include "Main.h"
+#include "ResourceTable.h"
+#include "StringPool.h"
 #include "WorkQueue.h"
+#include "XMLNode.h"
 
 #if HAVE_PRINTF_ZD
 #  define ZD "%zd"
@@ -1801,6 +1800,112 @@
     return String16();
 }
 
+static void writeResourceLoadedCallback(FILE* fp, int indent) {
+    IndentPrinter p(fp, 4);
+    p.indent(indent);
+    p.println("private static void rewriteIntArrayField(java.lang.reflect.Field field, int packageId) throws IllegalAccessException {");
+    {
+        p.indent();
+        p.println("int requiredModifiers = java.lang.reflect.Modifier.STATIC | java.lang.reflect.Modifier.PUBLIC;");
+        p.println("if ((field.getModifiers() & requiredModifiers) != requiredModifiers) {");
+        {
+            p.indent();
+            p.println("throw new IllegalArgumentException(\"Field \" + field.getName() + \" is not rewritable\");");
+            p.indent(-1);
+        }
+        p.println("}");
+        p.println("if (field.getType() != int[].class) {");
+        {
+            p.indent();
+            p.println("throw new IllegalArgumentException(\"Field \" + field.getName() + \" is not an int array\");");
+            p.indent(-1);
+        }
+        p.println("}");
+        p.println("int[] array = (int[]) field.get(null);");
+        p.println("for (int i = 0; i < array.length; i++) {");
+        {
+            p.indent();
+            p.println("array[i] = (array[i] & 0x00ffffff) | (packageId << 24);");
+            p.indent(-1);
+        }
+        p.println("}");
+        p.indent(-1);
+    }
+    p.println("}");
+    p.println();
+    p.println("private static void rewriteIntField(java.lang.reflect.Field field, int packageId) throws IllegalAccessException {");
+    {
+        p.indent();
+        p.println("int requiredModifiers = java.lang.reflect.Modifier.STATIC | java.lang.reflect.Modifier.PUBLIC;");
+        p.println("int bannedModifiers = java.lang.reflect.Modifier.FINAL;");
+        p.println("int mod = field.getModifiers();");
+        p.println("if ((mod & requiredModifiers) != requiredModifiers || (mod & bannedModifiers) != 0) {");
+        {
+            p.indent();
+            p.println("throw new IllegalArgumentException(\"Field \" + field.getName() + \" is not rewritable\");");
+            p.indent(-1);
+        }
+        p.println("}");
+        p.println("if (field.getType() != int.class && field.getType() != Integer.class) {");
+        {
+            p.indent();
+            p.println("throw new IllegalArgumentException(\"Field \" + field.getName() + \" is not an int\");");
+            p.indent(-1);
+        }
+        p.println("}");
+        p.println("int resId = field.getInt(null);");
+        p.println("field.setInt(null, (resId & 0x00ffffff) | (packageId << 24));");
+        p.indent(-1);
+    }
+    p.println("}");
+    p.println();
+    p.println("public static void onResourcesLoaded(int assignedPackageId) throws Exception {");
+    {
+        p.indent();
+        p.println("Class<?>[] declaredClasses = R.class.getDeclaredClasses();");
+        p.println("for (Class<?> clazz : declaredClasses) {");
+        {
+            p.indent();
+            p.println("if (clazz.getSimpleName().equals(\"styleable\")) {");
+            {
+                p.indent();
+                p.println("for (java.lang.reflect.Field field : clazz.getDeclaredFields()) {");
+                {
+                    p.indent();
+                    p.println("if (field.getType() == int[].class) {");
+                    {
+                        p.indent();
+                        p.println("rewriteIntArrayField(field, assignedPackageId);");
+                        p.indent(-1);
+                    }
+                    p.println("}");
+                    p.indent(-1);
+                }
+                p.println("}");
+                p.indent(-1);
+            }
+            p.println("} else {");
+            {
+                p.indent();
+                p.println("for (java.lang.reflect.Field field : clazz.getDeclaredFields()) {");
+                {
+                    p.indent();
+                    p.println("rewriteIntField(field, assignedPackageId);");
+                    p.indent(-1);
+                }
+                p.println("}");
+                p.indent(-1);
+            }
+            p.println("}");
+            p.indent(-1);
+        }
+        p.println("}");
+        p.indent(-1);
+    }
+    p.println("}");
+    p.println();
+}
+
 static status_t writeLayoutClasses(
     FILE* fp, const sp<AaptAssets>& assets,
     const sp<AaptSymbols>& symbols, int indent, bool includePrivate, bool nonConstantId)
@@ -2138,7 +2243,7 @@
 static status_t writeSymbolClass(
     FILE* fp, const sp<AaptAssets>& assets, bool includePrivate,
     const sp<AaptSymbols>& symbols, const String8& className, int indent,
-    bool nonConstantId)
+    bool nonConstantId, bool emitCallback)
 {
     fprintf(fp, "%spublic %sfinal class %s {\n",
             getIndentSpace(indent),
@@ -2238,7 +2343,8 @@
         if (nclassName == "styleable") {
             styleableSymbols = nsymbols;
         } else {
-            err = writeSymbolClass(fp, assets, includePrivate, nsymbols, nclassName, indent, nonConstantId);
+            err = writeSymbolClass(fp, assets, includePrivate, nsymbols, nclassName,
+                    indent, nonConstantId, false);
         }
         if (err != NO_ERROR) {
             return err;
@@ -2252,6 +2358,10 @@
         }
     }
 
+    if (emitCallback) {
+        writeResourceLoadedCallback(fp, indent);
+    }
+
     indent--;
     fprintf(fp, "%s}\n", getIndentSpace(indent));
     return NO_ERROR;
@@ -2299,7 +2409,7 @@
 }
 
 status_t writeResourceSymbols(Bundle* bundle, const sp<AaptAssets>& assets,
-    const String8& package, bool includePrivate)
+    const String8& package, bool includePrivate, bool emitCallback)
 {
     if (!bundle->getRClassDir()) {
         return NO_ERROR;
@@ -2355,7 +2465,7 @@
             "package %s;\n\n", package.string());
 
         status_t err = writeSymbolClass(fp, assets, includePrivate, symbols,
-                className, 0, bundle->getNonConstantId());
+                className, 0, bundle->getNonConstantId(), emitCallback);
         fclose(fp);
         if (err != NO_ERROR) {
             return err;
diff --git a/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java b/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java
index f8bc2ae..2604e97 100644
--- a/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java
+++ b/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java
@@ -221,6 +221,12 @@
     }
 
     @Override
+    public void overridePendingAppTransitionAspectScaledThumb(Bitmap srcThumb, int startX,
+            int startY, IRemoteCallback startedCallback, boolean scaleUp) {
+        // TODO Auto-generated method stub
+    }
+
+    @Override
     public void pauseKeyDispatching(IBinder arg0) throws RemoteException {
         // TODO Auto-generated method stub
 
diff --git a/wifi/java/android/net/wifi/IWifiManager.aidl b/wifi/java/android/net/wifi/IWifiManager.aidl
index 71b6bee..397d700 100644
--- a/wifi/java/android/net/wifi/IWifiManager.aidl
+++ b/wifi/java/android/net/wifi/IWifiManager.aidl
@@ -25,6 +25,7 @@
 import android.net.wifi.WifiChannel;
 import android.net.wifi.ScanResult;
 import android.net.wifi.WifiConnectionStatistics;
+import android.net.wifi.WifiActivityEnergyInfo;
 
 import android.net.DhcpInfo;
 
@@ -41,6 +42,8 @@
 {
     List<WifiAdapter> getAdaptors();
 
+    WifiActivityEnergyInfo reportActivityInfo(in WifiAdapter adapter);
+
     List<WifiConfiguration> getConfiguredNetworks();
 
     List<WifiConfiguration> getPrivilegedConfiguredNetworks();
diff --git a/wifi/java/android/net/wifi/ScanResult.java b/wifi/java/android/net/wifi/ScanResult.java
index f2db206..a280348 100644
--- a/wifi/java/android/net/wifi/ScanResult.java
+++ b/wifi/java/android/net/wifi/ScanResult.java
@@ -16,8 +16,6 @@
 
 package android.net.wifi;
 
-import android.net.wifi.passpoint.WifiPasspointInfo;
-import android.net.wifi.passpoint.WifiPasspointManager;
 import android.os.Parcel;
 import android.os.Parcelable;
 
@@ -159,12 +157,6 @@
     public int distanceSdCm;
 
     /**
-     * Passpoint ANQP information. This is not fetched automatically.
-     * Use {@link WifiPasspointManager#requestAnqpInfo} to request ANQP info.
-     */
-    public WifiPasspointInfo passpoint;
-
-    /**
      * {@hide}
      */
     public final static int UNSPECIFIED = -1;
@@ -260,7 +252,6 @@
             distanceCm = source.distanceCm;
             distanceSdCm = source.distanceSdCm;
             seen = source.seen;
-            passpoint = source.passpoint;
             autoJoinStatus = source.autoJoinStatus;
             untrusted = source.untrusted;
             numConnection = source.numConnection;
@@ -298,7 +289,6 @@
         sb.append(", distanceSd: ").append((distanceSdCm != UNSPECIFIED ? distanceSdCm : "?")).
                 append("(cm)");
 
-        sb.append(", passpoint: ").append(passpoint != null ? "yes" : "no");
         if (autoJoinStatus != 0) {
             sb.append(", status: ").append(autoJoinStatus);
         }
@@ -330,12 +320,6 @@
         dest.writeInt(untrusted ? 1 : 0);
         dest.writeInt(numConnection);
         dest.writeInt(numUsage);
-        if (passpoint != null) {
-            dest.writeInt(1);
-            passpoint.writeToParcel(dest, flags);
-        } else {
-            dest.writeInt(0);
-        }
         if (informationElements != null) {
             dest.writeInt(informationElements.length);
             for (int i = 0; i < informationElements.length; i++) {
@@ -370,10 +354,6 @@
                 sr.autoJoinStatus = in.readInt();
                 sr.untrusted = in.readInt() != 0;
                 sr.numConnection = in.readInt();
-                sr.numUsage = in.readInt();
-                if (in.readInt() == 1) {
-                    sr.passpoint = WifiPasspointInfo.CREATOR.createFromParcel(in);
-                }
                 int n = in.readInt();
                 if (n != 0) {
                     sr.informationElements = new InformationElement[n];
diff --git a/wifi/java/android/net/wifi/passpoint/WifiPasspointPolicy.aidl b/wifi/java/android/net/wifi/WifiActivityEnergyInfo.aidl
similarity index 89%
rename from wifi/java/android/net/wifi/passpoint/WifiPasspointPolicy.aidl
rename to wifi/java/android/net/wifi/WifiActivityEnergyInfo.aidl
index 1d61da0..007ec94 100644
--- a/wifi/java/android/net/wifi/passpoint/WifiPasspointPolicy.aidl
+++ b/wifi/java/android/net/wifi/WifiActivityEnergyInfo.aidl
@@ -14,6 +14,6 @@
  * limitations under the License.
  */
 
-package android.net.wifi.passpoint;
+package android.net.wifi;
 
-parcelable WifiPasspointPolicy;
+parcelable WifiActivityEnergyInfo;
diff --git a/wifi/java/android/net/wifi/WifiActivityEnergyInfo.java b/wifi/java/android/net/wifi/WifiActivityEnergyInfo.java
new file mode 100644
index 0000000..533b8bc
--- /dev/null
+++ b/wifi/java/android/net/wifi/WifiActivityEnergyInfo.java
@@ -0,0 +1,141 @@
+/*
+ * Copyright (C) 2014 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.net.wifi;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * Record of energy and activity information from controller and
+ * underlying wifi stack state.Timestamp the record with system
+ * time
+ * @hide
+ */
+public final class WifiActivityEnergyInfo implements Parcelable {
+    private final int mStackState;
+    private final int mControllerTxTimeMs;
+    private final int mControllerRxTimeMs;
+    private final int mControllerIdleTimeMs;
+    private final int mControllerEnergyUsed;
+    private final long timestamp;
+
+    public static final int STACK_STATE_INVALID = 0;
+    public static final int STACK_STATE_STATE_ACTIVE = 1;
+    public static final int STACK_STATE_STATE_SCANNING = 2;
+    public static final int STACK_STATE_STATE_IDLE = 3;
+
+    public WifiActivityEnergyInfo(int stackState, int txTime, int rxTime,
+                                  int idleTime, int energyUsed) {
+        mStackState = stackState;
+        mControllerTxTimeMs = txTime;
+        mControllerRxTimeMs = rxTime;
+        mControllerIdleTimeMs = idleTime;
+        mControllerEnergyUsed = energyUsed;
+        timestamp = System.currentTimeMillis();
+    }
+
+    @Override
+    public String toString() {
+        return "WifiActivityEnergyInfo{"
+            + " timestamp=" + timestamp
+            + " mStackState=" + mStackState
+            + " mControllerTxTimeMs=" + mControllerTxTimeMs
+            + " mControllerRxTimeMs=" + mControllerRxTimeMs
+            + " mControllerIdleTimeMs=" + mControllerIdleTimeMs
+            + " mControllerEnergyUsed=" + mControllerEnergyUsed
+            + " }";
+    }
+
+    public static final Parcelable.Creator<WifiActivityEnergyInfo> CREATOR =
+            new Parcelable.Creator<WifiActivityEnergyInfo>() {
+        public WifiActivityEnergyInfo createFromParcel(Parcel in) {
+            int stackState = in.readInt();
+            int txTime = in.readInt();
+            int rxTime = in.readInt();
+            int idleTime = in.readInt();
+            int energyUsed = in.readInt();
+            return new WifiActivityEnergyInfo(stackState, txTime, rxTime,
+                    idleTime, energyUsed);
+        }
+        public WifiActivityEnergyInfo[] newArray(int size) {
+            return new WifiActivityEnergyInfo[size];
+        }
+    };
+
+    public void writeToParcel(Parcel out, int flags) {
+        out.writeInt(mStackState);
+        out.writeInt(mControllerTxTimeMs);
+        out.writeInt(mControllerRxTimeMs);
+        out.writeInt(mControllerIdleTimeMs);
+        out.writeInt(mControllerEnergyUsed);
+    }
+
+    public int describeContents() {
+        return 0;
+    }
+
+    /**
+     * @return bt stack reported state
+     */
+    public int getStackState() {
+        return mStackState;
+    }
+
+    /**
+     * @return tx time in ms
+     */
+    public int getControllerTxTimeMillis() {
+        return (int)mControllerTxTimeMs;
+    }
+
+    /**
+     * @return rx time in ms
+     */
+    public int getControllerRxTimeMillis() {
+        return (int)mControllerRxTimeMs;
+    }
+
+    /**
+     * @return idle time in ms
+     */
+    public int getControllerIdleTimeMillis() {
+        return (int)mControllerIdleTimeMs;
+    }
+
+    /**
+     * product of current(mA), voltage(V) and time(ms)
+     * @return energy used
+     */
+    public int getControllerEnergyUsed() {
+        return mControllerEnergyUsed;
+    }
+    /**
+     * @return timestamp(wall clock) of record creation
+     */
+    public long getTimeStamp() {
+        return timestamp;
+    }
+
+    /**
+     * @return if the record is valid
+     */
+    public boolean isValid() {
+        return ((getControllerTxTimeMillis() !=0) ||
+                (getControllerRxTimeMillis() !=0) ||
+                (getControllerIdleTimeMillis() !=0));
+    }
+}
diff --git a/wifi/java/android/net/wifi/WifiAdapter.aidl b/wifi/java/android/net/wifi/WifiAdapter.aidl
index 931da92..0bb5dd7 100644
--- a/wifi/java/android/net/wifi/WifiAdapter.aidl
+++ b/wifi/java/android/net/wifi/WifiAdapter.aidl
@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2008, The Android Open Source Project
+ * Copyright (c) 2014, 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.
diff --git a/wifi/java/android/net/wifi/WifiAdapter.java b/wifi/java/android/net/wifi/WifiAdapter.java
index c0211f3..0b12dea 100644
--- a/wifi/java/android/net/wifi/WifiAdapter.java
+++ b/wifi/java/android/net/wifi/WifiAdapter.java
@@ -18,6 +18,8 @@
 
 import android.os.Parcel;
 import android.os.Parcelable;
+import android.os.RemoteException;
+import android.util.Log;
 
 /**
  * Represents local wifi adapter. Different devices have different kinds of
@@ -25,6 +27,7 @@
  * which capabilites are supported by the wifi adapter on the device.
  */
 public class WifiAdapter implements Parcelable {
+    private static final String TAG = "WifiAdapter";
 
     /* Keep this list in sync with wifi_hal.h */
     /** @hide */
@@ -58,9 +61,20 @@
     /** @hide */
     public static final int WIFI_FEATURE_EPR              = 0x4000;  // Enhanced power reporting
 
+    private static final int CONTROLLER_ENERGY_UPDATE_TIMEOUT_MILLIS = 30;
+    /** @hide */
+    public static final int ACTIVITY_ENERGY_INFO_CACHED = 0;
+    /** @hide */
+    public static final int ACTIVITY_ENERGY_INFO_REFRESHED = 1;
+
     private String name;
     private int    supportedFeatures;
 
+    // Make the API consistent with BlueTooth Adaptor, allowing WifiService to be accessed
+    // Directly from the adapter
+    /** @hide */
+    public IWifiManager mService = null;
+
     /** @hide */
     public WifiAdapter(String name, int supportedFeatures) {
         this.name = name;
@@ -175,6 +189,38 @@
         return isFeatureSupported(WIFI_FEATURE_EPR);
     }
 
+
+    /**
+     * Return the record of {@link WifiActivityEnergyInfo} object that
+     * has the activity and energy info. This can be used to ascertain what
+     * the controller has been up to, since the last sample.
+     * @param updateType Type of info, cached vs refreshed.
+     *
+     * @return a record with {@link WifiActivityEnergyInfo} or null if
+     * report is unavailable or unsupported
+     * @hide
+     */
+    public WifiActivityEnergyInfo getControllerActivityEnergyInfo(int updateType) {
+        if (mService == null) return null;
+        try {
+            WifiActivityEnergyInfo record;
+            if (!isEnhancedPowerReportingSupported()) {
+                return null;
+            }
+            synchronized(this) {
+                record = mService.reportActivityInfo(this);
+                if (record.isValid()) {
+                    return record;
+                } else {
+                    return null;
+                }
+            }
+        } catch (RemoteException e) {
+            Log.e(TAG, "getControllerActivityEnergyInfo: " + e);
+        }
+        return null;
+    }
+
     /* Parcelable implementation */
     /**
      * Implement the Parcelable interface
diff --git a/wifi/java/android/net/wifi/WifiLinkLayerStats.java b/wifi/java/android/net/wifi/WifiLinkLayerStats.java
index ae2fa98..7fac7cf 100644
--- a/wifi/java/android/net/wifi/WifiLinkLayerStats.java
+++ b/wifi/java/android/net/wifi/WifiLinkLayerStats.java
@@ -102,6 +102,14 @@
     /** {@hide} */
     public long retries_vo;
 
+    /** {@hide} */
+    public int on_time;
+    /** {@hide} */
+    public int tx_time;
+    /** {@hide} */
+    public int rx_time;
+    /** {@hide} */
+    public int on_time_scan;
 
     /** {@hide} */
     public WifiLinkLayerStats() {
@@ -138,7 +146,10 @@
                 .append(" tx=").append(Long.toString(this.txmpdu_vo))
                 .append(" lost=").append(Long.toString(this.lostmpdu_vo))
                 .append(" retries=").append(Long.toString(this.retries_vo)).append('\n');
-
+        sbuf.append(" on_time : ").append(Integer.toString(this.on_time))
+                .append(" tx_time=").append(Integer.toString(this.tx_time))
+                .append(" rx_time=").append(Integer.toString(this.rx_time))
+                .append(" scan_time=").append(Integer.toString(this.on_time_scan)).append('\n');
         return sbuf.toString();
     }
 
@@ -172,6 +183,10 @@
     public void writeToParcel(Parcel dest, int flags) {
         dest.writeString(SSID);
         dest.writeString(BSSID);
+        dest.writeInt(on_time);
+        dest.writeInt(tx_time);
+        dest.writeInt(rx_time);
+        dest.writeInt(on_time_scan);
     }
 
     /** Implement the Parcelable interface {@hide} */
@@ -181,6 +196,10 @@
                 WifiLinkLayerStats stats = new WifiLinkLayerStats();
                 stats.SSID = in.readString();
                 stats.BSSID = in.readString();
+                stats.on_time = in.readInt();
+                stats.tx_time = in.readInt();
+                stats.rx_time = in.readInt();
+                stats.on_time_scan = in.readInt();
                 return stats;
             };
             public WifiLinkLayerStats[] newArray(int size) {
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
index e27bd7e..4a4da22 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -581,7 +581,11 @@
      */
     public List<WifiAdapter> getAdapters() {
         try {
-            return mService.getAdaptors();
+            List<WifiAdapter> adapterList = mService.getAdaptors();
+            for (WifiAdapter a : adapterList) {
+                a.mService = mService;
+            }
+            return adapterList;
         } catch (RemoteException e) {
             return null;
         }
diff --git a/wifi/java/android/net/wifi/passpoint/IWifiPasspointManager.aidl b/wifi/java/android/net/wifi/passpoint/IWifiPasspointManager.aidl
deleted file mode 100644
index 54237c4..0000000
--- a/wifi/java/android/net/wifi/passpoint/IWifiPasspointManager.aidl
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Copyright (c) 2014, 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.net.wifi.passpoint;
-
-import android.net.wifi.ScanResult;
-import android.net.wifi.passpoint.WifiPasspointPolicy;
-import android.net.wifi.passpoint.WifiPasspointCredential;
-import android.os.Messenger;
-
-/**
- * Interface that allows controlling and querying Wifi Passpoint connectivity.
- *
- * {@hide}
- */
-interface IWifiPasspointManager
-{
-    Messenger getMessenger();
-
-    int getPasspointState();
-}
-
diff --git a/wifi/java/android/net/wifi/passpoint/WifiPasspointCredential.aidl b/wifi/java/android/net/wifi/passpoint/WifiPasspointCredential.aidl
deleted file mode 100644
index cfd3605..0000000
--- a/wifi/java/android/net/wifi/passpoint/WifiPasspointCredential.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Copyright (c) 2014, 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.net.wifi.passpoint;
-
-parcelable WifiPasspointCredential;
diff --git a/wifi/java/android/net/wifi/passpoint/WifiPasspointCredential.java b/wifi/java/android/net/wifi/passpoint/WifiPasspointCredential.java
deleted file mode 100644
index 0a7230f..0000000
--- a/wifi/java/android/net/wifi/passpoint/WifiPasspointCredential.java
+++ /dev/null
@@ -1,667 +0,0 @@
-/*
- * Copyright (C) 2014 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.net.wifi.passpoint;
-
-import android.net.wifi.WifiEnterpriseConfig;
-import android.os.Parcelable;
-import android.os.Parcel;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-
-/**
- * A class representing a Wi-Fi Passpoint credential.
- * @hide
- */
-public class WifiPasspointCredential implements Parcelable {
-
-    private final static String TAG = "PasspointCredential";
-    private final static boolean DBG = true;
-
-    /** Wi-Fi nodes**/
-    private String mWifiSpFqdn;
-
-    /** PerProviderSubscription nodes **/
-    private String mCredentialName;
-
-    /** SubscriptionUpdate nodes **/
-    private String mSubscriptionUpdateInterval;
-    private String mSubscriptionUpdateMethod;
-    private String mSubscriptionUpdateRestriction;
-    private String mSubscriptionUpdateURI;
-    private String mSubscriptionUpdateUsername;
-    private String mSubscriptionUpdatePassword;
-
-    /** HomeSP nodes **/
-    private String mHomeSpFqdn;
-    private String mFriendlyName;
-    private Collection<WifiPasspointDmTree.HomeOIList> mHomeOIList;
-    private Collection<WifiPasspointDmTree.OtherHomePartners> mOtherHomePartnerList;
-
-    /** SubscriptionParameters nodes**/
-    private String mCreationDate;
-    private String mExpirationDate;
-
-    /** Credential nodes **/
-    private String mType;
-    private String mInnerMethod;
-    private String mCertType;
-    private String mCertSha256Fingerprint;
-    private String mUpdateIdentifier;
-    private String mUsername;
-    private String mPasswd;
-    private String mRealm;
-    private String mImsi;
-    private String mMcc;
-    private String mMnc;
-    private String mCaRootCert;
-    private String mClientCert;
-    private boolean mCheckAaaServerCertStatus;
-
-    /** Policy nodes **/
-    private String mPolicyUpdateUri;
-    private String mPolicyUpdateInterval;
-    private String mPolicyUpdateUsername;
-    private String mPolicyUpdatePassword;
-    private String mPolicyUpdateRestriction;
-    private String mPolicyUpdateMethod;
-    private Collection<WifiPasspointDmTree.PreferredRoamingPartnerList> mPreferredRoamingPartnerList;
-    private Collection<WifiPasspointDmTree.MinBackhaulThresholdNetwork> mMinBackhaulThresholdNetwork;
-    private Collection<WifiPasspointDmTree.SPExclusionList> mSpExclusionList;
-    private Collection<WifiPasspointDmTree.RequiredProtoPortTuple> mRequiredProtoPortTuple;
-    private String mMaxBssLoad;
-
-    /** CrednetialPriority node **/
-    private int mCrednetialPriority;
-
-    /** AAAServerTrustRoot nodes **/
-    private String mAaaCertUrl;
-    private String mAaaSha256Fingerprint;
-
-    /** Others **/
-    private boolean mIsMachineRemediation;
-    private boolean mUserPreferred = false;
-    private String mWifiTreePath;
-    private WifiEnterpriseConfig mEnterpriseConfig;
-
-    /** @hide */
-    public WifiPasspointCredential() {}
-
-    /**
-     * Constructor
-     * @param realm Realm of the passpoint credential
-     * @param fqdn Fully qualified domain name (FQDN) of the credential
-     * @param config Enterprise config, must be either EAP-TLS or EAP-TTLS
-     * @see WifiEnterpriseConfig
-     */
-    public WifiPasspointCredential(String realm, String fqdn, WifiEnterpriseConfig config) {
-        mRealm = realm;
-        switch (config.getEapMethod()) {
-            case WifiEnterpriseConfig.Eap.TLS:
-            case WifiEnterpriseConfig.Eap.TTLS:
-                mEnterpriseConfig = new WifiEnterpriseConfig(config);
-                break;
-            default:
-                // ignore
-        }
-    }
-
-    /** @hide */
-    public WifiPasspointCredential(String type,
-            String caroot,
-            String clientcert,
-            String mcc,
-            String mnc,
-            WifiPasspointDmTree.SpFqdn sp,
-            WifiPasspointDmTree.CredentialInfo credinfo) {
-
-        if (credinfo == null) {
-            return;
-        }
-
-        mType = type;
-        mCaRootCert = caroot;
-        mClientCert = clientcert;
-
-        mWifiSpFqdn = sp.nodeName;
-        mUpdateIdentifier = sp.perProviderSubscription.UpdateIdentifier;
-
-        mCredentialName = credinfo.nodeName;
-        mOtherHomePartnerList = credinfo.homeSP.otherHomePartners.values();
-
-        Set set = credinfo.aAAServerTrustRoot.entrySet();
-        Iterator i = set.iterator();
-        if (i.hasNext()) {
-            Map.Entry entry3 = (Map.Entry) i.next();
-            WifiPasspointDmTree.AAAServerTrustRoot aaa = (WifiPasspointDmTree.AAAServerTrustRoot) entry3.getValue();
-            mAaaCertUrl = aaa.CertURL;
-            mAaaSha256Fingerprint = aaa.CertSHA256Fingerprint;
-        }
-
-        mCertType = credinfo.credential.digitalCertificate.CertificateType;
-        mCertSha256Fingerprint = credinfo.credential.digitalCertificate.CertSHA256Fingerprint;
-        mUsername = credinfo.credential.usernamePassword.Username;
-        mPasswd = credinfo.credential.usernamePassword.Password;
-        mIsMachineRemediation = credinfo.credential.usernamePassword.MachineManaged;
-        mInnerMethod = credinfo.credential.usernamePassword.eAPMethod.InnerMethod;
-        mImsi = credinfo.credential.sim.IMSI;
-        mMcc = mcc;
-        mMnc = mnc;
-        mCreationDate = credinfo.credential.CreationDate;
-        mExpirationDate = credinfo.credential.ExpirationDate;
-        mRealm = credinfo.credential.Realm;
-
-        if (credinfo.credentialPriority == null) {
-            mCrednetialPriority = 128;
-        } else {
-            mCrednetialPriority = Integer.parseInt(credinfo.credentialPriority);
-        }
-
-        mHomeSpFqdn = credinfo.homeSP.FQDN;
-
-        mSubscriptionUpdateInterval = credinfo.subscriptionUpdate.UpdateInterval;
-        mSubscriptionUpdateMethod = credinfo.subscriptionUpdate.UpdateMethod;
-        mSubscriptionUpdateRestriction = credinfo.subscriptionUpdate.Restriction;
-        mSubscriptionUpdateURI = credinfo.subscriptionUpdate.URI;
-        mSubscriptionUpdateUsername = credinfo.subscriptionUpdate.usernamePassword.Username;
-        mSubscriptionUpdatePassword = credinfo.subscriptionUpdate.usernamePassword.Password;
-
-        mPolicyUpdateUri = credinfo.policy.policyUpdate.URI;
-        mPolicyUpdateInterval = credinfo.policy.policyUpdate.UpdateInterval;
-        mPolicyUpdateUsername = credinfo.policy.policyUpdate.usernamePassword.Username;
-        mPolicyUpdatePassword = credinfo.policy.policyUpdate.usernamePassword.Password;
-        mPolicyUpdateRestriction = credinfo.policy.policyUpdate.Restriction;
-        mPolicyUpdateMethod = credinfo.policy.policyUpdate.UpdateMethod;
-        mPreferredRoamingPartnerList = credinfo.policy.preferredRoamingPartnerList.values();
-        mMinBackhaulThresholdNetwork = credinfo.policy.minBackhaulThreshold.values();
-        mRequiredProtoPortTuple = credinfo.policy.requiredProtoPortTuple.values();
-        mMaxBssLoad = credinfo.policy.maximumBSSLoadValue;
-        mSpExclusionList = credinfo.policy.sPExclusionList.values();
-
-        mHomeOIList = credinfo.homeSP.homeOIList.values();
-        mFriendlyName = credinfo.homeSP.FriendlyName;
-        mCheckAaaServerCertStatus = credinfo.credential.CheckAAAServerCertStatus;
-    }
-
-    /** @hide */
-    public String getUpdateIdentifier() {
-        return mUpdateIdentifier;
-    }
-
-    /** @hide */
-    public String getUpdateMethod() {
-        return mSubscriptionUpdateMethod;
-    }
-
-    /** @hide */
-    public void setUpdateMethod(String method) {
-        mSubscriptionUpdateMethod = method;
-    }
-
-    /** @hide */
-    public String getWifiSpFqdn() {
-        return mWifiSpFqdn;
-    }
-
-    /** @hide */
-    public String getCredName() {
-        return mCredentialName;
-    }
-
-    /** @hide */
-    public String getType() {
-        return mType;
-    }
-
-    /**
-     * Get enterprise config of this Passpoint credential.
-     * @return Enterprise config
-     * @see WifiEnterpriseConfig
-     */
-    public WifiEnterpriseConfig getEnterpriseConfig() {
-        return new WifiEnterpriseConfig(mEnterpriseConfig);
-    }
-
-    /**
-     * Set enterprise config of this Passpoint credential.
-     * @param config Enterprise config, must be either EAP-TLS or EAP-TTLS
-     * @see WifiEnterpriseConfig
-     */
-    public void setEnterpriseConfig(WifiEnterpriseConfig config) {
-        // TODO
-    }
-
-    /** @hide */
-    public String getCertType() {
-        return mCertType;
-    }
-
-    /** @hide */
-    public String getCertSha256Fingerprint() {
-        return mCertSha256Fingerprint;
-    }
-
-    /** @hide */
-    public String getUserName() {
-        return mUsername;
-    }
-
-    /** @hide */
-    public String getPassword() {
-        // TODO: guarded by connectivity internal
-        return mPasswd;
-    }
-
-    /** @hide */
-    public String getImsi() {
-        return mImsi;
-    }
-
-    /** @hide */
-    public String getMcc() {
-        return mMcc;
-    }
-
-    /** @hide */
-    public String getMnc() {
-        return mMnc;
-    }
-
-    /** @hide */
-    public String getCaRootCertPath() {
-        return mCaRootCert;
-    }
-
-    /** @hide */
-    public String getClientCertPath() {
-        return mClientCert;
-    }
-
-    /**
-     * Get the realm of this Passpoint credential.
-     * @return Realm
-     */
-    public String getRealm() {
-        return mRealm;
-    }
-
-    /**
-     * Set the ream of this Passpoint credential.
-     * @param realm Realm
-     */
-    public void setRealm(String realm) {
-        mRealm = realm;
-    }
-
-    /** @hide */
-    public int getPriority() {
-        if (mUserPreferred) {
-            return 0;
-        }
-
-        return mCrednetialPriority;
-    }
-
-    /**
-     * Get the fully qualified domain name (FQDN) of this Passpoint credential.
-     * @return FQDN
-     */
-    public String getHomeSpFqdn() {
-        return mHomeSpFqdn;
-    }
-
-    /**
-     * Set the fully qualified domain name (FQDN) of this Passpoint credential.
-     * @param fqdn FQDN
-     */
-    public void setHomeFqdn(String fqdn) {
-        mHomeSpFqdn = fqdn;
-    }
-
-
-    /** @hide */
-    public Collection<WifiPasspointDmTree.OtherHomePartners> getOtherHomePartnerList() {
-        return mOtherHomePartnerList;
-    }
-
-    /** @hide */
-    public String getSubscriptionUpdateUsername() {
-        return mSubscriptionUpdateUsername;
-    }
-
-    /** @hide */
-    public String getSubscriptionUpdatePassword() {
-        return mSubscriptionUpdatePassword;
-    }
-
-    /** @hide */
-    public String getPolicyUpdateUri() {
-        return mPolicyUpdateUri;
-    }
-
-    /** @hide */
-    public String getPolicyUpdateInterval() {
-        return mPolicyUpdateInterval;
-    }
-
-    /** @hide */
-    public String getPolicyUpdateUsername() {
-        return mPolicyUpdateUsername;
-    }
-
-    /** @hide */
-    public String getPolicyUpdatePassword() {
-        return mPolicyUpdatePassword;
-    }
-
-    /** @hide */
-    public String getPolicyUpdateRestriction() {
-        return mPolicyUpdateRestriction;
-    }
-
-    /** @hide */
-    public String getPolicyUpdateMethod() {
-        return mPolicyUpdateMethod;
-    }
-
-    /** @hide */
-    public String getCreationDate() {
-        return mCreationDate;
-    }
-
-    /** @hide */
-    public String getExpirationDate() {
-        return mExpirationDate;
-    }
-
-    /** @hide */
-    public void setExpirationDate(String expirationdate) {
-        mExpirationDate = expirationdate;
-    }
-
-    /** @hide */
-    public Collection<WifiPasspointDmTree.PreferredRoamingPartnerList> getPreferredRoamingPartnerList() {
-        return mPreferredRoamingPartnerList;
-    }
-
-    /** @hide */
-    public Collection<WifiPasspointDmTree.HomeOIList> getHomeOiList() {
-        return mHomeOIList;
-    }
-
-    /** @hide */
-    public Collection<WifiPasspointDmTree.MinBackhaulThresholdNetwork> getBackhaulThresholdList() {
-        return mMinBackhaulThresholdNetwork;
-    }
-
-    /** @hide */
-    public Collection<WifiPasspointDmTree.RequiredProtoPortTuple> getRequiredProtoPortList() {
-        return mRequiredProtoPortTuple;
-    }
-
-    /** @hide */
-    public Collection<WifiPasspointDmTree.SPExclusionList> getSPExclusionList() {
-        return mSpExclusionList;
-    }
-
-    /** @hide */
-    public boolean getIsMachineRemediation() {
-        return mIsMachineRemediation;
-    }
-
-    /** @hide */
-    public String getAaaCertUrl() {
-        return mAaaCertUrl;
-    }
-
-    /** @hide */
-    public String getAaaSha256Fingerprint() {
-        return mAaaSha256Fingerprint;
-    }
-
-    /** @hide */
-    public String getSubscriptionUpdateRestriction() {
-        return mSubscriptionUpdateRestriction;
-    }
-
-    /** @hide */
-    public String getSubscriptionUpdateURI() {
-        return mSubscriptionUpdateURI;
-    }
-
-    /** @hide */
-    public String getSubscriptionUpdateInterval() {
-        return mSubscriptionUpdateInterval;
-    }
-
-    /** @hide */
-    public String getFriendlyName() {
-        return mFriendlyName;
-    }
-
-    /** @hide */
-    public String getMaxBssLoad() {
-        return mMaxBssLoad;
-    }
-
-    /** @hide */
-    public boolean getUserPreference() {
-        return mUserPreferred;
-    }
-
-    /** @hide */
-    public boolean getCheckAaaServerCertStatus() {
-        return mCheckAaaServerCertStatus;
-    }
-
-    /** @hide */
-    public void setUserPreference(boolean value) {
-        mUserPreferred = value;
-    }
-
-    @Override
-    /** @hide */
-    public boolean equals(Object obj) {
-        boolean result = false;
-        if (obj instanceof WifiPasspointCredential) {
-            final WifiPasspointCredential other = (WifiPasspointCredential) obj;
-            if (this.mType.equals(other.mType)) {
-                if (this.mType.equals("TTLS")) {
-                    result = this.mUsername.equals(other.mUsername) &&
-                            this.mPasswd.equals(other.mPasswd) &&
-                            this.mRealm.equals(other.mRealm) &&
-                            this.mHomeSpFqdn.equals(other.mHomeSpFqdn);
-                }
-                if (this.mType.equals("TLS")) {
-                    result = this.mRealm.equals(other.mRealm) &&
-                            this.mHomeSpFqdn.equals(other.mHomeSpFqdn) &&
-                            this.mClientCert.equals(other.mClientCert);
-                }
-                if (this.mType.equals("SIM")) {
-                    result = this.mMcc.equals(other.mMcc) &&
-                            this.mMnc.equals(other.mMnc) &&
-                            this.mImsi.equals(other.mImsi) &&
-                            this.mHomeSpFqdn.equals(other.mHomeSpFqdn);
-                }
-            }
-        }
-        return result;
-    }
-
-    @Override
-    /** @hide */
-    public String toString() {
-        StringBuffer sb = new StringBuffer();
-        String none = "<none>";
-
-        if (!DBG) {
-            sb.append(none);
-        } else {
-            sb.append(", UpdateIdentifier: ")
-            .append(mUpdateIdentifier == null ? none : mUpdateIdentifier)
-            .append(", SubscriptionUpdateMethod: ")
-            .append(mSubscriptionUpdateMethod == null ? none : mSubscriptionUpdateMethod)
-            .append(", Type: ").append(mType == null ? none : mType)
-            .append(", Username: ").append(mUsername == null ? none : mUsername)
-            .append(", Passwd: ").append(mPasswd == null ? none : mPasswd)
-            .append(", SubDMAccUsername: ")
-            .append(mSubscriptionUpdateUsername == null ? none : mSubscriptionUpdateUsername)
-            .append(", SubDMAccPassword: ")
-            .append(mSubscriptionUpdatePassword == null ? none : mSubscriptionUpdatePassword)
-            .append(", PolDMAccUsername: ")
-            .append(mPolicyUpdateUsername == null ? none : mPolicyUpdateUsername)
-            .append(", PolDMAccPassword: ")
-            .append(mPolicyUpdatePassword == null ? none : mPolicyUpdatePassword)
-            .append(", Imsi: ").append(mImsi == null ? none : mImsi)
-            .append(", Mcc: ").append(mMcc == null ? none : mMcc)
-            .append(", Mnc: ").append(mMnc == null ? none : mMnc)
-            .append(", CaRootCert: ").append(mCaRootCert == null ? none : mCaRootCert)
-            .append(", Realm: ").append(mRealm == null ? none : mRealm)
-            .append(", Priority: ").append(mCrednetialPriority)
-            .append(", Fqdn: ").append(mHomeSpFqdn == null ? none : mHomeSpFqdn)
-            .append(", Otherhomepartners: ")
-            .append(mOtherHomePartnerList == null ? none : mOtherHomePartnerList)
-            .append(", ExpirationDate: ")
-            .append(mExpirationDate == null ? none : mExpirationDate)
-            .append(", MaxBssLoad: ").append(mMaxBssLoad == null ? none : mMaxBssLoad)
-            .append(", SPExclusionList: ").append(mSpExclusionList);
-
-            if (mPreferredRoamingPartnerList != null) {
-                sb.append("PreferredRoamingPartnerList:");
-                for (WifiPasspointDmTree.PreferredRoamingPartnerList prpListItem : mPreferredRoamingPartnerList) {
-                    sb.append("[fqdnmatch:").append(prpListItem.FQDN_Match).
-                            append(", priority:").append(prpListItem.Priority).
-                            append(", country:").append(prpListItem.Country).append("]");
-                }
-            }
-
-            if (mHomeOIList != null) {
-                sb.append("HomeOIList:");
-                for (WifiPasspointDmTree.HomeOIList HomeOIListItem : mHomeOIList) {
-                    sb.append("[HomeOI:").append(HomeOIListItem.HomeOI).
-                            append(", HomeOIRequired:").append(HomeOIListItem.HomeOIRequired).
-                            append("]");
-                }
-            }
-
-            if (mMinBackhaulThresholdNetwork != null) {
-                sb.append("BackHaulThreshold:");
-                for (WifiPasspointDmTree.MinBackhaulThresholdNetwork BhtListItem : mMinBackhaulThresholdNetwork) {
-                    sb.append("[networkType:").append(BhtListItem.NetworkType).
-                            append(", dlBandwidth:").append(BhtListItem.DLBandwidth).
-                            append(", ulBandwidth:").append(BhtListItem.ULBandwidth).
-                            append("]");
-                }
-            }
-
-            if (mRequiredProtoPortTuple != null) {
-                sb.append("WifiMORequiredProtoPortTupleList:");
-                for (WifiPasspointDmTree.RequiredProtoPortTuple RpptListItem : mRequiredProtoPortTuple) {
-                    sb.append("[IPProtocol:").append(RpptListItem.IPProtocol).
-                            append(", PortNumber:").append(RpptListItem.PortNumber).
-                            append("]");
-                }
-            }
-        }
-        return sb.toString();
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    public int describeContents() {
-        return 0;
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeString(mWifiSpFqdn);
-        dest.writeString(mCredentialName);
-        dest.writeString(mType);
-        dest.writeInt(mCrednetialPriority);
-        dest.writeString(mHomeSpFqdn);
-        dest.writeString(mRealm);
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    public void readFromParcel(Parcel in) {
-        mWifiSpFqdn = in.readString();
-        mCredentialName = in.readString();
-        mType = in.readString();
-        mCrednetialPriority = in.readInt();
-        mHomeSpFqdn = in.readString();
-        mRealm = in.readString();
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    public static final Creator<WifiPasspointCredential> CREATOR =
-            new Creator<WifiPasspointCredential>() {
-                public WifiPasspointCredential createFromParcel(Parcel in) {
-                    WifiPasspointCredential pc = new WifiPasspointCredential();
-                    pc.mWifiSpFqdn = in.readString();
-                    pc.mCredentialName = in.readString();
-                    pc.mType = in.readString();
-                    pc.mCrednetialPriority = in.readInt();
-                    pc.mHomeSpFqdn = in.readString();
-                    pc.mRealm = in.readString();
-                    return pc;
-                }
-
-                public WifiPasspointCredential[] newArray(int size) {
-                    return new WifiPasspointCredential[size];
-                }
-            };
-
-    /** @hide */
-    public int compareTo(WifiPasspointCredential another) {
-
-        //The smaller the higher
-        if (mCrednetialPriority < another.mCrednetialPriority) {
-            return -1;
-        } else if (mCrednetialPriority == another.mCrednetialPriority) {
-            return this.mType.compareTo(another.mType);
-        } else {
-            return 1;
-        }
-    }
-
-    @Override
-    /** @hide */
-    public int hashCode() {
-        int hash = 208;
-        if (mType != null) {
-            hash += mType.hashCode();
-        }
-        if (mRealm != null) {
-            hash += mRealm.hashCode();
-        }
-        if (mHomeSpFqdn != null) {
-            hash += mHomeSpFqdn.hashCode();
-        }
-        if (mUsername != null) {
-            hash += mUsername.hashCode();
-        }
-        if (mPasswd != null) {
-            hash += mPasswd.hashCode();
-        }
-
-        return hash;
-    }
-}
diff --git a/wifi/java/android/net/wifi/passpoint/WifiPasspointDmTree.aidl b/wifi/java/android/net/wifi/passpoint/WifiPasspointDmTree.aidl
deleted file mode 100644
index 6a88b2e..0000000
--- a/wifi/java/android/net/wifi/passpoint/WifiPasspointDmTree.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Copyright (c) 2014, 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.net.wifi.passpoint;
-
-parcelable WifiPasspointDmTree;
diff --git a/wifi/java/android/net/wifi/passpoint/WifiPasspointDmTree.java b/wifi/java/android/net/wifi/passpoint/WifiPasspointDmTree.java
deleted file mode 100644
index bbf5fc6..0000000
--- a/wifi/java/android/net/wifi/passpoint/WifiPasspointDmTree.java
+++ /dev/null
@@ -1,1377 +0,0 @@
-/*
- * Copyright (C) 2014 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.net.wifi.passpoint;
-
-import android.os.Parcelable;
-import android.os.Parcel;
-import android.util.Log;
-
-import java.util.HashMap;
-
-/**
- * Required Mobile Device Management Tree Structure
- *
- *                   +----------+
- *                   | ./(Root) |
- *                   +----+-----+
- *                        |
- *  +---------+           |         +---------+  +---------+
- *  | DevInfo |-----------+---------|  Wi-Fi  |--|SP FQDN* |
- *  +---------+           |         +---------+  +---------+
- *  +---------+           |                           |
- *  |DevDetail|-----------+                      +-----------------------+
- *  +---------+                                  |PerproviderSubscription|--<X>+
- *                                               +-----------------------+
- *
- * This class contains all nodes start from Wi-Fi
- * @hide
- **/
-public class WifiPasspointDmTree implements Parcelable {
-    private final static String TAG = "WifiTree";
-    public int PpsMoId;//plugfest used only
-    public HashMap<String, SpFqdn> spFqdn = new HashMap<String, SpFqdn>();//Maps.newHashMap();
-
-    public SpFqdn createSpFqdn(String name) {
-        SpFqdn obj = new SpFqdn(name);
-        spFqdn.put(name, obj);
-        return obj;
-    }
-
-    public static class SpFqdn implements Parcelable {
-        public String nodeName;
-        public PerProviderSubscription perProviderSubscription = new PerProviderSubscription();
-
-        public SpFqdn(String name) {
-            nodeName = name;
-        }
-
-        public SpFqdn() {
-        }
-
-        public SpFqdn(Parcel in) {
-            readFromParcel(in);
-        }
-
-        public int describeContents() {
-            return 0;
-        }
-
-        public void writeToParcel(Parcel out, int flags) {
-            out.writeString(nodeName);
-            out.writeParcelable(perProviderSubscription, flags);
-        }
-
-        public void readFromParcel(Parcel in) {
-            if (in == null) {
-                //log here
-            } else {
-                nodeName = in.readString();
-                perProviderSubscription = in.readParcelable(PerProviderSubscription.class
-                        .getClassLoader());
-            }
-        }
-
-        public static final Parcelable.Creator<SpFqdn> CREATOR = new Parcelable.Creator<SpFqdn>() {
-            public SpFqdn createFromParcel(Parcel in) {
-                return new SpFqdn(in);
-            }
-
-            public SpFqdn[] newArray(int size) {
-                return new SpFqdn[size];
-            }
-        };
-    }
-
-    /**
-     * PerProviderSubscription
-     **/
-    public static class PerProviderSubscription implements Parcelable {
-        /**
-         * PerProviderSubscription/UpdateIdentifier
-         **/
-        public String UpdateIdentifier;
-        public HashMap<String, CredentialInfo> credentialInfo = new HashMap<String, CredentialInfo>();
-
-        public CredentialInfo createCredentialInfo(String name) {
-            CredentialInfo obj = new CredentialInfo(name);
-            credentialInfo.put(name, obj);
-            return obj;
-        }
-
-        public PerProviderSubscription() {
-        }
-
-        public PerProviderSubscription(Parcel in) {
-            readFromParcel(in);
-        }
-
-        public int describeContents() {
-            return 0;
-        }
-
-        public void writeToParcel(Parcel out, int flags) {
-            out.writeString(UpdateIdentifier);
-            out.writeMap(credentialInfo);
-        }
-
-        public void readFromParcel(Parcel in) {
-            if (in == null) {
-                //log here
-            } else {
-                UpdateIdentifier = in.readString();
-                in.readMap(credentialInfo, CredentialInfo.class.getClassLoader());
-            }
-        }
-
-        public static final Parcelable.Creator<PerProviderSubscription> CREATOR = new Parcelable.Creator<PerProviderSubscription>() {
-            public PerProviderSubscription createFromParcel(Parcel in) {
-                return new PerProviderSubscription(in);
-            }
-
-            public PerProviderSubscription[] newArray(int size) {
-                return new PerProviderSubscription[size];
-            }
-        };
-
-    }
-
-    /**
-     * PerProviderSubscription/<X+>
-     * This interior node contains the Home SP information, subscription policy, management and credential information.
-     **/
-    public static class CredentialInfo implements Parcelable {
-        public String nodeName;
-        public Policy policy = new Policy();
-        public String credentialPriority;
-        public HashMap<String, AAAServerTrustRoot> aAAServerTrustRoot = new HashMap<String, AAAServerTrustRoot>();
-        public SubscriptionUpdate subscriptionUpdate = new SubscriptionUpdate();
-        public HomeSP homeSP = new HomeSP();
-        public SubscriptionParameters subscriptionParameters = new SubscriptionParameters();
-        public Credential credential = new Credential();
-        public Extension extension = new Extension();
-
-        public CredentialInfo(String nn) {
-            nodeName = nn;
-        }
-
-        public AAAServerTrustRoot createAAAServerTrustRoot(String name, String url, String fp) {
-            AAAServerTrustRoot obj = new AAAServerTrustRoot(name, url, fp);
-            aAAServerTrustRoot.put(name, obj);
-            return obj;
-        }
-
-        public CredentialInfo() {
-        }
-
-        public CredentialInfo(Parcel in) {
-            readFromParcel(in);
-        }
-
-        public int describeContents() {
-            return 0;
-        }
-
-        public void writeToParcel(Parcel out, int flags) {
-            out.writeString(nodeName);
-            out.writeParcelable(policy, flags);
-            out.writeString(credentialPriority);
-            out.writeMap(aAAServerTrustRoot);
-            out.writeParcelable(subscriptionUpdate, flags);
-            out.writeParcelable(homeSP, flags);
-            out.writeParcelable(subscriptionParameters, flags);
-            out.writeParcelable(credential, flags);
-            //out.writeParcelable(extension, flags);
-        }
-
-        public void readFromParcel(Parcel in) {
-            if (in == null) {
-                //log here
-            } else {
-                nodeName = in.readString();
-                policy = in.readParcelable(Policy.class.getClassLoader());
-                credentialPriority = in.readString();
-                in.readMap(aAAServerTrustRoot, AAAServerTrustRoot.class.getClassLoader());
-                subscriptionUpdate = in.readParcelable(SubscriptionUpdate.class.getClassLoader());
-                homeSP = in.readParcelable(HomeSP.class.getClassLoader());
-                subscriptionParameters = in.readParcelable(SubscriptionParameters.class
-                        .getClassLoader());
-                credential = in.readParcelable(Credential.class.getClassLoader());
-                //extension = in.readParcelable(Extension.class.getClassLoader());
-            }
-        }
-
-        public static final Parcelable.Creator<CredentialInfo> CREATOR = new Parcelable.Creator<CredentialInfo>() {
-            public CredentialInfo createFromParcel(Parcel in) {
-                return new CredentialInfo(in);
-            }
-
-            public CredentialInfo[] newArray(int size) {
-                return new CredentialInfo[size];
-            }
-        };
-
-    }
-
-    /**
-     * PerProviderSubscription/<X+>/Policy
-     **/
-    public static class Policy implements Parcelable {
-        public HashMap<String, PreferredRoamingPartnerList> preferredRoamingPartnerList = new HashMap<String, PreferredRoamingPartnerList>();
-        public HashMap<String, MinBackhaulThresholdNetwork> minBackhaulThreshold = new HashMap<String, MinBackhaulThresholdNetwork>();
-        public PolicyUpdate policyUpdate = new PolicyUpdate();
-        public HashMap<String, SPExclusionList> sPExclusionList = new HashMap<String, SPExclusionList>();
-        public HashMap<String, RequiredProtoPortTuple> requiredProtoPortTuple = new HashMap<String, RequiredProtoPortTuple>();
-        public String maximumBSSLoadValue;
-
-        public PreferredRoamingPartnerList createPreferredRoamingPartnerList(String name,
-                String fqdn, String priority, String country) {
-            PreferredRoamingPartnerList obj = new PreferredRoamingPartnerList(name, fqdn, priority,
-                    country);
-            preferredRoamingPartnerList.put(name, obj);
-            return obj;
-        }
-
-        public MinBackhaulThresholdNetwork createMinBackhaulThreshold(String name, String type,
-                String dl, String ul) {
-            MinBackhaulThresholdNetwork obj = new MinBackhaulThresholdNetwork(name, type, dl, ul);
-            minBackhaulThreshold.put(name, obj);
-            return obj;
-        }
-
-        public SPExclusionList createSPExclusionList(String name, String ssid) {
-            SPExclusionList obj = new SPExclusionList(name, ssid);
-            sPExclusionList.put(name, obj);
-            return obj;
-        }
-
-        public RequiredProtoPortTuple createRequiredProtoPortTuple(String name, String proto,
-                String port) {
-            RequiredProtoPortTuple obj = new RequiredProtoPortTuple(name, proto, port);
-            requiredProtoPortTuple.put(name, obj);
-            return obj;
-        }
-
-        public Policy() {
-        }
-
-        public Policy(Parcel in) {
-            readFromParcel(in);
-        }
-
-        public int describeContents() {
-            return 0;
-        }
-
-        public void writeToParcel(Parcel out, int flags) {
-            out.writeMap(preferredRoamingPartnerList);
-            out.writeMap(minBackhaulThreshold);
-            out.writeParcelable(policyUpdate, flags);
-            out.writeMap(sPExclusionList);
-            out.writeMap(requiredProtoPortTuple);
-            out.writeString(maximumBSSLoadValue);
-        }
-
-        public void readFromParcel(Parcel in) {
-            if (in == null) {
-                //log here
-            } else {
-                in.readMap(preferredRoamingPartnerList,
-                        PreferredRoamingPartnerList.class.getClassLoader());
-                in.readMap(minBackhaulThreshold, MinBackhaulThresholdNetwork.class.getClassLoader());
-                policyUpdate = in.readParcelable(PolicyUpdate.class.getClassLoader());
-                in.readMap(sPExclusionList, SPExclusionList.class.getClassLoader());
-                in.readMap(requiredProtoPortTuple, RequiredProtoPortTuple.class.getClassLoader());
-                maximumBSSLoadValue = in.readString();
-
-            }
-        }
-
-        public static final Parcelable.Creator<Policy> CREATOR = new Parcelable.Creator<Policy>() {
-            public Policy createFromParcel(Parcel in) {
-                return new Policy(in);
-            }
-
-            public Policy[] newArray(int size) {
-                return new Policy[size];
-            }
-        };
-
-    }
-
-    /**
-     * PerProviderSubscription/<X+>/Policy/PreferredRoamingPartnerList/<X+>
-     **/
-    public static class PreferredRoamingPartnerList implements Parcelable {
-        public String nodeName;
-        public String FQDN_Match; //maximum 255 + ",includeSubdomains", equals 273
-        public String Priority;
-        public String Country; // maximum 600 octets
-
-        public PreferredRoamingPartnerList(String nn, String f, String p, String c) {
-            nodeName = nn;
-            FQDN_Match = f;
-            Priority = p;
-            Country = c;
-        }
-
-        public PreferredRoamingPartnerList() {
-        }
-
-        public PreferredRoamingPartnerList(Parcel in) {
-            readFromParcel(in);
-        }
-
-        public int describeContents() {
-            return 0;
-        }
-
-        public void writeToParcel(Parcel out, int flags) {
-            out.writeString(nodeName);
-            out.writeString(FQDN_Match);
-            out.writeString(Priority);
-            out.writeString(Country);
-        }
-
-        public void readFromParcel(Parcel in) {
-            if (in == null) {
-                //log here
-            } else {
-                nodeName = in.readString();
-                FQDN_Match = in.readString();
-                Priority = in.readString();
-                Country = in.readString();
-            }
-        }
-
-        public static final Parcelable.Creator<PreferredRoamingPartnerList> CREATOR = new Parcelable.Creator<PreferredRoamingPartnerList>() {
-            public PreferredRoamingPartnerList createFromParcel(Parcel in) {
-                return new PreferredRoamingPartnerList(in);
-            }
-
-            public PreferredRoamingPartnerList[] newArray(int size) {
-                return new PreferredRoamingPartnerList[size];
-            }
-        };
-    }
-
-    /**
-     * PerProviderSubscription/<X+>/Policy/MinBackhaulThreshold
-     **/
-    public static class MinBackhaulThresholdNetwork implements Parcelable {
-        public String nodeName;
-        public String NetworkType;
-        public String DLBandwidth;
-        public String ULBandwidth;
-
-        public MinBackhaulThresholdNetwork(String nn, String nt, String d, String u) {
-            nodeName = nn;
-            NetworkType = nt;
-            DLBandwidth = d;
-            ULBandwidth = u;
-        }
-
-        public MinBackhaulThresholdNetwork() {
-        }
-
-        public MinBackhaulThresholdNetwork(Parcel in) {
-            readFromParcel(in);
-        }
-
-        public int describeContents() {
-            return 0;
-        }
-
-        public void writeToParcel(Parcel out, int flags) {
-            out.writeString(nodeName);
-            out.writeString(NetworkType);
-            out.writeString(DLBandwidth);
-            out.writeString(ULBandwidth);
-        }
-
-        public void readFromParcel(Parcel in) {
-            if (in == null) {
-                //log here
-            } else {
-                nodeName = in.readString();
-                NetworkType = in.readString();
-                DLBandwidth = in.readString();
-                ULBandwidth = in.readString();
-            }
-        }
-
-        public static final Parcelable.Creator<MinBackhaulThresholdNetwork> CREATOR = new Parcelable.Creator<MinBackhaulThresholdNetwork>() {
-            public MinBackhaulThresholdNetwork createFromParcel(Parcel in) {
-                return new MinBackhaulThresholdNetwork(in);
-            }
-
-            public MinBackhaulThresholdNetwork[] newArray(int size) {
-                return new MinBackhaulThresholdNetwork[size];
-            }
-        };
-
-    }
-
-    /**
-     * PerProviderSubscription/<X+>/Policy/PolicyUpdate
-     **/
-    public static class PolicyUpdate implements Parcelable {
-        public String UpdateInterval;
-        public String UpdateMethod;
-        public String Restriction;
-        public String URI;
-        public UsernamePassword usernamePassword = new UsernamePassword();
-        public String Other;
-        public TrustRoot trustRoot = new TrustRoot();
-
-        public PolicyUpdate() {
-        }
-
-        public PolicyUpdate(Parcel in) {
-            readFromParcel(in);
-        }
-
-        public int describeContents() {
-            return 0;
-        }
-
-        public void writeToParcel(Parcel out, int flags) {
-            out.writeString(UpdateInterval);
-            out.writeString(UpdateMethod);
-            out.writeString(Restriction);
-            out.writeString(URI);
-            out.writeParcelable(usernamePassword, flags);
-            out.writeString(Other);
-            out.writeParcelable(trustRoot, flags);
-
-        }
-
-        public void readFromParcel(Parcel in) {
-            if (in == null) {
-                //log here
-            } else {
-                UpdateInterval = in.readString();
-                UpdateMethod = in.readString();
-                Restriction = in.readString();
-                URI = in.readString();
-                usernamePassword = in.readParcelable(UsernamePassword.class.getClassLoader());
-                Other = in.readString();
-                trustRoot = in.readParcelable(TrustRoot.class.getClassLoader());
-            }
-        }
-
-        public static final Parcelable.Creator<PolicyUpdate> CREATOR = new Parcelable.Creator<PolicyUpdate>() {
-            public PolicyUpdate createFromParcel(Parcel in) {
-                return new PolicyUpdate(in);
-            }
-
-            public PolicyUpdate[] newArray(int size) {
-                return new PolicyUpdate[size];
-            }
-        };
-    }
-
-    /**
-     * PerProviderSubscription/<X+>/Policy/SPExclusionList
-     **/
-    public static class SPExclusionList implements Parcelable {
-        public String nodeName;
-        public String SSID;
-
-        public SPExclusionList(String nn, String s) {
-            nodeName = nn;
-            SSID = s;
-        }
-
-        public SPExclusionList() {
-        }
-
-        public SPExclusionList(Parcel in) {
-            readFromParcel(in);
-        }
-
-        public int describeContents() {
-            return 0;
-        }
-
-        public void writeToParcel(Parcel out, int flags) {
-            out.writeString(nodeName);
-            out.writeString(SSID);
-        }
-
-        public void readFromParcel(Parcel in) {
-            if (in == null) {
-                //log here
-            } else {
-                nodeName = in.readString();
-                SSID = in.readString();
-            }
-        }
-
-        public static final Parcelable.Creator<SPExclusionList> CREATOR = new Parcelable.Creator<SPExclusionList>() {
-            public SPExclusionList createFromParcel(Parcel in) {
-                return new SPExclusionList(in);
-            }
-
-            public SPExclusionList[] newArray(int size) {
-                return new SPExclusionList[size];
-            }
-        };
-    }
-
-    /**
-     * PerProviderSubscription/<X+>/Policy/RequiredProtoPortTuple
-     **/
-    public static class RequiredProtoPortTuple implements Parcelable {
-        public String nodeName;
-        public String IPProtocol;
-        public String PortNumber;
-
-        public RequiredProtoPortTuple() {
-        }
-
-        public RequiredProtoPortTuple(String nn, String protocol, String port) {
-            nodeName = nn;
-            IPProtocol = protocol;
-            PortNumber = port;
-        }
-
-        public RequiredProtoPortTuple(Parcel in) {
-            readFromParcel(in);
-        }
-
-        public int describeContents() {
-            return 0;
-        }
-
-        public void writeToParcel(Parcel out, int flags) {
-            out.writeString(nodeName);
-            out.writeString(IPProtocol);
-            out.writeString(PortNumber);
-        }
-
-        public void readFromParcel(Parcel in) {
-            if (in == null) {
-                //log here
-            } else {
-                nodeName = in.readString();
-                IPProtocol = in.readString();
-                PortNumber = in.readString();
-            }
-        }
-
-        public static final Parcelable.Creator<RequiredProtoPortTuple> CREATOR = new Parcelable.Creator<RequiredProtoPortTuple>() {
-            public RequiredProtoPortTuple createFromParcel(Parcel in) {
-                return new RequiredProtoPortTuple(in);
-            }
-
-            public RequiredProtoPortTuple[] newArray(int size) {
-                return new RequiredProtoPortTuple[size];
-            }
-        };
-    }
-
-    /**
-     * PerProviderSubscription/<X+>/AAAServerTrustRoot
-     **/
-    public static class AAAServerTrustRoot implements Parcelable {
-        public String nodeName;
-        public String CertURL;
-        public String CertSHA256Fingerprint;
-
-        public AAAServerTrustRoot(String nn, String url, String fp) {
-            nodeName = nn;
-            CertURL = url;
-            CertSHA256Fingerprint = fp;
-        }
-
-        public AAAServerTrustRoot() {
-        }
-
-        public AAAServerTrustRoot(Parcel in) {
-            readFromParcel(in);
-        }
-
-        public int describeContents() {
-            return 0;
-        }
-
-        public void writeToParcel(Parcel out, int flags) {
-            out.writeString(nodeName);
-            out.writeString(CertURL);
-            out.writeString(CertSHA256Fingerprint);
-        }
-
-        public void readFromParcel(Parcel in) {
-            if (in == null) {
-                //log here
-            } else {
-                nodeName = in.readString();
-                CertURL = in.readString();
-                CertSHA256Fingerprint = in.readString();
-            }
-        }
-
-        public static final Parcelable.Creator<AAAServerTrustRoot> CREATOR = new Parcelable.Creator<AAAServerTrustRoot>() {
-            public AAAServerTrustRoot createFromParcel(Parcel in) {
-                return new AAAServerTrustRoot(in);
-            }
-
-            public AAAServerTrustRoot[] newArray(int size) {
-                return new AAAServerTrustRoot[size];
-            }
-        };
-    }
-
-    /**
-     * PerProviderSubscription/<X+>/SubscriptionUpdate
-     **/
-    public static class SubscriptionUpdate implements Parcelable {
-        public String UpdateInterval;
-        public String UpdateMethod;
-        public String Restriction;
-        public String URI;
-        public UsernamePassword usernamePassword = new UsernamePassword();
-        public String Other;
-        public TrustRoot trustRoot = new TrustRoot();
-
-        public SubscriptionUpdate() {
-        }
-
-        public SubscriptionUpdate(Parcel in) {
-            readFromParcel(in);
-        }
-
-        public int describeContents() {
-            return 0;
-        }
-
-        public void writeToParcel(Parcel out, int flags) {
-            out.writeString(UpdateInterval);
-            out.writeString(UpdateMethod);
-            out.writeString(Restriction);
-            out.writeString(URI);
-            out.writeParcelable(usernamePassword, flags);
-            out.writeString(Other);
-            out.writeParcelable(trustRoot, flags);
-        }
-
-        public void readFromParcel(Parcel in) {
-            if (in == null) {
-                //log here
-            } else {
-                UpdateInterval = in.readString();
-                UpdateMethod = in.readString();
-                Restriction = in.readString();
-                URI = in.readString();
-                usernamePassword = in.readParcelable(UsernamePassword.class.getClassLoader());
-                Other = in.readString();
-                trustRoot = in.readParcelable(TrustRoot.class.getClassLoader());
-            }
-        }
-
-        public static final Parcelable.Creator<SubscriptionUpdate> CREATOR = new Parcelable.Creator<SubscriptionUpdate>() {
-            public SubscriptionUpdate createFromParcel(Parcel in) {
-                return new SubscriptionUpdate(in);
-            }
-
-            public SubscriptionUpdate[] newArray(int size) {
-                return new SubscriptionUpdate[size];
-            }
-        };
-
-    }
-
-    /**
-     * PerProviderSubscription/<X+>/Policy/PolicyUpdate/TrustRoot
-     * PerProviderSubscription/<X+>/SubscriptionUpdate/TrustRoot
-     * PerProviderSubscription/<X+>/AAAServerTrustRoot/<X+>
-     **/
-    public static class TrustRoot implements Parcelable {
-        public String CertURL;
-        public String CertSHA256Fingerprint;
-
-        public TrustRoot() {
-        }
-
-        public TrustRoot(Parcel in) {
-            readFromParcel(in);
-        }
-
-        public int describeContents() {
-            return 0;
-        }
-
-        public void writeToParcel(Parcel out, int flags) {
-            out.writeString(CertURL);
-            out.writeString(CertSHA256Fingerprint);
-        }
-
-        public void readFromParcel(Parcel in) {
-            if (in == null) {
-                //log here
-            } else {
-                CertURL = in.readString();
-                CertSHA256Fingerprint = in.readString();
-            }
-        }
-
-        public static final Parcelable.Creator<TrustRoot> CREATOR = new Parcelable.Creator<TrustRoot>() {
-            public TrustRoot createFromParcel(Parcel in) {
-                return new TrustRoot(in);
-            }
-
-            public TrustRoot[] newArray(int size) {
-                return new TrustRoot[size];
-            }
-        };
-    }
-
-    /**
-     * PerProviderSubscription/<X+>/Policy/PolicyUpdate/UsernamePassword
-     * PerProviderSubscription/<X+>/SubscriptionUpdate/UsernamePassword
-     * PerProviderSubscription/<X+>/Credential/UsernamePassword
-     **/
-    public static class UsernamePassword implements Parcelable {
-        public String Username;
-        public String Password;
-        //following are Credential node used only
-        public boolean MachineManaged;
-        public String SoftTokenApp;
-        public String AbleToShare;
-        public EAPMethod eAPMethod = new EAPMethod();
-
-        public UsernamePassword() {
-        }
-
-        public UsernamePassword(Parcel in) {
-            readFromParcel(in);
-        }
-
-        public int describeContents() {
-            return 0;
-        }
-
-        public void writeToParcel(Parcel out, int flags) {
-            out.writeString(Username);
-            out.writeString(Password);
-            out.writeInt(MachineManaged ? 1 : 0);
-            out.writeString(SoftTokenApp);
-            out.writeString(AbleToShare);
-            out.writeParcelable(eAPMethod, flags);
-        }
-
-        public void readFromParcel(Parcel in) {
-            if (in == null) {
-                //log here
-            } else {
-                Username = in.readString();
-                Password = in.readString();
-                MachineManaged = (in.readInt() == 1) ? true : false;
-                SoftTokenApp = in.readString();
-                AbleToShare = in.readString();
-                eAPMethod = in.readParcelable(EAPMethod.class.getClassLoader());
-            }
-        }
-
-        public static final Parcelable.Creator<UsernamePassword> CREATOR = new Parcelable.Creator<UsernamePassword>() {
-            public UsernamePassword createFromParcel(Parcel in) {
-                return new UsernamePassword(in);
-            }
-
-            public UsernamePassword[] newArray(int size) {
-                return new UsernamePassword[size];
-            }
-        };
-
-    }
-
-    /**
-     * PerProviderSubscription/<X+>/Credential/UsernamePassword/EAPMethod
-     **/
-    public static class EAPMethod implements Parcelable {
-        public String EAPType;
-        public String VendorId;
-        public String VendorType;
-        public String InnerEAPType;
-        public String InnerVendorId;
-        public String InnerVendorType;
-        public String InnerMethod;
-
-        public EAPMethod() {
-        }
-
-        public EAPMethod(Parcel in) {
-            readFromParcel(in);
-        }
-
-        public int describeContents() {
-            return 0;
-        }
-
-        public void writeToParcel(Parcel out, int flags) {
-            out.writeString(EAPType);
-            out.writeString(VendorId);
-            out.writeString(VendorType);
-            out.writeString(InnerEAPType);
-            out.writeString(InnerVendorId);
-            out.writeString(InnerVendorType);
-            out.writeString(InnerMethod);
-        }
-
-        public void readFromParcel(Parcel in) {
-            if (in == null) {
-                //log here
-            } else {
-                EAPType = in.readString();
-                VendorId = in.readString();
-                VendorType = in.readString();
-                InnerEAPType = in.readString();
-                InnerVendorId = in.readString();
-                InnerVendorType = in.readString();
-                InnerMethod = in.readString();
-            }
-        }
-
-        public static final Parcelable.Creator<EAPMethod> CREATOR = new Parcelable.Creator<EAPMethod>() {
-            public EAPMethod createFromParcel(Parcel in) {
-                return new EAPMethod(in);
-            }
-
-            public EAPMethod[] newArray(int size) {
-                return new EAPMethod[size];
-            }
-        };
-    }
-
-    /**
-     * PerProviderSubscription/<X+>/HomeSP
-     **/
-    public static class HomeSP implements Parcelable {
-        public HashMap<String, NetworkID> networkID = new HashMap<String, NetworkID>();
-        public String FriendlyName;
-        public String IconURL;
-        public String FQDN;
-        public HashMap<String, HomeOIList> homeOIList = new HashMap<String, HomeOIList>();
-        public HashMap<String, OtherHomePartners> otherHomePartners = new HashMap<String, OtherHomePartners>();
-        public String RoamingConsortiumOI;
-
-        public NetworkID createNetworkID(String name, String ssid, String hessid) {
-            NetworkID obj = new NetworkID(name, ssid, hessid);
-            networkID.put(name, obj);
-            return obj;
-        }
-
-        public HomeOIList createHomeOIList(String name, String homeoi, boolean required) {
-            HomeOIList obj = new HomeOIList(name, homeoi, required);
-            homeOIList.put(name, obj);
-            return obj;
-        }
-
-        public OtherHomePartners createOtherHomePartners(String name, String fqdn) {
-            OtherHomePartners obj = new OtherHomePartners(name, fqdn);
-            otherHomePartners.put(name, obj);
-            return obj;
-        }
-
-        public HomeSP() {
-        }
-
-        public HomeSP(Parcel in) {
-            readFromParcel(in);
-        }
-
-        public int describeContents() {
-            return 0;
-        }
-
-        public void writeToParcel(Parcel out, int flags) {
-            out.writeMap(networkID);
-            out.writeString(FriendlyName);
-            out.writeString(IconURL);
-            out.writeString(FQDN);
-            out.writeMap(homeOIList);
-            out.writeMap(otherHomePartners);
-            out.writeString(RoamingConsortiumOI);
-        }
-
-        public void readFromParcel(Parcel in) {
-            if (in == null) {
-                //log here
-            } else {
-                in.readMap(networkID, NetworkID.class.getClassLoader());
-                FriendlyName = in.readString();
-                IconURL = in.readString();
-                FQDN = in.readString();
-                in.readMap(homeOIList, HomeOIList.class.getClassLoader());
-                in.readMap(otherHomePartners, OtherHomePartners.class.getClassLoader());
-                RoamingConsortiumOI = in.readString();
-            }
-        }
-
-        public static final Parcelable.Creator<HomeSP> CREATOR = new Parcelable.Creator<HomeSP>() {
-            public HomeSP createFromParcel(Parcel in) {
-                return new HomeSP(in);
-            }
-
-            public HomeSP[] newArray(int size) {
-                return new HomeSP[size];
-            }
-        };
-
-    }
-
-    /**
-     * PerProviderSubscription/<X+>/HomeSP/NetworkID
-     **/
-    public static class NetworkID implements Parcelable {
-        public String nodeName;
-        public String SSID;
-        public String HESSID;
-
-        public NetworkID(String nn, String s, String h) {
-            nodeName = nn;
-            SSID = s;
-            HESSID = h;
-        }
-
-        public NetworkID() {
-        }
-
-        public NetworkID(Parcel in) {
-            readFromParcel(in);
-        }
-
-        public int describeContents() {
-            return 0;
-        }
-
-        public void writeToParcel(Parcel out, int flags) {
-            out.writeString(nodeName);
-            out.writeString(SSID);
-            out.writeString(HESSID);
-        }
-
-        public void readFromParcel(Parcel in) {
-            if (in == null) {
-                //log here
-            } else {
-                nodeName = in.readString();
-                SSID = in.readString();
-                HESSID = in.readString();
-            }
-        }
-
-        public static final Parcelable.Creator<NetworkID> CREATOR = new Parcelable.Creator<NetworkID>() {
-            public NetworkID createFromParcel(Parcel in) {
-                return new NetworkID(in);
-            }
-
-            public NetworkID[] newArray(int size) {
-                return new NetworkID[size];
-            }
-        };
-
-    }
-
-    /**
-     * PerProviderSubscription/<X+>/HomeSP/HomeOIList
-     **/
-    public static class HomeOIList implements Parcelable {
-        public String nodeName;
-        public String HomeOI;
-        public boolean HomeOIRequired;
-
-        public HomeOIList(String nn, String h, boolean r) {
-            nodeName = nn;
-            HomeOI = h;
-            HomeOIRequired = r;
-        }
-
-        public HomeOIList() {
-        }
-
-        public HomeOIList(Parcel in) {
-            readFromParcel(in);
-        }
-
-        public int describeContents() {
-            return 0;
-        }
-
-        public void writeToParcel(Parcel out, int flags) {
-            out.writeString(nodeName);
-            out.writeString(HomeOI);
-            out.writeInt(HomeOIRequired ? 1 : 0);
-        }
-
-        public void readFromParcel(Parcel in) {
-            if (in == null) {
-                //log here
-            } else {
-                nodeName = in.readString();
-                HomeOI = in.readString();
-                HomeOIRequired = (in.readInt() == 1) ? true : false;
-            }
-        }
-
-        public static final Parcelable.Creator<HomeOIList> CREATOR = new Parcelable.Creator<HomeOIList>() {
-            public HomeOIList createFromParcel(Parcel in) {
-                return new HomeOIList(in);
-            }
-
-            public HomeOIList[] newArray(int size) {
-                return new HomeOIList[size];
-            }
-        };
-
-    }
-
-    /**
-     * PerProviderSubscription/<X+>/HomeSP/OtherHomePartners
-     **/
-    public static class OtherHomePartners implements Parcelable {
-        public String nodeName;
-        public String FQDN;
-
-        public OtherHomePartners(String nn, String f) {
-            nodeName = nn;
-            FQDN = f;
-        }
-
-        public OtherHomePartners() {
-        }
-
-        public OtherHomePartners(Parcel in) {
-            readFromParcel(in);
-        }
-
-        public int describeContents() {
-            return 0;
-        }
-
-        public void writeToParcel(Parcel out, int flags) {
-            out.writeString(nodeName);
-            out.writeString(FQDN);
-        }
-
-        public void readFromParcel(Parcel in) {
-            if (in == null) {
-                //log here
-            } else {
-                nodeName = in.readString();
-                FQDN = in.readString();
-            }
-        }
-
-        public static final Parcelable.Creator<OtherHomePartners> CREATOR = new Parcelable.Creator<OtherHomePartners>() {
-            public OtherHomePartners createFromParcel(Parcel in) {
-                return new OtherHomePartners(in);
-            }
-
-            public OtherHomePartners[] newArray(int size) {
-                return new OtherHomePartners[size];
-            }
-        };
-
-    }
-
-    /**
-     * PerProviderSubscription/<X+>/SubscriptionParameters
-     **/
-    public static class SubscriptionParameters implements Parcelable {
-        public String CreationDate;
-        public String ExpirationDate;
-        public String TypeOfSubscription;
-        public UsageLimits usageLimits = new UsageLimits();
-
-        public SubscriptionParameters() {
-        }
-
-        public SubscriptionParameters(Parcel in) {
-            readFromParcel(in);
-        }
-
-        public int describeContents() {
-            return 0;
-        }
-
-        public void writeToParcel(Parcel out, int flags) {
-            out.writeString(CreationDate);
-            out.writeString(ExpirationDate);
-            out.writeString(TypeOfSubscription);
-            out.writeParcelable(usageLimits, flags);
-        }
-
-        public void readFromParcel(Parcel in) {
-            if (in == null) {
-                //log here
-            } else {
-                CreationDate = in.readString();
-                ExpirationDate = in.readString();
-                TypeOfSubscription = in.readString();
-                usageLimits = in.readParcelable(UsageLimits.class.getClassLoader());
-            }
-        }
-
-        public static final Parcelable.Creator<SubscriptionParameters> CREATOR = new Parcelable.Creator<SubscriptionParameters>() {
-            public SubscriptionParameters createFromParcel(Parcel in) {
-                return new SubscriptionParameters(in);
-            }
-
-            public SubscriptionParameters[] newArray(int size) {
-                return new SubscriptionParameters[size];
-            }
-        };
-
-    }
-
-    /**
-     * PerProviderSubscription/<X+>/SubscriptionParameters/UsageLimits
-     **/
-    public static class UsageLimits implements Parcelable {
-        public String DataLimit;
-        public String StartDate;
-        public String TimeLimit;
-        public String UsageTimePeriod;
-
-        public UsageLimits() {
-        }
-
-        public UsageLimits(Parcel in) {
-            readFromParcel(in);
-        }
-
-        public int describeContents() {
-            return 0;
-        }
-
-        public void writeToParcel(Parcel out, int flags) {
-            out.writeString(DataLimit);
-            out.writeString(StartDate);
-            out.writeString(TimeLimit);
-            out.writeString(UsageTimePeriod);
-        }
-
-        public void readFromParcel(Parcel in) {
-            if (in == null) {
-                //log here
-            } else {
-                DataLimit = in.readString();
-                StartDate = in.readString();
-                TimeLimit = in.readString();
-                UsageTimePeriod = in.readString();
-            }
-        }
-
-        public static final Parcelable.Creator<UsageLimits> CREATOR = new Parcelable.Creator<UsageLimits>() {
-            public UsageLimits createFromParcel(Parcel in) {
-                return new UsageLimits(in);
-            }
-
-            public UsageLimits[] newArray(int size) {
-                return new UsageLimits[size];
-            }
-        };
-    }
-
-    /**
-     * PerProviderSubscription/<X+>/Credential
-     **/
-    public static class Credential implements Parcelable {
-        public String CreationDate;
-        public String ExpirationDate;
-        public UsernamePassword usernamePassword = new UsernamePassword();
-        public DigitalCertificate digitalCertificate = new DigitalCertificate();
-        public String Realm;
-        public boolean CheckAAAServerCertStatus;
-        public SIM sim = new SIM();
-
-        public Credential() {
-        }
-
-        public Credential(Parcel in) {
-            readFromParcel(in);
-        }
-
-        public int describeContents() {
-            return 0;
-        }
-
-        public void writeToParcel(Parcel out, int flags) {
-            out.writeString(CreationDate);
-            out.writeString(ExpirationDate);
-            out.writeParcelable(usernamePassword, flags);
-            out.writeParcelable(digitalCertificate, flags);
-            out.writeString(Realm);
-            out.writeInt(CheckAAAServerCertStatus ? 1 : 0);
-            out.writeParcelable(sim, flags);
-        }
-
-        public void readFromParcel(Parcel in) {
-            if (in == null) {
-                //log here
-            } else {
-                CreationDate = in.readString();
-                ExpirationDate = in.readString();
-                usernamePassword = in.readParcelable(UsernamePassword.class.getClassLoader());
-                digitalCertificate = in.readParcelable(DigitalCertificate.class.getClassLoader());
-                Realm = in.readString();
-                CheckAAAServerCertStatus = (in.readInt() == 1) ? true : false;
-                sim = in.readParcelable(SIM.class.getClassLoader());
-            }
-        }
-
-        public static final Parcelable.Creator<Credential> CREATOR = new Parcelable.Creator<Credential>() {
-            public Credential createFromParcel(Parcel in) {
-                return new Credential(in);
-            }
-
-            public Credential[] newArray(int size) {
-                return new Credential[size];
-            }
-        };
-    }
-
-    /**
-     * PerProviderSubscription/<X+>/Credential/DigitalCertificate
-     **/
-    public static class DigitalCertificate implements Parcelable {
-        public String CertificateType;
-        public String CertSHA256Fingerprint;
-
-        public DigitalCertificate() {
-        }
-
-        public DigitalCertificate(Parcel in) {
-            readFromParcel(in);
-        }
-
-        public int describeContents() {
-            return 0;
-        }
-
-        public void writeToParcel(Parcel out, int flags) {
-            out.writeString(CertificateType);
-            out.writeString(CertSHA256Fingerprint);
-        }
-
-        public void readFromParcel(Parcel in) {
-            if (in == null) {
-                //log here
-            } else {
-                CertificateType = in.readString();
-                CertSHA256Fingerprint = in.readString();
-            }
-        }
-
-        public static final Parcelable.Creator<DigitalCertificate> CREATOR = new Parcelable.Creator<DigitalCertificate>() {
-            public DigitalCertificate createFromParcel(Parcel in) {
-                return new DigitalCertificate(in);
-            }
-
-            public DigitalCertificate[] newArray(int size) {
-                return new DigitalCertificate[size];
-            }
-        };
-
-    }
-
-    /**
-     * PerProviderSubscription/<X+>/Credential/SIM
-     **/
-    public static class SIM implements Parcelable {
-        public String IMSI;
-        public String EAPType;
-
-        public SIM() {
-        }
-
-        public SIM(Parcel in) {
-            readFromParcel(in);
-        }
-
-        public int describeContents() {
-            return 0;
-        }
-
-        public void writeToParcel(Parcel out, int flags) {
-            out.writeString(IMSI);
-            out.writeString(EAPType);
-        }
-
-        public void readFromParcel(Parcel in) {
-            if (in == null) {
-                //log here
-            } else {
-                IMSI = in.readString();
-                EAPType = in.readString();
-            }
-        }
-
-        public static final Parcelable.Creator<SIM> CREATOR = new Parcelable.Creator<SIM>() {
-            public SIM createFromParcel(Parcel in) {
-                return new SIM(in);
-            }
-
-            public SIM[] newArray(int size) {
-                return new SIM[size];
-            }
-        };
-
-    }
-
-    /**
-     * PerProviderSubscription/<X+>/Extension
-     **/
-    public static class Extension {
-        public String empty;
-    }
-
-    public WifiPasspointDmTree() {
-    }
-
-    public WifiPasspointDmTree(Parcel in) {
-        readFromParcel(in);
-    }
-
-    public int describeContents() {
-        return 0;
-    }
-
-    public void writeToParcel(Parcel out, int flags) {
-        out.writeMap(spFqdn);
-    }
-
-    public void readFromParcel(Parcel in) {
-        if (in == null) {
-            //log here
-        } else {
-            in.readMap(spFqdn, SpFqdn.class.getClassLoader());
-        }
-    }
-
-    public static final Parcelable.Creator<WifiPasspointDmTree> CREATOR = new Parcelable.Creator<WifiPasspointDmTree>() {
-        public WifiPasspointDmTree createFromParcel(Parcel in) {
-            return new WifiPasspointDmTree(in);
-        }
-
-        public WifiPasspointDmTree[] newArray(int size) {
-            return new WifiPasspointDmTree[size];
-        }
-    };
-
-}
diff --git a/wifi/java/android/net/wifi/passpoint/WifiPasspointInfo.aidl b/wifi/java/android/net/wifi/passpoint/WifiPasspointInfo.aidl
deleted file mode 100644
index 27f23bc..0000000
--- a/wifi/java/android/net/wifi/passpoint/WifiPasspointInfo.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Copyright (c) 2014, 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.net.wifi.passpoint;
-
-parcelable WifiPasspointInfo;
diff --git a/wifi/java/android/net/wifi/passpoint/WifiPasspointInfo.java b/wifi/java/android/net/wifi/passpoint/WifiPasspointInfo.java
deleted file mode 100644
index 32cf773..0000000
--- a/wifi/java/android/net/wifi/passpoint/WifiPasspointInfo.java
+++ /dev/null
@@ -1,558 +0,0 @@
-/*
- * Copyright (C) 2014 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.net.wifi.passpoint;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class WifiPasspointInfo implements Parcelable {
-
-    /** TODO doc */
-    public static final int ANQP_CAPABILITY = 1 << 0;
-
-    /** TODO doc */
-    public static final int VENUE_NAME = 1 << 1;
-
-    /** TODO doc */
-    public static final int NETWORK_AUTH_TYPE = 1 << 2;
-
-    /** TODO doc */
-    public static final int ROAMING_CONSORTIUM = 1 << 3;
-
-    /** TODO doc */
-    public static final int IP_ADDR_TYPE_AVAILABILITY = 1 << 4;
-
-    /** TODO doc */
-    public static final int NAI_REALM = 1 << 5;
-
-    /** TODO doc */
-    public static final int CELLULAR_NETWORK = 1 << 6;
-
-    /** TODO doc */
-    public static final int DOMAIN_NAME = 1 << 7;
-
-    /** TODO doc */
-    public static final int HOTSPOT_CAPABILITY = 1 << 8;
-
-    /** TODO doc */
-    public static final int OPERATOR_FRIENDLY_NAME = 1 << 9;
-
-    /** TODO doc */
-    public static final int WAN_METRICS = 1 << 10;
-
-    /** TODO doc */
-    public static final int CONNECTION_CAPABILITY = 1 << 11;
-
-    /** TODO doc */
-    public static final int OSU_PROVIDER = 1 << 12;
-
-    /** TODO doc */
-    public static final int PRESET_CRED_MATCH =
-            ANQP_CAPABILITY |
-                    HOTSPOT_CAPABILITY |
-                    NAI_REALM |
-                    CELLULAR_NETWORK |
-                    DOMAIN_NAME;
-
-    /** TODO doc */
-    public static final int PRESET_ALL =
-            ANQP_CAPABILITY |
-                    VENUE_NAME |
-                    NETWORK_AUTH_TYPE |
-                    ROAMING_CONSORTIUM |
-                    IP_ADDR_TYPE_AVAILABILITY |
-                    NAI_REALM |
-                    CELLULAR_NETWORK |
-                    DOMAIN_NAME |
-                    HOTSPOT_CAPABILITY |
-                    OPERATOR_FRIENDLY_NAME |
-                    WAN_METRICS |
-                    CONNECTION_CAPABILITY |
-                    OSU_PROVIDER;
-
-
-    public static class WanMetrics {
-        public static final int STATUS_RESERVED = 0;
-        public static final int STATUS_UP = 1;
-        public static final int STATUS_DOWN = 2;
-        public static final int STATUS_TEST = 3;
-
-        public int wanInfo;
-        public long downlinkSpeed;
-        public long uplinkSpeed;
-        public int downlinkLoad;
-        public int uplinkLoad;
-        public int lmd;
-
-        public int getLinkStatus() {
-            return wanInfo & 0x3;
-        }
-
-        public boolean getSymmetricLink() {
-            return (wanInfo & (1 << 2)) != 0;
-        }
-
-        public boolean getAtCapacity() {
-            return (wanInfo & (1 << 3)) != 0;
-        }
-
-        @Override
-        public String toString() {
-            return wanInfo + "," + downlinkSpeed + "," + uplinkSpeed + "," +
-                    downlinkLoad + "," + uplinkLoad + "," + lmd;
-        }
-    }
-
-    public static class IpProtoPort {
-        public static final int STATUS_CLOSED = 0;
-        public static final int STATUS_OPEN = 1;
-        public static final int STATUS_UNKNOWN = 2;
-
-        public int proto;
-        public int port;
-        public int status;
-
-        @Override
-        public String toString() {
-            return proto + "," + port + "," + status;
-        }
-    }
-
-    public static class NetworkAuthType {
-        public static final int TYPE_TERMS_AND_CONDITION = 0;
-        public static final int TYPE_ONLINE_ENROLLMENT = 1;
-        public static final int TYPE_HTTP_REDIRECTION = 2;
-        public static final int TYPE_DNS_REDIRECTION = 3;
-
-        public int type;
-        public String redirectUrl;
-
-        @Override
-        public String toString() {
-            return type + "," + redirectUrl;
-        }
-    }
-
-    public static class IpAddressType {
-        public static final int IPV6_NOT_AVAILABLE = 0;
-        public static final int IPV6_AVAILABLE = 1;
-        public static final int IPV6_UNKNOWN = 2;
-
-        public static final int IPV4_NOT_AVAILABLE = 0;
-        public static final int IPV4_PUBLIC = 1;
-        public static final int IPV4_PORT_RESTRICTED = 2;
-        public static final int IPV4_SINGLE_NAT = 3;
-        public static final int IPV4_DOUBLE_NAT = 4;
-        public static final int IPV4_PORT_RESTRICTED_SINGLE_NAT = 5;
-        public static final int IPV4_PORT_RESTRICTED_DOUBLE_NAT = 6;
-        public static final int IPV4_PORT_UNKNOWN = 7;
-
-        private static final int NULL_VALUE = -1;
-
-        public int availability;
-
-        public int getIpv6Availability() {
-            return availability & 0x3;
-        }
-
-        public int getIpv4Availability() {
-            return (availability & 0xFF) >> 2;
-        }
-
-        @Override
-        public String toString() {
-            return getIpv6Availability() + "," + getIpv4Availability();
-        }
-    }
-
-    public static class NaiRealm {
-        public static final int ENCODING_RFC4282 = 0;
-        public static final int ENCODING_UTF8 = 1;
-
-        public int encoding;
-        public String realm;
-
-        @Override
-        public String toString() {
-            return encoding + "," + realm;
-        }
-    }
-
-    public static class CellularNetwork {
-        public String mcc;
-        public String mnc;
-
-        @Override
-        public String toString() {
-            return mcc + "," + mnc;
-        }
-    }
-
-    /** BSSID */
-    public String bssid;
-
-    /** venue name */
-    public String venueName;
-
-    /** list of network authentication types */
-    public List<NetworkAuthType> networkAuthTypeList;
-
-    /** list of roaming consortium OIs */
-    public List<String> roamingConsortiumList;
-
-    /** IP address availability */
-    public IpAddressType ipAddrTypeAvailability;
-
-    /** list of NAI realm */
-    public List<NaiRealm> naiRealmList;
-
-    /** list of 3GPP cellular network */
-    public List<CellularNetwork> cellularNetworkList;
-
-    /** list of fully qualified domain name (FQDN) */
-    public List<String> domainNameList;
-
-    /** HS 2.0 operator friendly name */
-    public String operatorFriendlyName;
-
-    /** HS 2.0 wan metrics */
-    public WanMetrics wanMetrics;
-
-    /** list of HS 2.0 IP proto port */
-    public List<IpProtoPort> connectionCapabilityList;
-
-    /** list of HS 2.0 OSU providers */
-    public List<WifiPasspointOsuProvider> osuProviderList;
-
-    /**
-     * Convert mask to ANQP subtypes, for supplicant command use.
-     *
-     * @param mask The ANQP subtypes mask.
-     * @return String of ANQP subtypes, good for supplicant command use
-     * @hide
-     */
-    public static String toAnqpSubtypes(int mask) {
-        StringBuilder sb = new StringBuilder();
-        if ((mask & ANQP_CAPABILITY) != 0)
-            sb.append("257,");
-        if ((mask & VENUE_NAME) != 0)
-            sb.append("258,");
-        if ((mask & NETWORK_AUTH_TYPE) != 0)
-            sb.append("260,");
-        if ((mask & ROAMING_CONSORTIUM) != 0)
-            sb.append("261,");
-        if ((mask & IP_ADDR_TYPE_AVAILABILITY) != 0)
-            sb.append("262,");
-        if ((mask & NAI_REALM) != 0)
-            sb.append("263,");
-        if ((mask & CELLULAR_NETWORK) != 0)
-            sb.append("264,");
-        if ((mask & DOMAIN_NAME) != 0)
-            sb.append("268,");
-        if ((mask & HOTSPOT_CAPABILITY) != 0)
-            sb.append("hs20:2,");
-        if ((mask & OPERATOR_FRIENDLY_NAME) != 0)
-            sb.append("hs20:3,");
-        if ((mask & WAN_METRICS) != 0)
-            sb.append("hs20:4,");
-        if ((mask & CONNECTION_CAPABILITY) != 0)
-            sb.append("hs20:5,");
-        if ((mask & OSU_PROVIDER) != 0)
-            sb.append("hs20:8,");
-        if (sb.length() > 0)
-            sb.deleteCharAt(sb.length() - 1);
-        return sb.toString();
-    }
-
-    @Override
-    public String toString() {
-        StringBuffer sb = new StringBuffer();
-
-        sb.append("BSSID: ").append("(").append(bssid).append(")");
-
-        if (venueName != null)
-            sb.append(" venueName: ").append("(")
-              .append(venueName.replace("\n", "\\n")).append(")");
-
-        if (networkAuthTypeList != null) {
-            sb.append(" networkAuthType: ");
-            for (NetworkAuthType auth : networkAuthTypeList)
-                sb.append("(").append(auth.toString()).append(")");
-        }
-
-        if (roamingConsortiumList != null) {
-            sb.append(" roamingConsortium: ");
-            for (String oi : roamingConsortiumList)
-                sb.append("(").append(oi).append(")");
-        }
-
-        if (ipAddrTypeAvailability != null) {
-            sb.append(" ipAddrTypeAvaibility: ").append("(")
-              .append(ipAddrTypeAvailability.toString()).append(")");
-        }
-
-        if (naiRealmList != null) {
-            sb.append(" naiRealm: ");
-            for (NaiRealm realm : naiRealmList)
-                sb.append("(").append(realm.toString()).append(")");
-        }
-
-        if (cellularNetworkList != null) {
-            sb.append(" cellularNetwork: ");
-            for (CellularNetwork plmn : cellularNetworkList)
-                sb.append("(").append(plmn.toString()).append(")");
-        }
-
-        if (domainNameList != null) {
-            sb.append(" domainName: ");
-            for (String fqdn : domainNameList)
-                sb.append("(").append(fqdn).append(")");
-        }
-
-        if (operatorFriendlyName != null)
-            sb.append(" operatorFriendlyName: ").append("(")
-              .append(operatorFriendlyName).append(")");
-
-        if (wanMetrics != null)
-            sb.append(" wanMetrics: ").append("(")
-              .append(wanMetrics.toString()).append(")");
-
-        if (connectionCapabilityList != null) {
-            sb.append(" connectionCapability: ");
-            for (IpProtoPort ip : connectionCapabilityList)
-                sb.append("(").append(ip.toString()).append(")");
-        }
-
-        if (osuProviderList != null) {
-            sb.append(" osuProviderList: ");
-            for (WifiPasspointOsuProvider osu : osuProviderList)
-                sb.append("(").append(osu.toString()).append(")");
-        }
-
-        return sb.toString();
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    @Override
-    public void writeToParcel(Parcel out, int flags) {
-        out.writeString(bssid);
-        out.writeString(venueName);
-
-        if (networkAuthTypeList == null) {
-            out.writeInt(0);
-        } else {
-            out.writeInt(networkAuthTypeList.size());
-            for (NetworkAuthType auth : networkAuthTypeList) {
-                out.writeInt(auth.type);
-                out.writeString(auth.redirectUrl);
-            }
-        }
-
-        if (roamingConsortiumList == null) {
-            out.writeInt(0);
-        } else {
-            out.writeInt(roamingConsortiumList.size());
-            for (String oi : roamingConsortiumList)
-                out.writeString(oi);
-        }
-
-        if (ipAddrTypeAvailability == null) {
-            out.writeInt(IpAddressType.NULL_VALUE);
-        } else {
-            out.writeInt(ipAddrTypeAvailability.availability);
-        }
-
-        if (naiRealmList == null) {
-            out.writeInt(0);
-        } else {
-            out.writeInt(naiRealmList.size());
-            for (NaiRealm realm : naiRealmList) {
-                out.writeInt(realm.encoding);
-                out.writeString(realm.realm);
-            }
-        }
-
-        if (cellularNetworkList == null) {
-            out.writeInt(0);
-        } else {
-            out.writeInt(cellularNetworkList.size());
-            for (CellularNetwork plmn : cellularNetworkList) {
-                out.writeString(plmn.mcc);
-                out.writeString(plmn.mnc);
-            }
-        }
-
-
-        if (domainNameList == null) {
-            out.writeInt(0);
-        } else {
-            out.writeInt(domainNameList.size());
-            for (String fqdn : domainNameList)
-                out.writeString(fqdn);
-        }
-
-        out.writeString(operatorFriendlyName);
-
-        if (wanMetrics == null) {
-            out.writeInt(0);
-        } else {
-            out.writeInt(1);
-            out.writeInt(wanMetrics.wanInfo);
-            out.writeLong(wanMetrics.downlinkSpeed);
-            out.writeLong(wanMetrics.uplinkSpeed);
-            out.writeInt(wanMetrics.downlinkLoad);
-            out.writeInt(wanMetrics.uplinkLoad);
-            out.writeInt(wanMetrics.lmd);
-        }
-
-        if (connectionCapabilityList == null) {
-            out.writeInt(0);
-        } else {
-            out.writeInt(connectionCapabilityList.size());
-            for (IpProtoPort ip : connectionCapabilityList) {
-                out.writeInt(ip.proto);
-                out.writeInt(ip.port);
-                out.writeInt(ip.status);
-            }
-        }
-
-        if (osuProviderList == null) {
-            out.writeInt(0);
-        } else {
-            out.writeInt(osuProviderList.size());
-            for (WifiPasspointOsuProvider osu : osuProviderList)
-                osu.writeToParcel(out, flags);
-        }
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    public static final Parcelable.Creator<WifiPasspointInfo> CREATOR =
-            new Parcelable.Creator<WifiPasspointInfo>() {
-                @Override
-                public WifiPasspointInfo createFromParcel(Parcel in) {
-                    WifiPasspointInfo p = new WifiPasspointInfo();
-                    int n;
-
-                    p.bssid = in.readString();
-                    p.venueName = in.readString();
-
-                    n = in.readInt();
-                    if (n > 0) {
-                        p.networkAuthTypeList = new ArrayList<NetworkAuthType>();
-                        for (int i = 0; i < n; i++) {
-                            NetworkAuthType auth = new NetworkAuthType();
-                            auth.type = in.readInt();
-                            auth.redirectUrl = in.readString();
-                            p.networkAuthTypeList.add(auth);
-                        }
-                    }
-
-                    n = in.readInt();
-                    if (n > 0) {
-                        p.roamingConsortiumList = new ArrayList<String>();
-                        for (int i = 0; i < n; i++)
-                            p.roamingConsortiumList.add(in.readString());
-                    }
-
-                    n = in.readInt();
-                    if (n != IpAddressType.NULL_VALUE) {
-                        p.ipAddrTypeAvailability = new IpAddressType();
-                        p.ipAddrTypeAvailability.availability = n;
-                    }
-
-                    n = in.readInt();
-                    if (n > 0) {
-                        p.naiRealmList = new ArrayList<NaiRealm>();
-                        for (int i = 0; i < n; i++) {
-                            NaiRealm realm = new NaiRealm();
-                            realm.encoding = in.readInt();
-                            realm.realm = in.readString();
-                            p.naiRealmList.add(realm);
-                        }
-                    }
-
-                    n = in.readInt();
-                    if (n > 0) {
-                        p.cellularNetworkList = new ArrayList<CellularNetwork>();
-                        for (int i = 0; i < n; i++) {
-                            CellularNetwork plmn = new CellularNetwork();
-                            plmn.mcc = in.readString();
-                            plmn.mnc = in.readString();
-                            p.cellularNetworkList.add(plmn);
-                        }
-                    }
-
-                    n = in.readInt();
-                    if (n > 0) {
-                        p.domainNameList = new ArrayList<String>();
-                        for (int i = 0; i < n; i++)
-                            p.domainNameList.add(in.readString());
-                    }
-
-                    p.operatorFriendlyName = in.readString();
-
-                    n = in.readInt();
-                    if (n > 0) {
-                        p.wanMetrics = new WanMetrics();
-                        p.wanMetrics.wanInfo = in.readInt();
-                        p.wanMetrics.downlinkSpeed = in.readLong();
-                        p.wanMetrics.uplinkSpeed = in.readLong();
-                        p.wanMetrics.downlinkLoad = in.readInt();
-                        p.wanMetrics.uplinkLoad = in.readInt();
-                        p.wanMetrics.lmd = in.readInt();
-                    }
-
-                    n = in.readInt();
-                    if (n > 0) {
-                        p.connectionCapabilityList = new ArrayList<IpProtoPort>();
-                        for (int i = 0; i < n; i++) {
-                            IpProtoPort ip = new IpProtoPort();
-                            ip.proto = in.readInt();
-                            ip.port = in.readInt();
-                            ip.status = in.readInt();
-                            p.connectionCapabilityList.add(ip);
-                        }
-                    }
-
-                    n = in.readInt();
-                    if (n > 0) {
-                        p.osuProviderList = new ArrayList<WifiPasspointOsuProvider>();
-                        for (int i = 0; i < n; i++) {
-                            WifiPasspointOsuProvider osu = WifiPasspointOsuProvider.CREATOR
-                                    .createFromParcel(in);
-                            p.osuProviderList.add(osu);
-                        }
-                    }
-
-                    return p;
-                }
-
-                @Override
-                public WifiPasspointInfo[] newArray(int size) {
-                    return new WifiPasspointInfo[size];
-                }
-            };
-}
diff --git a/wifi/java/android/net/wifi/passpoint/WifiPasspointManager.java b/wifi/java/android/net/wifi/passpoint/WifiPasspointManager.java
deleted file mode 100644
index b2b5310..0000000
--- a/wifi/java/android/net/wifi/passpoint/WifiPasspointManager.java
+++ /dev/null
@@ -1,420 +0,0 @@
-/*
- * Copyright (C) 2014 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.net.wifi.passpoint;
-
-import android.content.Context;
-import android.net.wifi.ScanResult;
-import android.os.Handler;
-import android.os.Looper;
-import android.os.Message;
-import android.os.Messenger;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.os.RemoteException;
-import android.util.Log;
-
-import com.android.internal.util.AsyncChannel;
-import com.android.internal.util.Protocol;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-
-/**
- * Provides APIs for managing Wifi Passpoint credentials.
- */
-public class WifiPasspointManager {
-
-    private static final String TAG = "PasspointManager";
-
-    private static final boolean DBG = true;
-
-    /* Passpoint states values */
-
-    /** Passpoint is in an unknown state. This should only occur in boot time */
-    public static final int PASSPOINT_STATE_UNKNOWN = 0;
-
-    /** Passpoint is disabled. This occurs when wifi is disabled */
-    public static final int PASSPOINT_STATE_DISABLED = 1;
-
-    /** Passpoint is enabled and in discovery state */
-    public static final int PASSPOINT_STATE_DISCOVERY = 2;
-
-    /** Passpoint is enabled and in access state */
-    public static final int PASSPOINT_STATE_ACCESS = 3;
-
-    /** Passpoint is enabled and in provisioning state */
-    public static final int PASSPOINT_STATE_PROVISION = 4;
-
-    /* Passpoint callback error codes */
-
-    /** Indicates that the operation failed due to an internal error */
-    public static final int REASON_ERROR = 0;
-
-    /** Indicates that the operation failed because wifi is disabled */
-    public static final int REASON_WIFI_DISABLED = 1;
-
-    /** Indicates that the operation failed because the framework is busy */
-    public static final int REASON_BUSY = 2;
-
-    /** Indicates that the operation failed because parameter is invalid */
-    public static final int REASON_INVALID_PARAMETER = 3;
-
-    /** Indicates that the operation failed because the server is not trusted */
-    public static final int REASON_NOT_TRUSTED = 4;
-
-    /**
-     * protocol supported for Passpoint
-     */
-    public static final String PROTOCOL_DM = "OMA-DM-ClientInitiated";
-
-    /**
-     * protocol supported for Passpoint
-     */
-    public static final String PROTOCOL_SOAP = "SPP-ClientInitiated";
-
-    /* Passpoint broadcasts */
-
-    /**
-     * Broadcast intent action indicating that the state of Passpoint
-     * connectivity has changed
-     */
-    public static final String PASSPOINT_STATE_CHANGED_ACTION =
-            "android.net.wifi.passpoint.STATE_CHANGE";
-
-    /**
-     * Broadcast intent action indicating that the saved Passpoint credential
-     * list has changed
-     */
-    public static final String PASSPOINT_CRED_CHANGED_ACTION =
-            "android.net.wifi.passpoint.CRED_CHANGE";
-
-    /**
-     * Broadcast intent action indicating that Passpoint online sign up is
-     * avaiable.
-     */
-    public static final String PASSPOINT_OSU_AVAILABLE_ACTION =
-            "android.net.wifi.passpoint.OSU_AVAILABLE";
-
-    /**
-     * Broadcast intent action indicating that user remediation is required
-     */
-    public static final String PASSPOINT_USER_REM_REQ_ACTION =
-            "android.net.wifi.passpoint.USER_REM_REQ";
-
-    /**
-     * Interface for callback invocation when framework channel is lost
-     */
-    public interface ChannelListener {
-        /**
-         * The channel to the framework has been disconnected. Application could
-         * try re-initializing using {@link #initialize}
-         */
-        public void onChannelDisconnected();
-    }
-
-    /**
-     * Interface for callback invocation on an application action
-     */
-    public interface ActionListener {
-        /** The operation succeeded */
-        public void onSuccess();
-
-        /**
-         * The operation failed
-         *
-         * @param reason The reason for failure could be one of
-         *            {@link #REASON_WIFI_DISABLED}, {@link #REASON_ERROR} or {@link #REASON_BUSY}
-         */
-        public void onFailure(int reason);
-    }
-
-    /**
-     * A channel that connects the application to the wifi passpoint framework.
-     * Most passpoint operations require a Channel as an argument.
-     * An instance of Channel is obtained by doing a call on {@link #initialize}
-     */
-    public static class Channel {
-        private final static int INVALID_LISTENER_KEY = 0;
-
-        private ChannelListener mChannelListener;
-
-        private HashMap<Integer, Object> mListenerMap = new HashMap<Integer, Object>();
-        private HashMap<Integer, Integer> mListenerMapCount = new HashMap<Integer, Integer>();
-        private Object mListenerMapLock = new Object();
-        private int mListenerKey = 0;
-
-        private List<ScanResult> mAnqpRequest = new LinkedList<ScanResult>();
-        private Object mAnqpRequestLock = new Object();
-
-        private AsyncChannel mAsyncChannel;
-        private PasspointHandler mHandler;
-        Context mContext;
-
-        Channel(Context context, Looper looper, ChannelListener l) {
-            mAsyncChannel = new AsyncChannel();
-            mHandler = new PasspointHandler(looper);
-            mChannelListener = l;
-            mContext = context;
-        }
-
-        private int putListener(Object listener) {
-            return putListener(listener, 1);
-        }
-
-        private int putListener(Object listener, int count) {
-            if (listener == null || count <= 0)
-                return INVALID_LISTENER_KEY;
-            int key;
-            synchronized (mListenerMapLock) {
-                do {
-                    key = mListenerKey++;
-                } while (key == INVALID_LISTENER_KEY);
-                mListenerMap.put(key, listener);
-                mListenerMapCount.put(key, count);
-            }
-            return key;
-        }
-
-        private Object peekListener(int key) {
-            Log.d(TAG, "peekListener() key=" + key);
-            if (key == INVALID_LISTENER_KEY)
-                return null;
-            synchronized (mListenerMapLock) {
-                return mListenerMap.get(key);
-            }
-        }
-
-
-        private Object getListener(int key, boolean forceRemove) {
-            Log.d(TAG, "getListener() key=" + key + " force=" + forceRemove);
-            if (key == INVALID_LISTENER_KEY)
-                return null;
-            synchronized (mListenerMapLock) {
-                if (!forceRemove) {
-                    int count = mListenerMapCount.get(key);
-                    Log.d(TAG, "count=" + count);
-                    mListenerMapCount.put(key, --count);
-                    if (count > 0)
-                        return null;
-                }
-                Log.d(TAG, "remove key");
-                mListenerMapCount.remove(key);
-                return mListenerMap.remove(key);
-            }
-        }
-
-        private void anqpRequestStart(ScanResult sr) {
-            Log.d(TAG, "anqpRequestStart sr.bssid=" + sr.BSSID);
-            synchronized (mAnqpRequestLock) {
-                mAnqpRequest.add(sr);
-            }
-        }
-
-        private void anqpRequestFinish(WifiPasspointInfo result) {
-            Log.d(TAG, "anqpRequestFinish pi.bssid=" + result.bssid);
-            synchronized (mAnqpRequestLock) {
-                for (ScanResult sr : mAnqpRequest)
-                    if (sr.BSSID.equals(result.bssid)) {
-                        Log.d(TAG, "find hit " + result.bssid);
-                        sr.passpoint = result;
-                        mAnqpRequest.remove(sr);
-                        Log.d(TAG, "mAnqpRequest.len=" + mAnqpRequest.size());
-                        break;
-                    }
-            }
-        }
-
-        private void anqpRequestFinish(ScanResult sr) {
-            Log.d(TAG, "anqpRequestFinish sr.bssid=" + sr.BSSID);
-            synchronized (mAnqpRequestLock) {
-                for (ScanResult sr1 : mAnqpRequest)
-                    if (sr1.BSSID.equals(sr.BSSID)) {
-                        mAnqpRequest.remove(sr1);
-                        break;
-                    }
-            }
-        }
-
-        class PasspointHandler extends Handler {
-            PasspointHandler(Looper looper) {
-                super(looper);
-            }
-
-            @Override
-            public void handleMessage(Message message) {
-                Object listener = null;
-
-                switch (message.what) {
-                    case AsyncChannel.CMD_CHANNEL_DISCONNECTED:
-                        if (mChannelListener != null) {
-                            mChannelListener.onChannelDisconnected();
-                            mChannelListener = null;
-                        }
-                        break;
-
-                    case REQUEST_ANQP_INFO_SUCCEEDED:
-                        WifiPasspointInfo result = (WifiPasspointInfo) message.obj;
-                        anqpRequestFinish(result);
-                        listener = getListener(message.arg2, false);
-                        if (listener != null) {
-                            ((ActionListener) listener).onSuccess();
-                        }
-                        break;
-
-                    case REQUEST_ANQP_INFO_FAILED:
-                        anqpRequestFinish((ScanResult) message.obj);
-                        listener = getListener(message.arg2, false);
-                        if (listener == null)
-                            getListener(message.arg2, true);
-                        if (listener != null) {
-                            ((ActionListener) listener).onFailure(message.arg1);
-                        }
-                        break;
-
-                    default:
-                        Log.d(TAG, "Ignored " + message);
-                        break;
-                }
-            }
-        }
-
-    }
-
-    public static class ParcelableString implements Parcelable {
-        public String string;
-
-        @Override
-        public int describeContents() {
-            return 0;
-        }
-
-        @Override
-        public void writeToParcel(Parcel out, int flags) {
-            out.writeString(string);
-        }
-
-        public static final Parcelable.Creator<ParcelableString> CREATOR =
-                new Parcelable.Creator<ParcelableString>() {
-                    @Override
-                    public ParcelableString createFromParcel(Parcel in) {
-                        ParcelableString ret = new ParcelableString();
-                        ret.string = in.readString();
-                        return ret;
-                    }
-                    @Override
-                    public ParcelableString[] newArray(int size) {
-                        return new ParcelableString[size];
-                    }
-        };
-    }
-
-    private static final int BASE = Protocol.BASE_WIFI_PASSPOINT_MANAGER;
-
-    public static final int REQUEST_ANQP_INFO                   = BASE + 1;
-    public static final int REQUEST_ANQP_INFO_FAILED            = BASE + 2;
-    public static final int REQUEST_ANQP_INFO_SUCCEEDED         = BASE + 3;
-    public static final int REQUEST_OSU_ICON                    = BASE + 4;
-    public static final int REQUEST_OSU_ICON_FAILED             = BASE + 5;
-    public static final int REQUEST_OSU_ICON_SUCCEEDED          = BASE + 6;
-    public static final int START_OSU                           = BASE + 7;
-    public static final int START_OSU_BROWSER                   = BASE + 8;
-    public static final int START_OSU_FAILED                    = BASE + 9;
-    public static final int START_OSU_SUCCEEDED                 = BASE + 10;
-
-    private Context mContext;
-    IWifiPasspointManager mService;
-
-    /**
-     * TODO: doc
-     * @param context
-     * @param service
-     */
-    public WifiPasspointManager(Context context, IWifiPasspointManager service) {
-        mContext = context;
-        mService = service;
-    }
-
-    /**
-     * Registers the application with the framework. This function must be the
-     * first to be called before any async passpoint operations are performed.
-     *
-     * @param srcContext is the context of the source
-     * @param srcLooper is the Looper on which the callbacks are receivied
-     * @param listener for callback at loss of framework communication. Can be
-     *            null.
-     * @return Channel instance that is necessary for performing any further
-     *         passpoint operations
-     *
-     */
-    public Channel initialize(Context srcContext, Looper srcLooper, ChannelListener listener) {
-        Messenger messenger = getMessenger();
-        if (messenger == null)
-            return null;
-
-        Channel c = new Channel(srcContext, srcLooper, listener);
-        if (c.mAsyncChannel.connectSync(srcContext, c.mHandler, messenger)
-                == AsyncChannel.STATUS_SUCCESSFUL) {
-            return c;
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * STOPSHIP: temp solution, should use supplicant manager instead, check
-     * with b/13931972
-     */
-    public Messenger getMessenger() {
-        try {
-            return mService.getMessenger();
-        } catch (RemoteException e) {
-            return null;
-        }
-    }
-
-    public void requestAnqpInfo(Channel c, List<ScanResult> requested, int mask,
-            ActionListener listener) {
-        Log.d(TAG, "requestAnqpInfo start");
-        Log.d(TAG, "requested.size=" + requested.size());
-        checkChannel(c);
-        List<ScanResult> list = new ArrayList<ScanResult>();
-        for (ScanResult sr : requested)
-            if (sr.capabilities.contains("[HS20]")) {
-                list.add(sr);
-                c.anqpRequestStart(sr);
-                Log.d(TAG, "adding " + sr.BSSID);
-            }
-        int count = list.size();
-        Log.d(TAG, "after filter, count=" + count);
-        if (count == 0) {
-            if (DBG)
-                Log.d(TAG, "ANQP info request contains no HS20 APs, skipped");
-            listener.onSuccess();
-            return;
-        }
-        int key = c.putListener(listener, count);
-        for (ScanResult sr : list)
-            c.mAsyncChannel.sendMessage(REQUEST_ANQP_INFO, mask, key, sr);
-        Log.d(TAG, "requestAnqpInfo end");
-    }
-
-    private static void checkChannel(Channel c) {
-        if (c == null) throw new IllegalArgumentException("Channel needs to be initialized");
-    }
-}
diff --git a/wifi/java/android/net/wifi/passpoint/WifiPasspointOsuProvider.aidl b/wifi/java/android/net/wifi/passpoint/WifiPasspointOsuProvider.aidl
deleted file mode 100644
index 088136f..0000000
--- a/wifi/java/android/net/wifi/passpoint/WifiPasspointOsuProvider.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Copyright (c) 2014, 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.net.wifi.passpoint;
-
-parcelable WifiPasspointOsuProvider;
diff --git a/wifi/java/android/net/wifi/passpoint/WifiPasspointOsuProvider.java b/wifi/java/android/net/wifi/passpoint/WifiPasspointOsuProvider.java
deleted file mode 100644
index b54b70c..0000000
--- a/wifi/java/android/net/wifi/passpoint/WifiPasspointOsuProvider.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright (C) 2014 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.net.wifi.passpoint;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-/** @hide */
-public class WifiPasspointOsuProvider implements Parcelable {
-
-    /** TODO: doc
-     * @hide
-     */
-    public static final int OSU_METHOD_UNKNOWN = -1;
-
-    /** TODO: doc
-     * @hide
-     */
-    public static final int OSU_METHOD_OMADM = 0;
-
-    /** TODO: doc
-     * @hide
-     */
-    public static final int OSU_METHOD_SOAP = 1;
-
-    /** TODO: doc */
-    public String ssid;
-
-    /** TODO: doc */
-    public String friendlyName;
-
-    /** TODO: doc
-     * @hide
-     */
-    public String serverUri;
-
-    /** TODO: doc
-     * @hide
-     */
-    public int osuMethod = OSU_METHOD_UNKNOWN;
-
-    /** TODO: doc */
-    public int iconWidth;
-
-    /** TODO: doc */
-    public int iconHeight;
-
-    /** TODO: doc */
-    public String iconType;
-
-    /** TODO: doc */
-    public String iconFileName;
-
-    /** TODO: doc */
-    public Object icon; // TODO: should change to image format
-
-    /** TODO: doc */
-    public String osuNai;
-
-    /** TODO: doc */
-    public String osuService;
-
-    /** default constructor @hide */
-    public WifiPasspointOsuProvider() {
-        // TODO
-    }
-
-    /** copy constructor @hide */
-    public WifiPasspointOsuProvider(WifiPasspointOsuProvider source) {
-        // TODO
-    }
-
-    @Override
-    public String toString() {
-        StringBuffer sb = new StringBuffer();
-        sb.append("SSID: ").append("<").append(ssid).append(">");
-        if (friendlyName != null)
-            sb.append(" friendlyName: ").append("<").append(friendlyName).append(">");
-        if (serverUri != null)
-            sb.append(" serverUri: ").append("<").append(serverUri).append(">");
-        sb.append(" osuMethod: ").append("<").append(osuMethod).append(">");
-        if (iconFileName != null) {
-            sb.append(" icon: <").append(iconWidth).append("x")
-                    .append(iconHeight).append(" ")
-                    .append(iconType).append(" ")
-                    .append(iconFileName).append(">");
-        }
-        if (osuNai != null)
-            sb.append(" osuNai: ").append("<").append(osuNai).append(">");
-        if (osuService != null)
-            sb.append(" osuService: ").append("<").append(osuService).append(">");
-        return sb.toString();
-    }
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel out, int flags) {
-        out.writeString(ssid);
-        out.writeString(friendlyName);
-        out.writeString(serverUri);
-        out.writeInt(osuMethod);
-        out.writeInt(iconWidth);
-        out.writeInt(iconHeight);
-        out.writeString(iconType);
-        out.writeString(iconFileName);
-        out.writeString(osuNai);
-        out.writeString(osuService);
-        // TODO: icon image?
-    }
-
-    public static final Parcelable.Creator<WifiPasspointOsuProvider> CREATOR =
-            new Parcelable.Creator<WifiPasspointOsuProvider>() {
-                @Override
-                public WifiPasspointOsuProvider createFromParcel(Parcel in) {
-                    WifiPasspointOsuProvider osu = new WifiPasspointOsuProvider();
-                    osu.ssid = in.readString();
-                    osu.friendlyName = in.readString();
-                    osu.serverUri = in.readString();
-                    osu.osuMethod = in.readInt();
-                    osu.iconWidth = in.readInt();
-                    osu.iconHeight = in.readInt();
-                    osu.iconType = in.readString();
-                    osu.iconFileName = in.readString();
-                    osu.osuNai = in.readString();
-                    osu.osuService = in.readString();
-                    return osu;
-                }
-
-                @Override
-                public WifiPasspointOsuProvider[] newArray(int size) {
-                    return new WifiPasspointOsuProvider[size];
-                }
-            };
-}
diff --git a/wifi/java/android/net/wifi/passpoint/WifiPasspointPolicy.java b/wifi/java/android/net/wifi/passpoint/WifiPasspointPolicy.java
deleted file mode 100644
index f84ac88..0000000
--- a/wifi/java/android/net/wifi/passpoint/WifiPasspointPolicy.java
+++ /dev/null
@@ -1,386 +0,0 @@
-/*
- * Copyright (C) 2014 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.net.wifi.passpoint;
-
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.ScanResult;
-import android.os.Parcelable;
-import android.os.Parcel;
-import android.security.Credentials;
-import android.util.Log;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.List;
-
-
-/** @hide */
-public class WifiPasspointPolicy implements Parcelable {
-
-    private final static String TAG = "PasspointPolicy";
-
-    /** @hide */
-    public static final int HOME_SP = 0;
-
-    /** @hide */
-    public static final int ROAMING_PARTNER = 1;
-
-    /** @hide */
-    public static final int UNRESTRICTED = 2;
-
-    private String mName;
-    private int mCredentialPriority;
-    private int mRoamingPriority;
-    private String mBssid;
-    private String mSsid;
-    private WifiPasspointCredential mCredential;
-    private int mRestriction;// Permitted values are "HomeSP", "RoamingPartner", or "Unrestricted"
-    private boolean mIsHomeSp;
-
-    private final String INT_PRIVATE_KEY = "private_key";
-    private final String INT_PHASE2 = "phase2";
-    private final String INT_PASSWORD = "password";
-    private final String INT_IDENTITY = "identity";
-    private final String INT_EAP = "eap";
-    private final String INT_CLIENT_CERT = "client_cert";
-    private final String INT_CA_CERT = "ca_cert";
-    private final String INT_ANONYMOUS_IDENTITY = "anonymous_identity";
-    private final String INT_SIM_SLOT = "sim_slot";
-    private final String INT_ENTERPRISEFIELD_NAME ="android.net.wifi.WifiConfiguration$EnterpriseField";
-    private final String ISO8601DATEFORMAT = "yyyy-MM-dd'T'HH:mm:ss'Z'";
-    private final String ENTERPRISE_PHASE2_MSCHAPV2 = "auth=MSCHAPV2";
-    private final String ENTERPRISE_PHASE2_MSCHAP = "auth=MSCHAP";
-
-    /** @hide */
-    public WifiPasspointPolicy(String name, String ssid,
-            String bssid, WifiPasspointCredential pc,
-            int restriction, boolean ishomesp) {
-        mName = name;
-        if (pc != null) {
-            mCredentialPriority = pc.getPriority();
-        }
-        //PerProviderSubscription/<X+>/Policy/PreferredRoamingPartnerList/<X+>/Priority
-        mRoamingPriority = 128; //default priority value of 128
-        mSsid = ssid;
-        mCredential = pc;
-        mBssid = bssid;
-        mRestriction = restriction;
-        mIsHomeSp = ishomesp;
-    }
-
-    public String getSsid() {
-        return mSsid;
-    }
-
-    /** @hide */
-    public void setBssid(String bssid) {
-        mBssid = bssid;
-    }
-
-    public String getBssid() {
-        return mBssid;
-    }
-
-    /** @hide */
-    public void setRestriction(int r) {
-        mRestriction = r;
-    }
-
-    /** @hide */
-    public int getRestriction() {
-        return mRestriction;
-    }
-
-    /** @hide */
-    public void setHomeSp(boolean b) {
-        mIsHomeSp = b;
-    }
-
-    /** @hide */
-    public boolean isHomeSp() {
-        return mIsHomeSp;
-    }
-
-    /** @hide */
-    public void setCredential(WifiPasspointCredential newCredential) {
-        mCredential = newCredential;
-    }
-
-    public WifiPasspointCredential getCredential() {
-        // TODO: return a copy
-        return mCredential;
-    }
-
-    /** @hide */
-    public void setCredentialPriority(int priority) {
-        mCredentialPriority = priority;
-    }
-
-    /** @hide */
-    public void setRoamingPriority(int priority) {
-        mRoamingPriority = priority;
-    }
-
-    public int getCredentialPriority() {
-        return mCredentialPriority;
-    }
-
-    public int getRoamingPriority() {
-        return mRoamingPriority;
-    }
-
-    public WifiConfiguration createWifiConfiguration() {
-        WifiConfiguration wfg = new WifiConfiguration();
-        if (mBssid != null) {
-            Log.d(TAG, "create bssid:" + mBssid);
-            wfg.BSSID = mBssid;
-        }
-
-        if (mSsid != null) {
-            Log.d(TAG, "create ssid:" + mSsid);
-            wfg.SSID = mSsid;
-        }
-        //TODO: 1. add pmf configuration
-        //      2. add ocsp configuration
-        //      3. add eap-sim configuration
-        /*Key management*/
-        wfg.status = WifiConfiguration.Status.ENABLED;
-        wfg.allowedKeyManagement.clear();
-        wfg.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_EAP);
-        wfg.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.IEEE8021X);
-
-        /*Group Ciphers*/
-        wfg.allowedGroupCiphers.clear();
-        wfg.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP);
-        wfg.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.TKIP);
-
-        /*Protocols*/
-        wfg.allowedProtocols.clear();
-        wfg.allowedProtocols.set(WifiConfiguration.Protocol.RSN);
-        wfg.allowedProtocols.set(WifiConfiguration.Protocol.WPA);
-
-        Class[] enterpriseFieldArray  = WifiConfiguration.class.getClasses();
-        Class<?> enterpriseFieldClass = null;
-
-
-        for(Class<?> myClass : enterpriseFieldArray) {
-            if(myClass.getName().equals(INT_ENTERPRISEFIELD_NAME)) {
-                enterpriseFieldClass = myClass;
-                break;
-            }
-        }
-        Log.d(TAG, "class chosen " + enterpriseFieldClass.getName() );
-
-
-        Field anonymousId = null, caCert = null, clientCert = null,
-              eap = null, identity = null, password = null,
-              phase2 = null, privateKey =  null;
-
-        Field[] fields = WifiConfiguration.class.getFields();
-
-
-        for (Field tempField : fields) {
-            if (tempField.getName().trim().equals(INT_ANONYMOUS_IDENTITY)) {
-                anonymousId = tempField;
-                Log.d(TAG, "field " + anonymousId.getName() );
-            } else if (tempField.getName().trim().equals(INT_CA_CERT)) {
-                caCert = tempField;
-            } else if (tempField.getName().trim().equals(INT_CLIENT_CERT)) {
-                clientCert = tempField;
-                Log.d(TAG, "field " + clientCert.getName() );
-            } else if (tempField.getName().trim().equals(INT_EAP)) {
-                eap = tempField;
-                Log.d(TAG, "field " + eap.getName() );
-            } else if (tempField.getName().trim().equals(INT_IDENTITY)) {
-                identity = tempField;
-                Log.d(TAG, "field " + identity.getName() );
-            } else if (tempField.getName().trim().equals(INT_PASSWORD)) {
-                password = tempField;
-                Log.d(TAG, "field " + password.getName() );
-            } else if (tempField.getName().trim().equals(INT_PHASE2)) {
-                phase2 = tempField;
-                Log.d(TAG, "field " + phase2.getName() );
-
-            } else if (tempField.getName().trim().equals(INT_PRIVATE_KEY)) {
-                privateKey = tempField;
-            }
-        }
-
-
-        Method setValue = null;
-
-        for(Method m: enterpriseFieldClass.getMethods()) {
-            if(m.getName().trim().equals("setValue")) {
-                Log.d(TAG, "method " + m.getName() );
-                setValue = m;
-                break;
-            }
-        }
-
-        try {
-            // EAP
-            String eapmethod = mCredential.getType();
-            Log.d(TAG, "eapmethod:" + eapmethod);
-            setValue.invoke(eap.get(wfg), eapmethod);
-
-            // Username, password, EAP Phase 2
-            if ("TTLS".equals(eapmethod)) {
-                setValue.invoke(phase2.get(wfg), ENTERPRISE_PHASE2_MSCHAPV2);
-                setValue.invoke(identity.get(wfg), mCredential.getUserName());
-                setValue.invoke(password.get(wfg), mCredential.getPassword());
-                setValue.invoke(anonymousId.get(wfg), "anonymous@" + mCredential.getRealm());
-            }
-
-            // EAP CA Certificate
-            String cacertificate = null;
-            String rootCA = mCredential.getCaRootCertPath();
-            if (rootCA == null){
-                cacertificate = null;
-            } else {
-                cacertificate = "keystore://" + Credentials.WIFI + "HS20" + Credentials.CA_CERTIFICATE + rootCA;
-            }
-            Log.d(TAG, "cacertificate:" + cacertificate);
-            setValue.invoke(caCert.get(wfg), cacertificate);
-
-            //User certificate
-            if ("TLS".equals(eapmethod)) {
-                String usercertificate = null;
-                String privatekey = null;
-                String clientCertPath = mCredential.getClientCertPath();
-                if (clientCertPath != null){
-                    privatekey = "keystore://" + Credentials.WIFI + "HS20" + Credentials.USER_PRIVATE_KEY + clientCertPath;
-                    usercertificate = "keystore://" + Credentials.WIFI + "HS20" + Credentials.USER_CERTIFICATE + clientCertPath;
-                }
-                Log.d(TAG, "privatekey:" + privatekey);
-                Log.d(TAG, "usercertificate:" + usercertificate);
-                if (privatekey != null && usercertificate != null) {
-                    setValue.invoke(privateKey.get(wfg), privatekey);
-                    setValue.invoke(clientCert.get(wfg), usercertificate);
-                }
-            }
-        } catch (Exception e) {
-            Log.d(TAG, "createWifiConfiguration err:" + e);
-        }
-
-        return wfg;
-    }
-
-    /** {@inheritDoc} @hide */
-    public int compareTo(WifiPasspointPolicy another) {
-        Log.d(TAG, "this:" + this);
-        Log.d(TAG, "another:" + another);
-
-        if (another == null) {
-            return -1;
-        } else if (this.mIsHomeSp == true && another.isHomeSp() == false) {
-            //home sp priority is higher then roaming
-            Log.d(TAG, "compare HomeSP  first, this is HomeSP, another isn't");
-            return -1;
-        } else if ((this.mIsHomeSp == true && another.isHomeSp() == true)) {
-            Log.d(TAG, "both HomeSP");
-            //if both home sp, compare credential priority
-            if (this.mCredentialPriority < another.getCredentialPriority()) {
-                Log.d(TAG, "this priority is higher");
-                return -1;
-            } else if (this.mCredentialPriority == another.getCredentialPriority()) {
-                Log.d(TAG, "both priorities equal");
-                //if priority still the same, compare name(ssid)
-                if (this.mName.compareTo(another.mName) != 0) {
-                    Log.d(TAG, "compare mName return:" + this.mName.compareTo(another.mName));
-                    return this.mName.compareTo(another.mName);
-                }
-                /**
-                 *if name still the same, compare credential
-                 *the device may has two more credentials(TLS,SIM..etc)
-                 *it can associate to one AP(same ssid). so we should compare by credential
-                 */
-                if (this.mCredential != null && another.mCredential != null) {
-                    if (this.mCredential.compareTo(another.mCredential) != 0) {
-                        Log.d(TAG,
-                                "compare mCredential return:" + this.mName.compareTo(another.mName));
-                        return this.mCredential.compareTo(another.mCredential);
-                    }
-                }
-            } else {
-                return 1;
-            }
-        } else if ((this.mIsHomeSp == false && another.isHomeSp() == false)) {
-            Log.d(TAG, "both RoamingSp");
-            //if both roaming sp, compare roaming priority(preferredRoamingPartnerList/<X+>/priority)
-            if (this.mRoamingPriority < another.getRoamingPriority()) {
-                Log.d(TAG, "this priority is higher");
-                return -1;
-            } else if (this.mRoamingPriority == another.getRoamingPriority()) {//priority equals, compare name
-                Log.d(TAG, "both priorities equal");
-                //if priority still the same, compare name(ssid)
-                if (this.mName.compareTo(another.mName) != 0) {
-                    Log.d(TAG, "compare mName return:" + this.mName.compareTo(another.mName));
-                    return this.mName.compareTo(another.mName);
-                }
-                //if name still the same, compare credential
-                if (this.mCredential != null && another.mCredential != null) {
-                    if (this.mCredential.compareTo(another.mCredential) != 0) {
-                        Log.d(TAG,
-                                "compare mCredential return:"
-                                        + this.mCredential.compareTo(another.mCredential));
-                        return this.mCredential.compareTo(another.mCredential);
-                    }
-                }
-            } else {
-                return 1;
-            }
-        }
-
-        Log.d(TAG, "both policies equal");
-        return 0;
-    }
-
-    @Override
-    /** @hide */
-    public String toString() {
-        return "PasspointPolicy: name=" + mName + " CredentialPriority=" + mCredentialPriority +
-                " mRoamingPriority" + mRoamingPriority +
-                " ssid=" + mSsid + " restriction=" + mRestriction +
-                " ishomesp=" + mIsHomeSp + " Credential=" + mCredential;
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        // TODO
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    public static final Creator<WifiPasspointPolicy> CREATOR =
-            new Creator<WifiPasspointPolicy>() {
-                @Override
-                public WifiPasspointPolicy createFromParcel(Parcel in) {
-                    return null;
-                }
-
-                @Override
-                public WifiPasspointPolicy[] newArray(int size) {
-                    return new WifiPasspointPolicy[size];
-                }
-            };
-}