merge in oc-release history after reset to master
diff --git a/Android.mk b/Android.mk
index 9e89738..9ebc276 100644
--- a/Android.mk
+++ b/Android.mk
@@ -104,6 +104,7 @@
 	core/java/android/app/trust/ITrustListener.aidl \
 	core/java/android/app/backup/IBackupManager.aidl \
 	core/java/android/app/backup/IBackupObserver.aidl \
+	core/java/android/app/backup/IBackupManagerMonitor.aidl \
 	core/java/android/app/backup/IFullBackupRestoreObserver.aidl \
 	core/java/android/app/backup/IRestoreObserver.aidl \
 	core/java/android/app/backup/IRestoreSession.aidl \
diff --git a/apct-tests/perftests/core/res/layout/test_autosize_textview_10.xml b/apct-tests/perftests/core/res/layout/test_autosize_textview_10.xml
index 791f587..a8d3de0 100644
--- a/apct-tests/perftests/core/res/layout/test_autosize_textview_10.xml
+++ b/apct-tests/perftests/core/res/layout/test_autosize_textview_10.xml
@@ -35,8 +35,7 @@
           android:layout_width="400dp"
           android:layout_height="600dp"
           android:text="@string/long_text"
-          android:textDirection="rtl"
-          android:autoSizeText="xy"
+          android:autoSizeText="uniform"
           android:autoSizeMinTextSize="10px"
           android:textSize="20px"
           android:autoSizeStepGranularity="1px"/>
diff --git a/apct-tests/perftests/core/res/layout/test_autosize_textview_100.xml b/apct-tests/perftests/core/res/layout/test_autosize_textview_100.xml
index cca4a52..d991862 100644
--- a/apct-tests/perftests/core/res/layout/test_autosize_textview_100.xml
+++ b/apct-tests/perftests/core/res/layout/test_autosize_textview_100.xml
@@ -19,8 +19,7 @@
           android:layout_width="400dp"
           android:layout_height="600dp"
           android:text="@string/long_text"
-          android:textDirection="rtl"
-          android:autoSizeText="xy"
+          android:autoSizeText="uniform"
           android:autoSizeMinTextSize="10px"
           android:textSize="110px"
           android:autoSizeStepGranularity="1px"/>
diff --git a/apct-tests/perftests/core/res/layout/test_autosize_textview_1000.xml b/apct-tests/perftests/core/res/layout/test_autosize_textview_1000.xml
index bb9fc5e..3b55b6c 100644
--- a/apct-tests/perftests/core/res/layout/test_autosize_textview_1000.xml
+++ b/apct-tests/perftests/core/res/layout/test_autosize_textview_1000.xml
@@ -19,8 +19,7 @@
           android:layout_width="400dp"
           android:layout_height="600dp"
           android:text="@string/long_text"
-          android:textDirection="rtl"
-          android:autoSizeText="xy"
+          android:autoSizeText="uniform"
           android:autoSizeMinTextSize="10px"
           android:textSize="1010px"
           android:autoSizeStepGranularity="1px"/>
diff --git a/apct-tests/perftests/core/res/layout/test_autosize_textview_10000.xml b/apct-tests/perftests/core/res/layout/test_autosize_textview_10000.xml
index e0e5878..64a25c2 100644
--- a/apct-tests/perftests/core/res/layout/test_autosize_textview_10000.xml
+++ b/apct-tests/perftests/core/res/layout/test_autosize_textview_10000.xml
@@ -19,8 +19,7 @@
           android:layout_width="400dp"
           android:layout_height="600dp"
           android:text="@string/long_text"
-          android:textDirection="rtl"
-          android:autoSizeText="xy"
+          android:autoSizeText="uniform"
           android:autoSizeMinTextSize="10px"
           android:textSize="10010px"
           android:autoSizeStepGranularity="1px"/>
diff --git a/apct-tests/perftests/core/res/layout/test_autosize_textview_100000.xml b/apct-tests/perftests/core/res/layout/test_autosize_textview_100000.xml
index 4f66805..1f60783 100644
--- a/apct-tests/perftests/core/res/layout/test_autosize_textview_100000.xml
+++ b/apct-tests/perftests/core/res/layout/test_autosize_textview_100000.xml
@@ -19,8 +19,7 @@
           android:layout_width="400dp"
           android:layout_height="600dp"
           android:text="@string/long_text"
-          android:textDirection="rtl"
-          android:autoSizeText="xy"
+          android:autoSizeText="uniform"
           android:autoSizeMinTextSize="10px"
           android:textSize="100010px"
           android:autoSizeStepGranularity="1px"/>
diff --git a/apct-tests/perftests/core/res/layout/test_autosize_textview_300.xml b/apct-tests/perftests/core/res/layout/test_autosize_textview_300.xml
index d3a4040..54c7e71 100644
--- a/apct-tests/perftests/core/res/layout/test_autosize_textview_300.xml
+++ b/apct-tests/perftests/core/res/layout/test_autosize_textview_300.xml
@@ -19,8 +19,7 @@
           android:layout_width="400dp"
           android:layout_height="600dp"
           android:text="@string/long_text"
-          android:textDirection="rtl"
-          android:autoSizeText="xy"
+          android:autoSizeText="uniform"
           android:autoSizeMinTextSize="10px"
           android:textSize="310px"
           android:autoSizeStepGranularity="1px"/>
diff --git a/apct-tests/perftests/core/res/layout/test_autosize_textview_5.xml b/apct-tests/perftests/core/res/layout/test_autosize_textview_5.xml
index c7982e76..525b2c8 100644
--- a/apct-tests/perftests/core/res/layout/test_autosize_textview_5.xml
+++ b/apct-tests/perftests/core/res/layout/test_autosize_textview_5.xml
@@ -35,8 +35,7 @@
           android:layout_width="400dp"
           android:layout_height="600dp"
           android:text="@string/long_text"
-          android:textDirection="rtl"
-          android:autoSizeText="xy"
+          android:autoSizeText="uniform"
           android:autoSizeMinTextSize="10px"
           android:textSize="15px"
           android:autoSizeStepGranularity="1px"/>
diff --git a/apct-tests/perftests/core/res/layout/test_autosize_textview_50.xml b/apct-tests/perftests/core/res/layout/test_autosize_textview_50.xml
index b009889..470c4da 100644
--- a/apct-tests/perftests/core/res/layout/test_autosize_textview_50.xml
+++ b/apct-tests/perftests/core/res/layout/test_autosize_textview_50.xml
@@ -19,8 +19,7 @@
           android:layout_width="400dp"
           android:layout_height="600dp"
           android:text="@string/long_text"
-          android:textDirection="rtl"
-          android:autoSizeText="xy"
+          android:autoSizeText="uniform"
           android:autoSizeMinTextSize="10px"
           android:textSize="60px"
           android:autoSizeStepGranularity="1px"/>
diff --git a/apct-tests/perftests/core/res/layout/test_autosize_textview_500.xml b/apct-tests/perftests/core/res/layout/test_autosize_textview_500.xml
index f59d751..b8a6e0a 100644
--- a/apct-tests/perftests/core/res/layout/test_autosize_textview_500.xml
+++ b/apct-tests/perftests/core/res/layout/test_autosize_textview_500.xml
@@ -19,8 +19,7 @@
           android:layout_width="400dp"
           android:layout_height="600dp"
           android:text="@string/long_text"
-          android:textDirection="rtl"
-          android:autoSizeText="xy"
+          android:autoSizeText="uniform"
           android:autoSizeMinTextSize="10px"
           android:textSize="510px"
           android:autoSizeStepGranularity="1px"/>
diff --git a/api/current.txt b/api/current.txt
index e2720f2..e0d895e 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -15,6 +15,7 @@
     field public static final java.lang.String ACCESS_WIFI_STATE = "android.permission.ACCESS_WIFI_STATE";
     field public static final java.lang.String ACCOUNT_MANAGER = "android.permission.ACCOUNT_MANAGER";
     field public static final java.lang.String ADD_VOICEMAIL = "com.android.voicemail.permission.ADD_VOICEMAIL";
+    field public static final java.lang.String ALLOCATE_AGGRESSIVE = "android.permission.ALLOCATE_AGGRESSIVE";
     field public static final java.lang.String BATTERY_STATS = "android.permission.BATTERY_STATS";
     field public static final java.lang.String BIND_ACCESSIBILITY_SERVICE = "android.permission.BIND_ACCESSIBILITY_SERVICE";
     field public static final java.lang.String BIND_APPWIDGET = "android.permission.BIND_APPWIDGET";
@@ -79,6 +80,7 @@
     field public static final java.lang.String INSTALL_LOCATION_PROVIDER = "android.permission.INSTALL_LOCATION_PROVIDER";
     field public static final java.lang.String INSTALL_PACKAGES = "android.permission.INSTALL_PACKAGES";
     field public static final java.lang.String INSTALL_SHORTCUT = "com.android.launcher.permission.INSTALL_SHORTCUT";
+    field public static final java.lang.String INSTANT_APP_FOREGROUND_SERVICE = "android.permission.INSTANT_APP_FOREGROUND_SERVICE";
     field public static final java.lang.String INTERNET = "android.permission.INTERNET";
     field public static final java.lang.String KILL_BACKGROUND_PROCESSES = "android.permission.KILL_BACKGROUND_PROCESSES";
     field public static final java.lang.String LOCATION_HARDWARE = "android.permission.LOCATION_HARDWARE";
@@ -269,6 +271,7 @@
     field public static final int allowTaskReparenting = 16843268; // 0x1010204
     field public static final int allowUndo = 16843999; // 0x10104df
     field public static final int alpha = 16843551; // 0x101031f
+    field public static final int alphabeticModifiers = 16844112; // 0x1010550
     field public static final int alphabeticShortcut = 16843235; // 0x10101e3
     field public static final int alwaysDrawnWithCache = 16842991; // 0x10100ef
     field public static final int alwaysRetainTaskState = 16843267; // 0x1010203
@@ -298,8 +301,8 @@
     field public static final int autoRemoveFromRecents = 16843847; // 0x1010447
     field public static final int autoSizeMaxTextSize = 16844103; // 0x1010547
     field public static final int autoSizeMinTextSize = 16844088; // 0x1010538
+    field public static final int autoSizePresetSizes = 16844087; // 0x1010537
     field public static final int autoSizeStepGranularity = 16844086; // 0x1010536
-    field public static final int autoSizeStepSizeSet = 16844087; // 0x1010537
     field public static final int autoSizeText = 16844085; // 0x1010535
     field public static final int autoStart = 16843445; // 0x10102b5
     field public static final deprecated int autoText = 16843114; // 0x101016a
@@ -923,6 +926,7 @@
     field public static final int numbersSelectorColor = 16843939; // 0x10104a3
     field public static final int numbersTextColor = 16843937; // 0x10104a1
     field public static final deprecated int numeric = 16843109; // 0x1010165
+    field public static final int numericModifiers = 16844113; // 0x1010551
     field public static final int numericShortcut = 16843236; // 0x10101e4
     field public static final int offset = 16844052; // 0x1010514
     field public static final int onClick = 16843375; // 0x101026f
@@ -3137,6 +3141,7 @@
   public final class AnimatorSet extends android.animation.Animator {
     ctor public AnimatorSet();
     method public java.util.ArrayList<android.animation.Animator> getChildAnimations();
+    method public long getCurrentPlayTime();
     method public long getDuration();
     method public long getStartDelay();
     method public boolean isRunning();
@@ -5099,6 +5104,7 @@
     field public static final java.lang.String EXTRA_AUDIO_CONTENTS_URI = "android.audioContents";
     field public static final java.lang.String EXTRA_BACKGROUND_IMAGE_URI = "android.backgroundImageUri";
     field public static final java.lang.String EXTRA_BIG_TEXT = "android.bigText";
+    field public static final java.lang.String EXTRA_CHANNEL_ID = "android.intent.extra.CHANNEL_ID";
     field public static final java.lang.String EXTRA_CHRONOMETER_COUNT_DOWN = "android.chronometerCountDown";
     field public static final java.lang.String EXTRA_COLORIZED = "android.colorized";
     field public static final java.lang.String EXTRA_COMPACT_ACTIONS = "android.compactActions";
@@ -5501,6 +5507,7 @@
   public final class NotificationChannelGroup implements android.os.Parcelable {
     ctor public NotificationChannelGroup(java.lang.String, java.lang.CharSequence);
     ctor protected NotificationChannelGroup(android.os.Parcel);
+    method public android.app.NotificationChannelGroup clone();
     method public int describeContents();
     method public java.util.List<android.app.NotificationChannel> getChannels();
     method public java.lang.String getId();
@@ -5668,10 +5675,9 @@
   }
 
   public final class RecoverableSecurityException extends java.lang.SecurityException implements android.os.Parcelable {
-    ctor public RecoverableSecurityException(java.lang.Throwable, java.lang.CharSequence, java.lang.CharSequence, android.app.PendingIntent);
+    ctor public RecoverableSecurityException(java.lang.Throwable, java.lang.CharSequence, android.app.RemoteAction);
     method public int describeContents();
-    method public android.app.PendingIntent getUserAction();
-    method public java.lang.CharSequence getUserActionTitle();
+    method public android.app.RemoteAction getUserAction();
     method public java.lang.CharSequence getUserMessage();
     method public void showAsDialog(android.app.Activity);
     method public void showAsNotification(android.content.Context);
@@ -12239,6 +12245,7 @@
     field public int inTargetDensity;
     field public byte[] inTempStorage;
     field public deprecated boolean mCancel;
+    field public android.graphics.Bitmap.Config outConfig;
     field public int outHeight;
     field public java.lang.String outMimeType;
     field public int outWidth;
@@ -31205,6 +31212,9 @@
   }
 
   public class StorageManager {
+    method public void allocateBytes(java.io.File, long, int) throws java.io.IOException;
+    method public void allocateBytes(java.io.FileDescriptor, long, int) throws java.io.IOException;
+    method public long getAllocatableBytes(java.io.File, int) throws java.io.IOException;
     method public long getCacheQuotaBytes();
     method public long getCacheSizeBytes();
     method public long getExternalCacheQuotaBytes();
@@ -31223,6 +31233,7 @@
     method public void setCacheBehaviorTombstone(java.io.File, boolean) throws java.io.IOException;
     method public boolean unmountObb(java.lang.String, boolean, android.os.storage.OnObbStateChangeListener);
     field public static final java.lang.String ACTION_MANAGE_STORAGE = "android.os.storage.action.MANAGE_STORAGE";
+    field public static final int FLAG_ALLOCATE_AGGRESSIVE = 1; // 0x1
   }
 
   public final class StorageVolume implements android.os.Parcelable {
@@ -34060,6 +34071,7 @@
     field public static final java.lang.String ACTION_APPLICATION_DETAILS_SETTINGS = "android.settings.APPLICATION_DETAILS_SETTINGS";
     field public static final java.lang.String ACTION_APPLICATION_DEVELOPMENT_SETTINGS = "android.settings.APPLICATION_DEVELOPMENT_SETTINGS";
     field public static final java.lang.String ACTION_APPLICATION_SETTINGS = "android.settings.APPLICATION_SETTINGS";
+    field public static final java.lang.String ACTION_APP_NOTIFICATION_SETTINGS = "android.settings.APP_NOTIFICATION_SETTINGS";
     field public static final java.lang.String ACTION_BATTERY_SAVER_SETTINGS = "android.settings.BATTERY_SAVER_SETTINGS";
     field public static final java.lang.String ACTION_BLUETOOTH_SETTINGS = "android.settings.BLUETOOTH_SETTINGS";
     field public static final java.lang.String ACTION_CAPTIONING_SETTINGS = "android.settings.CAPTIONING_SETTINGS";
@@ -43821,6 +43833,7 @@
     field public static final int FLAG_APPEND_TO_GROUP = 1; // 0x1
     field public static final int FLAG_PERFORM_NO_CLOSE = 1; // 0x1
     field public static final int NONE = 0; // 0x0
+    field public static final int SUPPORTED_MODIFIERS_MASK = 69647; // 0x1100f
   }
 
   public class MenuInflater {
@@ -43833,6 +43846,7 @@
     method public abstract boolean expandActionView();
     method public abstract android.view.ActionProvider getActionProvider();
     method public abstract android.view.View getActionView();
+    method public default int getAlphabeticModifiers();
     method public abstract char getAlphabeticShortcut();
     method public default java.lang.CharSequence getContentDescription();
     method public abstract int getGroupId();
@@ -43840,6 +43854,7 @@
     method public abstract android.content.Intent getIntent();
     method public abstract int getItemId();
     method public abstract android.view.ContextMenu.ContextMenuInfo getMenuInfo();
+    method public default int getNumericModifiers();
     method public abstract char getNumericShortcut();
     method public abstract int getOrder();
     method public abstract android.view.SubMenu getSubMenu();
@@ -43856,6 +43871,7 @@
     method public abstract android.view.MenuItem setActionView(android.view.View);
     method public abstract android.view.MenuItem setActionView(int);
     method public abstract android.view.MenuItem setAlphabeticShortcut(char);
+    method public default android.view.MenuItem setAlphabeticShortcut(char, int);
     method public abstract android.view.MenuItem setCheckable(boolean);
     method public abstract android.view.MenuItem setChecked(boolean);
     method public default android.view.MenuItem setContentDescription(java.lang.CharSequence);
@@ -43864,9 +43880,11 @@
     method public abstract android.view.MenuItem setIcon(int);
     method public abstract android.view.MenuItem setIntent(android.content.Intent);
     method public abstract android.view.MenuItem setNumericShortcut(char);
+    method public default android.view.MenuItem setNumericShortcut(char, int);
     method public abstract android.view.MenuItem setOnActionExpandListener(android.view.MenuItem.OnActionExpandListener);
     method public abstract android.view.MenuItem setOnMenuItemClickListener(android.view.MenuItem.OnMenuItemClickListener);
     method public abstract android.view.MenuItem setShortcut(char, char);
+    method public default android.view.MenuItem setShortcut(char, char, int, int);
     method public abstract void setShowAsAction(int);
     method public abstract android.view.MenuItem setShowAsActionFlags(int);
     method public abstract android.view.MenuItem setTitle(java.lang.CharSequence);
@@ -50371,7 +50389,7 @@
     method public int getAutoSizeMaxTextSize();
     method public int getAutoSizeMinTextSize();
     method public int getAutoSizeStepGranularity();
-    method public int[] getAutoSizeTextPresetSizes();
+    method public int[] getAutoSizeTextAvailableSizes();
     method public int getAutoSizeTextType();
     method public int getBreakStrategy();
     method public int getCompoundDrawablePadding();
@@ -50579,7 +50597,7 @@
     method public void setTypeface(android.graphics.Typeface);
     method public void setWidth(int);
     field public static final int AUTO_SIZE_TEXT_TYPE_NONE = 0; // 0x0
-    field public static final int AUTO_SIZE_TEXT_TYPE_XY = 1; // 0x1
+    field public static final int AUTO_SIZE_TEXT_TYPE_UNIFORM = 1; // 0x1
   }
 
   public static final class TextView.BufferType extends java.lang.Enum {
diff --git a/api/system-current.txt b/api/system-current.txt
index 14120af..a5f3081 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -23,6 +23,7 @@
     field public static final java.lang.String ACCESS_WIFI_STATE = "android.permission.ACCESS_WIFI_STATE";
     field public static final java.lang.String ACCOUNT_MANAGER = "android.permission.ACCOUNT_MANAGER";
     field public static final java.lang.String ADD_VOICEMAIL = "com.android.voicemail.permission.ADD_VOICEMAIL";
+    field public static final java.lang.String ALLOCATE_AGGRESSIVE = "android.permission.ALLOCATE_AGGRESSIVE";
     field public static final java.lang.String ALLOW_ANY_CODEC_FOR_PLAYBACK = "android.permission.ALLOW_ANY_CODEC_FOR_PLAYBACK";
     field public static final java.lang.String BACKUP = "android.permission.BACKUP";
     field public static final java.lang.String BATTERY_STATS = "android.permission.BATTERY_STATS";
@@ -121,6 +122,7 @@
     field public static final java.lang.String INSTALL_LOCATION_PROVIDER = "android.permission.INSTALL_LOCATION_PROVIDER";
     field public static final java.lang.String INSTALL_PACKAGES = "android.permission.INSTALL_PACKAGES";
     field public static final java.lang.String INSTALL_SHORTCUT = "com.android.launcher.permission.INSTALL_SHORTCUT";
+    field public static final java.lang.String INSTANT_APP_FOREGROUND_SERVICE = "android.permission.INSTANT_APP_FOREGROUND_SERVICE";
     field public static final java.lang.String INTENT_FILTER_VERIFICATION_AGENT = "android.permission.INTENT_FILTER_VERIFICATION_AGENT";
     field public static final java.lang.String INTERACT_ACROSS_USERS = "android.permission.INTERACT_ACROSS_USERS";
     field public static final java.lang.String INTERACT_ACROSS_USERS_FULL = "android.permission.INTERACT_ACROSS_USERS_FULL";
@@ -381,6 +383,7 @@
     field public static final int allowTaskReparenting = 16843268; // 0x1010204
     field public static final int allowUndo = 16843999; // 0x10104df
     field public static final int alpha = 16843551; // 0x101031f
+    field public static final int alphabeticModifiers = 16844112; // 0x1010550
     field public static final int alphabeticShortcut = 16843235; // 0x10101e3
     field public static final int alwaysDrawnWithCache = 16842991; // 0x10100ef
     field public static final int alwaysRetainTaskState = 16843267; // 0x1010203
@@ -410,8 +413,8 @@
     field public static final int autoRemoveFromRecents = 16843847; // 0x1010447
     field public static final int autoSizeMaxTextSize = 16844103; // 0x1010547
     field public static final int autoSizeMinTextSize = 16844088; // 0x1010538
+    field public static final int autoSizePresetSizes = 16844087; // 0x1010537
     field public static final int autoSizeStepGranularity = 16844086; // 0x1010536
-    field public static final int autoSizeStepSizeSet = 16844087; // 0x1010537
     field public static final int autoSizeText = 16844085; // 0x1010535
     field public static final int autoStart = 16843445; // 0x10102b5
     field public static final deprecated int autoText = 16843114; // 0x101016a
@@ -1035,6 +1038,7 @@
     field public static final int numbersSelectorColor = 16843939; // 0x10104a3
     field public static final int numbersTextColor = 16843937; // 0x10104a1
     field public static final deprecated int numeric = 16843109; // 0x1010165
+    field public static final int numericModifiers = 16844113; // 0x1010551
     field public static final int numericShortcut = 16843236; // 0x10101e4
     field public static final int offset = 16844052; // 0x1010514
     field public static final int onClick = 16843375; // 0x101026f
@@ -3257,6 +3261,7 @@
   public final class AnimatorSet extends android.animation.Animator {
     ctor public AnimatorSet();
     method public java.util.ArrayList<android.animation.Animator> getChildAnimations();
+    method public long getCurrentPlayTime();
     method public long getDuration();
     method public long getStartDelay();
     method public boolean isRunning();
@@ -5260,6 +5265,7 @@
     field public static final java.lang.String EXTRA_AUDIO_CONTENTS_URI = "android.audioContents";
     field public static final java.lang.String EXTRA_BACKGROUND_IMAGE_URI = "android.backgroundImageUri";
     field public static final java.lang.String EXTRA_BIG_TEXT = "android.bigText";
+    field public static final java.lang.String EXTRA_CHANNEL_ID = "android.intent.extra.CHANNEL_ID";
     field public static final java.lang.String EXTRA_CHRONOMETER_COUNT_DOWN = "android.chronometerCountDown";
     field public static final java.lang.String EXTRA_COLORIZED = "android.colorized";
     field public static final java.lang.String EXTRA_COMPACT_ACTIONS = "android.compactActions";
@@ -5695,6 +5701,7 @@
     ctor public NotificationChannelGroup(java.lang.String, java.lang.CharSequence);
     ctor protected NotificationChannelGroup(android.os.Parcel);
     method public void addChannel(android.app.NotificationChannel);
+    method public android.app.NotificationChannelGroup clone();
     method public int describeContents();
     method public java.util.List<android.app.NotificationChannel> getChannels();
     method public java.lang.String getId();
@@ -5864,10 +5871,9 @@
   }
 
   public final class RecoverableSecurityException extends java.lang.SecurityException implements android.os.Parcelable {
-    ctor public RecoverableSecurityException(java.lang.Throwable, java.lang.CharSequence, java.lang.CharSequence, android.app.PendingIntent);
+    ctor public RecoverableSecurityException(java.lang.Throwable, java.lang.CharSequence, android.app.RemoteAction);
     method public int describeContents();
-    method public android.app.PendingIntent getUserAction();
-    method public java.lang.CharSequence getUserActionTitle();
+    method public android.app.RemoteAction getUserAction();
     method public java.lang.CharSequence getUserMessage();
     method public void showAsDialog(android.app.Activity);
     method public void showAsNotification(android.content.Context);
@@ -6893,8 +6899,9 @@
     method public boolean isBackupEnabled();
     method public java.lang.String[] listAllTransports();
     method public int requestBackup(java.lang.String[], android.app.backup.BackupObserver);
-    method public int requestBackup(java.lang.String[], android.app.backup.BackupObserver, int);
+    method public int requestBackup(java.lang.String[], android.app.backup.BackupObserver, android.app.backup.BackupManagerMonitor, int);
     method public int requestRestore(android.app.backup.RestoreObserver);
+    method public int requestRestore(android.app.backup.RestoreObserver, android.app.backup.BackupManagerMonitor);
     method public deprecated java.lang.String selectBackupTransport(java.lang.String);
     method public void selectBackupTransport(android.content.ComponentName, android.app.backup.SelectBackupTransportCallback);
     method public void setAutoRestore(boolean);
@@ -6912,6 +6919,23 @@
     field public static final int SUCCESS = 0; // 0x0
   }
 
+  public class BackupManagerMonitor {
+    ctor public BackupManagerMonitor();
+    method public void onEvent(android.os.Bundle);
+    field public static final java.lang.String EXTRA_LOG_EVENT_CATEGORY = "android.app.backup.extra.LOG_EVENT_CATEGORY";
+    field public static final java.lang.String EXTRA_LOG_EVENT_ID = "android.app.backup.extra.LOG_EVENT_ID";
+    field public static final java.lang.String EXTRA_LOG_EVENT_PACKAGE_NAME = "android.app.backup.extra.LOG_EVENT_PACKAGE_NAME";
+    field public static final java.lang.String EXTRA_LOG_EVENT_PACKAGE_VERSION = "android.app.backup.extra.LOG_EVENT_PACKAGE_VERSION";
+    field public static final int LOG_EVENT_CATEGORY_AGENT = 2; // 0x2
+    field public static final int LOG_EVENT_CATEGORY_BACKUP_MANAGER_POLICY = 3; // 0x3
+    field public static final int LOG_EVENT_CATEGORY_TRANSPORT = 1; // 0x1
+    field public static final int LOG_EVENT_ID_FULL_BACKUP_TIMEOUT = 4; // 0x4
+    field public static final int LOG_EVENT_ID_FULL_RESTORE_TIMEOUT = 45; // 0x2d
+    field public static final int LOG_EVENT_ID_KEY_VALUE_BACKUP_TIMEOUT = 21; // 0x15
+    field public static final int LOG_EVENT_ID_KEY_VALUE_RESTORE_TIMEOUT = 31; // 0x1f
+    field public static final int LOG_EVENT_ID_NO_PACKAGES = 49; // 0x31
+  }
+
   public abstract class BackupObserver {
     ctor public BackupObserver();
     method public void backupFinished(int);
@@ -7005,8 +7029,11 @@
 
   public class RestoreSession {
     method public void endRestoreSession();
+    method public int getAvailableRestoreSets(android.app.backup.RestoreObserver, android.app.backup.BackupManagerMonitor);
     method public int getAvailableRestoreSets(android.app.backup.RestoreObserver);
+    method public int restoreAll(long, android.app.backup.RestoreObserver, android.app.backup.BackupManagerMonitor);
     method public int restoreAll(long, android.app.backup.RestoreObserver);
+    method public int restorePackage(java.lang.String, android.app.backup.RestoreObserver, android.app.backup.BackupManagerMonitor);
     method public int restorePackage(java.lang.String, android.app.backup.RestoreObserver);
   }
 
@@ -12807,6 +12834,7 @@
     field public int inTargetDensity;
     field public byte[] inTempStorage;
     field public deprecated boolean mCancel;
+    field public android.graphics.Bitmap.Config outConfig;
     field public int outHeight;
     field public java.lang.String outMimeType;
     field public int outWidth;
@@ -34054,6 +34082,9 @@
   }
 
   public class StorageManager {
+    method public void allocateBytes(java.io.File, long, int) throws java.io.IOException;
+    method public void allocateBytes(java.io.FileDescriptor, long, int) throws java.io.IOException;
+    method public long getAllocatableBytes(java.io.File, int) throws java.io.IOException;
     method public long getCacheQuotaBytes();
     method public long getCacheSizeBytes();
     method public long getExternalCacheQuotaBytes();
@@ -34072,6 +34103,7 @@
     method public void setCacheBehaviorTombstone(java.io.File, boolean) throws java.io.IOException;
     method public boolean unmountObb(java.lang.String, boolean, android.os.storage.OnObbStateChangeListener);
     field public static final java.lang.String ACTION_MANAGE_STORAGE = "android.os.storage.action.MANAGE_STORAGE";
+    field public static final int FLAG_ALLOCATE_AGGRESSIVE = 1; // 0x1
   }
 
   public final class StorageVolume implements android.os.Parcelable {
@@ -47237,6 +47269,7 @@
     field public static final int FLAG_APPEND_TO_GROUP = 1; // 0x1
     field public static final int FLAG_PERFORM_NO_CLOSE = 1; // 0x1
     field public static final int NONE = 0; // 0x0
+    field public static final int SUPPORTED_MODIFIERS_MASK = 69647; // 0x1100f
   }
 
   public class MenuInflater {
@@ -47249,6 +47282,7 @@
     method public abstract boolean expandActionView();
     method public abstract android.view.ActionProvider getActionProvider();
     method public abstract android.view.View getActionView();
+    method public default int getAlphabeticModifiers();
     method public abstract char getAlphabeticShortcut();
     method public default java.lang.CharSequence getContentDescription();
     method public abstract int getGroupId();
@@ -47256,6 +47290,7 @@
     method public abstract android.content.Intent getIntent();
     method public abstract int getItemId();
     method public abstract android.view.ContextMenu.ContextMenuInfo getMenuInfo();
+    method public default int getNumericModifiers();
     method public abstract char getNumericShortcut();
     method public abstract int getOrder();
     method public abstract android.view.SubMenu getSubMenu();
@@ -47272,6 +47307,7 @@
     method public abstract android.view.MenuItem setActionView(android.view.View);
     method public abstract android.view.MenuItem setActionView(int);
     method public abstract android.view.MenuItem setAlphabeticShortcut(char);
+    method public default android.view.MenuItem setAlphabeticShortcut(char, int);
     method public abstract android.view.MenuItem setCheckable(boolean);
     method public abstract android.view.MenuItem setChecked(boolean);
     method public default android.view.MenuItem setContentDescription(java.lang.CharSequence);
@@ -47280,9 +47316,11 @@
     method public abstract android.view.MenuItem setIcon(int);
     method public abstract android.view.MenuItem setIntent(android.content.Intent);
     method public abstract android.view.MenuItem setNumericShortcut(char);
+    method public default android.view.MenuItem setNumericShortcut(char, int);
     method public abstract android.view.MenuItem setOnActionExpandListener(android.view.MenuItem.OnActionExpandListener);
     method public abstract android.view.MenuItem setOnMenuItemClickListener(android.view.MenuItem.OnMenuItemClickListener);
     method public abstract android.view.MenuItem setShortcut(char, char);
+    method public default android.view.MenuItem setShortcut(char, char, int, int);
     method public abstract void setShowAsAction(int);
     method public abstract android.view.MenuItem setShowAsActionFlags(int);
     method public abstract android.view.MenuItem setTitle(java.lang.CharSequence);
@@ -54151,7 +54189,7 @@
     method public int getAutoSizeMaxTextSize();
     method public int getAutoSizeMinTextSize();
     method public int getAutoSizeStepGranularity();
-    method public int[] getAutoSizeTextPresetSizes();
+    method public int[] getAutoSizeTextAvailableSizes();
     method public int getAutoSizeTextType();
     method public int getBreakStrategy();
     method public int getCompoundDrawablePadding();
@@ -54359,7 +54397,7 @@
     method public void setTypeface(android.graphics.Typeface);
     method public void setWidth(int);
     field public static final int AUTO_SIZE_TEXT_TYPE_NONE = 0; // 0x0
-    field public static final int AUTO_SIZE_TEXT_TYPE_XY = 1; // 0x1
+    field public static final int AUTO_SIZE_TEXT_TYPE_UNIFORM = 1; // 0x1
   }
 
   public static final class TextView.BufferType extends java.lang.Enum {
diff --git a/api/test-current.txt b/api/test-current.txt
index 4fb669a..a983cf5 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -15,6 +15,7 @@
     field public static final java.lang.String ACCESS_WIFI_STATE = "android.permission.ACCESS_WIFI_STATE";
     field public static final java.lang.String ACCOUNT_MANAGER = "android.permission.ACCOUNT_MANAGER";
     field public static final java.lang.String ADD_VOICEMAIL = "com.android.voicemail.permission.ADD_VOICEMAIL";
+    field public static final java.lang.String ALLOCATE_AGGRESSIVE = "android.permission.ALLOCATE_AGGRESSIVE";
     field public static final java.lang.String BATTERY_STATS = "android.permission.BATTERY_STATS";
     field public static final java.lang.String BIND_ACCESSIBILITY_SERVICE = "android.permission.BIND_ACCESSIBILITY_SERVICE";
     field public static final java.lang.String BIND_APPWIDGET = "android.permission.BIND_APPWIDGET";
@@ -79,6 +80,7 @@
     field public static final java.lang.String INSTALL_LOCATION_PROVIDER = "android.permission.INSTALL_LOCATION_PROVIDER";
     field public static final java.lang.String INSTALL_PACKAGES = "android.permission.INSTALL_PACKAGES";
     field public static final java.lang.String INSTALL_SHORTCUT = "com.android.launcher.permission.INSTALL_SHORTCUT";
+    field public static final java.lang.String INSTANT_APP_FOREGROUND_SERVICE = "android.permission.INSTANT_APP_FOREGROUND_SERVICE";
     field public static final java.lang.String INTERNET = "android.permission.INTERNET";
     field public static final java.lang.String KILL_BACKGROUND_PROCESSES = "android.permission.KILL_BACKGROUND_PROCESSES";
     field public static final java.lang.String LOCATION_HARDWARE = "android.permission.LOCATION_HARDWARE";
@@ -269,6 +271,7 @@
     field public static final int allowTaskReparenting = 16843268; // 0x1010204
     field public static final int allowUndo = 16843999; // 0x10104df
     field public static final int alpha = 16843551; // 0x101031f
+    field public static final int alphabeticModifiers = 16844112; // 0x1010550
     field public static final int alphabeticShortcut = 16843235; // 0x10101e3
     field public static final int alwaysDrawnWithCache = 16842991; // 0x10100ef
     field public static final int alwaysRetainTaskState = 16843267; // 0x1010203
@@ -298,8 +301,8 @@
     field public static final int autoRemoveFromRecents = 16843847; // 0x1010447
     field public static final int autoSizeMaxTextSize = 16844103; // 0x1010547
     field public static final int autoSizeMinTextSize = 16844088; // 0x1010538
+    field public static final int autoSizePresetSizes = 16844087; // 0x1010537
     field public static final int autoSizeStepGranularity = 16844086; // 0x1010536
-    field public static final int autoSizeStepSizeSet = 16844087; // 0x1010537
     field public static final int autoSizeText = 16844085; // 0x1010535
     field public static final int autoStart = 16843445; // 0x10102b5
     field public static final deprecated int autoText = 16843114; // 0x101016a
@@ -923,6 +926,7 @@
     field public static final int numbersSelectorColor = 16843939; // 0x10104a3
     field public static final int numbersTextColor = 16843937; // 0x10104a1
     field public static final deprecated int numeric = 16843109; // 0x1010165
+    field public static final int numericModifiers = 16844113; // 0x1010551
     field public static final int numericShortcut = 16843236; // 0x10101e4
     field public static final int offset = 16844052; // 0x1010514
     field public static final int onClick = 16843375; // 0x101026f
@@ -3137,6 +3141,7 @@
   public final class AnimatorSet extends android.animation.Animator {
     ctor public AnimatorSet();
     method public java.util.ArrayList<android.animation.Animator> getChildAnimations();
+    method public long getCurrentPlayTime();
     method public long getDuration();
     method public long getStartDelay();
     method public boolean isRunning();
@@ -5109,6 +5114,7 @@
     field public static final java.lang.String EXTRA_AUDIO_CONTENTS_URI = "android.audioContents";
     field public static final java.lang.String EXTRA_BACKGROUND_IMAGE_URI = "android.backgroundImageUri";
     field public static final java.lang.String EXTRA_BIG_TEXT = "android.bigText";
+    field public static final java.lang.String EXTRA_CHANNEL_ID = "android.intent.extra.CHANNEL_ID";
     field public static final java.lang.String EXTRA_CHRONOMETER_COUNT_DOWN = "android.chronometerCountDown";
     field public static final java.lang.String EXTRA_COLORIZED = "android.colorized";
     field public static final java.lang.String EXTRA_COMPACT_ACTIONS = "android.compactActions";
@@ -5511,6 +5517,7 @@
   public final class NotificationChannelGroup implements android.os.Parcelable {
     ctor public NotificationChannelGroup(java.lang.String, java.lang.CharSequence);
     ctor protected NotificationChannelGroup(android.os.Parcel);
+    method public android.app.NotificationChannelGroup clone();
     method public int describeContents();
     method public java.util.List<android.app.NotificationChannel> getChannels();
     method public java.lang.String getId();
@@ -5679,10 +5686,9 @@
   }
 
   public final class RecoverableSecurityException extends java.lang.SecurityException implements android.os.Parcelable {
-    ctor public RecoverableSecurityException(java.lang.Throwable, java.lang.CharSequence, java.lang.CharSequence, android.app.PendingIntent);
+    ctor public RecoverableSecurityException(java.lang.Throwable, java.lang.CharSequence, android.app.RemoteAction);
     method public int describeContents();
-    method public android.app.PendingIntent getUserAction();
-    method public java.lang.CharSequence getUserActionTitle();
+    method public android.app.RemoteAction getUserAction();
     method public java.lang.CharSequence getUserMessage();
     method public void showAsDialog(android.app.Activity);
     method public void showAsNotification(android.content.Context);
@@ -12273,6 +12279,7 @@
     field public int inTargetDensity;
     field public byte[] inTempStorage;
     field public deprecated boolean mCancel;
+    field public android.graphics.Bitmap.Config outConfig;
     field public int outHeight;
     field public java.lang.String outMimeType;
     field public int outWidth;
@@ -31320,6 +31327,9 @@
   }
 
   public class StorageManager {
+    method public void allocateBytes(java.io.File, long, int) throws java.io.IOException;
+    method public void allocateBytes(java.io.FileDescriptor, long, int) throws java.io.IOException;
+    method public long getAllocatableBytes(java.io.File, int) throws java.io.IOException;
     method public long getCacheQuotaBytes();
     method public long getCacheSizeBytes();
     method public long getExternalCacheQuotaBytes();
@@ -31338,6 +31348,7 @@
     method public void setCacheBehaviorTombstone(java.io.File, boolean) throws java.io.IOException;
     method public boolean unmountObb(java.lang.String, boolean, android.os.storage.OnObbStateChangeListener);
     field public static final java.lang.String ACTION_MANAGE_STORAGE = "android.os.storage.action.MANAGE_STORAGE";
+    field public static final int FLAG_ALLOCATE_AGGRESSIVE = 1; // 0x1
   }
 
   public final class StorageVolume implements android.os.Parcelable {
@@ -34178,6 +34189,7 @@
     field public static final java.lang.String ACTION_APPLICATION_DETAILS_SETTINGS = "android.settings.APPLICATION_DETAILS_SETTINGS";
     field public static final java.lang.String ACTION_APPLICATION_DEVELOPMENT_SETTINGS = "android.settings.APPLICATION_DEVELOPMENT_SETTINGS";
     field public static final java.lang.String ACTION_APPLICATION_SETTINGS = "android.settings.APPLICATION_SETTINGS";
+    field public static final java.lang.String ACTION_APP_NOTIFICATION_SETTINGS = "android.settings.APP_NOTIFICATION_SETTINGS";
     field public static final java.lang.String ACTION_BATTERY_SAVER_SETTINGS = "android.settings.BATTERY_SAVER_SETTINGS";
     field public static final java.lang.String ACTION_BLUETOOTH_SETTINGS = "android.settings.BLUETOOTH_SETTINGS";
     field public static final java.lang.String ACTION_CAPTIONING_SETTINGS = "android.settings.CAPTIONING_SETTINGS";
@@ -44125,6 +44137,7 @@
     field public static final int FLAG_APPEND_TO_GROUP = 1; // 0x1
     field public static final int FLAG_PERFORM_NO_CLOSE = 1; // 0x1
     field public static final int NONE = 0; // 0x0
+    field public static final int SUPPORTED_MODIFIERS_MASK = 69647; // 0x1100f
   }
 
   public class MenuInflater {
@@ -44137,6 +44150,7 @@
     method public abstract boolean expandActionView();
     method public abstract android.view.ActionProvider getActionProvider();
     method public abstract android.view.View getActionView();
+    method public default int getAlphabeticModifiers();
     method public abstract char getAlphabeticShortcut();
     method public default java.lang.CharSequence getContentDescription();
     method public abstract int getGroupId();
@@ -44144,6 +44158,7 @@
     method public abstract android.content.Intent getIntent();
     method public abstract int getItemId();
     method public abstract android.view.ContextMenu.ContextMenuInfo getMenuInfo();
+    method public default int getNumericModifiers();
     method public abstract char getNumericShortcut();
     method public abstract int getOrder();
     method public abstract android.view.SubMenu getSubMenu();
@@ -44160,6 +44175,7 @@
     method public abstract android.view.MenuItem setActionView(android.view.View);
     method public abstract android.view.MenuItem setActionView(int);
     method public abstract android.view.MenuItem setAlphabeticShortcut(char);
+    method public default android.view.MenuItem setAlphabeticShortcut(char, int);
     method public abstract android.view.MenuItem setCheckable(boolean);
     method public abstract android.view.MenuItem setChecked(boolean);
     method public default android.view.MenuItem setContentDescription(java.lang.CharSequence);
@@ -44168,9 +44184,11 @@
     method public abstract android.view.MenuItem setIcon(int);
     method public abstract android.view.MenuItem setIntent(android.content.Intent);
     method public abstract android.view.MenuItem setNumericShortcut(char);
+    method public default android.view.MenuItem setNumericShortcut(char, int);
     method public abstract android.view.MenuItem setOnActionExpandListener(android.view.MenuItem.OnActionExpandListener);
     method public abstract android.view.MenuItem setOnMenuItemClickListener(android.view.MenuItem.OnMenuItemClickListener);
     method public abstract android.view.MenuItem setShortcut(char, char);
+    method public default android.view.MenuItem setShortcut(char, char, int, int);
     method public abstract void setShowAsAction(int);
     method public abstract android.view.MenuItem setShowAsActionFlags(int);
     method public abstract android.view.MenuItem setTitle(java.lang.CharSequence);
@@ -50691,7 +50709,7 @@
     method public int getAutoSizeMaxTextSize();
     method public int getAutoSizeMinTextSize();
     method public int getAutoSizeStepGranularity();
-    method public int[] getAutoSizeTextPresetSizes();
+    method public int[] getAutoSizeTextAvailableSizes();
     method public int getAutoSizeTextType();
     method public int getBreakStrategy();
     method public int getCompoundDrawablePadding();
@@ -50899,7 +50917,7 @@
     method public void setTypeface(android.graphics.Typeface);
     method public void setWidth(int);
     field public static final int AUTO_SIZE_TEXT_TYPE_NONE = 0; // 0x0
-    field public static final int AUTO_SIZE_TEXT_TYPE_XY = 1; // 0x1
+    field public static final int AUTO_SIZE_TEXT_TYPE_UNIFORM = 1; // 0x1
   }
 
   public static final class TextView.BufferType extends java.lang.Enum {
diff --git a/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java b/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java
index 7e91391..a67e47f 100644
--- a/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java
+++ b/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java
@@ -17,6 +17,7 @@
 package com.android.commands.bmgr;
 
 import android.app.backup.BackupManager;
+import android.app.backup.BackupManagerMonitor;
 import android.app.backup.BackupProgress;
 import android.app.backup.IBackupManager;
 import android.app.backup.IBackupObserver;
@@ -312,8 +313,9 @@
         }
         try {
             BackupObserver observer = new BackupObserver();
+            // TODO: implement monitor here?
             int err = mBmgr.requestBackup(packages.toArray(new String[packages.size()]), observer,
-                    flags);
+                    null, flags);
             if (err == 0) {
                 // Off and running -- wait for the backup to complete
                 observer.waitForCompletion();
@@ -504,7 +506,8 @@
     private void doListRestoreSets() {
         try {
             RestoreObserver observer = new RestoreObserver();
-            int err = mRestore.getAvailableRestoreSets(observer);
+            // TODO implement monitor here
+            int err = mRestore.getAvailableRestoreSets(observer, null);
             if (err != 0) {
                 System.out.println("Unable to request restore sets");
             } else {
@@ -607,7 +610,8 @@
             }
 
             RestoreObserver observer = new RestoreObserver();
-            int err = mRestore.restorePackage(pkg, observer);
+            // TODO implement monitor here
+            int err = mRestore.restorePackage(pkg, observer, null );
             if (err == 0) {
                 // Off and running -- wait for the restore to complete
                 observer.waitForCompletion();
@@ -634,7 +638,8 @@
                 return;
             }
             RestoreSet[] sets = null;
-            int err = mRestore.getAvailableRestoreSets(observer);
+            // TODO implement monitor here
+            int err = mRestore.getAvailableRestoreSets(observer, null);
             if (err == 0) {
                 observer.waitForCompletion();
                 sets = observer.sets;
@@ -643,11 +648,12 @@
                         if (s.token == token) {
                             System.out.println("Scheduling restore: " + s.name);
                             if (filter == null) {
-                                didRestore = (mRestore.restoreAll(token, observer) == 0);
+                                didRestore = (mRestore.restoreAll(token, observer, null) == 0);
                             } else {
                                 String[] names = new String[filter.size()];
                                 filter.toArray(names);
-                                didRestore = (mRestore.restoreSome(token, observer, names) == 0);
+                                didRestore = (mRestore.restoreSome(token, observer,
+                                        null, names) == 0);
                             }
                             break;
                         }
diff --git a/core/java/android/animation/AnimatorSet.java b/core/java/android/animation/AnimatorSet.java
index 4e3b7d0..2940e86 100644
--- a/core/java/android/animation/AnimatorSet.java
+++ b/core/java/android/animation/AnimatorSet.java
@@ -142,11 +142,17 @@
     // the animation was previously seeked and therefore doesn't start from the beginning).
     private final boolean mShouldResetValuesAtStart;
 
+    // In pre-O releases, end() may never explicitly called on a child animator. As a result, end()
+    // may not even be properly implemented in a lot of cases. After a few apps crashing on this,
+    // it became necessary to use an sdk target guard for calling end().
+    private final boolean mEndCanBeCalled;
+
     // The time, in milliseconds, when last frame of the animation came in. -1 when the animation is
     // not running.
     private long mLastFrameTime = -1;
 
-    // The time, in milliseconds, when the first frame of the animation came in.
+    // The time, in milliseconds, when the first frame of the animation came in. This is the
+    // frame before we start counting down the start delay, if any.
     // -1 when the animation is not running.
     private long mFirstFrame = -1;
 
@@ -191,11 +197,12 @@
         super();
         mNodeMap.put(mDelayAnim, mRootNode);
         mNodes.add(mRootNode);
+        boolean isPreO;
         // Set the flag to ignore calling end() without start() for pre-N releases
         Application app = ActivityThread.currentApplication();
         if (app == null || app.getApplicationInfo() == null) {
             mShouldIgnoreEndWithoutStart = true;
-            mShouldResetValuesAtStart = false;
+            isPreO = true;
         } else {
             if (app.getApplicationInfo().targetSdkVersion < Build.VERSION_CODES.N) {
                 mShouldIgnoreEndWithoutStart = true;
@@ -203,12 +210,10 @@
                 mShouldIgnoreEndWithoutStart = false;
             }
 
-            if (app.getApplicationInfo().targetSdkVersion < Build.VERSION_CODES.O) {
-                mShouldResetValuesAtStart = false;
-            } else {
-                mShouldResetValuesAtStart = true;
-            }
+            isPreO = app.getApplicationInfo().targetSdkVersion < Build.VERSION_CODES.O;
         }
+        mShouldResetValuesAtStart = !isPreO;
+        mEndCanBeCalled = !isPreO;
     }
 
     /**
@@ -424,6 +429,35 @@
         }
     }
 
+    // Force all the animations to end when the duration scale is 0.
+    private void forceToEnd() {
+        if (mEndCanBeCalled) {
+            end();
+        } else {
+            // Note: we don't want to combine this case with the end() method below because in
+            // the case of developer calling end(), we still need to make sure end() is explicitly
+            // called on the child animators to maintain the old behavior.
+            if (mReversing) {
+                mLastEventId = mLastEventId == -1 ? mEvents.size() : mLastEventId;
+                for (int j = mLastEventId - 1; j >= 0; j--) {
+                    AnimationEvent event = mEvents.get(j);
+                    if (event.mEvent == AnimationEvent.ANIMATION_END) {
+                        event.mNode.mAnimation.reverse();
+                    }
+                }
+            } else {
+                for (int j = mLastEventId + 1; j < mEvents.size(); j++) {
+                    AnimationEvent event = mEvents.get(j);
+                    if (event.mEvent == AnimationEvent.ANIMATION_START) {
+                        event.mNode.mAnimation.start();
+                    }
+                }
+            }
+            mPlayingSet.clear();
+            endAnimation();
+        }
+    }
+
     /**
      * {@inheritDoc}
      *
@@ -445,19 +479,28 @@
                 mLastEventId = mLastEventId == -1 ? mEvents.size() : mLastEventId;
                 for (int j = mLastEventId - 1; j >= 0; j--) {
                     AnimationEvent event = mEvents.get(j);
+                    Animator anim = event.mNode.mAnimation;
                     if (event.mEvent == AnimationEvent.ANIMATION_END) {
-                        event.mNode.mAnimation.reverse();
-                    } else if (event.mEvent == AnimationEvent.ANIMATION_DELAY_ENDED) {
-                        event.mNode.mAnimation.end();
+                        anim.reverse();
+                    } else if (event.mEvent == AnimationEvent.ANIMATION_DELAY_ENDED
+                            && anim.isStarted()) {
+                        // Make sure anim hasn't finished before calling end() so that we don't end
+                        // already ended animations, which will cause start and end callbacks to be
+                        // triggered again.
+                        anim.end();
                     }
                 }
             } else {
                 for (int j = mLastEventId + 1; j < mEvents.size(); j++) {
                     AnimationEvent event = mEvents.get(j);
+                    Animator anim = event.mNode.mAnimation;
                     if (event.mEvent == AnimationEvent.ANIMATION_START) {
-                        event.mNode.mAnimation.start();
-                    } else if (event.mEvent == AnimationEvent.ANIMATION_END) {
-                        event.mNode.mAnimation.end();
+                        anim.start();
+                    } else if (event.mEvent == AnimationEvent.ANIMATION_END && anim.isStarted()) {
+                        // Make sure anim hasn't finished before calling end() so that we don't end
+                        // already ended animations, which will cause start and end callbacks to be
+                        // triggered again.
+                        anim.end();
                     }
                 }
             }
@@ -476,12 +519,10 @@
      */
     @Override
     public boolean isRunning() {
-        if (mStartDelay > 0) {
-            return mStarted && !mDelayAnim.isRunning();
-        } else {
-            // No start delay, animation should start right away
+        if (mStartDelay == 0) {
             return mStarted;
         }
+        return mLastFrameTime > 0;
     }
 
     @Override
@@ -673,8 +714,8 @@
         mReversing = inReverse;
 
         // Now that all dependencies are set up, start the animations that should be started.
-        boolean setIsEmpty = isEmptySet(this);
-        if (!setIsEmpty) {
+        boolean isZeroDuration = ValueAnimator.getDurationScale() == 0f || isEmptySet(this);
+        if (!isZeroDuration) {
             startAnimation();
         }
 
@@ -686,9 +727,10 @@
                 tmpListeners.get(i).onAnimationStart(this, inReverse);
             }
         }
-        if (setIsEmpty) {
-            // In the case of empty AnimatorSet, we will trigger the onAnimationEnd() right away.
-            end();
+        if (isZeroDuration) {
+            // In the case of empty AnimatorSet, or 0 duration scale, we will trigger the
+            // onAnimationEnd() right away.
+            forceToEnd();
         }
     }
 
@@ -815,6 +857,9 @@
         for (int i = 0; i < unfinishedNodes.size(); i++) {
             Node node = unfinishedNodes.get(i);
             long playTime = getPlayTimeForNode(currentPlayTime, node, inReverse);
+            if (!inReverse) {
+                playTime -= node.mAnimation.getStartDelay();
+            }
             node.mAnimation.animateBasedOnPlayTime(playTime, lastPlayTime, inReverse);
         }
     }
@@ -889,6 +934,31 @@
         }
     }
 
+    /**
+     * Gets the current position of the animation in time, which is equal to the current
+     * time minus the time that the animation started. An animation that is not yet started will
+     * return a value of zero, unless the animation has has its play time set via
+     * {@link #setCurrentPlayTime(long)}, in which case it will return the time that was set.
+     *
+     * @return The current position in time of the animation.
+     */
+    public long getCurrentPlayTime() {
+        if (mSeekState.isActive()) {
+            return mSeekState.getPlayTime();
+        }
+        if (mLastFrameTime == -1) {
+            // Not yet started or during start delay
+            return 0;
+        }
+        float durationScale = ValueAnimator.getDurationScale();
+        durationScale = durationScale == 0 ? 1 : durationScale;
+        if (mReversing) {
+            return (long) ((mLastFrameTime - mFirstFrame) / durationScale);
+        } else {
+            return (long) ((mLastFrameTime - mFirstFrame - mStartDelay) / durationScale);
+        }
+    }
+
     private void initChildren() {
         if (!isInitialized()) {
             mChildrenInitialized = true;
@@ -907,8 +977,17 @@
      */
     @Override
     public boolean doAnimationFrame(long frameTime) {
-        if (mLastFrameTime < 0) {
-            mFirstFrame = mLastFrameTime = frameTime;
+        float durationScale = ValueAnimator.getDurationScale();
+        if (durationScale == 0f) {
+            // Duration scale changed to 0 amid animation, end the animation right away.
+            forceToEnd();
+            return true;
+        }
+
+        // After the first frame comes in, we need to wait for start delay to pass before updating
+        // any animation values.
+        if (mFirstFrame < 0) {
+            mFirstFrame = frameTime;
         }
 
         // Handle pause/resume
@@ -928,19 +1007,31 @@
         // Continue at seeked position
         if (mSeekState.isActive()) {
             mSeekState.updateSeekDirection(mReversing);
-            mFirstFrame = frameTime - mSeekState.getPlayTime() - mStartDelay;
+            if (mReversing) {
+                mFirstFrame = (long) (frameTime - mSeekState.getPlayTime() * durationScale);
+            } else {
+                mFirstFrame = (long) (frameTime - (mSeekState.getPlayTime() + mStartDelay)
+                        * durationScale);
+            }
             mSeekState.reset();
         }
 
-        // This playTime includes the start delay.
-        long playTime = frameTime - mFirstFrame;
+        if (!mReversing && frameTime < mFirstFrame + mStartDelay * durationScale) {
+            // Still during start delay in a forward playing case.
+            return false;
+        }
+
+        // From here on, we always use unscaled play time. Note this unscaled playtime includes
+        // the start delay.
+        long unscaledPlayTime = (long) ((frameTime - mFirstFrame) / durationScale);
+        mLastFrameTime = frameTime;
 
         // 1. Pulse the animators that will start or end in this frame
         // 2. Pulse the animators that will finish in a later frame
-        int latestId = findLatestEventIdForTime(playTime);
+        int latestId = findLatestEventIdForTime(unscaledPlayTime);
         int startId = mLastEventId;
 
-        handleAnimationEvents(startId, latestId, playTime);
+        handleAnimationEvents(startId, latestId, unscaledPlayTime);
 
         mLastEventId = latestId;
 
@@ -948,8 +1039,7 @@
         for (int i = 0; i < mPlayingSet.size(); i++) {
             Node node = mPlayingSet.get(i);
             if (!node.mEnded) {
-                node.mEnded = node.mAnimation.pulseAnimationFrame(
-                    getPlayTimeForNode(playTime, node));
+                pulseFrame(node, getPlayTimeForNode(unscaledPlayTime, node));
             }
         }
 
@@ -960,20 +1050,22 @@
             }
         }
 
-        mLastFrameTime = frameTime;
-        if (mPlayingSet.isEmpty()) {
-            boolean finished;
-            if (mReversing) {
-                // Make sure there's no more END event before current event id and after start delay
-                finished = mLastEventId <= 3;
-            } else {
-                // Make sure there's no more START event before current event id:
-                finished = (mLastEventId == mEvents.size() - 1);
+        boolean finished = false;
+        if (mReversing) {
+            if (mPlayingSet.size() == 1 && mPlayingSet.get(0) == mRootNode) {
+                // The only animation that is running is the delay animation.
+                finished = true;
+            } else if (mPlayingSet.isEmpty() && mLastEventId < 3) {
+                // The only remaining animation is the delay animation
+                finished = true;
             }
-            if (finished) {
-                endAnimation();
-                return true;
-            }
+        } else {
+            finished = mPlayingSet.isEmpty() && mLastEventId == mEvents.size() - 1;
+        }
+
+        if (finished) {
+            endAnimation();
+            return true;
         }
         return false;
     }
@@ -1029,9 +1121,17 @@
         }
     }
 
-    private void pulseFrame(Node node, long frameTime) {
+    /**
+     * This method pulses frames into child animations. It scales the input animation play time
+     * with the duration scale and pass that to the child animation via pulseAnimationFrame(long).
+     *
+     * @param node child animator node
+     * @param animPlayTime unscaled play time (including start delay) for the child animator
+     */
+    private void pulseFrame(Node node, long animPlayTime) {
         if (!node.mEnded) {
-            node.mEnded = node.mAnimation.pulseAnimationFrame(frameTime);
+            node.mEnded = node.mAnimation.pulseAnimationFrame(
+                    (long) (animPlayTime * ValueAnimator.getDurationScale()));
         }
     }
 
@@ -1052,7 +1152,7 @@
         addDummyListener();
 
         // Register animation callback
-        addAnimationCallback(mStartDelay);
+        addAnimationCallback(0);
 
         if (mSeekState.getPlayTimeNormalized() == 0 && mReversing) {
             // Maintain old behavior, if seeked to 0 then call reverse, we'll treat the case
@@ -1061,7 +1161,11 @@
         }
         // Set the child animators to the right end:
         if (mShouldResetValuesAtStart) {
-            if (mReversing || isInitialized()) {
+            if (isInitialized()) {
+                skipToEndValue(!mReversing);
+            } else if (mReversing) {
+                // Reversing but haven't initialized all the children yet.
+                initChildren();
                 skipToEndValue(!mReversing);
             } else {
                 // If not all children are initialized and play direction is forward
@@ -1091,6 +1195,11 @@
             }
             int toId = findLatestEventIdForTime(playTime);
             handleAnimationEvents(-1, toId, playTime);
+            for (int i = mPlayingSet.size() - 1; i >= 0; i--) {
+                if (mPlayingSet.get(i).mEnded) {
+                    mPlayingSet.remove(i);
+                }
+            }
             mLastEventId = toId;
         }
     }
@@ -1797,6 +1906,7 @@
             if (mPlayTime >= 0) {
                 if (inReverse != mSeekingInReverse) {
                     mPlayTime = getTotalDuration() - mStartDelay - mPlayTime;
+                    mSeekingInReverse = inReverse;
                 }
             }
         }
diff --git a/core/java/android/animation/ValueAnimator.java b/core/java/android/animation/ValueAnimator.java
index 558fdc6..4e31e44 100644
--- a/core/java/android/animation/ValueAnimator.java
+++ b/core/java/android/animation/ValueAnimator.java
@@ -1031,6 +1031,7 @@
         // started-but-not-yet-reached-the-first-frame phase.
         mLastFrameTime = -1;
         mFirstFrameTime = -1;
+        mStartTime = -1;
         addAnimationCallback(0);
 
         if (mStartDelay == 0 || mSeekFraction >= 0 || mReversing) {
@@ -1199,7 +1200,7 @@
         mStartListenersCalled = false;
         mLastFrameTime = -1;
         mFirstFrameTime = -1;
-        mReversing = false;
+        mStartTime = -1;
         if (notify && mListeners != null) {
             ArrayList<AnimatorListener> tmpListeners =
                     (ArrayList<AnimatorListener>) mListeners.clone();
@@ -1208,6 +1209,7 @@
                 tmpListeners.get(i).onAnimationEnd(this, mReversing);
             }
         }
+        // mReversing needs to be reset *after* notifying the listeners for the end callbacks.
         mReversing = false;
         if (Trace.isTagEnabled(Trace.TRACE_TAG_VIEW)) {
             Trace.asyncTraceEnd(Trace.TRACE_TAG_VIEW, getNameForTrace(),
@@ -1392,9 +1394,10 @@
      * @hide
      */
     public final boolean doAnimationFrame(long frameTime) {
-        if (!mRunning && mStartTime < 0) {
-            // First frame during delay
-            mStartTime = frameTime + mStartDelay;
+        if (mStartTime < 0) {
+            // First frame. If there is start delay, start delay count down will happen *after* this
+            // frame.
+            mStartTime = mReversing ? frameTime : frameTime + mStartDelay;
         }
 
         // Handle pause/resume
@@ -1411,25 +1414,23 @@
         }
 
         if (!mRunning) {
-            // If not running, that means the animation is in the start delay phase. In the case of
-            // reversing, we want to run start delay in the end.
-            if (mStartTime > frameTime) {
-                // During start delay
+            // If not running, that means the animation is in the start delay phase of a forward
+            // running animation. In the case of reversing, we want to run start delay in the end.
+            if (mStartTime > frameTime && mSeekFraction == -1) {
+                // This is when no seek fraction is set during start delay. If developers change the
+                // seek fraction during the delay, animation will start from the seeked position
+                // right away.
                 return false;
             } else {
-                // Start delay has passed.
+                // If mRunning is not set by now, that means non-zero start delay,
+                // no seeking, not reversing. At this point, start delay has passed.
                 mRunning = true;
+                startAnimation();
             }
         }
 
         if (mLastFrameTime < 0) {
-            // First frame
-            if (mStartDelay > 0) {
-                startAnimation();
-            }
-            if (mSeekFraction < 0) {
-                mStartTime = frameTime;
-            } else {
+            if (mSeekFraction >= 0) {
                 long seekTime = (long) (getScaledDuration() * mSeekFraction);
                 mStartTime = frameTime - seekTime;
                 mSeekFraction = -1;
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 6a1e74e..edf60b4 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -1744,13 +1744,14 @@
             final MenuItem item = menu.getItem(i);
             final CharSequence title = item.getTitle();
             final char alphaShortcut = item.getAlphabeticShortcut();
+            final int alphaModifiers = item.getAlphabeticModifiers();
             if (title != null && alphaShortcut != MIN_VALUE) {
                 if (group == null) {
                     final int resource = mApplication.getApplicationInfo().labelRes;
                     group = new KeyboardShortcutGroup(resource != 0 ? getString(resource) : null);
                 }
                 group.addItem(new KeyboardShortcutInfo(
-                    title, alphaShortcut, KeyEvent.META_CTRL_ON));
+                    title, alphaShortcut, alphaModifiers));
             }
         }
         if (group != null) {
diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java
index 603126b..fb927e9 100644
--- a/core/java/android/app/AppOpsManager.java
+++ b/core/java/android/app/AppOpsManager.java
@@ -247,8 +247,10 @@
     public static final int OP_REQUEST_INSTALL_PACKAGES = 66;
     /** @hide Enter picture-in-picture when hidden. */
     public static final int OP_ENTER_PICTURE_IN_PICTURE_ON_HIDE = 67;
+    /** @hide Instant app start foreground service. */
+    public static final int OP_INSTANT_APP_START_FOREGROUND = 68;
     /** @hide */
-    public static final int _NUM_OP = 68;
+    public static final int _NUM_OP = 69;
 
     /** Access to coarse location information. */
     public static final String OPSTR_COARSE_LOCATION = "android:coarse_location";
@@ -351,6 +353,9 @@
             = "android:get_accounts";
     public static final String OPSTR_READ_PHONE_NUMBER
             = "android:read_phone_number";
+    /** @hide */
+    public static final String OPSTR_INSTANT_APP_START_FOREGROUND
+            = "android:instant_app_start_foreground";
 
     private static final int[] RUNTIME_PERMISSIONS_OPS = {
             // Contacts
@@ -467,6 +472,7 @@
             OP_READ_PHONE_NUMBER,
             OP_REQUEST_INSTALL_PACKAGES,
             OP_ENTER_PICTURE_IN_PICTURE_ON_HIDE,
+            OP_INSTANT_APP_START_FOREGROUND,
     };
 
     /**
@@ -542,6 +548,7 @@
             OPSTR_READ_PHONE_NUMBER,
             null, // OP_REQUEST_INSTALL_PACKAGES
             null,
+            OPSTR_INSTANT_APP_START_FOREGROUND,
     };
 
     /**
@@ -617,6 +624,7 @@
             "READ_PHONE_NUMBER",
             "REQUEST_INSTALL_PACKAGES",
             "OP_ENTER_PICTURE_IN_PICTURE_ON_HIDE",
+            "INSTANT_APP_START_FOREGROUND",
     };
 
     /**
@@ -692,6 +700,7 @@
             Manifest.permission.READ_PHONE_NUMBER,
             Manifest.permission.REQUEST_INSTALL_PACKAGES,
             null, // no permission for entering picture-in-picture on hide
+            Manifest.permission.INSTANT_APP_FOREGROUND_SERVICE,
     };
 
     /**
@@ -768,6 +777,7 @@
             null, // READ_PHONE_NUMBER
             null, // REQUEST_INSTALL_PACKAGES
             null, // ENTER_PICTURE_IN_PICTURE_ON_HIDE
+            null, // INSTANT_APP_START_FOREGROUND
     };
 
     /**
@@ -843,6 +853,7 @@
             false, // READ_PHONE_NUMBER
             false, // REQUEST_INSTALL_PACKAGES
             false, // ENTER_PICTURE_IN_PICTURE_ON_HIDE
+            false, // INSTANT_APP_START_FOREGROUND
     };
 
     /**
@@ -917,6 +928,7 @@
             AppOpsManager.MODE_ALLOWED,
             AppOpsManager.MODE_DEFAULT, // OP_REQUEST_INSTALL_PACKAGES
             AppOpsManager.MODE_ALLOWED,  // OP_ENTER_PICTURE_IN_PICTURE_ON_HIDE
+            AppOpsManager.MODE_DEFAULT, // OP_INSTANT_APP_START_FOREGROUND
     };
 
     /**
@@ -995,6 +1007,7 @@
             false,
             false, // OP_REQUEST_INSTALL_PACKAGES
             false, // OP_ENTER_PICTURE_IN_PICTURE_ON_HIDE
+            false,
     };
 
     /**
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 9ef40b4..92510eb 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -110,6 +110,13 @@
             = "android.intent.category.NOTIFICATION_PREFERENCES";
 
     /**
+     * Optional extra for {@link #INTENT_CATEGORY_NOTIFICATION_PREFERENCES}. If provided, will
+     * contain a {@link NotificationChannel#getId() channel id} that can be used to narrow down
+     * what in app notifications settings should be shown.
+     */
+    public static final String EXTRA_CHANNEL_ID = "android.intent.extra.CHANNEL_ID";
+
+    /**
      * Use all default values (where applicable).
      */
     public static final int DEFAULT_ALL = ~0;
diff --git a/core/java/android/app/RecoverableSecurityException.java b/core/java/android/app/RecoverableSecurityException.java
index 1f015a6..540d1cd 100644
--- a/core/java/android/app/RecoverableSecurityException.java
+++ b/core/java/android/app/RecoverableSecurityException.java
@@ -17,6 +17,8 @@
 package android.app;
 
 import android.content.Context;
+import android.content.res.Resources;
+import android.graphics.drawable.Icon;
 import android.os.Bundle;
 import android.os.Parcel;
 import android.os.Parcelable;
@@ -40,13 +42,12 @@
     private static final String TAG = "RecoverableSecurityException";
 
     private final CharSequence mUserMessage;
-    private final CharSequence mUserActionTitle;
-    private final PendingIntent mUserAction;
+    private final RemoteAction mUserAction;
 
     /** {@hide} */
     public RecoverableSecurityException(Parcel in) {
-        this(new SecurityException(in.readString()), in.readCharSequence(), in.readCharSequence(),
-                PendingIntent.CREATOR.createFromParcel(in));
+        this(new SecurityException(in.readString()), in.readCharSequence(),
+                RemoteAction.CREATOR.createFromParcel(in));
     }
 
     /**
@@ -56,26 +57,35 @@
      *            audiences.
      * @param userMessage short message describing the issue for end user
      *            audiences, which may be shown in a notification or dialog.
-     *            This should be less than 64 characters. For example: <em>PIN
-     *            required to access Document.pdf</em>
-     * @param userActionTitle short title describing the primary action. This
-     *            should be less than 24 characters. For example: <em>Enter
-     *            PIN</em>
-     * @param userAction primary action that will initiate the recovery. This
-     *            must launch an activity that is expected to set
+     *            This should be localized and less than 64 characters. For
+     *            example: <em>PIN required to access Document.pdf</em>
+     * @param userAction primary action that will initiate the recovery. The
+     *            title should be localized and less than 24 characters. For
+     *            example: <em>Enter PIN</em>. This action must launch an
+     *            activity that is expected to set
      *            {@link Activity#setResult(int)} before finishing to
      *            communicate the final status of the recovery. For example,
      *            apps that observe {@link Activity#RESULT_OK} may choose to
      *            immediately retry their operation.
      */
     public RecoverableSecurityException(Throwable cause, CharSequence userMessage,
-            CharSequence userActionTitle, PendingIntent userAction) {
+            RemoteAction userAction) {
         super(cause.getMessage());
         mUserMessage = Preconditions.checkNotNull(userMessage);
-        mUserActionTitle = Preconditions.checkNotNull(userActionTitle);
         mUserAction = Preconditions.checkNotNull(userAction);
     }
 
+    /** {@hide} */
+    @Deprecated
+    public RecoverableSecurityException(Throwable cause, CharSequence userMessage,
+            CharSequence userActionTitle, PendingIntent userAction) {
+        this(cause, userMessage,
+                new RemoteAction(
+                        Icon.createWithResource("android",
+                                com.android.internal.R.drawable.ic_restart),
+                        userActionTitle, userActionTitle, userAction));
+    }
+
     /**
      * Return short message describing the issue for end user audiences, which
      * may be shown in a notification or dialog.
@@ -85,16 +95,9 @@
     }
 
     /**
-     * Return short title describing the primary action.
-     */
-    public CharSequence getUserActionTitle() {
-        return mUserActionTitle;
-    }
-
-    /**
      * Return primary action that will initiate the recovery.
      */
-    public PendingIntent getUserAction() {
+    public RemoteAction getUserAction() {
         return mUserAction;
     }
 
@@ -113,15 +116,21 @@
      * remote UID; notifications from older exceptions will always be replaced.
      */
     public void showAsNotification(Context context) {
-        final Notification.Builder builder = new Notification.Builder(context)
-                .setSmallIcon(com.android.internal.R.drawable.ic_print_error)
-                .setContentTitle(mUserActionTitle)
-                .setContentText(mUserMessage)
-                .setContentIntent(mUserAction)
-                .setCategory(Notification.CATEGORY_ERROR);
-
         final NotificationManager nm = context.getSystemService(NotificationManager.class);
-        nm.notify(TAG, mUserAction.getCreatorUid(), builder.build());
+
+        // Create a channel per-sender, since we don't want one poorly behaved
+        // remote app to cause all of our notifications to be blocked
+        final String tag = TAG + "_" + mUserAction.getActionIntent().getCreatorUid();
+        nm.createNotificationChannel(new NotificationChannel(tag, TAG,
+                NotificationManager.IMPORTANCE_DEFAULT));
+
+        final Notification.Builder builder = new Notification.Builder(context, tag)
+                .setSmallIcon(com.android.internal.R.drawable.ic_print_error)
+                .setContentTitle(mUserAction.getTitle())
+                .setContentText(mUserMessage)
+                .setContentIntent(mUserAction.getActionIntent())
+                .setCategory(Notification.CATEGORY_ERROR);
+        nm.notify(tag, 0, builder.build());
     }
 
     /**
@@ -144,7 +153,7 @@
         args.putParcelable(TAG, this);
         dialog.setArguments(args);
 
-        final String tag = TAG + "_" + mUserAction.getCreatorUid();
+        final String tag = TAG + "_" + mUserAction.getActionIntent().getCreatorUid();
         final FragmentManager fm = activity.getFragmentManager();
         final FragmentTransaction ft = fm.beginTransaction();
         final Fragment old = fm.findFragmentByTag(tag);
@@ -162,9 +171,9 @@
             final RecoverableSecurityException e = getArguments().getParcelable(TAG);
             return new AlertDialog.Builder(getActivity())
                     .setMessage(e.mUserMessage)
-                    .setPositiveButton(e.mUserActionTitle, (dialog, which) -> {
+                    .setPositiveButton(e.mUserAction.getTitle(), (dialog, which) -> {
                         try {
-                            e.mUserAction.send();
+                            e.mUserAction.getActionIntent().send();
                         } catch (PendingIntent.CanceledException ignored) {
                         }
                     })
@@ -182,7 +191,6 @@
     public void writeToParcel(Parcel dest, int flags) {
         dest.writeString(getMessage());
         dest.writeCharSequence(mUserMessage);
-        dest.writeCharSequence(mUserActionTitle);
         mUserAction.writeToParcel(dest, flags);
     }
 
diff --git a/core/java/android/app/backup/BackupManager.java b/core/java/android/app/backup/BackupManager.java
index f0abe33..59bd01f 100644
--- a/core/java/android/app/backup/BackupManager.java
+++ b/core/java/android/app/backup/BackupManager.java
@@ -19,6 +19,7 @@
 import android.annotation.SystemApi;
 import android.content.ComponentName;
 import android.content.Context;
+import android.os.Bundle;
 import android.os.Handler;
 import android.os.Message;
 import android.os.RemoteException;
@@ -257,16 +258,46 @@
      * @return Zero on success; nonzero on error.
      */
     public int requestRestore(RestoreObserver observer) {
+        return requestRestore(observer, null);
+    }
+
+    // system APIs start here
+
+    /**
+     * Restore the calling application from backup.  The data will be restored from the
+     * current backup dataset if the application has stored data there, or from
+     * the dataset used during the last full device setup operation if the current
+     * backup dataset has no matching data.  If no backup data exists for this application
+     * in either source, a nonzero value will be returned.
+     *
+     * <p>If this method returns zero (meaning success), the OS will attempt to retrieve
+     * a backed-up dataset from the remote transport, instantiate the application's
+     * backup agent, and pass the dataset to the agent's
+     * {@link android.app.backup.BackupAgent#onRestore(BackupDataInput, int, android.os.ParcelFileDescriptor) onRestore()}
+     * method.
+     *
+     * @param observer The {@link RestoreObserver} to receive callbacks during the restore
+     * operation. This must not be null.
+     *
+     * @param monitor the {@link BackupManagerMonitor} to receive callbacks during the restore
+     * operation.
+     *
+     * @return Zero on success; nonzero on error.
+     *
+     * @hide
+     */
+    @SystemApi
+    public int requestRestore(RestoreObserver observer, BackupManagerMonitor monitor) {
         int result = -1;
         checkServiceBinder();
         if (sService != null) {
             RestoreSession session = null;
             try {
                 IRestoreSession binder = sService.beginRestoreSession(mContext.getPackageName(),
-                        null);
+                    null);
                 if (binder != null) {
                     session = new RestoreSession(mContext, binder);
-                    result = session.restorePackage(mContext.getPackageName(), observer);
+                    result = session.restorePackage(mContext.getPackageName(), observer, monitor);
                 }
             } catch (RemoteException e) {
                 Log.e(TAG, "restoreSelf() unable to contact service");
@@ -279,8 +310,6 @@
         return result;
     }
 
-    // system APIs start here
-
     /**
      * Begin the process of restoring data from backup.  See the
      * {@link android.app.backup.RestoreSession} class for documentation on that process.
@@ -556,7 +585,7 @@
      */
     @SystemApi
     public int requestBackup(String[] packages, BackupObserver observer) {
-        return requestBackup(packages, observer, 0);
+        return requestBackup(packages, observer, null, 0);
     }
 
     /**
@@ -570,20 +599,26 @@
      * @param packages List of package names to backup.
      * @param observer The {@link BackupObserver} to receive callbacks during the backup
      *                 operation. Could be {@code null}.
+     * @param monitor  The {@link BackupManagerMonitorWrapper} to receive callbacks of important
+     *                 events during the backup operation. Could be {@code null}.
      * @param flags    {@link #FLAG_NON_INCREMENTAL_BACKUP}.
      * @return {@link BackupManager#SUCCESS} on success; nonzero on error.
      * @throws IllegalArgumentException on null or empty {@code packages} param.
      * @hide
      */
     @SystemApi
-    public int requestBackup(String[] packages, BackupObserver observer, int flags) {
+    public int requestBackup(String[] packages, BackupObserver observer,
+            BackupManagerMonitor monitor, int flags) {
         checkServiceBinder();
         if (sService != null) {
             try {
                 BackupObserverWrapper observerWrapper = observer == null
                         ? null
                         : new BackupObserverWrapper(mContext, observer);
-                return sService.requestBackup(packages, observerWrapper, flags);
+                BackupManagerMonitorWrapper monitorWrapper = monitor == null
+                        ? null
+                        : new BackupManagerMonitorWrapper(monitor);
+                return sService.requestBackup(packages, observerWrapper, monitorWrapper, flags);
             } catch (RemoteException e) {
                 Log.e(TAG, "requestBackup() couldn't connect");
             }
@@ -680,4 +715,18 @@
             });
         }
     }
+
+    private class BackupManagerMonitorWrapper extends IBackupManagerMonitor.Stub {
+        final BackupManagerMonitor mMonitor;
+
+        BackupManagerMonitorWrapper(BackupManagerMonitor monitor) {
+            mMonitor = monitor;
+        }
+
+        @Override
+        public void onEvent(final Bundle event) throws RemoteException {
+            mMonitor.onEvent(event);
+        }
+    }
+
 }
diff --git a/core/java/android/app/backup/BackupManagerMonitor.java b/core/java/android/app/backup/BackupManagerMonitor.java
new file mode 100644
index 0000000..099878b
--- /dev/null
+++ b/core/java/android/app/backup/BackupManagerMonitor.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2017 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.backup;
+
+import android.annotation.SystemApi;
+import android.os.Bundle;
+
+/**
+ * Callback class for receiving important events during backup/restore operations.
+ * Events consist mostly of errors and exceptions, giving detailed reason on why a restore/backup
+ * failed or any time BackupManager makes an important decision.
+ * On the other hand {@link BackupObserver} will give a failure/success view without
+ * getting into details why. This callback runs on the thread it was called on because it can get
+ * a bit spammy.
+ * These callbacks will run on the binder thread.
+ *
+ * @hide
+ */
+@SystemApi
+public class BackupManagerMonitor {
+
+  // Logging constants for BackupManagerMonitor
+  public static final int LOG_EVENT_CATEGORY_TRANSPORT = 1;
+  public static final int LOG_EVENT_CATEGORY_AGENT = 2;
+  public static final int LOG_EVENT_CATEGORY_BACKUP_MANAGER_POLICY = 3;
+  /** string : the package name */
+  public static final String EXTRA_LOG_EVENT_PACKAGE_NAME =
+          "android.app.backup.extra.LOG_EVENT_PACKAGE_NAME";
+  /** int : the versionCode of the package named by EXTRA_LOG_EVENT_PACKAGE_NAME */
+  public static final String EXTRA_LOG_EVENT_PACKAGE_VERSION =
+          "android.app.backup.extra.LOG_EVENT_PACKAGE_VERSION";
+  /** int : the id of the log message, will be a unique identifier */
+  public static final String EXTRA_LOG_EVENT_ID = "android.app.backup.extra.LOG_EVENT_ID";
+  /**
+   *  int : category will be one of
+   *  { LOG_EVENT_CATEGORY_TRANSPORT,
+   *    LOG_EVENT_CATEGORY_AGENT,
+   *    LOG_EVENT_CATEGORY_BACKUP_MANAGER_POLICY}.
+   */
+  public static final String EXTRA_LOG_EVENT_CATEGORY =
+          "android.app.backup.extra.LOG_EVENT_CATEGORY";
+
+  // TODO complete this list with all log messages. And document properly.
+  public static final int LOG_EVENT_ID_FULL_BACKUP_TIMEOUT = 4;
+  public static final int LOG_EVENT_ID_KEY_VALUE_BACKUP_TIMEOUT = 21;
+  public static final int LOG_EVENT_ID_KEY_VALUE_RESTORE_TIMEOUT = 31;
+  public static final int LOG_EVENT_ID_FULL_RESTORE_TIMEOUT = 45;
+  public static final int LOG_EVENT_ID_NO_PACKAGES = 49;
+
+
+
+  /**
+   * This method will be called each time something important happens on BackupManager.
+   *
+   * @param event bundle will contain data about event:
+   *    - event id, not optional, a unique identifier for each event.
+   *    - package name, optional, the current package we're backing up/restoring if applicable.
+   *    - package version, optional, the current package version  we're backing up/restoring
+   *          if applicable.
+   *    - category of event, not optional, one of
+   *          { LOG_EVENT_CATEGORY_TRANSPORT,
+   *            LOG_EVENT_CATEGORY_AGENT,
+   *            LOG_EVENT_CATEGORY_BACKUP_MANAGER_POLICY}
+   *
+   */
+  public void onEvent(Bundle event) {
+  }
+}
diff --git a/core/java/android/app/backup/IBackupManager.aidl b/core/java/android/app/backup/IBackupManager.aidl
index 1657e2e..393667d 100644
--- a/core/java/android/app/backup/IBackupManager.aidl
+++ b/core/java/android/app/backup/IBackupManager.aidl
@@ -17,6 +17,7 @@
 package android.app.backup;
 
 import android.app.backup.IBackupObserver;
+import android.app.backup.IBackupManagerMonitor;
 import android.app.backup.IFullBackupRestoreObserver;
 import android.app.backup.IRestoreSession;
 import android.app.backup.ISelectBackupTransportCallback;
@@ -376,9 +377,13 @@
      * @param observer The {@link BackupObserver} to receive callbacks during the backup
      * operation.
      *
+     * @param monitor the {@link BackupManagerMonitor} to receive callbacks about important events
+     * during the backup operation.
+     *
      * @param flags {@link BackupManager#FLAG_NON_INCREMENTAL_BACKUP}.
      *
      * @return Zero on success; nonzero on error.
      */
-    int requestBackup(in String[] packages, IBackupObserver observer, int flags);
+    int requestBackup(in String[] packages, IBackupObserver observer, IBackupManagerMonitor monitor,
+        int flags);
 }
diff --git a/core/java/android/app/backup/IBackupManagerMonitor.aidl b/core/java/android/app/backup/IBackupManagerMonitor.aidl
new file mode 100644
index 0000000..cf1d9f8
--- /dev/null
+++ b/core/java/android/app/backup/IBackupManagerMonitor.aidl
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2017 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.backup;
+
+import android.os.Bundle;
+
+/**
+ * Callback class for receiving important events during backup/restore operations.
+ * These callbacks will run on the binder thread.
+ *
+ * @hide
+ */
+oneway interface IBackupManagerMonitor {
+
+  /**
+   * This method will be called each time something important happens on BackupManager.
+   *
+   * @param event bundle will contain data about event, like package name, package version etc.
+   */
+  void onEvent(in Bundle event);
+
+}
\ No newline at end of file
diff --git a/core/java/android/app/backup/IRestoreSession.aidl b/core/java/android/app/backup/IRestoreSession.aidl
index 14731ee..b9e9485 100644
--- a/core/java/android/app/backup/IRestoreSession.aidl
+++ b/core/java/android/app/backup/IRestoreSession.aidl
@@ -18,7 +18,7 @@
 
 import android.app.backup.RestoreSet;
 import android.app.backup.IRestoreObserver;
-
+import android.app.backup.IBackupManagerMonitor;
 /**
  * Binder interface used by clients who wish to manage a restore operation.  Every
  * method in this interface requires the android.permission.BACKUP permission.
@@ -31,10 +31,11 @@
      *
      * @param observer This binder points to an object whose onRestoreSetsAvailable()
      *   method will be called to supply the results of the transport's lookup.
+     * @param monitor If non null the binder will send important events to this monitor.
      * @return Zero on success; nonzero on error.  The observer will only receive a
      *   result callback if this method returned zero.
      */
-    int getAvailableRestoreSets(IRestoreObserver observer);
+    int getAvailableRestoreSets(IRestoreObserver observer, IBackupManagerMonitor monitor);
 
     /**
      * Restore the given set onto the device, replacing the current data of any app
@@ -48,8 +49,9 @@
      *   the restore set that should be used.
      * @param observer If non-null, this binder points to an object that will receive
      *   progress callbacks during the restore operation.
+     * @param monitor If non null the binder will send important events to this monitor.
      */
-    int restoreAll(long token, IRestoreObserver observer);
+    int restoreAll(long token, IRestoreObserver observer, IBackupManagerMonitor monitor);
 
     /**
      * Restore select packages from the given set onto the device, replacing the
@@ -67,8 +69,10 @@
      * @param packages The set of packages for which to attempt a restore.  Regardless of
      *   the contents of the actual back-end dataset named by {@code token}, only
      *   applications mentioned in this list will have their data restored.
+     * @param monitor If non null the binder will send important events to this monitor.
      */
-    int restoreSome(long token, IRestoreObserver observer, in String[] packages);
+    int restoreSome(long token, IRestoreObserver observer, IBackupManagerMonitor monitor,
+            in String[] packages);
 
     /**
      * Restore a single application from backup.  The data will be restored from the
@@ -84,8 +88,10 @@
      *   permission must be held.
      * @param observer If non-null, this binder points to an object that will receive
      *   progress callbacks during the restore operation.
+     * @param monitor If non null the binder will send important events to this monitor.
      */
-    int restorePackage(in String packageName, IRestoreObserver observer);
+    int restorePackage(in String packageName, IRestoreObserver observer,
+          IBackupManagerMonitor monitor);
 
     /**
      * End this restore session.  After this method is called, the IRestoreSession binder
diff --git a/core/java/android/app/backup/RestoreSession.java b/core/java/android/app/backup/RestoreSession.java
index 0a885b6..94fac17 100644
--- a/core/java/android/app/backup/RestoreSession.java
+++ b/core/java/android/app/backup/RestoreSession.java
@@ -22,6 +22,7 @@
 import android.app.backup.IRestoreObserver;
 import android.app.backup.IRestoreSession;
 import android.content.Context;
+import android.os.Bundle;
 import android.os.Handler;
 import android.os.Message;
 import android.os.RemoteException;
@@ -46,16 +47,63 @@
      *   be called on the application's main thread in order to supply the results of
      *   the restore set lookup by the backup transport.  This parameter must not be
      *   null.
+     * @param monitor a BackupManagerMonitor object will supply data about important events.
+     * @return Zero on success, nonzero on error.  The observer's restoreSetsAvailable()
+     *   method will only be called if this method returned zero.
+     */
+    public int getAvailableRestoreSets(RestoreObserver observer, BackupManagerMonitor monitor) {
+        int err = -1;
+        RestoreObserverWrapper obsWrapper = new RestoreObserverWrapper(mContext, observer);
+        BackupManagerMonitorWrapper monitorWrapper = new BackupManagerMonitorWrapper(monitor);
+        try {
+            err = mBinder.getAvailableRestoreSets(obsWrapper, monitorWrapper);
+        } catch (RemoteException e) {
+            Log.d(TAG, "Can't contact server to get available sets");
+        }
+        return err;
+    }
+
+    /**
+     * Ask the current transport what the available restore sets are.
+     *
+     * @param observer a RestoreObserver object whose restoreSetsAvailable() method will
+     *   be called on the application's main thread in order to supply the results of
+     *   the restore set lookup by the backup transport.  This parameter must not be
+     *   null.
      * @return Zero on success, nonzero on error.  The observer's restoreSetsAvailable()
      *   method will only be called if this method returned zero.
      */
     public int getAvailableRestoreSets(RestoreObserver observer) {
+        return getAvailableRestoreSets(observer, null);
+    }
+
+    /**
+     * Restore the given set onto the device, replacing the current data of any app
+     * contained in the restore set with the data previously backed up.
+     *
+     * <p>Callers must hold the android.permission.BACKUP permission to use this method.
+     *
+     * @return Zero on success; nonzero on error.  The observer will only receive
+     *   progress callbacks if this method returned zero.
+     * @param token The token from {@link #getAvailableRestoreSets()} corresponding to
+     *   the restore set that should be used.
+     * @param observer If non-null, this binder points to an object that will receive
+     *   progress callbacks during the restore operation.
+     * @param monitor If non-null, this binder points to an object that will receive
+     *   progress callbacks during the restore operation.
+     */
+    public int restoreAll(long token, RestoreObserver observer, BackupManagerMonitor monitor) {
         int err = -1;
-        RestoreObserverWrapper obsWrapper = new RestoreObserverWrapper(mContext, observer);
+        if (mObserver != null) {
+            Log.d(TAG, "restoreAll() called during active restore");
+            return -1;
+        }
+        mObserver = new RestoreObserverWrapper(mContext, observer);
+        BackupManagerMonitorWrapper monitorWrapper = new BackupManagerMonitorWrapper(monitor);
         try {
-            err = mBinder.getAvailableRestoreSets(obsWrapper);
+            err = mBinder.restoreAll(token, mObserver, monitorWrapper);
         } catch (RemoteException e) {
-            Log.d(TAG, "Can't contact server to get available sets");
+            Log.d(TAG, "Can't contact server to restore");
         }
         return err;
     }
@@ -74,16 +122,43 @@
      *   progress callbacks during the restore operation.
      */
     public int restoreAll(long token, RestoreObserver observer) {
+        return restoreAll(token, observer, null);
+    }
+
+    /**
+     * Restore select packages from the given set onto the device, replacing the
+     * current data of any app contained in the set with the data previously
+     * backed up.
+     *
+     * <p>Callers must hold the android.permission.BACKUP permission to use this method.
+     *
+     * @return Zero on success, nonzero on error. The observer will only receive
+     *   progress callbacks if this method returned zero.
+     * @param token The token from {@link getAvailableRestoreSets()} corresponding to
+     *   the restore set that should be used.
+     * @param observer If non-null, this binder points to an object that will receive
+     *   progress callbacks during the restore operation.
+     * @param monitor If non-null, this binder points to an object that will receive
+     *   progress callbacks during the restore operation.
+     * @param packages The set of packages for which to attempt a restore.  Regardless of
+     *   the contents of the actual back-end dataset named by {@code token}, only
+     *   applications mentioned in this list will have their data restored.
+     *
+     * @hide
+     */
+    public int restoreSome(long token, RestoreObserver observer, BackupManagerMonitor monitor,
+            String[] packages) {
         int err = -1;
         if (mObserver != null) {
             Log.d(TAG, "restoreAll() called during active restore");
             return -1;
         }
         mObserver = new RestoreObserverWrapper(mContext, observer);
+        BackupManagerMonitorWrapper monitorWrapper = new BackupManagerMonitorWrapper(monitor);
         try {
-            err = mBinder.restoreAll(token, mObserver);
+            err = mBinder.restoreSome(token, mObserver, monitorWrapper, packages);
         } catch (RemoteException e) {
-            Log.d(TAG, "Can't contact server to restore");
+            Log.d(TAG, "Can't contact server to restore packages");
         }
         return err;
     }
@@ -108,20 +183,46 @@
      * @hide
      */
     public int restoreSome(long token, RestoreObserver observer, String[] packages) {
+        return restoreSome(token, observer, null, packages);
+    }
+
+    /**
+     * Restore a single application from backup.  The data will be restored from the
+     * current backup dataset if the given package has stored data there, or from
+     * the dataset used during the last full device setup operation if the current
+     * backup dataset has no matching data.  If no backup data exists for this package
+     * in either source, a nonzero value will be returned.
+     *
+     * @return Zero on success; nonzero on error.  The observer will only receive
+     *   progress callbacks if this method returned zero.
+     * @param packageName The name of the package whose data to restore.  If this is
+     *   not the name of the caller's own package, then the android.permission.BACKUP
+     *   permission must be held.
+     * @param observer If non-null, this binder points to an object that will receive
+     *   progress callbacks during the restore operation.
+     *
+     * @param monitor If non-null, this binder points to an object that will receive
+     *   event callbacks during the restore operation.
+     */
+    public int restorePackage(String packageName, RestoreObserver observer,
+            BackupManagerMonitor monitor) {
         int err = -1;
         if (mObserver != null) {
-            Log.d(TAG, "restoreAll() called during active restore");
+            Log.d(TAG, "restorePackage() called during active restore");
             return -1;
         }
         mObserver = new RestoreObserverWrapper(mContext, observer);
+        BackupManagerMonitorWrapper monitorWrapper = new BackupManagerMonitorWrapper(monitor);
+
         try {
-            err = mBinder.restoreSome(token, mObserver, packages);
+            err = mBinder.restorePackage(packageName, mObserver, monitorWrapper);
         } catch (RemoteException e) {
-            Log.d(TAG, "Can't contact server to restore packages");
+            Log.d(TAG, "Can't contact server to restore package");
         }
         return err;
     }
 
+
     /**
      * Restore a single application from backup.  The data will be restored from the
      * current backup dataset if the given package has stored data there, or from
@@ -138,18 +239,7 @@
      *   progress callbacks during the restore operation.
      */
     public int restorePackage(String packageName, RestoreObserver observer) {
-        int err = -1;
-        if (mObserver != null) {
-            Log.d(TAG, "restorePackage() called during active restore");
-            return -1;
-        }
-        mObserver = new RestoreObserverWrapper(mContext, observer);
-        try {
-            err = mBinder.restorePackage(packageName, mObserver);
-        } catch (RemoteException e) {
-            Log.d(TAG, "Can't contact server to restore package");
-        }
-        return err;
+        return restorePackage(packageName, observer, null);
     }
 
     /**
@@ -236,4 +326,17 @@
                     mHandler.obtainMessage(MSG_RESTORE_FINISHED, error, 0));
         }
     }
+
+    private class BackupManagerMonitorWrapper extends IBackupManagerMonitor.Stub {
+        final BackupManagerMonitor mMonitor;
+
+        BackupManagerMonitorWrapper(BackupManagerMonitor monitor) {
+            mMonitor = monitor;
+        }
+
+        @Override
+        public void onEvent(final Bundle event) throws RemoteException {
+            mMonitor.onEvent(event);
+        }
+    }
 }
diff --git a/core/java/android/content/pm/ActivityInfo.java b/core/java/android/content/pm/ActivityInfo.java
index 9a8eff0..48c52d5 100644
--- a/core/java/android/content/pm/ActivityInfo.java
+++ b/core/java/android/content/pm/ActivityInfo.java
@@ -824,6 +824,7 @@
      * WindowManager.LayoutParams.softInputMode}.  If 0 (unspecified),
      * the mode from the theme will be used.
      */
+    @android.view.WindowManager.LayoutParams.SoftInputModeFlags
     public int softInputMode;
 
     /**
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index 7cef781..7a9aaaf 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -2747,15 +2747,15 @@
         String cls = clsSeq.toString();
         char c = cls.charAt(0);
         if (c == '.') {
-            return pkg + cls;
+            return (pkg + cls).intern();
         }
         if (cls.indexOf('.') < 0) {
             StringBuilder b = new StringBuilder(pkg);
             b.append('.');
             b.append(cls);
-            return b.toString();
+            return b.toString().intern();
         }
-        return cls;
+        return cls.intern();
     }
 
     private static String buildCompoundName(String pkg,
@@ -2775,7 +2775,7 @@
                         + pkg + ": " + nameError;
                 return null;
             }
-            return pkg + proc;
+            return (pkg + proc).intern();
         }
         String nameError = validateName(proc, true, false);
         if (nameError != null && !"system".equals(proc)) {
@@ -2783,7 +2783,7 @@
                     + pkg + ": " + nameError;
             return null;
         }
-        return proc;
+        return proc.intern();
     }
 
     private static String buildProcessName(String pkg, String defProc,
@@ -5101,7 +5101,7 @@
             if (v != null) {
                 if (v.type == TypedValue.TYPE_STRING) {
                     CharSequence cs = v.coerceToString();
-                    data.putString(name, cs != null ? cs.toString() : null);
+                    data.putString(name, cs != null ? cs.toString().intern() : null);
                 } else if (v.type == TypedValue.TYPE_INT_BOOLEAN) {
                     data.putBoolean(name, v.data != 0);
                 } else if (v.type >= TypedValue.TYPE_FIRST_INT
diff --git a/core/java/android/hardware/camera2/params/OutputConfiguration.java b/core/java/android/hardware/camera2/params/OutputConfiguration.java
index d951294..522575f 100644
--- a/core/java/android/hardware/camera2/params/OutputConfiguration.java
+++ b/core/java/android/hardware/camera2/params/OutputConfiguration.java
@@ -259,6 +259,10 @@
             throw new IllegalArgumentException("Unknow surface source class type");
         }
 
+        if (surfaceSize.getWidth() == 0 || surfaceSize.getHeight() == 0) {
+            throw new IllegalArgumentException("Surface size needs to be non-zero");
+        }
+
         mSurfaceGroupId = SURFACE_GROUP_ID_NONE;
         mSurfaces = new ArrayList<Surface>();
         mRotation = ROTATION_0;
diff --git a/core/java/android/inputmethodservice/IInputMethodWrapper.java b/core/java/android/inputmethodservice/IInputMethodWrapper.java
index 167d5a0..bc40750 100644
--- a/core/java/android/inputmethodservice/IInputMethodWrapper.java
+++ b/core/java/android/inputmethodservice/IInputMethodWrapper.java
@@ -61,7 +61,6 @@
     private static final int DO_SET_INPUT_CONTEXT = 20;
     private static final int DO_UNSET_INPUT_CONTEXT = 30;
     private static final int DO_START_INPUT = 32;
-    private static final int DO_RESTART_INPUT = 34;
     private static final int DO_CREATE_SESSION = 40;
     private static final int DO_SET_SESSION_ENABLED = 45;
     private static final int DO_REVOKE_SESSION = 50;
@@ -164,26 +163,19 @@
                 inputMethod.unbindInput();
                 return;
             case DO_START_INPUT: {
-                SomeArgs args = (SomeArgs)msg.obj;
-                int missingMethods = msg.arg1;
-                IInputContext inputContext = (IInputContext)args.arg1;
-                InputConnection ic = inputContext != null
+                final SomeArgs args = (SomeArgs) msg.obj;
+                final int missingMethods = msg.arg1;
+                final boolean restarting = msg.arg2 != 0;
+                final IInputContext inputContext = (IInputContext) args.arg1;
+                final EditorInfo info = (EditorInfo) args.arg2;
+                final InputConnection ic = inputContext != null
                         ? new InputConnectionWrapper(mTarget, inputContext, missingMethods) : null;
-                EditorInfo info = (EditorInfo)args.arg2;
                 info.makeCompatible(mTargetSdkVersion);
-                inputMethod.startInput(ic, info);
-                args.recycle();
-                return;
-            }
-            case DO_RESTART_INPUT: {
-                SomeArgs args = (SomeArgs)msg.obj;
-                int missingMethods = msg.arg1;
-                IInputContext inputContext = (IInputContext)args.arg1;
-                InputConnection ic = inputContext != null
-                        ? new InputConnectionWrapper(mTarget, inputContext, missingMethods) : null;
-                EditorInfo info = (EditorInfo)args.arg2;
-                info.makeCompatible(mTargetSdkVersion);
-                inputMethod.restartInput(ic, info);
+                if (restarting) {
+                    inputMethod.restartInput(ic, info);
+                } else {
+                    inputMethod.startInput(ic, info);
+                }
                 args.recycle();
                 return;
             }
@@ -265,17 +257,9 @@
     @Override
     public void startInput(IInputContext inputContext,
             @InputConnectionInspector.MissingMethodFlags final int missingMethods,
-            EditorInfo attribute) {
-        mCaller.executeOrSendMessage(mCaller.obtainMessageIOO(DO_START_INPUT,
-                missingMethods, inputContext, attribute));
-    }
-
-    @Override
-    public void restartInput(IInputContext inputContext,
-            @InputConnectionInspector.MissingMethodFlags final int missingMethods,
-            EditorInfo attribute) {
-        mCaller.executeOrSendMessage(mCaller.obtainMessageIOO(DO_RESTART_INPUT,
-                missingMethods, inputContext, attribute));
+            EditorInfo attribute, boolean restarting) {
+        mCaller.executeOrSendMessage(mCaller.obtainMessageIIOO(DO_START_INPUT,
+                missingMethods, restarting ? 1 : 0, inputContext, attribute));
     }
 
     @Override
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index 5996fe2..5ae1fd0 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -387,8 +387,9 @@
             mInputConnection = binding.getConnection();
             if (DEBUG) Log.v(TAG, "bindInput(): binding=" + binding
                     + " ic=" + mInputConnection);
-            InputConnection ic = getCurrentInputConnection();
-            if (ic != null) ic.reportFullscreenMode(mIsFullscreen);
+            if (mImm != null && mToken != null) {
+                mImm.reportFullscreenMode(mToken, mIsFullscreen);
+            }
             initialize();
             onBindInput();
         }
@@ -1027,8 +1028,9 @@
         if (mIsFullscreen != isFullscreen || !mFullscreenApplied) {
             changed = true;
             mIsFullscreen = isFullscreen;
-            InputConnection ic = getCurrentInputConnection();
-            if (ic != null) ic.reportFullscreenMode(isFullscreen);
+            if (mImm != null && mToken != null) {
+                mImm.reportFullscreenMode(mToken, mIsFullscreen);
+            }
             mFullscreenApplied = true;
             initialize();
             LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams)
diff --git a/core/java/android/net/INetworkScoreService.aidl b/core/java/android/net/INetworkScoreService.aidl
index 9cc256e..f249daf 100644
--- a/core/java/android/net/INetworkScoreService.aidl
+++ b/core/java/android/net/INetworkScoreService.aidl
@@ -132,5 +132,14 @@
     oneway void requestRecommendationAsync(in RecommendationRequest request,
                                            in RemoteCallback remoteCallback);
 
+    /**
+     * Returns metadata about the active scorer or <code>null</code> if there is no active scorer.
+     */
     NetworkScorerAppManager.NetworkScorerAppData getActiveScorer();
+
+    /**
+     * Returns the list of available scorer apps. The list will be empty if there are
+     * no valid scorers.
+     */
+    List<NetworkScorerAppManager.NetworkScorerAppData> getAllValidScorers();
 }
diff --git a/core/java/android/net/NetworkScoreManager.java b/core/java/android/net/NetworkScoreManager.java
index 2875580..8f3af66 100644
--- a/core/java/android/net/NetworkScoreManager.java
+++ b/core/java/android/net/NetworkScoreManager.java
@@ -37,6 +37,7 @@
 
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
+import java.util.List;
 import java.util.concurrent.CompletableFuture;
 
 /**
@@ -200,6 +201,20 @@
     }
 
     /**
+     * Returns the list of available scorer apps. The list will be empty if there are
+     * no valid scorers.
+     *
+     * @hide
+     */
+    public List<NetworkScorerAppData> getAllValidScorers() {
+        try {
+            return mService.getAllValidScorers();
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
      * Update network scores.
      *
      * <p>This may be called at any time to re-score active networks. Scores will generally be
diff --git a/core/java/android/net/NetworkScorerAppManager.java b/core/java/android/net/NetworkScorerAppManager.java
index f3cbb52..a166c7f 100644
--- a/core/java/android/net/NetworkScorerAppManager.java
+++ b/core/java/android/net/NetworkScorerAppManager.java
@@ -127,6 +127,14 @@
     }
 
     /**
+     * Returns the list of available scorer apps. The list will be empty if there are
+     * no valid scorers.
+     */
+    public List<NetworkScorerAppData> getAllValidScorers() {
+        return Collections.emptyList();
+    }
+
+    /**
      * @return A {@link NetworkScorerAppData} instance containing information about the
      *         best configured network recommendation provider installed or {@code null}
      *         if none of the configured packages can recommend networks.
diff --git a/core/java/android/os/ISchedulingPolicyService.aidl b/core/java/android/os/ISchedulingPolicyService.aidl
index 1273c83..efcf59a 100644
--- a/core/java/android/os/ISchedulingPolicyService.aidl
+++ b/core/java/android/os/ISchedulingPolicyService.aidl
@@ -29,6 +29,6 @@
      * The thread group leader of tid must be pid.
      * There may be restrictions on who can call this.
      */
-    int requestPriority(int pid, int tid, int prio);
+    int requestPriority(int pid, int tid, int prio, boolean isForApp);
 
 }
diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java
index dfcab3d..e4d11da 100644
--- a/core/java/android/os/UserManager.java
+++ b/core/java/android/os/UserManager.java
@@ -1048,6 +1048,10 @@
      * allowed to run code through scheduled alarms, receiving broadcasts,
      * etc.  A started user may be either the current foreground user or a
      * background user; the result here does not distinguish between the two.
+     * <p>Requires {@code android.permission.MANAGE_USERS} or
+     * {@code android.permission.INTERACT_ACROSS_USERS}, otherwise specified {@link UserHandle user}
+     * must be the calling user or a managed profile associated with it.
+     *
      * @param user The user to retrieve the running state for.
      */
     public boolean isUserRunning(UserHandle user) {
@@ -1068,6 +1072,10 @@
      * This is like {@link #isUserRunning(UserHandle)}, but will also return
      * true if the user had been running but is in the process of being stopped
      * (but is not yet fully stopped, and still running some code).
+     * <p>Requires {@code android.permission.MANAGE_USERS} or
+     * {@code android.permission.INTERACT_ACROSS_USERS}, otherwise specified {@link UserHandle user}
+     * must be the calling user or a managed profile associated with it.
+     *
      * @param user The user to retrieve the running state for.
      */
     public boolean isUserRunningOrStopping(UserHandle user) {
@@ -1142,6 +1150,9 @@
      * When a user is locked, only device-protected data storage is available.
      * When a user is unlocked, both device-protected and credential-protected
      * private app data storage is available.
+     * <p>Requires {@code android.permission.MANAGE_USERS} or
+     * {@code android.permission.INTERACT_ACROSS_USERS}, otherwise specified {@link UserHandle user}
+     * must be the calling user or a managed profile associated with it.
      *
      * @param user to retrieve the unlocked state for.
      * @see Intent#ACTION_USER_UNLOCKED
diff --git a/core/java/android/os/storage/IStorageManager.aidl b/core/java/android/os/storage/IStorageManager.aidl
index 35a266b..9e35bf6 100644
--- a/core/java/android/os/storage/IStorageManager.aidl
+++ b/core/java/android/os/storage/IStorageManager.aidl
@@ -293,4 +293,6 @@
     ParcelFileDescriptor openProxyFileDescriptor(int mountPointId, int fileId, int mode) = 74;
     long getCacheQuotaBytes(String volumeUuid, int uid) = 75;
     long getCacheSizeBytes(String volumeUuid, int uid) = 76;
+    long getAllocatableBytes(String path, int flags) = 77;
+    void allocateBytes(String path, long bytes, int flags) = 78;
 }
diff --git a/core/java/android/os/storage/StorageManager.java b/core/java/android/os/storage/StorageManager.java
index 626d6f4..2a3c03d 100644
--- a/core/java/android/os/storage/StorageManager.java
+++ b/core/java/android/os/storage/StorageManager.java
@@ -18,8 +18,10 @@
 
 import static android.net.TrafficStats.MB_IN_BYTES;
 
+import android.annotation.IntDef;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
+import android.annotation.RequiresPermission;
 import android.annotation.SdkConstant;
 import android.app.ActivityThread;
 import android.content.ContentResolver;
@@ -34,6 +36,7 @@
 import android.os.Looper;
 import android.os.Message;
 import android.os.ParcelFileDescriptor;
+import android.os.ParcelableException;
 import android.os.ProxyFileDescriptorCallback;
 import android.os.RemoteException;
 import android.os.ServiceManager;
@@ -60,10 +63,13 @@
 
 import java.io.BufferedReader;
 import java.io.File;
+import java.io.FileDescriptor;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStreamReader;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
 import java.lang.ref.WeakReference;
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
@@ -1424,10 +1430,7 @@
      * as a single unit.
      * </p>
      *
-     * @see #getCacheQuotaBytes()
      * @see #getCacheSizeBytes()
-     * @see #getExternalCacheQuotaBytes()
-     * @see #getExternalCacheSizeBytes()
      */
     public long getCacheQuotaBytes() {
         try {
@@ -1453,9 +1456,6 @@
      * </p>
      *
      * @see #getCacheQuotaBytes()
-     * @see #getCacheSizeBytes()
-     * @see #getExternalCacheQuotaBytes()
-     * @see #getExternalCacheSizeBytes()
      */
     public long getCacheSizeBytes() {
         try {
@@ -1520,6 +1520,139 @@
         }
     }
 
+    /**
+     * Flag indicating that a disk space allocation request should operate in an
+     * aggressive mode. This flag should only be rarely used in situations that
+     * are critical to system health or security.
+     * <p>
+     * When set, the system is more aggressive about the data that it considers
+     * for possible deletion when allocating disk space.
+     * <p class="note">
+     * Note: your app must hold the
+     * {@link android.Manifest.permission#ALLOCATE_AGGRESSIVE} permission for
+     * this flag to take effect.
+     * </p>
+     *
+     * @see #getAllocatableBytes(File, int)
+     * @see #allocateBytes(File, long, int)
+     * @see #allocateBytes(FileDescriptor, long, int)
+     */
+    @RequiresPermission(android.Manifest.permission.ALLOCATE_AGGRESSIVE)
+    public static final int FLAG_ALLOCATE_AGGRESSIVE = 1;
+
+    /** @hide */
+    @IntDef(flag = true, value = {
+            FLAG_ALLOCATE_AGGRESSIVE,
+    })
+    @Retention(RetentionPolicy.SOURCE)
+    public @interface AllocateFlags {}
+
+    /**
+     * Return the maximum number of new bytes that your app can allocate for
+     * itself using {@link #allocateBytes(File, long, int)} at the given path.
+     * This value is typically larger than {@link File#getUsableSpace()}, since
+     * the system may automatically delete cached files to satisfy your request.
+     * <p>
+     * This method is best used as a pre-flight check, such as deciding if there
+     * is enough space to store an entire music album before you allocate space
+     * for each audio file in the album. Attempts to allocate disk space beyond
+     * this value will fail.
+     * <p class="note">
+     * Note: if your app uses the {@code android:sharedUserId} manifest feature,
+     * then allocatable space for all packages in your shared UID is tracked
+     * together as a single unit.
+     * </p>
+     *
+     * @param file the directory where you're considering allocating disk space,
+     *            since allocatable space can vary widely depending on the
+     *            underlying storage device.
+     * @param flags to apply to the request.
+     * @return the maximum number of new bytes that the calling app can allocate
+     *         using {@link #allocateBytes(File, long, int)}.
+     */
+    public long getAllocatableBytes(File file, @AllocateFlags int flags) throws IOException {
+        try {
+            return mStorageManager.getAllocatableBytes(file.getAbsolutePath(), flags);
+        } catch (ParcelableException e) {
+            e.maybeRethrow(IOException.class);
+            throw new RuntimeException(e);
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
+     * Allocate the requested number of bytes for your application to use at the
+     * given path. This will cause the system to delete any cached files
+     * necessary to satisfy your request.
+     * <p>
+     * Attempts to allocate disk space beyond the value returned by
+     * {@link #getAllocatableBytes(File, int)} will fail.
+     * <p>
+     * Since multiple apps can be running simultaneously, this method may be
+     * subject to race conditions. If possible, consider using
+     * {@link #allocateBytes(FileDescriptor, long, int)} which will guarantee
+     * that bytes are allocated to an opened file.
+     *
+     * @param file the directory where you'd like to allocate disk space.
+     * @param bytes the number of bytes to allocate.
+     * @param flags to apply to the request.
+     * @see #getAllocatableBytes(File, int)
+     */
+    public void allocateBytes(File file, long bytes, @AllocateFlags int flags) throws IOException {
+        try {
+            mStorageManager.allocateBytes(file.getAbsolutePath(), bytes, flags);
+        } catch (ParcelableException e) {
+            e.maybeRethrow(IOException.class);
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
+     * Allocate the requested number of bytes for your application to use at the
+     * given path. This will cause the system to delete any cached files
+     * necessary to satisfy your request.
+     * <p>
+     * Attempts to allocate disk space beyond the value returned by
+     * {@link #getAllocatableBytes(File, int)} will fail.
+     * <p>
+     * This method guarantees that bytes are allocated to the opened file,
+     * otherwise it will throw if fast allocation not possible. Fast allocation
+     * is typically only supported in private app data directories, and on
+     * shared/external storage devices which are emulated.
+     *
+     * @param fd the directory where you'd like to allocate disk space.
+     * @param bytes the number of bytes to allocate.
+     * @param flags to apply to the request.
+     * @see #getAllocatableBytes(File, int)
+     * @see Environment#isExternalStorageEmulated(File)
+     */
+    public void allocateBytes(FileDescriptor fd, long bytes, @AllocateFlags int flags)
+            throws IOException {
+        final File file;
+        try {
+            file = new File(Os.readlink("/proc/self/fd/" + fd.getInt$()));
+        } catch (ErrnoException e) {
+            throw e.rethrowAsIOException();
+        }
+        for (int i = 0; i < 3; i++) {
+            allocateBytes(file, bytes, flags);
+
+            try {
+                Os.posix_fallocate(fd, 0, bytes);
+            } catch (ErrnoException e) {
+                if (e.errno == OsConstants.ENOSPC) {
+                    Log.w(TAG, "Odd, not enough space; let's try again?");
+                    continue;
+                }
+                throw e.rethrowAsIOException();
+            }
+        }
+        throw new IOException(
+                "Well this is embarassing; we can't allocate " + bytes + " for " + file);
+    }
+
     private static final String XATTR_ATOMIC = "user.atomic";
     private static final String XATTR_TOMBSTONE = "user.tombstone";
 
diff --git a/core/java/android/provider/CalendarContract.java b/core/java/android/provider/CalendarContract.java
index aa22041..d9ce57a 100644
--- a/core/java/android/provider/CalendarContract.java
+++ b/core/java/android/provider/CalendarContract.java
@@ -2392,6 +2392,7 @@
             Intent intent = new Intent(ACTION_EVENT_REMINDER);
             intent.setData(ContentUris.withAppendedId(CalendarContract.CONTENT_URI, alarmTime));
             intent.putExtra(ALARM_TIME, alarmTime);
+            intent.setFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
             PendingIntent pi = PendingIntent.getBroadcast(context, 0, intent, 0);
             manager.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, alarmTime, pi);
         }
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 2936dfb..1655847 100755
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -48,6 +48,7 @@
 import android.database.SQLException;
 import android.location.LocationManager;
 import android.net.ConnectivityManager;
+import android.net.NetworkScoreManager;
 import android.net.Uri;
 import android.net.wifi.WifiManager;
 import android.os.BatteryManager;
@@ -1279,9 +1280,7 @@
      *     Input: Optionally, {@link #EXTRA_CHANNEL_ID}, to highlight that channel.
      * <p>
      * Output: Nothing.
-     * @hide
      */
-    @SystemApi
     @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
     public static final String ACTION_APP_NOTIFICATION_SETTINGS
             = "android.settings.APP_NOTIFICATION_SETTINGS";
@@ -1289,8 +1288,6 @@
     /**
      * Activity Action: Show notification settings for a single {@link NotificationChannel}.
      * <p>
-     * Must be called from an activity.
-     * <p>
      *     Input: {@link #EXTRA_APP_PACKAGE}, the package containing the channel to display.
      *     Input: {@link #EXTRA_CHANNEL_ID}, the id of the channel to display.
      * <p>
@@ -6825,39 +6822,6 @@
                 "system_navigation_keys_enabled";
 
         /**
-         * Whether Downloads folder backup is enabled and should run on the device.
-         *
-         * @hide
-         */
-        public static final String DOWNLOADS_BACKUP_ENABLED = "downloads_backup_enabled";
-
-        /**
-         * Whether Downloads folder backup should only occur if the device is using a metered
-         * network.
-         *
-         * @hide
-         */
-        public static final String DOWNLOADS_BACKUP_ALLOW_METERED =
-                "downloads_backup_allow_metered";
-
-        /**
-         * Whether Downloads folder backup should only occur if the device is charging.
-         *
-         * @hide
-         */
-        public static final String DOWNLOADS_BACKUP_CHARGING_ONLY =
-                "downloads_backup_charging_only";
-
-        /**
-         * How many days of information for the automatic storage manager to retain on the device
-         * for downloads.
-         *
-         * @hide
-         */
-        public static final String AUTOMATIC_STORAGE_MANAGER_DOWNLOADS_DAYS_TO_RETAIN =
-                "automatic_storage_manager_downloads_days_to_retain";
-
-        /**
          * Holds comma separated list of ordering of QS tiles.
          * @hide
          */
@@ -6977,7 +6941,8 @@
             DOZE_ENABLED,
             DOZE_PULSE_ON_PICK_UP,
             DOZE_PULSE_ON_DOUBLE_TAP,
-            NFC_PAYMENT_DEFAULT_COMPONENT
+            NFC_PAYMENT_DEFAULT_COMPONENT,
+            AUTOMATIC_STORAGE_MANAGER_DAYS_TO_RETAIN
         };
 
         /**
@@ -8220,6 +8185,19 @@
                 "network_recommendations_enabled";
 
         /**
+         * Which package name to use for network recommendations. If null, network recommendations
+         * will neither be requested nor accepted.
+         *
+         * Use {@link NetworkScoreManager#getActiveScorerPackage()} to read this value and
+         * {@link NetworkScoreManager#setActiveScorer(String)} to write it.
+         *
+         * Type: string - package name
+         * @hide
+         */
+        public static final String NETWORK_RECOMMENDATIONS_PACKAGE =
+                "network_recommendations_package";
+
+        /**
          * Value to specify if the Wi-Fi Framework should defer to
          * {@link com.android.server.NetworkScoreService} for evaluating saved open networks.
          *
diff --git a/core/java/android/service/autofill/AutoFillService.java b/core/java/android/service/autofill/AutoFillService.java
index ab80aa3..6da6a39 100644
--- a/core/java/android/service/autofill/AutoFillService.java
+++ b/core/java/android/service/autofill/AutoFillService.java
@@ -172,7 +172,7 @@
      * <p>You should generally do initialization here rather than in {@link #onCreate}.
      */
     public void onConnected() {
-
+        //TODO(b/33197203): is not called anymore, fix it!
     }
 
     /**
@@ -221,6 +221,6 @@
      * <p> At this point this service may no longer be an active {@link AutoFillService}.
      */
     public void onDisconnected() {
-
+        //TODO(b/33197203): is not called anymore, fix it!
     }
 }
diff --git a/core/java/android/service/autofill/IAutoFillManagerService.aidl b/core/java/android/service/autofill/IAutoFillManagerService.aidl
index b39c0c8..6cdb516 100644
--- a/core/java/android/service/autofill/IAutoFillManagerService.aidl
+++ b/core/java/android/service/autofill/IAutoFillManagerService.aidl
@@ -34,7 +34,4 @@
     void updateSession(in IBinder activityToken, in AutoFillId id, in Rect bounds,
                        in AutoFillValue value, int flags);
     void finishSession(in IBinder activityToken);
-
-    // Methods called by ShellCommand
-    void requestSaveForUser(int userId);
 }
diff --git a/core/java/android/view/Display.java b/core/java/android/view/Display.java
index 3ba55ed..83b6a52 100644
--- a/core/java/android/view/Display.java
+++ b/core/java/android/view/Display.java
@@ -339,6 +339,21 @@
     public static final int COLOR_MODE_DISPLAY_P3 = 9;
 
     /**
+     * Indicates that when display is removed, all its activities will be moved to the primary
+     * display and the topmost activity should become focused.
+     *
+     * @hide
+     */
+    public static final int REMOVE_MODE_MOVE_CONTENT_TO_PRIMARY = 0;
+    /**
+     * Indicates that when display is removed, all its stacks and tasks will be removed, all
+     * activities will be destroyed according to the usual lifecycle.
+     *
+     * @hide
+     */
+    public static final int REMOVE_MODE_DESTROY_CONTENT = 1;
+
+    /**
      * Internal method to create a display.
      * Applications should use {@link android.view.WindowManager#getDefaultDisplay()}
      * or {@link android.hardware.display.DisplayManager#getDisplay}
@@ -770,6 +785,20 @@
     }
 
     /**
+     * @hide
+     * Get current remove mode of the display - what actions should be performed with the display's
+     * content when it is removed. Default behavior for public displays in this case is to move all
+     * activities to the primary display and make it focused. For private display - destroy all
+     * activities.
+     *
+     * @see #REMOVE_MODE_MOVE_CONTENT_TO_PRIMARY
+     * @see #REMOVE_MODE_DESTROY_CONTENT
+     */
+    public int getRemoveMode() {
+        return mDisplayInfo.removeMode;
+    }
+
+    /**
      * Returns the display's HDR capabilities.
      *
      * @see #isHdr()
diff --git a/core/java/android/view/DisplayInfo.java b/core/java/android/view/DisplayInfo.java
index f6b94af..3d11dcb 100644
--- a/core/java/android/view/DisplayInfo.java
+++ b/core/java/android/view/DisplayInfo.java
@@ -238,6 +238,15 @@
      */
     public String ownerPackageName;
 
+    /**
+     * @hide
+     * Get current remove mode of the display - what actions should be performed with the display's
+     * content when it is removed.
+     *
+     * @see Display#getRemoveMode()
+     */
+    public int removeMode = Display.REMOVE_MODE_MOVE_CONTENT_TO_PRIMARY;
+
     public static final Creator<DisplayInfo> CREATOR = new Creator<DisplayInfo>() {
         @Override
         public DisplayInfo createFromParcel(Parcel source) {
@@ -298,7 +307,8 @@
                 && presentationDeadlineNanos == other.presentationDeadlineNanos
                 && state == other.state
                 && ownerUid == other.ownerUid
-                && Objects.equal(ownerPackageName, other.ownerPackageName);
+                && Objects.equal(ownerPackageName, other.ownerPackageName)
+                && removeMode == other.removeMode;
     }
 
     @Override
@@ -341,6 +351,7 @@
         state = other.state;
         ownerUid = other.ownerUid;
         ownerPackageName = other.ownerPackageName;
+        removeMode = other.removeMode;
     }
 
     public void readFromParcel(Parcel source) {
@@ -385,6 +396,7 @@
         ownerUid = source.readInt();
         ownerPackageName = source.readString();
         uniqueId = source.readString();
+        removeMode = source.readInt();
     }
 
     @Override
@@ -428,6 +440,7 @@
         dest.writeInt(ownerUid);
         dest.writeString(ownerPackageName);
         dest.writeString(uniqueId);
+        dest.writeInt(removeMode);
     }
 
     @Override
@@ -637,6 +650,8 @@
             sb.append(" (uid ").append(ownerUid).append(")");
         }
         sb.append(flagsToString(flags));
+        sb.append(", removeMode ");
+        sb.append(removeMode);
         sb.append("}");
         return sb.toString();
     }
diff --git a/core/java/android/view/GestureDetector.java b/core/java/android/view/GestureDetector.java
index 27c1dcb..52e53b0 100644
--- a/core/java/android/view/GestureDetector.java
+++ b/core/java/android/view/GestureDetector.java
@@ -502,6 +502,8 @@
         final boolean pointerUp =
                 (action & MotionEvent.ACTION_MASK) == MotionEvent.ACTION_POINTER_UP;
         final int skipIndex = pointerUp ? ev.getActionIndex() : -1;
+        final boolean isGeneratedGesture =
+                (ev.getFlags() & MotionEvent.FLAG_IS_GENERATED_GESTURE) != 0;
 
         // Determine focal point
         float sumX = 0, sumY = 0;
@@ -604,7 +606,8 @@
                 final int deltaX = (int) (focusX - mDownFocusX);
                 final int deltaY = (int) (focusY - mDownFocusY);
                 int distance = (deltaX * deltaX) + (deltaY * deltaY);
-                if (distance > mTouchSlopSquare) {
+                int slopSquare = isGeneratedGesture ? 0 : mTouchSlopSquare;
+                if (distance > slopSquare) {
                     handled = mListener.onScroll(mCurrentDownEvent, ev, scrollX, scrollY);
                     mLastFocusX = focusX;
                     mLastFocusY = focusY;
@@ -613,7 +616,8 @@
                     mHandler.removeMessages(SHOW_PRESS);
                     mHandler.removeMessages(LONG_PRESS);
                 }
-                if (distance > mDoubleTapTouchSlopSquare) {
+                int doubleTapSlopSquare = isGeneratedGesture ? 0 : mDoubleTapTouchSlopSquare;
+                if (distance > doubleTapSlopSquare) {
                     mAlwaysInBiggerTapRegion = false;
                 }
             } else if ((Math.abs(scrollX) >= 1) || (Math.abs(scrollY) >= 1)) {
@@ -761,7 +765,10 @@
 
         int deltaX = (int) firstDown.getX() - (int) secondDown.getX();
         int deltaY = (int) firstDown.getY() - (int) secondDown.getY();
-        return (deltaX * deltaX + deltaY * deltaY < mDoubleTapSlopSquare);
+        final boolean isGeneratedGesture =
+                (firstDown.getFlags() & MotionEvent.FLAG_IS_GENERATED_GESTURE) != 0;
+        int slopSquare = isGeneratedGesture ? 0 : mDoubleTapSlopSquare;
+        return (deltaX * deltaX + deltaY * deltaY < slopSquare);
     }
 
     private void dispatchLongPress() {
diff --git a/core/java/android/view/Menu.java b/core/java/android/view/Menu.java
index 0c2e9cf..a8ea4dc 100644
--- a/core/java/android/view/Menu.java
+++ b/core/java/android/view/Menu.java
@@ -75,6 +75,13 @@
     static final int CATEGORY_SHIFT = 16;
 
     /**
+     * A mask of all supported modifiers for MenuItem's keyboard shortcuts
+     */
+    static final int SUPPORTED_MODIFIERS_MASK = KeyEvent.META_META_ON | KeyEvent.META_CTRL_ON
+            | KeyEvent.META_ALT_ON | KeyEvent.META_SHIFT_ON | KeyEvent.META_SYM_ON
+            | KeyEvent.META_FUNCTION_ON;
+
+    /**
      * Value to use for group and item identifier integers when you don't care
      * about them.
      */
diff --git a/core/java/android/view/MenuInflater.java b/core/java/android/view/MenuInflater.java
index 7a5c65f..6574bc0 100644
--- a/core/java/android/view/MenuInflater.java
+++ b/core/java/android/view/MenuInflater.java
@@ -305,7 +305,9 @@
         private CharSequence itemTitleCondensed;
         private int itemIconResId;
         private char itemAlphabeticShortcut;
+        private int itemAlphabeticModifiers;
         private char itemNumericShortcut;
+        private int itemNumericModifiers;
         /**
          * Sync to attrs.xml enum:
          * - 0: none
@@ -395,8 +397,14 @@
             itemIconResId = a.getResourceId(com.android.internal.R.styleable.MenuItem_icon, 0);
             itemAlphabeticShortcut =
                     getShortcut(a.getString(com.android.internal.R.styleable.MenuItem_alphabeticShortcut));
+            itemAlphabeticModifiers =
+                    a.getInt(com.android.internal.R.styleable.MenuItem_alphabeticModifiers,
+                            KeyEvent.META_CTRL_ON);
             itemNumericShortcut =
                     getShortcut(a.getString(com.android.internal.R.styleable.MenuItem_numericShortcut));
+            itemNumericModifiers =
+                    a.getInt(com.android.internal.R.styleable.MenuItem_numericModifiers,
+                            KeyEvent.META_CTRL_ON);
             if (a.hasValue(com.android.internal.R.styleable.MenuItem_checkable)) {
                 // Item has attribute checkable, use it
                 itemCheckable = a.getBoolean(com.android.internal.R.styleable.MenuItem_checkable, false) ? 1 : 0;
@@ -451,8 +459,8 @@
                 .setCheckable(itemCheckable >= 1)
                 .setTitleCondensed(itemTitleCondensed)
                 .setIcon(itemIconResId)
-                .setAlphabeticShortcut(itemAlphabeticShortcut)
-                .setNumericShortcut(itemNumericShortcut);
+                .setAlphabeticShortcut(itemAlphabeticShortcut, itemAlphabeticModifiers)
+                .setNumericShortcut(itemNumericShortcut, itemNumericModifiers);
 
             if (itemShowAsAction >= 0) {
                 item.setShowAsAction(itemShowAsAction);
diff --git a/core/java/android/view/MenuItem.java b/core/java/android/view/MenuItem.java
index 3f8d089..6aaaedbe 100644
--- a/core/java/android/view/MenuItem.java
+++ b/core/java/android/view/MenuItem.java
@@ -261,12 +261,13 @@
     /**
      * Change both the numeric and alphabetic shortcut associated with this
      * item. Note that the shortcut will be triggered when the key that
-     * generates the given character is pressed along with the ctrl key.
-     * Also note that case is not significant and that alphabetic shortcut
-     * characters will be displayed in lower case.
+     * generates the given character is pressed along with the corresponding
+     * modifier key. The default modifier is  {@link KeyEvent#META_CTRL_ON} in
+     * case nothing is specified. Also note that case is not significant and
+     * that alphabetic shortcut characters will be handled in lower case.
      * <p>
      * See {@link Menu} for the menu types that support shortcuts.
-     * 
+     *
      * @param numericChar The numeric shortcut key. This is the shortcut when
      *        using a numeric (e.g., 12-key) keyboard.
      * @param alphaChar The alphabetic shortcut key. This is the shortcut when
@@ -276,6 +277,39 @@
     public MenuItem setShortcut(char numericChar, char alphaChar);
 
     /**
+     * Change both the numeric and alphabetic shortcut associated with this
+     * item. Note that the shortcut will be triggered when the key that
+     * generates the given character is pressed along with the corresponding
+     * modifier key. Also note that case is not significant and that alphabetic
+     * shortcut characters will be handled in lower case.
+     * <p>
+     * See {@link Menu} for the menu types that support shortcuts.
+     *
+     * @param numericChar The numeric shortcut key. This is the shortcut when
+     *        using a numeric (e.g., 12-key) keyboard.
+     * @param numericModifiers The numeric modifier associated with the shortcut. It should
+     *        be a combination of {@link KeyEvent#META_META_ON}, {@link KeyEvent#META_CTRL_ON},
+     *        {@link KeyEvent#META_ALT_ON}, {@link KeyEvent#META_SHIFT_ON},
+     *        {@link KeyEvent#META_SYM_ON}, {@link KeyEvent#META_FUNCTION_ON}.
+     * @param alphaChar The alphabetic shortcut key. This is the shortcut when
+     *        using a keyboard with alphabetic keys.
+     * @param alphaModifiers The alphabetic modifier associated with the shortcut. It should
+     *        be a combination of {@link KeyEvent#META_META_ON}, {@link KeyEvent#META_CTRL_ON},
+     *        {@link KeyEvent#META_ALT_ON}, {@link KeyEvent#META_SHIFT_ON},
+     *        {@link KeyEvent#META_SYM_ON}, {@link KeyEvent#META_FUNCTION_ON}.
+     * @return This Item so additional setters can be called.
+     */
+    default public MenuItem setShortcut(char numericChar, char alphaChar, int numericModifiers,
+            int alphaModifiers) {
+        if ((alphaModifiers & Menu.SUPPORTED_MODIFIERS_MASK) == KeyEvent.META_CTRL_ON
+                && (numericModifiers & Menu.SUPPORTED_MODIFIERS_MASK) == KeyEvent.META_CTRL_ON) {
+            return setShortcut(numericChar, alphaChar);
+        } else {
+            return this;
+        }
+    }
+
+    /**
      * Change the numeric shortcut associated with this item.
      * <p>
      * See {@link Menu} for the menu types that support shortcuts.
@@ -287,6 +321,27 @@
     public MenuItem setNumericShortcut(char numericChar);
 
     /**
+     * Change the numeric shortcut and modifiers associated with this item.
+     * <p>
+     * See {@link Menu} for the menu types that support shortcuts.
+     *
+     * @param numericChar The numeric shortcut key.  This is the shortcut when
+     *                 using a 12-key (numeric) keyboard.
+     * @param numericModifiers The modifier associated with the shortcut. It should
+     *        be a combination of {@link KeyEvent#META_META_ON}, {@link KeyEvent#META_CTRL_ON},
+     *        {@link KeyEvent#META_ALT_ON}, {@link KeyEvent#META_SHIFT_ON},
+     *        {@link KeyEvent#META_SYM_ON}, {@link KeyEvent#META_FUNCTION_ON}.
+     * @return This Item so additional setters can be called.
+     */
+    default public MenuItem setNumericShortcut(char numericChar, int numericModifiers) {
+        if ((numericModifiers & Menu.SUPPORTED_MODIFIERS_MASK) == KeyEvent.META_CTRL_ON) {
+            return setNumericShortcut(numericChar);
+        } else {
+            return this;
+        }
+    }
+
+    /**
      * Return the char for this menu item's numeric (12-key) shortcut.
      *
      * @return Numeric character to use as a shortcut.
@@ -294,15 +349,30 @@
     public char getNumericShortcut();
 
     /**
+     * Return the modifiers for this menu item's numeric (12-key) shortcut.
+     * The modifier is a combination of {@link KeyEvent#META_META_ON},
+     * {@link KeyEvent#META_CTRL_ON}, {@link KeyEvent#META_ALT_ON},
+     * {@link KeyEvent#META_SHIFT_ON}, {@link KeyEvent#META_SYM_ON},
+     * {@link KeyEvent#META_FUNCTION_ON}.
+     * For example, {@link KeyEvent#META_FUNCTION_ON}|{@link KeyEvent#META_CTRL_ON}
+     *
+     * @return Modifier associated with the numeric shortcut.
+     */
+    default public int getNumericModifiers() {
+        return KeyEvent.META_CTRL_ON;
+    }
+
+    /**
      * Change the alphabetic shortcut associated with this item. The shortcut
      * will be triggered when the key that generates the given character is
-     * pressed along with the ctrl key. Case is not significant and shortcut
-     * characters will be displayed in lower case. Note that menu items with
-     * the characters '\b' or '\n' as shortcuts will get triggered by the
-     * Delete key or Carriage Return key, respectively.
+     * pressed along with the corresponding modifier key. The default modifier
+     * is {@link KeyEvent#META_CTRL_ON} in case nothing is specified. Case is
+     * not significant and shortcut characters will be displayed in lower case.
+     * Note that menu items with the characters '\b' or '\n' as shortcuts will
+     * get triggered by the Delete key or Carriage Return key, respectively.
      * <p>
      * See {@link Menu} for the menu types that support shortcuts.
-     * 
+     *
      * @param alphaChar The alphabetic shortcut key. This is the shortcut when
      *        using a keyboard with alphabetic keys.
      * @return This Item so additional setters can be called.
@@ -310,6 +380,32 @@
     public MenuItem setAlphabeticShortcut(char alphaChar);
 
     /**
+     * Change the alphabetic shortcut associated with this item. The shortcut
+     * will be triggered when the key that generates the given character is
+     * pressed along with the modifier keys. Case is not significant and shortcut
+     * characters will be displayed in lower case. Note that menu items with
+     * the characters '\b' or '\n' as shortcuts will get triggered by the
+     * Delete key or Carriage Return key, respectively.
+     * <p>
+     * See {@link Menu} for the menu types that support shortcuts.
+     *
+     * @param alphaChar The alphabetic shortcut key. This is the shortcut when
+     *        using a keyboard with alphabetic keys.
+     * @param alphaModifiers The modifier associated with the shortcut. It should
+     *        be a combination of {@link KeyEvent#META_META_ON}, {@link KeyEvent#META_CTRL_ON},
+     *        {@link KeyEvent#META_ALT_ON}, {@link KeyEvent#META_SHIFT_ON},
+     *        {@link KeyEvent#META_SYM_ON}, {@link KeyEvent#META_FUNCTION_ON}.
+     * @return This Item so additional setters can be called.
+     */
+    default public MenuItem setAlphabeticShortcut(char alphaChar, int alphaModifiers) {
+        if ((alphaModifiers & Menu.SUPPORTED_MODIFIERS_MASK) == KeyEvent.META_CTRL_ON) {
+            return setAlphabeticShortcut(alphaChar);
+        } else {
+            return this;
+        }
+    }
+
+    /**
      * Return the char for this menu item's alphabetic shortcut.
      *
      * @return Alphabetic character to use as a shortcut.
@@ -317,13 +413,27 @@
     public char getAlphabeticShortcut();
 
     /**
+     * Return the modifier for this menu item's alphabetic shortcut.
+     * The modifier is a combination of {@link KeyEvent#META_META_ON},
+     * {@link KeyEvent#META_CTRL_ON}, {@link KeyEvent#META_ALT_ON},
+     * {@link KeyEvent#META_SHIFT_ON}, {@link KeyEvent#META_SYM_ON},
+     * {@link KeyEvent#META_FUNCTION_ON}.
+     * For example, {@link KeyEvent#META_FUNCTION_ON}|{@link KeyEvent#META_CTRL_ON}
+     *
+     * @return Modifier associated with the keyboard shortcut.
+     */
+    default public int getAlphabeticModifiers() {
+        return KeyEvent.META_CTRL_ON;
+    }
+
+    /**
      * Control whether this item can display a check mark. Setting this does
      * not actually display a check mark (see {@link #setChecked} for that);
      * rather, it ensures there is room in the item in which to display a
      * check mark.
      * <p>
      * See {@link Menu} for the menu types that support check marks.
-     * 
+     *
      * @param checkable Set to true to allow a check mark, false to
      *            disallow. The default is false.
      * @see #setChecked
diff --git a/core/java/android/view/MotionEvent.java b/core/java/android/view/MotionEvent.java
index 2316b38..2129039 100644
--- a/core/java/android/view/MotionEvent.java
+++ b/core/java/android/view/MotionEvent.java
@@ -186,7 +186,7 @@
      * Bit mask of the parts of the action code that are the action itself.
      */
     public static final int ACTION_MASK             = 0xff;
-    
+
     /**
      * Constant for {@link #getActionMasked}: A pressed gesture has started, the
      * motion contains the initial starting location.
@@ -197,14 +197,14 @@
      * </p>
      */
     public static final int ACTION_DOWN             = 0;
-    
+
     /**
      * Constant for {@link #getActionMasked}: A pressed gesture has finished, the
      * motion contains the final release location as well as any intermediate
      * points since the last down or move event.
      */
     public static final int ACTION_UP               = 1;
-    
+
     /**
      * Constant for {@link #getActionMasked}: A change has happened during a
      * press gesture (between {@link #ACTION_DOWN} and {@link #ACTION_UP}).
@@ -212,14 +212,14 @@
      * points since the last down or move event.
      */
     public static final int ACTION_MOVE             = 2;
-    
+
     /**
      * Constant for {@link #getActionMasked}: The current gesture has been aborted.
      * You will not receive any more points in it.  You should treat this as
      * an up event, but not perform any action that you normally would.
      */
     public static final int ACTION_CANCEL           = 3;
-    
+
     /**
      * Constant for {@link #getActionMasked}: A movement has happened outside of the
      * normal bounds of the UI element.  This does not provide a full gesture,
@@ -237,7 +237,7 @@
      * </p>
      */
     public static final int ACTION_POINTER_DOWN     = 5;
-    
+
     /**
      * Constant for {@link #getActionMasked}: A non-primary pointer has gone up.
      * <p>
@@ -343,7 +343,7 @@
      * @see #getActionIndex
      */
     public static final int ACTION_POINTER_INDEX_MASK  = 0xff00;
-    
+
     /**
      * Bit shift for the action bits holding the pointer index as
      * defined by {@link #ACTION_POINTER_INDEX_MASK}.
@@ -358,56 +358,56 @@
      */
     @Deprecated
     public static final int ACTION_POINTER_1_DOWN   = ACTION_POINTER_DOWN | 0x0000;
-    
+
     /**
      * @deprecated Use {@link #ACTION_POINTER_INDEX_MASK} to retrieve the
      * data index associated with {@link #ACTION_POINTER_DOWN}.
      */
     @Deprecated
     public static final int ACTION_POINTER_2_DOWN   = ACTION_POINTER_DOWN | 0x0100;
-    
+
     /**
      * @deprecated Use {@link #ACTION_POINTER_INDEX_MASK} to retrieve the
      * data index associated with {@link #ACTION_POINTER_DOWN}.
      */
     @Deprecated
     public static final int ACTION_POINTER_3_DOWN   = ACTION_POINTER_DOWN | 0x0200;
-    
+
     /**
      * @deprecated Use {@link #ACTION_POINTER_INDEX_MASK} to retrieve the
      * data index associated with {@link #ACTION_POINTER_UP}.
      */
     @Deprecated
     public static final int ACTION_POINTER_1_UP     = ACTION_POINTER_UP | 0x0000;
-    
+
     /**
      * @deprecated Use {@link #ACTION_POINTER_INDEX_MASK} to retrieve the
      * data index associated with {@link #ACTION_POINTER_UP}.
      */
     @Deprecated
     public static final int ACTION_POINTER_2_UP     = ACTION_POINTER_UP | 0x0100;
-    
+
     /**
      * @deprecated Use {@link #ACTION_POINTER_INDEX_MASK} to retrieve the
      * data index associated with {@link #ACTION_POINTER_UP}.
      */
     @Deprecated
     public static final int ACTION_POINTER_3_UP     = ACTION_POINTER_UP | 0x0200;
-    
+
     /**
      * @deprecated Renamed to {@link #ACTION_POINTER_INDEX_MASK} to match
      * the actual data contained in these bits.
      */
     @Deprecated
     public static final int ACTION_POINTER_ID_MASK  = 0xff00;
-    
+
     /**
      * @deprecated Renamed to {@link #ACTION_POINTER_INDEX_SHIFT} to match
      * the actual data contained in these bits.
      */
     @Deprecated
     public static final int ACTION_POINTER_ID_SHIFT = 8;
-    
+
     /**
      * This flag indicates that the window that received this motion event is partly
      * or wholly obscured by another visible window above it.  This flag is set to true
@@ -444,6 +444,14 @@
     public static final int FLAG_HOVER_EXIT_PENDING = 0x4;
 
     /**
+     * This flag indicates that the event has been generated by a gesture generator. It
+     * provides a hint to the GestureDector to not apply any touch slop.
+     *
+     * @hide
+     */
+    public static final int FLAG_IS_GENERATED_GESTURE = 0x8;
+
+    /**
      * Private flag that indicates when the system has detected that this motion event
      * may be inconsistent with respect to the sequence of previously delivered motion events,
      * such as when a pointer move event is sent but the pointer is not down.
@@ -1582,9 +1590,9 @@
      * Create a new MotionEvent, filling in all of the basic values that
      * define the motion.
      *
-     * @param downTime The time (in ms) when the user originally pressed down to start 
+     * @param downTime The time (in ms) when the user originally pressed down to start
      * a stream of position events.  This must be obtained from {@link SystemClock#uptimeMillis()}.
-     * @param eventTime The the time (in ms) when this specific event was generated.  This 
+     * @param eventTime The the time (in ms) when this specific event was generated.  This
      * must be obtained from {@link SystemClock#uptimeMillis()}.
      * @param action The kind of action being performed, such as {@link #ACTION_DOWN}.
      * @param pointerCount The number of pointers that will be in this event.
@@ -1623,7 +1631,7 @@
     /**
      * Create a new MotionEvent, filling in all of the basic values that
      * define the motion.
-     * 
+     *
      * @param downTime The time (in ms) when the user originally pressed down to start
      * a stream of position events.  This must be obtained from {@link SystemClock#uptimeMillis()}.
      * @param eventTime The the time (in ms) when this specific event was generated.  This
@@ -1751,7 +1759,7 @@
      * numbers are arbitrary and you shouldn't depend on the values.
      * @param edgeFlags A bitfield indicating which edges, if any, were touched by this
      * MotionEvent.
-     * 
+     *
      * @deprecated Use {@link #obtain(long, long, int, float, float, float, float, int, float, float, int, int)}
      * instead.
      */
@@ -2057,7 +2065,7 @@
     public final float getSize() {
         return nativeGetAxisValue(mNativePtr, AXIS_SIZE, 0, HISTORY_CURRENT);
     }
-    
+
     /**
      * {@link #getTouchMajor(int)} for the first pointer index (may be an
      * arbitrary pointer identifier).
@@ -2077,7 +2085,7 @@
     public final float getTouchMinor() {
         return nativeGetAxisValue(mNativePtr, AXIS_TOUCH_MINOR, 0, HISTORY_CURRENT);
     }
-    
+
     /**
      * {@link #getToolMajor(int)} for the first pointer index (may be an
      * arbitrary pointer identifier).
@@ -2161,7 +2169,7 @@
 
     /**
      * Given a pointer identifier, find the index of its data in the event.
-     * 
+     *
      * @param pointerId The identifier of the pointer to be found.
      * @return Returns either the index of the pointer (for use with
      * {@link #getX(int)} et al.), or -1 if there is no data available for
@@ -2175,8 +2183,8 @@
      * Returns the X coordinate of this event for the given pointer
      * <em>index</em> (use {@link #getPointerId(int)} to find the pointer
      * identifier for this index).
-     * Whole numbers are pixels; the 
-     * value may have a fraction for input devices that are sub-pixel precise. 
+     * Whole numbers are pixels; the
+     * value may have a fraction for input devices that are sub-pixel precise.
      * @param pointerIndex Raw index of pointer to retrieve.  Value may be from 0
      * (the first pointer that is down) to {@link #getPointerCount()}-1.
      *
@@ -2235,7 +2243,7 @@
     public final float getSize(int pointerIndex) {
         return nativeGetAxisValue(mNativePtr, AXIS_SIZE, pointerIndex, HISTORY_CURRENT);
     }
-    
+
     /**
      * Returns the length of the major axis of an ellipse that describes the touch
      * area at the point of contact for the given pointer
@@ -2249,7 +2257,7 @@
     public final float getTouchMajor(int pointerIndex) {
         return nativeGetAxisValue(mNativePtr, AXIS_TOUCH_MAJOR, pointerIndex, HISTORY_CURRENT);
     }
-    
+
     /**
      * Returns the length of the minor axis of an ellipse that describes the touch
      * area at the point of contact for the given pointer
@@ -2263,7 +2271,7 @@
     public final float getTouchMinor(int pointerIndex) {
         return nativeGetAxisValue(mNativePtr, AXIS_TOUCH_MINOR, pointerIndex, HISTORY_CURRENT);
     }
-    
+
     /**
      * Returns the length of the major axis of an ellipse that describes the size of
      * the approaching tool for the given pointer
@@ -2279,7 +2287,7 @@
     public final float getToolMajor(int pointerIndex) {
         return nativeGetAxisValue(mNativePtr, AXIS_TOOL_MAJOR, pointerIndex, HISTORY_CURRENT);
     }
-    
+
     /**
      * Returns the length of the minor axis of an ellipse that describes the size of
      * the approaching tool for the given pointer
@@ -2295,7 +2303,7 @@
     public final float getToolMinor(int pointerIndex) {
         return nativeGetAxisValue(mNativePtr, AXIS_TOOL_MINOR, pointerIndex, HISTORY_CURRENT);
     }
-    
+
     /**
      * Returns the orientation of the touch area and tool area in radians clockwise from vertical
      * for the given pointer <em>index</em> (use {@link #getPointerId(int)} to find the pointer
@@ -2334,7 +2342,7 @@
     /**
      * Populates a {@link PointerCoords} object with pointer coordinate data for
      * the specified pointer index.
-     * 
+     *
      * @param pointerIndex Raw index of pointer to retrieve.  Value may be from 0
      * (the first pointer that is down) to {@link #getPointerCount()}-1.
      * @param outPointerCoords The pointer coordinate object to populate.
@@ -2622,7 +2630,7 @@
     public final float getHistoricalTouchMinor(int pos) {
         return nativeGetAxisValue(mNativePtr, AXIS_TOUCH_MINOR, 0, pos);
     }
-    
+
     /**
      * {@link #getHistoricalToolMajor(int, int)} for the first pointer index (may be an
      * arbitrary pointer identifier).
@@ -2652,7 +2660,7 @@
     public final float getHistoricalToolMinor(int pos) {
         return nativeGetAxisValue(mNativePtr, AXIS_TOOL_MINOR, 0, pos);
     }
-    
+
     /**
      * {@link #getHistoricalOrientation(int, int)} for the first pointer index (may be an
      * arbitrary pointer identifier).
@@ -2730,7 +2738,7 @@
      * (the first pointer that is down) to {@link #getPointerCount()}-1.
      * @param pos Which historical value to return; must be less than
      * {@link #getHistorySize}
-     * 
+     *
      * @see #getHistorySize
      * @see #getPressure(int)
      * @see #AXIS_PRESSURE
@@ -2748,7 +2756,7 @@
      * (the first pointer that is down) to {@link #getPointerCount()}-1.
      * @param pos Which historical value to return; must be less than
      * {@link #getHistorySize}
-     * 
+     *
      * @see #getHistorySize
      * @see #getSize(int)
      * @see #AXIS_SIZE
@@ -2756,7 +2764,7 @@
     public final float getHistoricalSize(int pointerIndex, int pos) {
         return nativeGetAxisValue(mNativePtr, AXIS_SIZE, pointerIndex, pos);
     }
-    
+
     /**
      * Returns a historical touch major axis coordinate, as per {@link #getTouchMajor(int)}, that
      * occurred between this event and the previous event for the given pointer.
@@ -2766,7 +2774,7 @@
      * (the first pointer that is down) to {@link #getPointerCount()}-1.
      * @param pos Which historical value to return; must be less than
      * {@link #getHistorySize}
-     * 
+     *
      * @see #getHistorySize
      * @see #getTouchMajor(int)
      * @see #AXIS_TOUCH_MAJOR
@@ -2784,7 +2792,7 @@
      * (the first pointer that is down) to {@link #getPointerCount()}-1.
      * @param pos Which historical value to return; must be less than
      * {@link #getHistorySize}
-     * 
+     *
      * @see #getHistorySize
      * @see #getTouchMinor(int)
      * @see #AXIS_TOUCH_MINOR
@@ -2802,7 +2810,7 @@
      * (the first pointer that is down) to {@link #getPointerCount()}-1.
      * @param pos Which historical value to return; must be less than
      * {@link #getHistorySize}
-     * 
+     *
      * @see #getHistorySize
      * @see #getToolMajor(int)
      * @see #AXIS_TOOL_MAJOR
@@ -2820,7 +2828,7 @@
      * (the first pointer that is down) to {@link #getPointerCount()}-1.
      * @param pos Which historical value to return; must be less than
      * {@link #getHistorySize}
-     * 
+     *
      * @see #getHistorySize
      * @see #getToolMinor(int)
      * @see #AXIS_TOOL_MINOR
@@ -2838,7 +2846,7 @@
      * (the first pointer that is down) to {@link #getPointerCount()}-1.
      * @param pos Which historical value to return; must be less than
      * {@link #getHistorySize}
-     * 
+     *
      * @see #getHistorySize
      * @see #getOrientation(int)
      * @see #AXIS_ORIENTATION
@@ -2871,13 +2879,13 @@
      * as per {@link #getPointerCoords}, that occurred between this event and the previous
      * event for the given pointer.
      * Only applies to ACTION_MOVE events.
-     * 
+     *
      * @param pointerIndex Raw index of pointer to retrieve.  Value may be from 0
      * (the first pointer that is down) to {@link #getPointerCount()}-1.
      * @param pos Which historical value to return; must be less than
      * {@link #getHistorySize}
      * @param outPointerCoords The pointer coordinate object to populate.
-     * 
+     *
      * @see #getHistorySize
      * @see #getPointerCoords
      * @see PointerCoords
@@ -2886,7 +2894,7 @@
             PointerCoords outPointerCoords) {
         nativeGetPointerCoords(mNativePtr, pointerIndex, pos, outPointerCoords);
     }
-    
+
     /**
      * Returns a bitfield indicating which edges, if any, were touched by this
      * MotionEvent. For touch events, clients can use this to determine if the
@@ -2943,7 +2951,7 @@
         float oldY = getY();
         offsetLocation(x - oldX, y - oldY);
     }
-    
+
     /**
      * Applies a transformation matrix to all of the points in the event.
      *
@@ -3427,11 +3435,11 @@
 
     /**
      * Transfer object for pointer coordinates.
-     * 
+     *
      * Objects of this type can be used to specify the pointer coordinates when
      * creating new {@link MotionEvent} objects and to query pointer coordinates
      * in bulk.
-     * 
+     *
      * Refer to {@link InputDevice} for information about how different kinds of
      * input devices and sources represent pointer coordinates.
      */
@@ -3471,14 +3479,14 @@
          * @see MotionEvent#AXIS_X
          */
         public float x;
-        
+
         /**
          * The Y component of the pointer movement.
          *
          * @see MotionEvent#AXIS_Y
          */
         public float y;
-        
+
         /**
          * A normalized value that describes the pressure applied to the device
          * by a finger or other tool.
@@ -3489,7 +3497,7 @@
          * @see MotionEvent#AXIS_PRESSURE
          */
         public float pressure;
-        
+
         /**
          * A normalized value that describes the approximate size of the pointer touch area
          * in relation to the maximum detectable size of the device.
@@ -3502,7 +3510,7 @@
          * @see MotionEvent#AXIS_SIZE
          */
         public float size;
-        
+
         /**
          * The length of the major axis of an ellipse that describes the touch area at
          * the point of contact.
@@ -3512,7 +3520,7 @@
          * @see MotionEvent#AXIS_TOUCH_MAJOR
          */
         public float touchMajor;
-        
+
         /**
          * The length of the minor axis of an ellipse that describes the touch area at
          * the point of contact.
@@ -3522,7 +3530,7 @@
          * @see MotionEvent#AXIS_TOUCH_MINOR
          */
         public float touchMinor;
-        
+
         /**
          * The length of the major axis of an ellipse that describes the size of
          * the approaching tool.
@@ -3534,7 +3542,7 @@
          * @see MotionEvent#AXIS_TOOL_MAJOR
          */
         public float toolMajor;
-        
+
         /**
          * The length of the minor axis of an ellipse that describes the size of
          * the approaching tool.
@@ -3546,7 +3554,7 @@
          * @see MotionEvent#AXIS_TOOL_MINOR
          */
         public float toolMinor;
-        
+
         /**
          * The orientation of the touch area and tool area in radians clockwise from vertical.
          * An angle of 0 radians indicates that the major axis of contact is oriented
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index b06c3fd..d468117 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -858,6 +858,17 @@
      */
     static boolean sHasFocusableExcludeAutoFocusable;
 
+    /**
+     * Prior to O, auto-focusable didn't exist and views marked as clickable weren't implicitly
+     * made focusable by default. As a result, apps could (incorrectly) change the clickable
+     * setting of views off the UI thread. Now that clickable can effect the focusable state,
+     * changing the clickable attribute off the UI thread will cause an exception (since changing
+     * the focusable state checks). In order to prevent apps from crashing, we will handle this
+     * specific case and just not notify parents on new focusables resulting from marking views
+     * clickable from outside the UI thread.
+     */
+    private static boolean sAutoFocusableOffUIThreadWontNotifyParents;
+
     /** @hide */
     @IntDef({NOT_FOCUSABLE, FOCUSABLE, FOCUSABLE_AUTO})
     @Retention(RetentionPolicy.SOURCE)
@@ -4182,6 +4193,8 @@
 
             sHasFocusableExcludeAutoFocusable = targetSdkVersion < Build.VERSION_CODES.O;
 
+            sAutoFocusableOffUIThreadWontNotifyParents = targetSdkVersion < Build.VERSION_CODES.O;
+
             sCompatibilityDone = true;
         }
     }
@@ -12135,6 +12148,7 @@
         int privateFlags = mPrivateFlags;
 
         // If focusable is auto, update the FOCUSABLE bit.
+        int focusableChangedByAuto = 0;
         if (((mViewFlags & FOCUSABLE_AUTO) != 0)
                 && (changed & (FOCUSABLE_MASK | CLICKABLE | FOCUSABLE_IN_TOUCH_MODE)) != 0) {
             int newFocus = NOT_FOCUSABLE;
@@ -12144,8 +12158,8 @@
                 mViewFlags = (mViewFlags & ~FOCUSABLE_IN_TOUCH_MODE);
             }
             mViewFlags = (mViewFlags & ~FOCUSABLE) | newFocus;
-            int focusChanged = (old & FOCUSABLE) ^ (newFocus & FOCUSABLE);
-            changed = (changed & ~FOCUSABLE) | focusChanged;
+            focusableChangedByAuto = (old & FOCUSABLE) ^ (newFocus & FOCUSABLE);
+            changed = (changed & ~FOCUSABLE) | focusableChangedByAuto;
         }
 
         /* Check if the FOCUSABLE bit has changed */
@@ -12160,7 +12174,15 @@
                  * Tell the view system that we are now available to take focus
                  * if no one else already has it.
                  */
-                if (mParent != null) mParent.focusableViewAvailable(this);
+                if (mParent != null) {
+                    ViewRootImpl viewRootImpl = getViewRootImpl();
+                    if (!sAutoFocusableOffUIThreadWontNotifyParents
+                            || focusableChangedByAuto == 0
+                            || viewRootImpl == null
+                            || viewRootImpl.mThread == Thread.currentThread()) {
+                        mParent.focusableViewAvailable(this);
+                    }
+                }
             }
         }
 
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index cb29053..cc4c5c1 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -73,6 +73,7 @@
 import android.view.Surface.OutOfResourcesException;
 import android.view.View.AttachInfo;
 import android.view.View.MeasureSpec;
+import android.view.WindowManager.LayoutParams.SoftInputModeFlags;
 import android.view.accessibility.AccessibilityEvent;
 import android.view.accessibility.AccessibilityManager;
 import android.view.accessibility.AccessibilityManager.AccessibilityStateChangeListener;
@@ -334,6 +335,7 @@
     final Configuration mPendingConfiguration = new Configuration();
 
     boolean mScrollMayChange;
+    @SoftInputModeFlags
     int mSoftInputMode;
     WeakReference<View> mLastScrolledFocus;
     int mScrollY;
@@ -4479,9 +4481,9 @@
                 }
             }
 
-            // If the Control modifier is held, try to interpret the key as a shortcut.
+            // If a modifier is held, try to interpret the key as a shortcut.
             if (event.getAction() == KeyEvent.ACTION_DOWN
-                    && event.isCtrlPressed()
+                    && !KeyEvent.metaStateHasNoModifiers(event.getMetaState())
                     && event.getRepeatCount() == 0
                     && !KeyEvent.isModifierKey(event.getKeyCode())
                     && groupNavigationDirection == 0) {
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java
index 5a640fa..051f56f 100644
--- a/core/java/android/view/WindowManager.java
+++ b/core/java/android/view/WindowManager.java
@@ -16,6 +16,7 @@
 
 package android.view;
 
+import android.annotation.IntDef;
 import android.annotation.NonNull;
 import android.annotation.SystemApi;
 import android.app.KeyguardManager;
@@ -30,6 +31,8 @@
 import android.text.TextUtils;
 import android.util.Log;
 
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
 import java.util.List;
 import java.util.Objects;
 
@@ -1540,24 +1543,45 @@
         public static final int SOFT_INPUT_IS_FORWARD_NAVIGATION = 0x100;
 
         /**
+         * An internal annotation for flags that can be specified to {@link #softInputMode}.
+         *
+         * @hide
+         */
+        @Retention(RetentionPolicy.SOURCE)
+        @IntDef(flag = true, value = {
+                SOFT_INPUT_STATE_UNSPECIFIED,
+                SOFT_INPUT_STATE_UNCHANGED,
+                SOFT_INPUT_STATE_HIDDEN,
+                SOFT_INPUT_STATE_ALWAYS_HIDDEN,
+                SOFT_INPUT_STATE_VISIBLE,
+                SOFT_INPUT_STATE_ALWAYS_VISIBLE,
+                SOFT_INPUT_ADJUST_UNSPECIFIED,
+                SOFT_INPUT_ADJUST_RESIZE,
+                SOFT_INPUT_ADJUST_PAN,
+                SOFT_INPUT_ADJUST_NOTHING,
+                SOFT_INPUT_IS_FORWARD_NAVIGATION,
+        })
+        public @interface SoftInputModeFlags {}
+
+        /**
          * Desired operating mode for any soft input area.  May be any combination
          * of:
          *
          * <ul>
          * <li> One of the visibility states
          * {@link #SOFT_INPUT_STATE_UNSPECIFIED}, {@link #SOFT_INPUT_STATE_UNCHANGED},
-         * {@link #SOFT_INPUT_STATE_HIDDEN}, {@link #SOFT_INPUT_STATE_ALWAYS_VISIBLE}, or
-         * {@link #SOFT_INPUT_STATE_VISIBLE}.
+         * {@link #SOFT_INPUT_STATE_HIDDEN}, {@link #SOFT_INPUT_STATE_ALWAYS_HIDDEN},
+         * {@link #SOFT_INPUT_STATE_VISIBLE}, or {@link #SOFT_INPUT_STATE_ALWAYS_VISIBLE}.
          * <li> One of the adjustment options
-         * {@link #SOFT_INPUT_ADJUST_UNSPECIFIED},
-         * {@link #SOFT_INPUT_ADJUST_RESIZE}, or
-         * {@link #SOFT_INPUT_ADJUST_PAN}.
+         * {@link #SOFT_INPUT_ADJUST_UNSPECIFIED}, {@link #SOFT_INPUT_ADJUST_RESIZE},
+         * {@link #SOFT_INPUT_ADJUST_PAN}, or {@link #SOFT_INPUT_ADJUST_NOTHING}.
          * </ul>
          *
          *
          * <p>This flag can be controlled in your theme through the
          * {@link android.R.attr#windowSoftInputMode} attribute.</p>
          */
+        @SoftInputModeFlags
         public int softInputMode;
 
         /**
diff --git a/core/java/android/view/accessibility/AccessibilityNodeInfo.java b/core/java/android/view/accessibility/AccessibilityNodeInfo.java
index b0a11cd..67d7ff8 100644
--- a/core/java/android/view/accessibility/AccessibilityNodeInfo.java
+++ b/core/java/android/view/accessibility/AccessibilityNodeInfo.java
@@ -3315,6 +3315,7 @@
         mBoundsInScreen.set(0, 0, 0, 0);
         mBooleanProperties = 0;
         mDrawingOrderInParent = 0;
+        mExtraDataKeys = null;
         mPackageName = null;
         mClassName = null;
         mText = null;
diff --git a/core/java/android/view/autofill/AutoFillId.java b/core/java/android/view/autofill/AutoFillId.java
index 3dbf5a8..38dc404 100644
--- a/core/java/android/view/autofill/AutoFillId.java
+++ b/core/java/android/view/autofill/AutoFillId.java
@@ -93,11 +93,11 @@
     public String toString() {
         if (!DEBUG) return super.toString();
 
-        final StringBuilder builder = new StringBuilder("FieldId [viewId=").append(mViewId);
+        final StringBuilder builder = new StringBuilder().append(mViewId);
         if (mVirtual) {
-            builder.append(", virtualId=").append(mVirtualId);
+            builder.append(":").append(mVirtualId);
         }
-        return builder.append(']').toString();
+        return builder.toString();
     }
 
     @Override
diff --git a/core/java/android/view/autofill/AutoFillValue.java b/core/java/android/view/autofill/AutoFillValue.java
index b31f4af..af70361 100644
--- a/core/java/android/view/autofill/AutoFillValue.java
+++ b/core/java/android/view/autofill/AutoFillValue.java
@@ -104,8 +104,11 @@
     public String toString() {
         if (!DEBUG) return super.toString();
 
-        return "AutoFillValue[text=" + mText + ", listIndex=" + mListIndex + ", toggle=" + mToggle
-                + "]";
+        if (mText != null) {
+            return mText.length() + "_chars";
+        }
+
+        return "[listIndex=" + mListIndex + ", toggle=" + mToggle + "]";
     }
 
     /////////////////////////////////////
diff --git a/core/java/android/view/autofill/Helper.java b/core/java/android/view/autofill/Helper.java
index a9844d7..b1c9efa 100644
--- a/core/java/android/view/autofill/Helper.java
+++ b/core/java/android/view/autofill/Helper.java
@@ -32,7 +32,7 @@
     static StringBuilder append(StringBuilder builder, Bundle bundle) {
         if (bundle == null) {
             builder.append("N/A");
-        } else if (!DEBUG) {
+        } else if (!VERBOSE) {
             builder.append(REDACTED);
         } else {
             final Set<String> keySet = bundle.keySet();
diff --git a/core/java/android/view/inputmethod/InputConnection.java b/core/java/android/view/inputmethod/InputConnection.java
index 71c1d62..57f9895 100644
--- a/core/java/android/view/inputmethod/InputConnection.java
+++ b/core/java/android/view/inputmethod/InputConnection.java
@@ -18,6 +18,7 @@
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
+import android.inputmethodservice.InputMethodService;
 import android.os.Bundle;
 import android.os.Handler;
 import android.view.KeyCharacterMap;
@@ -751,13 +752,19 @@
     public boolean clearMetaKeyStates(int states);
 
     /**
-     * Called by the IME to tell the client when it switches between
-     * fullscreen and normal modes. This will normally be called for
-     * you by the standard implementation of
-     * {@link android.inputmethodservice.InputMethodService}.
+     * Called back when the connected IME switches between fullscreen and normal modes.
      *
-     * @return true on success, false if the input connection is no longer
-     * valid.
+     * <p>Note: On {@link android.os.Build.VERSION_CODES#O} and later devices, input methods are no
+     * longer allowed to directly call this method at any time. To signal this event in the target
+     * application, input methods should always call
+     * {@link InputMethodService#updateFullscreenMode()} instead. This approach should work on API
+     * {@link android.os.Build.VERSION_CODES#N_MR1} and prior devices.</p>
+     *
+     * @return For editor authors, the return value will always be ignored. For IME authors, this
+     *         always returns {@code true} on {@link android.os.Build.VERSION_CODES#N_MR1} and prior
+     *         devices and {@code false} on {@link android.os.Build.VERSION_CODES#O} and later
+     *         devices.
+     * @see InputMethodManager#isFullscreenMode()
      */
     public boolean reportFullscreenMode(boolean enabled);
 
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java
index 2e99092..1f76d28 100644
--- a/core/java/android/view/inputmethod/InputMethodManager.java
+++ b/core/java/android/view/inputmethod/InputMethodManager.java
@@ -34,7 +34,6 @@
 import android.os.ServiceManager;
 import android.os.ServiceManager.ServiceNotFoundException;
 import android.os.Trace;
-import android.text.TextUtils;
 import android.text.style.SuggestionSpan;
 import android.util.Log;
 import android.util.Pools.Pool;
@@ -48,6 +47,7 @@
 import android.view.KeyEvent;
 import android.view.View;
 import android.view.ViewRootImpl;
+import android.view.WindowManager.LayoutParams.SoftInputModeFlags;
 
 import com.android.internal.inputmethod.IInputContentUriToken;
 import com.android.internal.os.SomeArgs;
@@ -396,6 +396,7 @@
     static final int MSG_TIMEOUT_INPUT_EVENT = 6;
     static final int MSG_FLUSH_INPUT_EVENT = 7;
     static final int MSG_SET_USER_ACTION_NOTIFICATION_SEQUENCE_NUMBER = 9;
+    static final int MSG_REPORT_FULLSCREEN_MODE = 10;
 
     class H extends Handler {
         H(Looper looper) {
@@ -476,12 +477,13 @@
                 }
                 case MSG_SET_ACTIVE: {
                     final boolean active = msg.arg1 != 0;
+                    final boolean fullscreen = msg.arg2 != 0;
                     if (DEBUG) {
                         Log.i(TAG, "handleMessage: MSG_SET_ACTIVE " + active + ", was " + mActive);
                     }
                     synchronized (mH) {
                         mActive = active;
-                        mFullscreenMode = false;
+                        mFullscreenMode = fullscreen;
                         if (!active) {
                             // Some other client has starting using the IME, so note
                             // that this happened and make sure our own editor's
@@ -523,6 +525,21 @@
                     synchronized (mH) {
                         mNextUserActionNotificationSequenceNumber = msg.arg1;
                     }
+                    return;
+                }
+                case MSG_REPORT_FULLSCREEN_MODE: {
+                    final boolean fullscreen = msg.arg1 != 0;
+                    InputConnection ic = null;
+                    synchronized (mH) {
+                        mFullscreenMode = fullscreen;
+                        if (mServedInputConnectionWrapper != null) {
+                            ic = mServedInputConnectionWrapper.getInputConnection();
+                        }
+                    }
+                    if (ic != null) {
+                        ic.reportFullscreenMode(fullscreen);
+                    }
+                    return;
                 }
             }
         }
@@ -557,18 +574,11 @@
         }
 
         @Override
-        protected void onReportFullscreenMode(boolean enabled, boolean calledInBackground) {
-            mParentInputMethodManager.onReportFullscreenMode(enabled, calledInBackground,
-                    getInputMethodId());
-        }
-
-        @Override
         public String toString() {
             return "ControlledInputConnectionWrapper{"
                     + "connection=" + getInputConnection()
                     + " finished=" + isFinished()
                     + " mParentInputMethodManager.mActive=" + mParentInputMethodManager.mActive
-                    + " mInputMethodId=" + getInputMethodId()
                     + "}";
         }
     }
@@ -600,24 +610,31 @@
 
         @Override
         public void onBindMethod(InputBindResult res) {
-            mH.sendMessage(mH.obtainMessage(MSG_BIND, res));
+            mH.obtainMessage(MSG_BIND, res).sendToTarget();
         }
 
         @Override
         public void onUnbindMethod(int sequence, @InputMethodClient.UnbindReason int unbindReason) {
-            mH.sendMessage(mH.obtainMessage(MSG_UNBIND, sequence, unbindReason));
+            mH.obtainMessage(MSG_UNBIND, sequence, unbindReason).sendToTarget();
         }
 
         @Override
-        public void setActive(boolean active) {
-            mH.sendMessage(mH.obtainMessage(MSG_SET_ACTIVE, active ? 1 : 0, 0));
+        public void setActive(boolean active, boolean fullscreen) {
+            mH.obtainMessage(MSG_SET_ACTIVE, active ? 1 : 0, fullscreen ? 1 : 0).sendToTarget();
         }
 
         @Override
         public void setUserActionNotificationSequenceNumber(int sequenceNumber) {
-            mH.sendMessage(mH.obtainMessage(MSG_SET_USER_ACTION_NOTIFICATION_SEQUENCE_NUMBER,
-                    sequenceNumber, 0));
+            mH.obtainMessage(MSG_SET_USER_ACTION_NOTIFICATION_SEQUENCE_NUMBER, sequenceNumber, 0)
+                    .sendToTarget();
         }
+
+        @Override
+        public void reportFullscreenMode(boolean fullscreen) {
+            mH.obtainMessage(MSG_REPORT_FULLSCREEN_MODE, fullscreen ? 1 : 0, 0)
+                    .sendToTarget();
+        }
+
     };
 
     final InputConnection mDummyInputConnection = new BaseInputConnection(this, false);
@@ -731,16 +748,6 @@
     }
 
     /** @hide */
-    public void onReportFullscreenMode(boolean fullScreen, boolean calledInBackground,
-            String inputMethodId) {
-        synchronized (mH) {
-            if (!calledInBackground || TextUtils.equals(mCurId, inputMethodId)) {
-                mFullscreenMode = fullScreen;
-            }
-        }
-    }
-
-    /** @hide */
     public void registerSuggestionSpansForNotification(SuggestionSpan[] spans) {
         try {
             mService.registerSuggestionSpansForNotification(spans);
@@ -770,6 +777,17 @@
     }
 
     /**
+     * @hide
+     */
+    public void reportFullscreenMode(IBinder token, boolean fullscreen) {
+        try {
+            mService.reportFullscreenMode(token, fullscreen);
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
      * Return true if the given view is the currently active view for the
      * input method.
      */
@@ -1274,9 +1292,6 @@
                         mCurId = res.id;
                         mNextUserActionNotificationSequenceNumber =
                                 res.userActionNotificationSequenceNumber;
-                        if (mServedInputConnectionWrapper != null) {
-                            mServedInputConnectionWrapper.setInputMethodId(mCurId);
-                        }
                     } else {
                         if (res.channel != null && res.channel != mCurChannel) {
                             res.channel.dispose();
@@ -1476,12 +1491,12 @@
      * Called by ViewAncestor when its window gets input focus.
      * @hide
      */
-    public void onPostWindowFocus(View rootView, View focusedView, int softInputMode,
-            boolean first, int windowFlags) {
+    public void onPostWindowFocus(View rootView, View focusedView,
+            @SoftInputModeFlags int softInputMode, boolean first, int windowFlags) {
         boolean forceNewFocus = false;
         synchronized (mH) {
             if (DEBUG) Log.v(TAG, "onWindowFocus: " + focusedView
-                    + " softInputMode=" + softInputMode
+                    + " softInputMode=" + InputMethodClient.softInputModeToString(softInputMode)
                     + " first=" + first + " flags=#"
                     + Integer.toHexString(windowFlags));
             if (mHasBeenInactive) {
@@ -2341,6 +2356,7 @@
                 + " mHasBeenInactive=" + mHasBeenInactive
                 + " mBindSequence=" + mBindSequence
                 + " mCurId=" + mCurId);
+        p.println("  mFullscreenMode=" + mFullscreenMode);
         p.println("  mCurMethod=" + mCurMethod);
         p.println("  mCurRootView=" + mCurRootView);
         p.println("  mServedView=" + mServedView);
diff --git a/core/java/android/text/LangId.java b/core/java/android/view/textclassifier/LangId.java
similarity index 85%
rename from core/java/android/text/LangId.java
rename to core/java/android/view/textclassifier/LangId.java
index ed6e909..53bc1b0 100644
--- a/core/java/android/text/LangId.java
+++ b/core/java/android/view/textclassifier/LangId.java
@@ -13,16 +13,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package android.text;
+package android.view.textclassifier;
 
 /**
  *  Java wrapper for LangId native library interface.
  *  This class is used to detect languages in text.
- *  @hide
  */
-public final class LangId {
-    // TODO: Move this to android.view.textclassifier and make it package-private.
-    // We'll have to update the native library code to do this.
+final class LangId {
 
     static {
         System.loadLibrary("smart-selection_jni");
@@ -33,7 +30,7 @@
     /**
      * Creates a new instance of LangId predictor, using the provided model image.
      */
-    public LangId(int fd) {
+    LangId(int fd) {
         mModelPtr = nativeNew(fd);
     }
 
diff --git a/core/java/android/text/SmartSelection.java b/core/java/android/view/textclassifier/SmartSelection.java
similarity index 91%
rename from core/java/android/text/SmartSelection.java
rename to core/java/android/view/textclassifier/SmartSelection.java
index 97ef514..47c39e4 100644
--- a/core/java/android/text/SmartSelection.java
+++ b/core/java/android/view/textclassifier/SmartSelection.java
@@ -14,16 +14,13 @@
  * limitations under the License.
  */
 
-package android.text;
+package android.view.textclassifier;
 
 /**
  *  Java wrapper for SmartSelection native library interface.
  *  This library is used for detecting entities in text.
- *  @hide
  */
-public final class SmartSelection {
-    // TODO: Move this to android.view.textclassifier and make it package-private.
-    // We'll have to update the native library code to do this.
+final class SmartSelection {
 
     static {
         System.loadLibrary("smart-selection_jni");
@@ -35,7 +32,7 @@
      * Creates a new instance of SmartSelect predictor, using the provided model image,
      * given as a file descriptor.
      */
-    public SmartSelection(int fd) {
+    SmartSelection(int fd) {
         mCtx = nativeNew(fd);
     }
 
diff --git a/core/java/android/view/textclassifier/TextClassificationManager.java b/core/java/android/view/textclassifier/TextClassificationManager.java
index a4e524f..c4d64d1 100644
--- a/core/java/android/view/textclassifier/TextClassificationManager.java
+++ b/core/java/android/view/textclassifier/TextClassificationManager.java
@@ -19,7 +19,6 @@
 import android.annotation.NonNull;
 import android.content.Context;
 import android.os.ParcelFileDescriptor;
-import android.text.LangId;
 import android.util.Log;
 
 import com.android.internal.util.Preconditions;
@@ -45,8 +44,9 @@
     private final Object mLangIdLock = new Object();
 
     private final Context mContext;
-    // TODO: Implement a way to close the file descriptor.
-    private ParcelFileDescriptor mFd;
+    // TODO: Implement a way to close the file descriptors.
+    private ParcelFileDescriptor mSmartSelectionFd;
+    private ParcelFileDescriptor mLangIdFd;
     private TextClassifier mDefault;
     private LangId mLangId;
 
@@ -62,10 +62,10 @@
         synchronized (mTextClassifierLock) {
             if (mDefault == null) {
                 try {
-                    mFd = ParcelFileDescriptor.open(
+                    mSmartSelectionFd = ParcelFileDescriptor.open(
                             new File("/etc/assistant/smart-selection.model"),
                             ParcelFileDescriptor.MODE_READ_ONLY);
-                    mDefault = new TextClassifierImpl(mContext, mFd);
+                    mDefault = new TextClassifierImpl(mContext, mSmartSelectionFd);
                 } catch (FileNotFoundException e) {
                     Log.e(LOG_TAG, "Error accessing 'text classifier selection' model file.", e);
                     mDefault = TextClassifier.NO_OP;
@@ -100,12 +100,13 @@
         return Collections.emptyList();
     }
 
-    private LangId getLanguageDetector() {
+    private LangId getLanguageDetector() throws FileNotFoundException {
         synchronized (mLangIdLock) {
             if (mLangId == null) {
-                // TODO: Use a file descriptor as soon as we start to depend on a model file
-                // for language detection.
-                mLangId = new LangId(0);
+                mLangIdFd = ParcelFileDescriptor.open(
+                        new File("/etc/assistant/lang-id.model"),
+                        ParcelFileDescriptor.MODE_READ_ONLY);
+                mLangId = new LangId(mLangIdFd.getFd());
             }
             return mLangId;
         }
diff --git a/core/java/android/view/textclassifier/TextClassifierImpl.java b/core/java/android/view/textclassifier/TextClassifierImpl.java
index e2ff44c..8b39775 100644
--- a/core/java/android/view/textclassifier/TextClassifierImpl.java
+++ b/core/java/android/view/textclassifier/TextClassifierImpl.java
@@ -27,7 +27,6 @@
 import android.icu.text.BreakIterator;
 import android.net.Uri;
 import android.os.ParcelFileDescriptor;
-import android.text.SmartSelection;
 import android.text.Spannable;
 import android.text.TextUtils;
 import android.text.method.WordIterator;
diff --git a/core/java/android/widget/PopupWindow.java b/core/java/android/widget/PopupWindow.java
index 989927e..1436bdb 100644
--- a/core/java/android/widget/PopupWindow.java
+++ b/core/java/android/widget/PopupWindow.java
@@ -54,6 +54,7 @@
 import android.view.ViewTreeObserver.OnScrollChangedListener;
 import android.view.WindowManager;
 import android.view.WindowManager.LayoutParams;
+import android.view.WindowManager.LayoutParams.SoftInputModeFlags;
 
 import com.android.internal.R;
 
@@ -162,6 +163,7 @@
 
     private boolean mFocusable;
     private int mInputMethodMode = INPUT_METHOD_FROM_FOCUSABLE;
+    @SoftInputModeFlags
     private int mSoftInputMode = WindowManager.LayoutParams.SOFT_INPUT_STATE_UNCHANGED;
     private boolean mTouchable = true;
     private boolean mOutsideTouchable = false;
@@ -724,7 +726,7 @@
      * @see android.view.WindowManager.LayoutParams#softInputMode
      * @see #getSoftInputMode()
      */
-    public void setSoftInputMode(int mode) {
+    public void setSoftInputMode(@SoftInputModeFlags int mode) {
         mSoftInputMode = mode;
     }
 
@@ -734,6 +736,7 @@
      * @see #setSoftInputMode(int)
      * @see android.view.WindowManager.LayoutParams#softInputMode
      */
+    @SoftInputModeFlags
     public int getSoftInputMode() {
         return mSoftInputMode;
     }
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 20e325c..17cd446 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -271,7 +271,7 @@
  * @attr ref android.R.styleable#TextView_autoSizeMinTextSize
  * @attr ref android.R.styleable#TextView_autoSizeMaxTextSize
  * @attr ref android.R.styleable#TextView_autoSizeStepGranularity
- * @attr ref android.R.styleable#TextView_autoSizeStepSizeSet
+ * @attr ref android.R.styleable#TextView_autoSizePresetSizes
  */
 @RemoteView
 public class TextView extends View implements ViewTreeObserver.OnPreDrawListener {
@@ -698,9 +698,9 @@
     public static final int AUTO_SIZE_TEXT_TYPE_NONE = 0;
     // The TextView performs uniform horizontal and vertical text size scaling to fit within the
     // container.
-    public static final int AUTO_SIZE_TEXT_TYPE_XY = 1;
+    public static final int AUTO_SIZE_TEXT_TYPE_UNIFORM = 1;
     /** @hide */
-    @IntDef({AUTO_SIZE_TEXT_TYPE_NONE, AUTO_SIZE_TEXT_TYPE_XY})
+    @IntDef({AUTO_SIZE_TEXT_TYPE_NONE, AUTO_SIZE_TEXT_TYPE_UNIFORM})
     @Retention(RetentionPolicy.SOURCE)
     public @interface AutoSizeTextType {}
     // Default minimum size for auto-sizing text in scaled pixels. {@see #setAutoSizeMinTextSize}.
@@ -725,7 +725,7 @@
     // Specifies whether auto-size should use the provided auto size steps set or if it should
     // build the steps set using mAutoSizeMinTextSizeInPx, mAutoSizeMaxTextSizeInPx and
     // mAutoSizeStepGranularityInPx.
-    private boolean mHasPredefinedAutoSizeSet = false;
+    private boolean mHasPresetAutoSizeValues = false;
 
     // Watcher used to notify changes to auto-fill manager.
     private AutoFillChangeWatcher mAutoFillChangeWatcher;
@@ -1318,12 +1318,12 @@
                     mAutoSizeMaxTextSizeInPx = a.getDimensionPixelSize(attr, 0);
                     break;
 
-                case com.android.internal.R.styleable.TextView_autoSizeStepSizeSet:
+                case com.android.internal.R.styleable.TextView_autoSizePresetSizes:
                     final int autoSizeStepSizeArrayResId = a.getResourceId(attr, 0);
                     if (autoSizeStepSizeArrayResId > 0) {
                         final TypedArray autoSizePreDefTextSizes = a.getResources()
                                 .obtainTypedArray(autoSizeStepSizeArrayResId);
-                        setupAutoSizeStepSizeSet(autoSizePreDefTextSizes);
+                        setupAutoSizePresetSizes(autoSizePreDefTextSizes);
                         autoSizePreDefTextSizes.recycle();
                     }
                     break;
@@ -1601,7 +1601,7 @@
             setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_YES);
         }
 
-        setupAutoSizeTextXY();
+        setupAutoSizeText();
     }
 
     /**
@@ -1610,7 +1610,7 @@
      *
      * @param autoSizeTextType the type of auto-size. Must be one of
      *        {@link TextView#AUTO_SIZE_TEXT_TYPE_NONE} or
-     *        {@link TextView#AUTO_SIZE_TEXT_TYPE_XY}
+     *        {@link TextView#AUTO_SIZE_TEXT_TYPE_UNIFORM}
      *
      * @attr ref android.R.styleable#TextView_autoSizeText
      *
@@ -1630,10 +1630,10 @@
                         mNeedsAutoSizeText = false;
                     }
                     break;
-                case AUTO_SIZE_TEXT_TYPE_XY:
-                    if (mAutoSizeTextType != AUTO_SIZE_TEXT_TYPE_XY) {
-                        mAutoSizeTextType = AUTO_SIZE_TEXT_TYPE_XY;
-                        setupAutoSizeTextXY();
+                case AUTO_SIZE_TEXT_TYPE_UNIFORM:
+                    if (mAutoSizeTextType != AUTO_SIZE_TEXT_TYPE_UNIFORM) {
+                        mAutoSizeTextType = AUTO_SIZE_TEXT_TYPE_UNIFORM;
+                        setupAutoSizeText();
                     }
                     break;
                 default:
@@ -1648,7 +1648,7 @@
      *
      * @return an {@code int} corresponding to one of the auto-size types:
      *         {@link TextView#AUTO_SIZE_TEXT_TYPE_NONE} or
-     *         {@link TextView#AUTO_SIZE_TEXT_TYPE_XY}
+     *         {@link TextView#AUTO_SIZE_TEXT_TYPE_UNIFORM}
      *
      * @attr ref android.R.styleable#TextView_autoSizeText
      *
@@ -1678,8 +1678,8 @@
         if (supportsAutoSizeText()) {
             mAutoSizeStepGranularityInPx = (int) TypedValue.applyDimension(
                     unit, size, getResources().getDisplayMetrics());
-            mHasPredefinedAutoSizeSet = false;
-            setupAutoSizeTextXY();
+            mHasPresetAutoSizeValues = false;
+            setupAutoSizeText();
         }
     }
 
@@ -1711,8 +1711,8 @@
         if (supportsAutoSizeText()) {
             mAutoSizeMinTextSizeInPx = (int) TypedValue.applyDimension(
                     unit, size, getResources().getDisplayMetrics());
-            mHasPredefinedAutoSizeSet = false;
-            setupAutoSizeTextXY();
+            mHasPresetAutoSizeValues = false;
+            setupAutoSizeText();
         }
     }
 
@@ -1745,8 +1745,8 @@
         if (supportsAutoSizeText()) {
             mAutoSizeMaxTextSizeInPx = (int) TypedValue.applyDimension(
                     unit, size, getResources().getDisplayMetrics());
-            mHasPredefinedAutoSizeSet = false;
-            setupAutoSizeTextXY();
+            mHasPresetAutoSizeValues = false;
+            setupAutoSizeText();
         }
     }
 
@@ -1774,25 +1774,25 @@
      *
      * @param presetSizes an {@code int} array of sizes in pixels
      *
-     * @attr ref android.R.styleable#TextView_autoSizeStepSizeSet
+     * @attr ref android.R.styleable#TextView_autoSizePresetSizes
      *
-     * @see #getAutoSizeTextPresetSizes()
+     * @see #getAutoSizeTextAvailableSizes()
      */
     public void setAutoSizeTextPresetSizes(@NonNull int[] presetSizes) {
         if (supportsAutoSizeText()) {
             if (presetSizes.length > 0) {
-                mAutoSizeTextSizesInPx = cleanupAutoSizePredefinedSizes(presetSizes);
+                mAutoSizeTextSizesInPx = cleanupAutoSizePresetSizes(presetSizes);
                 final int sizesLength = mAutoSizeTextSizesInPx.length;
-                mHasPredefinedAutoSizeSet = sizesLength > 0;
-                if (mHasPredefinedAutoSizeSet) {
+                mHasPresetAutoSizeValues = sizesLength > 0;
+                if (mHasPresetAutoSizeValues) {
                     mAutoSizeMinTextSizeInPx = mAutoSizeTextSizesInPx[0];
                     mAutoSizeMaxTextSizeInPx = mAutoSizeTextSizesInPx[sizesLength - 1];
                     mAutoSizeStepGranularityInPx = 0;
                 }
             } else {
-                mHasPredefinedAutoSizeSet = false;
+                mHasPresetAutoSizeValues = false;
             }
-            setupAutoSizeTextXY();
+            setupAutoSizeText();
         }
     }
 
@@ -1804,11 +1804,11 @@
      * @see #setAutoSizeMaxTextSize(int, float)
      * @see #setAutoSizeStepGranularity(int, float)
      */
-    public int[] getAutoSizeTextPresetSizes() {
+    public int[] getAutoSizeTextAvailableSizes() {
         return mAutoSizeTextSizesInPx;
     }
 
-    private void setupAutoSizeStepSizeSet(TypedArray textSizes) {
+    private void setupAutoSizePresetSizes(TypedArray textSizes) {
         final int textSizesLength = textSizes.length();
         final int[] parsedSizes = new int[textSizesLength];
 
@@ -1816,39 +1816,39 @@
             for (int i = 0; i < textSizesLength; i++) {
                 parsedSizes[i] = textSizes.getDimensionPixelSize(i, -1);
             }
-            mAutoSizeTextSizesInPx = cleanupAutoSizePredefinedSizes(parsedSizes);
-            mHasPredefinedAutoSizeSet = mAutoSizeTextSizesInPx.length > 0;
+            mAutoSizeTextSizesInPx = cleanupAutoSizePresetSizes(parsedSizes);
+            mHasPresetAutoSizeValues = mAutoSizeTextSizesInPx.length > 0;
         }
     }
 
     // Returns distinct sorted positive values.
-    private int[] cleanupAutoSizePredefinedSizes(int[] predefinedValues) {
-        final int predefinedValuesLength = predefinedValues.length;
-        if (predefinedValuesLength == 0) {
-            return predefinedValues;
+    private int[] cleanupAutoSizePresetSizes(int[] presetValues) {
+        final int presetValuesLength = presetValues.length;
+        if (presetValuesLength == 0) {
+            return presetValues;
         }
-        Arrays.sort(predefinedValues);
+        Arrays.sort(presetValues);
 
         final IntArray uniqueValidSizes = new IntArray();
-        for (int i = 0; i < predefinedValuesLength; i++) {
-            final int currentPredefinedValue = predefinedValues[i];
+        for (int i = 0; i < presetValuesLength; i++) {
+            final int currentPresetValue = presetValues[i];
 
-            if (currentPredefinedValue > 0
-                    && uniqueValidSizes.binarySearch(currentPredefinedValue) < 0) {
-                uniqueValidSizes.add(currentPredefinedValue);
+            if (currentPresetValue > 0
+                    && uniqueValidSizes.binarySearch(currentPresetValue) < 0) {
+                uniqueValidSizes.add(currentPresetValue);
             }
         }
 
-        return predefinedValuesLength == uniqueValidSizes.size()
-            ? predefinedValues
+        return presetValuesLength == uniqueValidSizes.size()
+            ? presetValues
             : uniqueValidSizes.toArray();
     }
 
-    private void setupAutoSizeTextXY() {
-        if (supportsAutoSizeText() && mAutoSizeTextType == AUTO_SIZE_TEXT_TYPE_XY) {
+    private void setupAutoSizeText() {
+        if (supportsAutoSizeText() && mAutoSizeTextType == AUTO_SIZE_TEXT_TYPE_UNIFORM) {
             // Calculate the sizes set based on minimum size, maximum size and step size if we do
             // not have a predefined set of sizes or if the current sizes array is empty.
-            if (!mHasPredefinedAutoSizeSet || mAutoSizeTextSizesInPx.length == 0) {
+            if (!mHasPresetAutoSizeValues || mAutoSizeTextSizesInPx.length == 0) {
                 // Set valid defaults.
                 if (mAutoSizeMinTextSizeInPx <= 0) {
                     mAutoSizeMinTextSizeInPx = (int) TypedValue.applyDimension(
diff --git a/core/java/com/android/internal/inputmethod/InputMethodSubtypeSwitchingController.java b/core/java/com/android/internal/inputmethod/InputMethodSubtypeSwitchingController.java
index a94b161..dfc0696 100644
--- a/core/java/com/android/internal/inputmethod/InputMethodSubtypeSwitchingController.java
+++ b/core/java/com/android/internal/inputmethod/InputMethodSubtypeSwitchingController.java
@@ -42,8 +42,9 @@
 /**
  * InputMethodSubtypeSwitchingController controls the switching behavior of the subtypes.
  * <p>
- * This class is designed to be used from and only from {@link InputMethodManagerService} by using
- * {@link InputMethodManagerService#mMethodMap} as a global lock.
+ * This class is designed to be used from and only from
+ * {@link com.android.server.InputMethodManagerService} by using
+ * {@link com.android.server.InputMethodManagerService#mMethodMap} as a global lock.
  * </p>
  */
 public class InputMethodSubtypeSwitchingController {
@@ -106,21 +107,39 @@
             return c1.toString().compareTo(c2.toString());
         }
 
+        /**
+         * Compares this object with the specified object for order. The fields of this class will
+         * be compared in the following order.
+         * <ol>
+         *   <li>{@link #mImeName}</li>
+         *   <li>{@link #mIsSystemLocale}</li>
+         *   <li>{@link #mIsSystemLanguage}</li>
+         *   <li>{@link #mSubtypeName}</li>
+         * </ol>
+         * Note: this class has a natural ordering that is inconsistent with {@link #equals(Object).
+         * This method doesn't compare {@link #mSubtypeId} but {@link #equals(Object)} does.
+         *
+         * @param other the object to be compared.
+         * @return a negative integer, zero, or positive integer as this object is less than, equal
+         *         to, or greater than the specified <code>other</code> object.
+         */
         @Override
         public int compareTo(ImeSubtypeListItem other) {
             int result = compareNullableCharSequences(mImeName, other.mImeName);
             if (result != 0) {
                 return result;
             }
-            result = compareNullableCharSequences(mSubtypeName, other.mSubtypeName);
-            if (result != 0) {
-                return result;
-            }
+            // Subtype that has the same locale of the system's has higher priority.
             result = (mIsSystemLocale ? -1 : 0) - (other.mIsSystemLocale ? -1 : 0);
             if (result != 0) {
                 return result;
             }
-            return (mIsSystemLanguage ? -1 : 0) - (other.mIsSystemLanguage ? -1 : 0);
+            // Subtype that has the same language of the system's has higher priority.
+            result = (mIsSystemLanguage ? -1 : 0) - (other.mIsSystemLanguage ? -1 : 0);
+            if (result != 0) {
+                return result;
+            }
+            return compareNullableCharSequences(mSubtypeName, other.mSubtypeName);
         }
 
         @Override
@@ -141,13 +160,7 @@
             }
             if (o instanceof ImeSubtypeListItem) {
                 final ImeSubtypeListItem that = (ImeSubtypeListItem)o;
-                if (!Objects.equals(this.mImi, that.mImi)) {
-                    return false;
-                }
-                if (this.mSubtypeId != that.mSubtypeId) {
-                    return false;
-                }
-                return true;
+                return Objects.equals(this.mImi, that.mImi) && this.mSubtypeId == that.mSubtypeId;
             }
             return false;
         }
diff --git a/core/java/com/android/internal/os/RuntimeInit.java b/core/java/com/android/internal/os/RuntimeInit.java
index 304c31d..f4be128 100644
--- a/core/java/com/android/internal/os/RuntimeInit.java
+++ b/core/java/com/android/internal/os/RuntimeInit.java
@@ -43,8 +43,8 @@
  * @hide
  */
 public class RuntimeInit {
-    private final static String TAG = "AndroidRuntime";
-    private final static boolean DEBUG = false;
+    final static String TAG = "AndroidRuntime";
+    final static boolean DEBUG = false;
 
     /** true if commonInit() has been called */
     private static boolean initialized;
@@ -53,7 +53,6 @@
 
     private static volatile boolean mCrashing = false;
 
-    private static final native void nativeZygoteInit();
     private static final native void nativeFinishInit();
     private static final native void nativeSetExitWithoutCleanup(boolean exitWithoutCleanup);
 
@@ -133,7 +132,7 @@
         }
     }
 
-    private static final void commonInit() {
+    protected static final void commonInit() {
         if (DEBUG) Slog.d(TAG, "Entered RuntimeInit!");
 
         /*
@@ -287,50 +286,7 @@
         if (DEBUG) Slog.d(TAG, "Leaving RuntimeInit!");
     }
 
-    /**
-     * The main function called when started through the zygote process. This
-     * could be unified with main(), if the native code in nativeFinishInit()
-     * were rationalized with Zygote startup.<p>
-     *
-     * Current recognized args:
-     * <ul>
-     *   <li> <code> [--] &lt;start class name&gt;  &lt;args&gt;
-     * </ul>
-     *
-     * @param targetSdkVersion target SDK version
-     * @param argv arg strings
-     */
-    public static final void zygoteInit(int targetSdkVersion, String[] argv, ClassLoader classLoader)
-            throws Zygote.MethodAndArgsCaller {
-        if (DEBUG) Slog.d(TAG, "RuntimeInit: Starting application from zygote");
-
-        Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "RuntimeInit");
-        redirectLogStreams();
-
-        commonInit();
-        nativeZygoteInit();
-        applicationInit(targetSdkVersion, argv, classLoader);
-    }
-
-    /**
-     * The main function called when an application is started through a
-     * wrapper process.
-     *
-     * When the wrapper starts, the runtime starts {@link RuntimeInit#main}
-     * which calls {@link WrapperInit#main} which then calls this method.
-     * So we don't need to call commonInit() here.
-     *
-     * @param targetSdkVersion target SDK version
-     * @param argv arg strings
-     */
-    public static void wrapperInit(int targetSdkVersion, String[] argv)
-            throws Zygote.MethodAndArgsCaller {
-        if (DEBUG) Slog.d(TAG, "RuntimeInit: Starting application from wrapper");
-
-        applicationInit(targetSdkVersion, argv, null);
-    }
-
-    private static void applicationInit(int targetSdkVersion, String[] argv, ClassLoader classLoader)
+    protected static void applicationInit(int targetSdkVersion, String[] argv, ClassLoader classLoader)
             throws Zygote.MethodAndArgsCaller {
         // If the application calls System.exit(), terminate the process
         // immediately without running any shutdown hooks.  It is not possible to
diff --git a/core/java/com/android/internal/os/WrapperInit.java b/core/java/com/android/internal/os/WrapperInit.java
index c03bcdf..96468ab 100644
--- a/core/java/com/android/internal/os/WrapperInit.java
+++ b/core/java/com/android/internal/os/WrapperInit.java
@@ -20,7 +20,7 @@
 import android.os.Trace;
 import android.util.BootTimingsTraceLog;
 import android.util.Slog;
-
+import com.android.internal.os.Zygote.MethodAndArgsCaller;
 import dalvik.system.VMRuntime;
 import java.io.DataOutputStream;
 import java.io.FileDescriptor;
@@ -83,7 +83,7 @@
             // Launch the application.
             String[] runtimeArgs = new String[args.length - 2];
             System.arraycopy(args, 2, runtimeArgs, 0, runtimeArgs.length);
-            RuntimeInit.wrapperInit(targetSdkVersion, runtimeArgs);
+            WrapperInit.wrapperInit(targetSdkVersion, runtimeArgs);
         } catch (Zygote.MethodAndArgsCaller caller) {
             caller.run();
         }
@@ -124,4 +124,24 @@
         Zygote.appendQuotedShellArgs(command, args);
         Zygote.execShell(command.toString());
     }
+
+    /**
+     * The main function called when an application is started through a
+     * wrapper process.
+     *
+     * When the wrapper starts, the runtime starts {@link RuntimeInit#main}
+     * which calls {@link main} which then calls this method.
+     * So we don't need to call commonInit() here.
+     *
+     * @param targetSdkVersion target SDK version
+     * @param argv arg strings
+     */
+    private static void wrapperInit(int targetSdkVersion, String[] argv)
+            throws Zygote.MethodAndArgsCaller {
+        if (RuntimeInit.DEBUG) {
+            Slog.d(RuntimeInit.TAG, "RuntimeInit: Starting application from wrapper");
+        }
+
+        RuntimeInit.applicationInit(targetSdkVersion, argv, null);
+    }
 }
diff --git a/core/java/com/android/internal/os/ZygoteConnection.java b/core/java/com/android/internal/os/ZygoteConnection.java
index 8fe374c..a7f311b 100644
--- a/core/java/com/android/internal/os/ZygoteConnection.java
+++ b/core/java/com/android/internal/os/ZygoteConnection.java
@@ -789,7 +789,7 @@
                     VMRuntime.getCurrentInstructionSet(),
                     pipeFd, parsedArgs.remainingArgs);
         } else {
-            RuntimeInit.zygoteInit(parsedArgs.targetSdkVersion,
+            ZygoteInit.zygoteInit(parsedArgs.targetSdkVersion,
                     parsedArgs.remainingArgs, null /* classLoader */);
         }
     }
diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java
index 5049738..a72b66a 100644
--- a/core/java/com/android/internal/os/ZygoteInit.java
+++ b/core/java/com/android/internal/os/ZygoteInit.java
@@ -25,6 +25,7 @@
 import android.icu.text.DecimalFormatSymbols;
 import android.icu.util.ULocale;
 import android.net.LocalServerSocket;
+import android.opengl.EGL14;
 import android.os.IInstalld;
 import android.os.Process;
 import android.os.RemoteException;
@@ -44,6 +45,7 @@
 import android.util.BootTimingsTraceLog;
 import android.util.EventLog;
 import android.util.Log;
+import android.util.Slog;
 import android.webkit.WebViewFactory;
 import android.widget.TextView;
 
@@ -81,6 +83,7 @@
     private static final String TAG = "Zygote";
 
     private static final String PROPERTY_DISABLE_OPENGL_PRELOADING = "ro.zygote.disable_gl_preload";
+    private static final String PROPERTY_GFX_DRIVER = "ro.gfx.driver.0";
     private static final String PROPERTY_RUNNING_IN_CONTAINER = "ro.boot.container";
 
     private static final int LOG_BOOT_PROGRESS_PRELOAD_START = 3020;
@@ -125,6 +128,12 @@
         bootTimingsTraceLog.traceBegin("PreloadResources");
         preloadResources();
         bootTimingsTraceLog.traceEnd(); // PreloadResources
+        Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "PreloadOpenGL");
+        preloadOpenGL();
+        Trace.traceEnd(Trace.TRACE_TAG_DALVIK);
+        Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "PreloadOpenGL");
+        preloadOpenGL();
+        Trace.traceEnd(Trace.TRACE_TAG_DALVIK);
         preloadSharedLibraries();
         preloadTextResources();
         // Ask the WebViewFactory to do any initialization that must run in the zygote process,
@@ -174,6 +183,14 @@
         System.loadLibrary("jnigraphics");
     }
 
+    private static void preloadOpenGL() {
+        String driverPackageName = SystemProperties.get(PROPERTY_GFX_DRIVER);
+        if (!SystemProperties.getBoolean(PROPERTY_DISABLE_OPENGL_PRELOADING, false) ||
+                driverPackageName == null || driverPackageName.isEmpty()) {
+            EGL14.eglGetDisplay(EGL14.EGL_DEFAULT_DISPLAY);
+        }
+    }
+
     private static void preloadTextResources() {
         Hyphenator.init();
         TextView.preloadFontCache();
@@ -471,7 +488,7 @@
             /*
              * Pass the remaining arguments to SystemServer.
              */
-            RuntimeInit.zygoteInit(parsedArgs.targetSdkVersion, parsedArgs.remainingArgs, cl);
+            ZygoteInit.zygoteInit(parsedArgs.targetSdkVersion, parsedArgs.remainingArgs, cl);
         }
 
         /* should never reach here */
@@ -771,4 +788,33 @@
      */
     private ZygoteInit() {
     }
+
+    /**
+     * The main function called when started through the zygote process. This
+     * could be unified with main(), if the native code in nativeFinishInit()
+     * were rationalized with Zygote startup.<p>
+     *
+     * Current recognized args:
+     * <ul>
+     *   <li> <code> [--] &lt;start class name&gt;  &lt;args&gt;
+     * </ul>
+     *
+     * @param targetSdkVersion target SDK version
+     * @param argv arg strings
+     */
+    public static final void zygoteInit(int targetSdkVersion, String[] argv,
+            ClassLoader classLoader) throws Zygote.MethodAndArgsCaller {
+        if (RuntimeInit.DEBUG) {
+            Slog.d(RuntimeInit.TAG, "RuntimeInit: Starting application from zygote");
+        }
+
+        Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "ZygoteInit");
+        RuntimeInit.redirectLogStreams();
+
+        RuntimeInit.commonInit();
+        ZygoteInit.nativeZygoteInit();
+        RuntimeInit.applicationInit(targetSdkVersion, argv, classLoader);
+    }
+
+    private static final native void nativeZygoteInit();
 }
diff --git a/core/java/com/android/internal/view/IInputConnectionWrapper.java b/core/java/com/android/internal/view/IInputConnectionWrapper.java
index 0185e30..9de1b21 100644
--- a/core/java/com/android/internal/view/IInputConnectionWrapper.java
+++ b/core/java/com/android/internal/view/IInputConnectionWrapper.java
@@ -36,7 +36,8 @@
 import android.view.inputmethod.InputContentInfo;
 
 public abstract class IInputConnectionWrapper extends IInputContext.Stub {
-    static final String TAG = "IInputConnectionWrapper";
+    private static final String TAG = "IInputConnectionWrapper";
+    private static final boolean DEBUG = false;
 
     private static final int DO_GET_TEXT_AFTER_CURSOR = 10;
     private static final int DO_GET_TEXT_BEFORE_CURSOR = 20;
@@ -57,7 +58,6 @@
     private static final int DO_DELETE_SURROUNDING_TEXT_IN_CODE_POINTS = 81;
     private static final int DO_BEGIN_BATCH_EDIT = 90;
     private static final int DO_END_BATCH_EDIT = 95;
-    private static final int DO_REPORT_FULLSCREEN_MODE = 100;
     private static final int DO_PERFORM_PRIVATE_COMMAND = 120;
     private static final int DO_CLEAR_META_KEY_STATES = 130;
     private static final int DO_REQUEST_UPDATE_CURSOR_ANCHOR_INFO = 140;
@@ -73,8 +73,6 @@
     private Object mLock = new Object();
     @GuardedBy("mLock")
     private boolean mFinished = false;
-    @GuardedBy("mLock")
-    private String mInputMethodId;
 
     static class SomeArgs {
         Object arg1;
@@ -113,18 +111,6 @@
         }
     }
 
-    public String getInputMethodId() {
-        synchronized (mLock) {
-            return mInputMethodId;
-        }
-    }
-
-    public void setInputMethodId(final String inputMethodId) {
-        synchronized (mLock) {
-            mInputMethodId = inputMethodId;
-        }
-    }
-
     abstract protected boolean isActive();
 
     /**
@@ -133,14 +119,6 @@
      */
     abstract protected void onUserAction();
 
-    /**
-     * Called when the input method started or stopped full-screen mode.
-     * @param enabled {@code true} if the input method starts full-screen mode.
-     * @param calledInBackground {@code true} if this input connection is in a state when incoming
-     * events are usually ignored.
-     */
-    abstract protected void onReportFullscreenMode(boolean enabled, boolean calledInBackground);
-
     public void getTextAfterCursor(int length, int flags, int seq, IInputContextCallback callback) {
         dispatchMessage(obtainMessageIISC(DO_GET_TEXT_AFTER_CURSOR, length, flags, seq, callback));
     }
@@ -225,10 +203,6 @@
         dispatchMessage(obtainMessage(DO_END_BATCH_EDIT));
     }
 
-    public void reportFullscreenMode(boolean enabled) {
-        dispatchMessage(obtainMessageII(DO_REPORT_FULLSCREEN_MODE, enabled ? 1 : 0, 0));
-    }
-
     public void performPrivateCommand(String action, Bundle data) {
         dispatchMessage(obtainMessageOO(DO_PERFORM_PRIVATE_COMMAND, action, data));
     }
@@ -419,6 +393,14 @@
                 return;
             }
             case DO_FINISH_COMPOSING_TEXT: {
+                if (isFinished()) {
+                    // In this case, #finishComposingText() is guaranteed to be called already.
+                    // There should be no negative impact if we ignore this call silently.
+                    if (DEBUG) {
+                        Log.w(TAG, "Bug 35301295: Redundant finishComposingText.");
+                    }
+                    return;
+                }
                 InputConnection ic = getInputConnection();
                 // Note we do NOT check isActive() here, because this is safe
                 // for an IME to call at any time, and we need to allow it
@@ -486,23 +468,6 @@
                 ic.endBatchEdit();
                 return;
             }
-            case DO_REPORT_FULLSCREEN_MODE: {
-                InputConnection ic = getInputConnection();
-                boolean isBackground = false;
-                if (ic == null || !isActive()) {
-                    Log.w(TAG, "reportFullscreenMode on inexistent InputConnection");
-                    isBackground = true;
-                }
-                final boolean enabled = msg.arg1 == 1;
-                if (!isBackground) {
-                    ic.reportFullscreenMode(enabled);
-                }
-                // Due to the nature of asynchronous event handling, currently InputMethodService
-                // has relied on the fact that #reportFullscreenMode() can be handled even when the
-                // InputConnection is inactive.  We have to notify this event to InputMethodManager.
-                onReportFullscreenMode(enabled, isBackground);
-                return;
-            }
             case DO_PERFORM_PRIVATE_COMMAND: {
                 InputConnection ic = getInputConnection();
                 if (ic == null || !isActive()) {
diff --git a/core/java/com/android/internal/view/IInputContext.aidl b/core/java/com/android/internal/view/IInputContext.aidl
index 728c557..c227991 100644
--- a/core/java/com/android/internal/view/IInputContext.aidl
+++ b/core/java/com/android/internal/view/IInputContext.aidl
@@ -62,9 +62,7 @@
     void beginBatchEdit();
     
     void endBatchEdit();
-    
-    void reportFullscreenMode(boolean enabled);
-    
+
     void sendKeyEvent(in KeyEvent event);
     
     void clearMetaKeyStates(int states);
diff --git a/core/java/com/android/internal/view/IInputMethod.aidl b/core/java/com/android/internal/view/IInputMethod.aidl
index 6ab1ec7..9870612 100644
--- a/core/java/com/android/internal/view/IInputMethod.aidl
+++ b/core/java/com/android/internal/view/IInputMethod.aidl
@@ -38,9 +38,8 @@
 
     void unbindInput();
 
-    void startInput(in IInputContext inputContext, int missingMethods, in EditorInfo attribute);
-
-    void restartInput(in IInputContext inputContext, int missingMethods, in EditorInfo attribute);
+    void startInput(in IInputContext inputContext, int missingMethods, in EditorInfo attribute,
+            boolean restarting);
 
     void createSession(in InputChannel channel, IInputSessionCallback callback);
 
diff --git a/core/java/com/android/internal/view/IInputMethodClient.aidl b/core/java/com/android/internal/view/IInputMethodClient.aidl
index 81056f2..ffa9f75 100644
--- a/core/java/com/android/internal/view/IInputMethodClient.aidl
+++ b/core/java/com/android/internal/view/IInputMethodClient.aidl
@@ -27,6 +27,7 @@
     void onBindMethod(in InputBindResult res);
     // unbindReason corresponds to InputMethodClient.UnbindReason.
     void onUnbindMethod(int sequence, int unbindReason);
-    void setActive(boolean active);
+    void setActive(boolean active, boolean fullscreen);
     void setUserActionNotificationSequenceNumber(int sequenceNumber);
+    void reportFullscreenMode(boolean fullscreen);
 }
diff --git a/core/java/com/android/internal/view/IInputMethodManager.aidl b/core/java/com/android/internal/view/IInputMethodManager.aidl
index 9e4b43b..4377645 100644
--- a/core/java/com/android/internal/view/IInputMethodManager.aidl
+++ b/core/java/com/android/internal/view/IInputMethodManager.aidl
@@ -58,8 +58,8 @@
     InputBindResult startInputOrWindowGainedFocus(
             /* @InputMethodClient.StartInputReason */ int startInputReason,
             in IInputMethodClient client, in IBinder windowToken, int controlFlags,
-            int softInputMode, int windowFlags, in EditorInfo attribute,
-            IInputContext inputContext,
+            /* @android.view.WindowManager.LayoutParams.SoftInputModeFlags */ int softInputMode,
+            int windowFlags, in EditorInfo attribute, IInputContext inputContext,
             /* @InputConnectionInspector.MissingMethodFlags */ int missingMethodFlags);
 
     void showInputMethodPickerFromClient(in IInputMethodClient client,
@@ -86,5 +86,7 @@
     IInputContentUriToken createInputContentUriToken(in IBinder token, in Uri contentUri,
             in String packageName);
 
+    void reportFullscreenMode(in IBinder token, boolean fullscreen);
+
     oneway void notifyUserAction(int sequenceNumber);
 }
diff --git a/core/java/com/android/internal/view/InputConnectionWrapper.java b/core/java/com/android/internal/view/InputConnectionWrapper.java
index 9a09dcc..cc0ef75 100644
--- a/core/java/com/android/internal/view/InputConnectionWrapper.java
+++ b/core/java/com/android/internal/view/InputConnectionWrapper.java
@@ -467,12 +467,8 @@
     }
 
     public boolean reportFullscreenMode(boolean enabled) {
-        try {
-            mIInputContext.reportFullscreenMode(enabled);
-            return true;
-        } catch (RemoteException e) {
-            return false;
-        }
+        // Nothing should happen when called from input method.
+        return false;
     }
 
     public boolean performPrivateCommand(String action, Bundle data) {
diff --git a/core/java/com/android/internal/view/InputMethodClient.java b/core/java/com/android/internal/view/InputMethodClient.java
index 802ce3e..bbd33a2 100644
--- a/core/java/com/android/internal/view/InputMethodClient.java
+++ b/core/java/com/android/internal/view/InputMethodClient.java
@@ -17,6 +17,8 @@
 package com.android.internal.view;
 
 import android.annotation.IntDef;
+import android.view.WindowManager.LayoutParams;
+import android.view.WindowManager.LayoutParams.SoftInputModeFlags;
 
 import java.lang.annotation.Retention;
 
@@ -75,12 +77,12 @@
     public static final int UNBIND_REASON_DISCONNECT_IME = 3;
     public static final int UNBIND_REASON_NO_IME = 4;
     public static final int UNBIND_REASON_SWITCH_IME_FAILED = 5;
-    public static final int UNBIND_REASON_RESET_IME = 6;
+    public static final int UNBIND_REASON_SWITCH_USER = 6;
 
     @Retention(SOURCE)
     @IntDef({UNBIND_REASON_UNSPECIFIED, UNBIND_REASON_SWITCH_CLIENT, UNBIND_REASON_SWITCH_IME,
             UNBIND_REASON_DISCONNECT_IME, UNBIND_REASON_NO_IME, UNBIND_REASON_SWITCH_IME_FAILED,
-            UNBIND_REASON_RESET_IME})
+            UNBIND_REASON_SWITCH_USER})
     public @interface UnbindReason {}
 
     public static String getUnbindReason(@UnbindReason final int reason) {
@@ -97,10 +99,71 @@
                 return "NO_IME";
             case UNBIND_REASON_SWITCH_IME_FAILED:
                 return "SWITCH_IME_FAILED";
-            case UNBIND_REASON_RESET_IME:
-                return "RESET_IME";
+            case UNBIND_REASON_SWITCH_USER:
+                return "SWITCH_USER";
             default:
                 return "Unknown=" + reason;
         }
     }
+
+    public static String softInputModeToString(@SoftInputModeFlags final int softInputMode) {
+        final StringBuilder sb = new StringBuilder();
+        final int state = softInputMode & LayoutParams.SOFT_INPUT_MASK_STATE;
+        final int adjust = softInputMode & LayoutParams.SOFT_INPUT_MASK_ADJUST;
+        final boolean isForwardNav =
+                (softInputMode & LayoutParams.SOFT_INPUT_IS_FORWARD_NAVIGATION) != 0;
+
+        switch (state) {
+            case LayoutParams.SOFT_INPUT_STATE_UNSPECIFIED:
+                sb.append("STATE_UNSPECIFIED");
+                break;
+            case LayoutParams.SOFT_INPUT_STATE_UNCHANGED:
+                sb.append("STATE_UNCHANGED");
+                break;
+            case LayoutParams.SOFT_INPUT_STATE_HIDDEN:
+                sb.append("STATE_HIDDEN");
+                break;
+            case LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN:
+                sb.append("STATE_ALWAYS_HIDDEN");
+                break;
+            case LayoutParams.SOFT_INPUT_STATE_VISIBLE:
+                sb.append("STATE_VISIBLE");
+                break;
+            case LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE:
+                sb.append("STATE_ALWAYS_VISIBLE");
+                break;
+            default:
+                sb.append("STATE_UNKNOWN(");
+                sb.append(state);
+                sb.append(")");
+                break;
+        }
+
+        switch (adjust) {
+            case LayoutParams.SOFT_INPUT_ADJUST_UNSPECIFIED:
+                sb.append("|ADJUST_UNSPECIFIED");
+                break;
+            case LayoutParams.SOFT_INPUT_ADJUST_RESIZE:
+                sb.append("|ADJUST_RESIZE");
+                break;
+            case LayoutParams.SOFT_INPUT_ADJUST_PAN:
+                sb.append("|ADJUST_PAN");
+                break;
+            case LayoutParams.SOFT_INPUT_ADJUST_NOTHING:
+                sb.append("|ADJUST_NOTHING");
+                break;
+            default:
+                sb.append("|ADJUST_UNKNOWN(");
+                sb.append(adjust);
+                sb.append(")");
+                break;
+        }
+
+        if (isForwardNav) {
+            // This is a special bit that is set by the system only during the window navigation.
+            sb.append("|IS_FORWARD_NAVIGATION");
+        }
+
+        return sb.toString();
+    }
 }
diff --git a/core/java/com/android/internal/view/menu/ActionMenu.java b/core/java/com/android/internal/view/menu/ActionMenu.java
index 3d44ebc..c657b87 100644
--- a/core/java/com/android/internal/view/menu/ActionMenu.java
+++ b/core/java/com/android/internal/view/menu/ActionMenu.java
@@ -38,7 +38,7 @@
     private boolean mIsQwerty;
     
     private ArrayList<ActionMenuItem> mItems;
-    
+
     public ActionMenu(Context context) {
         mContext = context;
         mItems = new ArrayList<ActionMenuItem>();
@@ -157,18 +157,22 @@
         
         return false;
     }
-    
+
     private ActionMenuItem findItemWithShortcut(int keyCode, KeyEvent event) {
         // TODO Make this smarter.
         final boolean qwerty = mIsQwerty;
         final ArrayList<ActionMenuItem> items = mItems;
         final int itemCount = items.size();
-        
+        final int modifierState = event.getModifiers();
         for (int i = 0; i < itemCount; i++) {
             ActionMenuItem item = items.get(i);
             final char shortcut = qwerty ? item.getAlphabeticShortcut() :
                     item.getNumericShortcut();
-            if (keyCode == shortcut) {
+            final int shortcutModifiers =
+                    qwerty ? item.getAlphabeticModifiers() : item.getNumericModifiers();
+            final boolean is_modifiers_exact_match = (modifierState & SUPPORTED_MODIFIERS_MASK)
+                    == (shortcutModifiers & SUPPORTED_MODIFIERS_MASK);
+            if ((keyCode == shortcut) && is_modifiers_exact_match) {
                 return item;
             }
         }
diff --git a/core/java/com/android/internal/view/menu/ActionMenuItem.java b/core/java/com/android/internal/view/menu/ActionMenuItem.java
index 1fce0b7..ace0cce 100644
--- a/core/java/com/android/internal/view/menu/ActionMenuItem.java
+++ b/core/java/com/android/internal/view/menu/ActionMenuItem.java
@@ -21,6 +21,7 @@
 import android.graphics.drawable.Drawable;
 import android.view.ActionProvider;
 import android.view.ContextMenu.ContextMenuInfo;
+import android.view.KeyEvent;
 import android.view.MenuItem;
 import android.view.SubMenu;
 import android.view.View;
@@ -33,12 +34,14 @@
     private final int mGroup;
     private final int mCategoryOrder;
     private final int mOrdering;
-    
+
     private CharSequence mTitle;
     private CharSequence mTitleCondensed;
     private Intent mIntent;
     private char mShortcutNumericChar;
+    private int mShortcutNumericModifiers = KeyEvent.META_CTRL_ON;
     private char mShortcutAlphabeticChar;
+    private int mShortcutAlphabeticModifiers = KeyEvent.META_CTRL_ON;
 
     private Drawable mIconDrawable;
     private int mIconResId = NO_ICON;
@@ -73,6 +76,10 @@
         return mShortcutAlphabeticChar;
     }
 
+    public int getAlphabeticModifiers() {
+        return mShortcutAlphabeticModifiers;
+    }
+
     public int getGroupId() {
         return mGroup;
     }
@@ -97,6 +104,10 @@
         return mShortcutNumericChar;
     }
 
+    public int getNumericModifiers() {
+        return mShortcutNumericModifiers;
+    }
+
     public int getOrder() {
         return mOrdering;
     }
@@ -138,6 +149,12 @@
         return this;
     }
 
+    public MenuItem setAlphabeticShortcut(char alphachar, int alphaModifiers) {
+        mShortcutAlphabeticChar = alphachar;
+        mShortcutAlphabeticModifiers = KeyEvent.normalizeMetaState(alphaModifiers);
+        return this;
+    }
+
     public MenuItem setCheckable(boolean checkable) {
         mFlags = (mFlags & ~CHECKABLE) | (checkable ? CHECKABLE : 0);
         return this;
@@ -180,6 +197,12 @@
         return this;
     }
 
+    public MenuItem setNumericShortcut(char numericChar, int numericModifiers) {
+        mShortcutNumericChar = numericChar;
+        mShortcutNumericModifiers = KeyEvent.normalizeMetaState(numericModifiers);
+        return this;
+    }
+
     public MenuItem setOnMenuItemClickListener(OnMenuItemClickListener menuItemClickListener) {
         mClickListener = menuItemClickListener;
         return this;
@@ -191,6 +214,15 @@
         return this;
     }
 
+    public MenuItem setShortcut(char numericChar, char alphaChar, int numericModifiers,
+            int alphaModifiers) {
+        mShortcutNumericChar = numericChar;
+        mShortcutNumericModifiers = KeyEvent.normalizeMetaState(numericModifiers);
+        mShortcutAlphabeticChar = alphaChar;
+        mShortcutAlphabeticModifiers = KeyEvent.normalizeMetaState(alphaModifiers);
+        return this;
+    }
+
     public MenuItem setTitle(CharSequence title) {
         mTitle = title;
         return this;
diff --git a/core/java/com/android/internal/view/menu/MenuBuilder.java b/core/java/com/android/internal/view/menu/MenuBuilder.java
index df57639..7eb0f4d 100644
--- a/core/java/com/android/internal/view/menu/MenuBuilder.java
+++ b/core/java/com/android/internal/view/menu/MenuBuilder.java
@@ -805,7 +805,7 @@
      */
     void findItemsWithShortcutForKey(List<MenuItemImpl> items, int keyCode, KeyEvent event) {
         final boolean qwerty = isQwertyMode();
-        final int metaState = event.getMetaState();
+        final int modifierState = event.getModifiers();
         final KeyCharacterMap.KeyData possibleChars = new KeyCharacterMap.KeyData();
         // Get the chars associated with the keyCode (i.e using any chording combo)
         final boolean isKeyCodeMapped = event.getKeyData(possibleChars);
@@ -821,9 +821,13 @@
             if (item.hasSubMenu()) {
                 ((MenuBuilder)item.getSubMenu()).findItemsWithShortcutForKey(items, keyCode, event);
             }
-            final char shortcutChar = qwerty ? item.getAlphabeticShortcut() : item.getNumericShortcut();
-            if (((metaState & (KeyEvent.META_SHIFT_ON | KeyEvent.META_SYM_ON)) == 0) &&
-                  (shortcutChar != 0) &&
+            final char shortcutChar =
+                    qwerty ? item.getAlphabeticShortcut() : item.getNumericShortcut();
+            final int shortcutModifiers =
+                    qwerty ? item.getAlphabeticModifiers() : item.getNumericModifiers();
+            final boolean isModifiersExactMatch = (modifierState & SUPPORTED_MODIFIERS_MASK)
+                    == (shortcutModifiers & SUPPORTED_MODIFIERS_MASK);
+            if (isModifiersExactMatch && (shortcutChar != 0) &&
                   (shortcutChar == possibleChars.meta[0]
                       || shortcutChar == possibleChars.meta[2]
                       || (qwerty && shortcutChar == '\b' &&
diff --git a/core/java/com/android/internal/view/menu/MenuItemImpl.java b/core/java/com/android/internal/view/menu/MenuItemImpl.java
index 342943f..4c3118d 100644
--- a/core/java/com/android/internal/view/menu/MenuItemImpl.java
+++ b/core/java/com/android/internal/view/menu/MenuItemImpl.java
@@ -25,6 +25,7 @@
 import android.util.Log;
 import android.view.ActionProvider;
 import android.view.ContextMenu.ContextMenuInfo;
+import android.view.KeyEvent;
 import android.view.LayoutInflater;
 import android.view.MenuItem;
 import android.view.SubMenu;
@@ -50,7 +51,9 @@
     private CharSequence mTitleCondensed;
     private Intent mIntent;
     private char mShortcutNumericChar;
+    private int mShortcutNumericModifiers = KeyEvent.META_CTRL_ON;
     private char mShortcutAlphabeticChar;
+    private int mShortcutAlphabeticModifiers = KeyEvent.META_CTRL_ON;
 
     /** The icon's drawable which is only created as needed */
     private Drawable mIconDrawable;
@@ -227,18 +230,36 @@
         mItemCallback = callback;
         return this;
     }
-    
+
     public char getAlphabeticShortcut() {
         return mShortcutAlphabeticChar;
     }
 
+    public int getAlphabeticModifiers() {
+        return mShortcutAlphabeticModifiers;
+    }
+
     public MenuItem setAlphabeticShortcut(char alphaChar) {
         if (mShortcutAlphabeticChar == alphaChar) return this;
-        
+
         mShortcutAlphabeticChar = Character.toLowerCase(alphaChar);
-        
+
         mMenu.onItemsChanged(false);
-        
+
+        return this;
+    }
+
+    public MenuItem setAlphabeticShortcut(char alphaChar, int alphaModifiers){
+        if (mShortcutAlphabeticChar == alphaChar &&
+                mShortcutAlphabeticModifiers == alphaModifiers) {
+            return this;
+        }
+
+        mShortcutAlphabeticChar = alphaChar;
+        mShortcutAlphabeticModifiers = KeyEvent.normalizeMetaState(alphaModifiers);
+
+        mMenu.onItemsChanged(false);
+
         return this;
     }
 
@@ -246,6 +267,10 @@
         return mShortcutNumericChar;
     }
 
+    public int getNumericModifiers() {
+        return mShortcutNumericModifiers;
+    }
+
     public MenuItem setNumericShortcut(char numericChar) {
         if (mShortcutNumericChar == numericChar) return this;
         
@@ -256,6 +281,19 @@
         return this;
     }
 
+    public MenuItem setNumericShortcut(char numericChar, int numericModifiers){
+        if (mShortcutNumericChar == numericChar && mShortcutNumericModifiers == numericModifiers) {
+            return this;
+        }
+
+        mShortcutNumericChar = numericChar;
+        mShortcutNumericModifiers = KeyEvent.normalizeMetaState(numericModifiers);
+
+        mMenu.onItemsChanged(false);
+
+        return this;
+    }
+
     public MenuItem setShortcut(char numericChar, char alphaChar) {
         mShortcutNumericChar = numericChar;
         mShortcutAlphabeticChar = Character.toLowerCase(alphaChar);
@@ -265,6 +303,18 @@
         return this;
     }
 
+    public MenuItem setShortcut(char numericChar, int numericModifiers, char alphaChar,
+            int alphaModifiers) {
+        mShortcutNumericChar = numericChar;
+        mShortcutNumericModifiers = KeyEvent.normalizeMetaState(numericModifiers);
+        mShortcutAlphabeticChar = alphaChar;
+        mShortcutAlphabeticModifiers = KeyEvent.normalizeMetaState(alphaModifiers);
+
+        mMenu.onItemsChanged(false);
+
+        return this;
+    }
+
     /**
      * @return The active shortcut (based on QWERTY-mode of the menu).
      */
diff --git a/core/java/com/android/internal/widget/SwipeDismissLayout.java b/core/java/com/android/internal/widget/SwipeDismissLayout.java
index 2a5957c..261fa43 100644
--- a/core/java/com/android/internal/widget/SwipeDismissLayout.java
+++ b/core/java/com/android/internal/widget/SwipeDismissLayout.java
@@ -43,7 +43,8 @@
 public class SwipeDismissLayout extends FrameLayout {
     private static final String TAG = "SwipeDismissLayout";
 
-    private static final float DISMISS_MIN_DRAG_WIDTH_RATIO = .33f;
+    private static final float MAX_DIST_THRESHOLD = .33f;
+    private static final float MIN_DIST_THRESHOLD = .1f;
 
     public interface OnDismissedListener {
         void onDismissed(SwipeDismissLayout layout);
@@ -73,6 +74,7 @@
     private int mActiveTouchId;
     private float mDownX;
     private float mDownY;
+    private float mLastX;
     private boolean mSwiping;
     private boolean mDismissed;
     private boolean mDiscardIntercept;
@@ -105,7 +107,6 @@
     };
     private IntentFilter mScreenOffFilter = new IntentFilter(Intent.ACTION_SCREEN_OFF);
 
-    private float mLastX;
 
     private boolean mDismissable = true;
 
@@ -174,7 +175,7 @@
                 mDownX = ev.getRawX();
                 mDownY = ev.getRawY();
                 mActiveTouchId = ev.getPointerId(0);
-                mVelocityTracker = VelocityTracker.obtain();
+                mVelocityTracker = VelocityTracker.obtain("int1");
                 mVelocityTracker.addMovement(ev);
                 break;
 
@@ -238,7 +239,10 @@
                 updateDismiss(ev);
                 if (mDismissed) {
                     mDismissAnimator.animateDismissal(ev.getRawX() - mDownX);
-                } else if (mSwiping) {
+                } else if (mSwiping
+                        // Only trigger animation if we had a MOVE event that would shift the
+                        // underlying view, otherwise the animation would be janky.
+                        && mLastX != Integer.MIN_VALUE) {
                     mDismissAnimator.animateRecovery(ev.getRawX() - mDownX);
                 }
                 resetMembers();
@@ -298,6 +302,7 @@
         mVelocityTracker = null;
         mTranslationX = 0;
         mDownX = 0;
+        mLastX = Integer.MIN_VALUE;
         mDownY = 0;
         mSwiping = false;
         mDismissed = false;
@@ -329,19 +334,32 @@
 
     private void updateDismiss(MotionEvent ev) {
         float deltaX = ev.getRawX() - mDownX;
-        mVelocityTracker.addMovement(ev);
+        // Don't add the motion event as an UP event would clear the velocity tracker
         mVelocityTracker.computeCurrentVelocity(1000);
+        float xVelocity = mVelocityTracker.getXVelocity();
+        if (mLastX == Integer.MIN_VALUE) {
+            // If there's no changes to mLastX, we have only one point of data, and therefore no
+            // velocity. Estimate velocity from just the up and down event in that case.
+            xVelocity = deltaX / ((ev.getEventTime() - ev.getDownTime()) / 1000);
+        }
         if (!mDismissed) {
-            if ((deltaX > (getWidth() * DISMISS_MIN_DRAG_WIDTH_RATIO) &&
-                    ev.getRawX() >= mLastX)
-                    || mVelocityTracker.getXVelocity() >= mMinFlingVelocity) {
+            // Adjust the distance threshold linearly between the min and max threshold based on the
+            // x-velocity scaled with the the fling threshold speed
+            float distanceThreshold = getWidth() * Math.max(
+                    Math.min((MIN_DIST_THRESHOLD - MAX_DIST_THRESHOLD)
+                            * xVelocity / mMinFlingVelocity // scale x-velocity with fling velocity
+                            + MAX_DIST_THRESHOLD, // offset to start at max threshold
+                            MAX_DIST_THRESHOLD), // cap at max threshold
+                    MIN_DIST_THRESHOLD); // bottom out at min threshold
+            if ((deltaX > distanceThreshold && ev.getRawX() >= mLastX)
+                    || xVelocity >= mMinFlingVelocity) {
                 mDismissed = true;
             }
         }
         // Check if the user tried to undo this.
         if (mDismissed && mSwiping) {
             // Check if the user's finger is actually flinging back to left
-            if (mVelocityTracker.getXVelocity() < -mMinFlingVelocity) {
+            if (xVelocity < -mMinFlingVelocity) {
                 mDismissed = false;
             }
         }
diff --git a/core/jni/Android.mk b/core/jni/Android.mk
index db3ea8c..0c07192 100644
--- a/core/jni/Android.mk
+++ b/core/jni/Android.mk
@@ -203,6 +203,8 @@
     $(call include-path-for, libhardware)/hardware \
     $(call include-path-for, libhardware_legacy)/hardware_legacy \
     $(TOP)/frameworks/base/media/jni \
+    $(TOP)/frameworks/rs/cpp \
+    $(TOP)/frameworks/rs \
     $(TOP)/system/core/base/include \
     $(TOP)/system/core/include \
     $(TOP)/system/core/libappfuse/include \
@@ -281,6 +283,7 @@
     libhidlbase \
     libhidltransport \
     libhwbinder \
+    libvintf \
 
 LOCAL_SHARED_LIBRARIES += \
     libhwui \
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index 407e69c..e237ce9 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -216,7 +216,7 @@
     gCurRuntime->onStarted();
 }
 
-static void com_android_internal_os_RuntimeInit_nativeZygoteInit(JNIEnv* env, jobject clazz)
+static void com_android_internal_os_ZygoteInit_nativeZygoteInit(JNIEnv* env, jobject clazz)
 {
     gCurRuntime->onZygoteInit();
 }
@@ -230,19 +230,27 @@
 /*
  * JNI registration.
  */
-static const JNINativeMethod gMethods[] = {
-    { "nativeFinishInit", "()V",
-        (void*) com_android_internal_os_RuntimeInit_nativeFinishInit },
-    { "nativeZygoteInit", "()V",
-        (void*) com_android_internal_os_RuntimeInit_nativeZygoteInit },
-    { "nativeSetExitWithoutCleanup", "(Z)V",
-        (void*) com_android_internal_os_RuntimeInit_nativeSetExitWithoutCleanup },
-};
 
 int register_com_android_internal_os_RuntimeInit(JNIEnv* env)
 {
+    const JNINativeMethod methods[] = {
+        { "nativeFinishInit", "()V",
+            (void*) com_android_internal_os_RuntimeInit_nativeFinishInit },
+        { "nativeSetExitWithoutCleanup", "(Z)V",
+            (void*) com_android_internal_os_RuntimeInit_nativeSetExitWithoutCleanup },
+    };
     return jniRegisterNativeMethods(env, "com/android/internal/os/RuntimeInit",
-        gMethods, NELEM(gMethods));
+        methods, NELEM(methods));
+}
+
+int register_com_android_internal_os_ZygoteInit(JNIEnv* env)
+{
+    const JNINativeMethod methods[] = {
+        { "nativeZygoteInit", "()V",
+            (void*) com_android_internal_os_ZygoteInit_nativeZygoteInit },
+    };
+    return jniRegisterNativeMethods(env, "com/android/internal/os/ZygoteInit",
+        methods, NELEM(methods));
 }
 
 // ----------------------------------------------------------------------
@@ -1271,6 +1279,7 @@
 
 static const RegJNIRec gRegJNI[] = {
     REG_JNI(register_com_android_internal_os_RuntimeInit),
+    REG_JNI(register_com_android_internal_os_ZygoteInit),
     REG_JNI(register_android_os_SystemClock),
     REG_JNI(register_android_util_EventLog),
     REG_JNI(register_android_util_Log),
diff --git a/core/jni/android/graphics/Bitmap.cpp b/core/jni/android/graphics/Bitmap.cpp
index 2bde991..3ca455d 100755
--- a/core/jni/android/graphics/Bitmap.cpp
+++ b/core/jni/android/graphics/Bitmap.cpp
@@ -876,9 +876,9 @@
 
     sk_sp<SkColorSpace> colorSpace;
     if (kRGBA_F16_SkColorType == colorType) {
-        colorSpace = SkColorSpace::MakeNamed(SkColorSpace::kSRGBLinear_Named);
+        colorSpace = SkColorSpace::MakeSRGBLinear();
     } else {
-        colorSpace = isSRGB ? SkColorSpace::MakeNamed(SkColorSpace::kSRGB_Named) : nullptr;
+        colorSpace = isSRGB ? SkColorSpace::MakeSRGB() : nullptr;
     }
 
     if (!bitmap->setInfo(SkImageInfo::Make(width, height, colorType, alphaType, colorSpace),
@@ -997,7 +997,7 @@
     auto bitmapWrapper = reinterpret_cast<BitmapWrapper*>(bitmapHandle);
     bitmapWrapper->getSkBitmap(&bitmap);
 
-    sk_sp<SkColorSpace> sRGB = SkColorSpace::MakeNamed(SkColorSpace::kSRGB_Named);
+    sk_sp<SkColorSpace> sRGB = SkColorSpace::MakeSRGB();
     bool isSRGB = bitmap.colorSpace() == sRGB.get();
 
     p->writeInt32(isMutable);
diff --git a/core/jni/android/graphics/BitmapFactory.cpp b/core/jni/android/graphics/BitmapFactory.cpp
index 19d4848..2aa16b2 100644
--- a/core/jni/android/graphics/BitmapFactory.cpp
+++ b/core/jni/android/graphics/BitmapFactory.cpp
@@ -39,6 +39,7 @@
 jfieldID gOptions_widthFieldID;
 jfieldID gOptions_heightFieldID;
 jfieldID gOptions_mimeFieldID;
+jfieldID gOptions_outConfigFieldID;
 jfieldID gOptions_mCancelID;
 jfieldID gOptions_bitmapFieldID;
 
@@ -47,6 +48,9 @@
 jclass gInsetStruct_class;
 jmethodID gInsetStruct_constructorMethodID;
 
+jclass gBitmapConfig_class;
+jmethodID gBitmapConfig_nativeToConfigMethodID;
+
 using namespace android;
 
 jstring encodedFormatToString(JNIEnv* env, SkEncodedImageFormat format) {
@@ -298,6 +302,7 @@
         env->SetIntField(options, gOptions_widthFieldID, -1);
         env->SetIntField(options, gOptions_heightFieldID, -1);
         env->SetObjectField(options, gOptions_mimeFieldID, 0);
+        env->SetObjectField(options, gOptions_outConfigFieldID, 0);
 
         jobject jconfig = env->GetObjectField(options, gOptions_configFieldID);
         prefColorType = GraphicsJNI::getNativeBitmapColorType(env, jconfig);
@@ -352,6 +357,9 @@
         scaledHeight = codec->getInfo().height() / sampleSize;
     }
 
+    // Set the decode colorType
+    SkColorType decodeColorType = codec->computeOutputColorType(prefColorType);
+
     // Set the options and return if the client only wants the size.
     if (options != NULL) {
         jstring mimeType = encodedFormatToString(
@@ -363,6 +371,20 @@
         env->SetIntField(options, gOptions_heightFieldID, scaledHeight);
         env->SetObjectField(options, gOptions_mimeFieldID, mimeType);
 
+        SkColorType outColorType = decodeColorType;
+        // Scaling can affect the output color type
+        if (willScale || scale != 1.0f) {
+            outColorType = colorTypeForScaledOutput(outColorType);
+        }
+
+        jint configID = GraphicsJNI::colorTypeToLegacyBitmapConfig(outColorType);
+        if (isHardware) {
+            configID = GraphicsJNI::kHardware_LegacyBitmapConfig;
+        }
+        jobject config = env->CallStaticObjectMethod(gBitmapConfig_class,
+                gBitmapConfig_nativeToConfigMethodID, configID);
+        env->SetObjectField(options, gOptions_outConfigFieldID, config);
+
         if (onlyDecodeSize) {
             return nullptr;
         }
@@ -409,10 +431,6 @@
         decodeAllocator = &defaultAllocator;
     }
 
-    // Set the decode colorType.  This is necessary because we can't always support
-    // the requested colorType.
-    SkColorType decodeColorType = codec->computeOutputColorType(prefColorType);
-
     // Construct a color table for the decode if necessary
     sk_sp<SkColorTable> colorTable(nullptr);
     SkPMColor* colorPtr = nullptr;
@@ -747,6 +765,8 @@
     gOptions_widthFieldID = GetFieldIDOrDie(env, options_class, "outWidth", "I");
     gOptions_heightFieldID = GetFieldIDOrDie(env, options_class, "outHeight", "I");
     gOptions_mimeFieldID = GetFieldIDOrDie(env, options_class, "outMimeType", "Ljava/lang/String;");
+    gOptions_outConfigFieldID = GetFieldIDOrDie(env, options_class, "outConfig",
+             "Landroid/graphics/Bitmap$Config;");
     gOptions_mCancelID = GetFieldIDOrDie(env, options_class, "mCancel", "Z");
 
     jclass bitmap_class = FindClassOrDie(env, "android/graphics/Bitmap");
@@ -758,6 +778,11 @@
     gInsetStruct_constructorMethodID = GetMethodIDOrDie(env, gInsetStruct_class, "<init>",
                                                         "(IIIIIIIIFIF)V");
 
+    gBitmapConfig_class = MakeGlobalRefOrDie(env, FindClassOrDie(env,
+            "android/graphics/Bitmap$Config"));
+    gBitmapConfig_nativeToConfigMethodID = GetStaticMethodIDOrDie(env, gBitmapConfig_class,
+            "nativeToConfig", "(I)Landroid/graphics/Bitmap$Config;");
+
     return android::RegisterMethodsOrDie(env, "android/graphics/BitmapFactory",
                                          gMethods, NELEM(gMethods));
 }
diff --git a/core/jni/android/graphics/Graphics.cpp b/core/jni/android/graphics/Graphics.cpp
index d5f33cf..5d73101 100644
--- a/core/jni/android/graphics/Graphics.cpp
+++ b/core/jni/android/graphics/Graphics.cpp
@@ -287,21 +287,7 @@
     env->SetFloatField(obj, gPointF_yFieldID, SkScalarToFloat(r.fY));
 }
 
-// This enum must keep these int values, to match the int values
-// in the java Bitmap.Config enum.
-enum LegacyBitmapConfig {
-    kNo_LegacyBitmapConfig          = 0,
-    kA8_LegacyBitmapConfig          = 1,
-    kIndex8_LegacyBitmapConfig      = 2,
-    kRGB_565_LegacyBitmapConfig     = 3,
-    kARGB_4444_LegacyBitmapConfig   = 4,
-    kARGB_8888_LegacyBitmapConfig   = 5,
-    kRGBA_16F_LegacyBitmapConfig    = 6,
-    kHardware_LegacyBitmapConfig    = 7,
-
-    kLastEnum_LegacyBitmapConfig = kHardware_LegacyBitmapConfig
-};
-
+// See enum values in GraphicsJNI.h
 jint GraphicsJNI::colorTypeToLegacyBitmapConfig(SkColorType colorType) {
     switch (colorType) {
         case kRGBA_F16_SkColorType:
@@ -455,14 +441,14 @@
 
 sk_sp<SkColorSpace> GraphicsJNI::defaultColorSpace() {
 #ifdef ANDROID_ENABLE_LINEAR_BLENDING
-    return SkColorSpace::MakeNamed(SkColorSpace::kSRGB_Named);
+    return SkColorSpace::MakeSRGB();
 #else
     return nullptr;
 #endif
 }
 
 sk_sp<SkColorSpace> GraphicsJNI::linearColorSpace() {
-    return SkColorSpace::MakeNamed(SkColorSpace::kSRGBLinear_Named);
+    return SkColorSpace::MakeSRGBLinear();
 }
 
 sk_sp<SkColorSpace> GraphicsJNI::colorSpaceForType(SkColorType type) {
diff --git a/core/jni/android/graphics/GraphicsJNI.h b/core/jni/android/graphics/GraphicsJNI.h
index e899db5..8a1ef6e 100644
--- a/core/jni/android/graphics/GraphicsJNI.h
+++ b/core/jni/android/graphics/GraphicsJNI.h
@@ -24,6 +24,21 @@
 
 class GraphicsJNI {
 public:
+    // This enum must keep these int values, to match the int values
+    // in the java Bitmap.Config enum.
+    enum LegacyBitmapConfig {
+        kNo_LegacyBitmapConfig          = 0,
+        kA8_LegacyBitmapConfig          = 1,
+        kIndex8_LegacyBitmapConfig      = 2,
+        kRGB_565_LegacyBitmapConfig     = 3,
+        kARGB_4444_LegacyBitmapConfig   = 4,
+        kARGB_8888_LegacyBitmapConfig   = 5,
+        kRGBA_16F_LegacyBitmapConfig    = 6,
+        kHardware_LegacyBitmapConfig    = 7,
+
+        kLastEnum_LegacyBitmapConfig = kHardware_LegacyBitmapConfig
+    };
+
     // returns true if an exception is set (and dumps it out to the Log)
     static bool hasException(JNIEnv*);
 
diff --git a/core/jni/android_os_HwBinder.cpp b/core/jni/android_os_HwBinder.cpp
index d35ffbb..989a557 100644
--- a/core/jni/android_os_HwBinder.cpp
+++ b/core/jni/android_os_HwBinder.cpp
@@ -33,6 +33,7 @@
 #include <hidl/HidlTransportSupport.h>
 #include <hwbinder/ProcessState.h>
 #include <nativehelper/ScopedLocalRef.h>
+#include <vintf/parse_string.h>
 
 #include "core_jni_helpers.h"
 
@@ -127,18 +128,23 @@
         uint32_t flags,
         TransactCallback callback) {
     JNIEnv *env = AndroidRuntime::getJNIEnv();
+    bool isOneway = (flags & TF_ONE_WAY) != 0;
+    ScopedLocalRef<jobject> replyObj(env, nullptr);
+    sp<JHwParcel> replyContext = nullptr;
 
     ScopedLocalRef<jobject> requestObj(env, JHwParcel::NewObject(env));
     JHwParcel::GetNativeContext(env, requestObj.get())->setParcel(
             const_cast<hardware::Parcel *>(&data), false /* assumeOwnership */);
 
-    ScopedLocalRef<jobject> replyObj(env, JHwParcel::NewObject(env));
 
-    sp<JHwParcel> replyContext =
-        JHwParcel::GetNativeContext(env, replyObj.get());
+    if (!isOneway) {
+        replyObj.reset(JHwParcel::NewObject(env));
 
-    replyContext->setParcel(reply, false /* assumeOwnership */);
-    replyContext->setTransactCallback(callback);
+        replyContext = JHwParcel::GetNativeContext(env, replyObj.get());
+
+        replyContext->setParcel(reply, false /* assumeOwnership */);
+        replyContext->setTransactCallback(callback);
+    }
 
     env->CallVoidMethod(
             mObject,
@@ -151,13 +157,15 @@
     if (env->ExceptionCheck()) {
         jthrowable excep = env->ExceptionOccurred();
         env->ExceptionDescribe();
+        env->ExceptionClear();
 
+        // It is illegal to call IsInstanceOf if there is a pending exception.
+        // Attempting to do so results in a JniAbort which crashes the entire process.
         if (env->IsInstanceOf(excep, gErrorClass)) {
             /* It's an error */
             LOG(ERROR) << "Forcefully exiting";
             exit(1);
         } else {
-            env->ExceptionClear();
             LOG(ERROR) << "Uncaught exception!";
         }
 
@@ -166,27 +174,29 @@
 
     status_t err = OK;
 
-    if (!replyContext->wasSent()) {
-        // The implementation never finished the transaction.
-        err = UNKNOWN_ERROR;  // XXX special error code instead?
+    if (!isOneway) {
+        if (!replyContext->wasSent()) {
+            // The implementation never finished the transaction.
+            err = UNKNOWN_ERROR;  // XXX special error code instead?
 
-        reply->setDataPosition(0 /* pos */);
+            reply->setDataPosition(0 /* pos */);
+        }
+
+        // Release all temporary storage now that scatter-gather data
+        // has been consolidated, either by calling the TransactCallback,
+        // if wasSent() == true or clearing the reply parcel (setDataOffset above).
+        replyContext->getStorage()->release(env);
+
+        // We cannot permanently pass ownership of "data" and "reply" over to their
+        // Java object wrappers (we don't own them ourselves).
+        replyContext->setParcel(
+                NULL /* parcel */, false /* assumeOwnership */);
+
     }
 
-    // Release all temporary storage now that scatter-gather data
-    // has been consolidated, either by calling the TransactCallback,
-    // if wasSent() == true or clearing the reply parcel (setDataOffset above).
-    replyContext->getStorage()->release(env);
-
-    // We cannot permanently pass ownership of "data" and "reply" over to their
-    // Java object wrappers (we don't own them ourselves).
-
     JHwParcel::GetNativeContext(env, requestObj.get())->setParcel(
             NULL /* parcel */, false /* assumeOwnership */);
 
-    replyContext->setParcel(
-            NULL /* parcel */, false /* assumeOwnership */);
-
     return err;
 }
 
@@ -293,6 +303,8 @@
         jstring ifaceNameObj,
         jstring serviceNameObj) {
 
+    using ::android::vintf::operator<<;
+
     if (ifaceNameObj == NULL) {
         jniThrowException(env, "java/lang/NullPointerException", NULL);
         return NULL;
@@ -310,27 +322,41 @@
         return NULL;
     }
 
-    const char *ifaceName = env->GetStringUTFChars(ifaceNameObj, NULL);
-    if (ifaceName == NULL) {
+    const char *ifaceNameCStr = env->GetStringUTFChars(ifaceNameObj, NULL);
+    if (ifaceNameCStr == NULL) {
         return NULL; // XXX exception already pending?
     }
-    const char *serviceName = env->GetStringUTFChars(serviceNameObj, NULL);
-    if (serviceName == NULL) {
-        env->ReleaseStringUTFChars(ifaceNameObj, ifaceName);
+    std::string ifaceName(ifaceNameCStr);
+    env->ReleaseStringUTFChars(ifaceNameObj, ifaceNameCStr);
+    ::android::hardware::hidl_string ifaceNameHStr;
+    ifaceNameHStr.setToExternal(ifaceName.c_str(), ifaceName.size());
+
+    const char *serviceNameCStr = env->GetStringUTFChars(serviceNameObj, NULL);
+    if (serviceNameCStr == NULL) {
         return NULL; // XXX exception already pending?
     }
+    std::string serviceName(serviceNameCStr);
+    env->ReleaseStringUTFChars(serviceNameObj, serviceNameCStr);
+    ::android::hardware::hidl_string serviceNameHStr;
+    serviceNameHStr.setToExternal(serviceName.c_str(), serviceName.size());
 
     LOG(INFO) << "Looking for service "
               << ifaceName
               << "/"
               << serviceName;
 
-    Return<sp<hidl::base::V1_0::IBase>> ret = manager->get(ifaceName, serviceName);
+    ::android::vintf::Transport transport =
+            ::android::hardware::getTransport(ifaceName);
+    if (   transport != ::android::vintf::Transport::EMPTY
+        && transport != ::android::vintf::Transport::HWBINDER) {
+        LOG(ERROR) << "service " << ifaceName << " declares transport method "
+                   << transport << " but framework expects "
+                   << ::android::vintf::Transport::HWBINDER;
+        signalExceptionForError(env, UNKNOWN_ERROR, true /* canThrowRemoteException */);
+        return NULL;
+    }
 
-    env->ReleaseStringUTFChars(ifaceNameObj, ifaceName);
-    ifaceName = NULL;
-    env->ReleaseStringUTFChars(serviceNameObj, serviceName);
-    serviceName = NULL;
+    Return<sp<hidl::base::V1_0::IBase>> ret = manager->get(ifaceNameHStr, serviceNameHStr);
 
     if (!ret.isOk()) {
         signalExceptionForError(env, UNKNOWN_ERROR, true /* canThrowRemoteException */);
diff --git a/core/jni/android_os_seccomp.cpp b/core/jni/android_os_seccomp.cpp
index 3f021ae..45d5061 100644
--- a/core/jni/android_os_seccomp.cpp
+++ b/core/jni/android_os_seccomp.cpp
@@ -148,7 +148,10 @@
     AllowSyscall(f, 128); // __NR_restart_syscall
 
     // b/35034743
-    AllowSyscall(f, 267); // __NR_fstatfs64
+    AllowSyscall(f, 267); // __NR_syncfs
+
+    // b/34763393
+    AllowSyscall(f, 277); // __NR_seccomp
 
     Trap(f);
 
diff --git a/core/jni/android_view_Surface.cpp b/core/jni/android_view_Surface.cpp
index bc5f847..4a9cd24 100644
--- a/core/jni/android_view_Surface.cpp
+++ b/core/jni/android_view_Surface.cpp
@@ -31,6 +31,7 @@
 #include <binder/Parcel.h>
 
 #include <gui/Surface.h>
+#include <gui/view/Surface.h>
 #include <gui/SurfaceControl.h>
 #include <gui/GLConsumer.h>
 
diff --git a/core/jni/include/android_runtime/android_view_Surface.h b/core/jni/include/android_runtime/android_view_Surface.h
index 1bc8521..07e29cb 100644
--- a/core/jni/include/android_runtime/android_view_Surface.h
+++ b/core/jni/include/android_runtime/android_view_Surface.h
@@ -18,6 +18,7 @@
 #define _ANDROID_VIEW_SURFACE_H
 
 #include <android/native_window.h>
+#include <system/graphics.h>
 
 #include "jni.h"
 
diff --git a/core/proto/android/providers/settings.proto b/core/proto/android/providers/settings.proto
index 7674d7a..ee50c29 100644
--- a/core/proto/android/providers/settings.proto
+++ b/core/proto/android/providers/settings.proto
@@ -328,6 +328,7 @@
     SettingProto enable_cellular_on_boot = 283;
     SettingProto max_notification_enqueue_rate = 284;
     SettingProto cell_on = 285;
+    SettingProto network_recommendations_package = 286;
 }
 
 message SecureSettingsProto {
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 7b800b3..cd02fbb 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -1650,6 +1650,12 @@
     <permission android:name="android.permission.CACHE_CONTENT"
         android:protectionLevel="signature" />
 
+    <!-- Allows an application to aggressively allocate disk space.
+         <p>Not for use by third-party applications.
+    -->
+    <permission android:name="android.permission.ALLOCATE_AGGRESSIVE"
+        android:protectionLevel="signature|privileged" />
+
     <!-- ================================== -->
     <!-- Permissions for screenlock         -->
     <!-- ================================== -->
@@ -3252,6 +3258,10 @@
     <permission android:name="android.permission.MODIFY_THEME_OVERLAY"
                 android:protectionLevel="signature" />
 
+    <!-- Allows an instant app to create foreground services. -->
+    <permission android:name="android.permission.INSTANT_APP_FOREGROUND_SERVICE"
+        android:protectionLevel="signature|development|ephemeral|appop" />
+
     <application android:process="system"
                  android:persistent="true"
                  android:hasCode="false"
diff --git a/core/res/res/values-af/strings.xml b/core/res/res/values-af/strings.xml
index 46d0745..34208d1 100644
--- a/core/res/res/values-af/strings.xml
+++ b/core/res/res/values-af/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Kaarte en navigasie"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Produktiwiteit"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Toestelberging"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB-ontfouting"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml
index 45206873..d21e995 100644
--- a/core/res/res/values-am/strings.xml
+++ b/core/res/res/values-am/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"ካርታዎች እና ዳሰሳ"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"ውጤታማነት"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"የመሣሪያ ማከማቻ"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"የዩኤስቢ ማረሚያ"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml
index 95118c2..ef63055 100644
--- a/core/res/res/values-ar/strings.xml
+++ b/core/res/res/values-ar/strings.xml
@@ -1817,6 +1817,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"الخرائط والتنقل"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"الإنتاجية"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"السعة التخزينية للجهاز"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"‏تصحيح أخطاء USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-az/strings.xml b/core/res/res/values-az/strings.xml
index cf377b2d..13c3622 100644
--- a/core/res/res/values-az/strings.xml
+++ b/core/res/res/values-az/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Xəritə və Naviqasiya"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Məhsuldarlıq"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Cihaz yaddaşı"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB sazlama"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-b+sr+Latn/strings.xml b/core/res/res/values-b+sr+Latn/strings.xml
index e56d938..6413548 100644
--- a/core/res/res/values-b+sr+Latn/strings.xml
+++ b/core/res/res/values-b+sr+Latn/strings.xml
@@ -1724,6 +1724,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Mape i navigacija"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Produktivnost"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Memorijski prostor uređaja"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Otklanjanje grešaka sa USB-a"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-be/strings.xml b/core/res/res/values-be/strings.xml
index 6383c39..44425a3 100644
--- a/core/res/res/values-be/strings.xml
+++ b/core/res/res/values-be/strings.xml
@@ -1755,6 +1755,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Карты і навігацыя"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Прадукцыйнасць"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Сховішча на прыладзе"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Адладка USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml
index 1238e2c..6d94928 100644
--- a/core/res/res/values-bg/strings.xml
+++ b/core/res/res/values-bg/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Карти и навигация"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Производителност"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Хранилище на устройството"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Отстраняване на грешки през USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-bn/strings.xml b/core/res/res/values-bn/strings.xml
index 9bedf58..f0c54c1 100644
--- a/core/res/res/values-bn/strings.xml
+++ b/core/res/res/values-bn/strings.xml
@@ -1694,6 +1694,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"মানচিত্র ও নেভিগেশান"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"উৎপাদনশীলতা"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"ডিভাইসের সঞ্চয়স্থান"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB ডিবাগিং"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-bs/strings.xml b/core/res/res/values-bs/strings.xml
index 66ef19a33..34efe51 100644
--- a/core/res/res/values-bs/strings.xml
+++ b/core/res/res/values-bs/strings.xml
@@ -1727,6 +1727,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Mape i navigacija"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Produktivnost"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Memorija uređaja"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Otklanjanje grešaka putem uređaja spojenog na USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml
index b01f382..f501f70 100644
--- a/core/res/res/values-ca/strings.xml
+++ b/core/res/res/values-ca/strings.xml
@@ -278,7 +278,7 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"Controla el nivell i el posicionament del zoom de la pantalla."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"Utilitza gestos"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"Pot tocar, lliscar, pessigar i utilitzar altres gestos."</string>
-    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Gestos amb les empremtes digitals"</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"Gestos al sensor d\'empremtes digitals"</string>
     <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"Captura gestos realitzats en el sensor d\'empremtes digitals del dispositiu."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"desactivar o modificar la barra d\'estat"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"Permet que l\'aplicació desactivi la barra d\'estat o afegeixi i elimini icones del sistema."</string>
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Mapes i navegació"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Productivitat"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Emmagatzematge del dispositiu"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Depuració USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index b8717d5..66e8512 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -1755,6 +1755,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Mapy a navigace"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Produktivita"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Úložiště zařízení"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Ladění USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index ebcd48e..1c0d86c 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Kort og navigation"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Produktivitet"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Lagerplads på enheden"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB-fejlretning"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index 7e31748..8e3fda0 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Karten &amp; Navigation"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Effizienz"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Gerätespeicher"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB-Fehlerbehebung"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml
index 7458e04..eeb9e32 100644
--- a/core/res/res/values-el/strings.xml
+++ b/core/res/res/values-el/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Χάρτες και πλοήγηση"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Παραγωγικότητα"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Αποθηκευτικός χώρος συσκευής"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Εντοπισμός σφαλμάτων USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-en-rAU/strings.xml b/core/res/res/values-en-rAU/strings.xml
index 107f247..8c4e7855 100644
--- a/core/res/res/values-en-rAU/strings.xml
+++ b/core/res/res/values-en-rAU/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Maps &amp; Navigation"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Productivity"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Device storage"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB debugging"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml
index 107f247..8c4e7855 100644
--- a/core/res/res/values-en-rGB/strings.xml
+++ b/core/res/res/values-en-rGB/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Maps &amp; Navigation"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Productivity"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Device storage"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB debugging"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-en-rIN/strings.xml b/core/res/res/values-en-rIN/strings.xml
index 107f247..8c4e7855 100644
--- a/core/res/res/values-en-rIN/strings.xml
+++ b/core/res/res/values-en-rIN/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Maps &amp; Navigation"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Productivity"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Device storage"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB debugging"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index 2749b35..cb4ecac 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Mapas y navegación"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Productividad"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Almacenamiento del dispositivo"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Depuración por USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index bdb1381..9f8615b 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Mapas y navegación"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Productividad"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Almacenamiento del dispositivo"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Depuración por USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-et/strings.xml b/core/res/res/values-et/strings.xml
index 5b532b4..acaa751 100644
--- a/core/res/res/values-et/strings.xml
+++ b/core/res/res/values-et/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Kaardid ja navigeerimine"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Produktiivsus"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Seadme salvestusruum"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB silumine"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-eu/strings.xml b/core/res/res/values-eu/strings.xml
index afb0a9c..6d5c776 100644
--- a/core/res/res/values-eu/strings.xml
+++ b/core/res/res/values-eu/strings.xml
@@ -1694,6 +1694,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Mapak eta nabigazioa"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Produktibitatea"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Gailuaren memoria"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB arazketa"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index 1e1c8fa..b6d5424 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"نقشه و پیمایش"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"بهره‌وری"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"حافظه دستگاه"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"‏اشکال‌زدایی USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml
index c3c2c65..409a13d 100644
--- a/core/res/res/values-fi/strings.xml
+++ b/core/res/res/values-fi/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Kartat ja navigointi"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Tuottavuus"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Laitteen tallennustila"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB-vianetsintä"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-fr-rCA/strings.xml b/core/res/res/values-fr-rCA/strings.xml
index 7e051c9..8541512 100644
--- a/core/res/res/values-fr-rCA/strings.xml
+++ b/core/res/res/values-fr-rCA/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Cartes et navigation"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Productivité"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Mémoire de l\'appareil"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Débogage USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index b8fcf28..e956d9a 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Plans et navigation"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Productivité"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Mémoire de l\'appareil"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Débogage USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-gl/strings.xml b/core/res/res/values-gl/strings.xml
index 5d316f6..7cdeb06 100644
--- a/core/res/res/values-gl/strings.xml
+++ b/core/res/res/values-gl/strings.xml
@@ -1694,6 +1694,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Mapas e navegación"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Produtividade"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Almacenamento do dispositivo"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Depuración de USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-gu/strings.xml b/core/res/res/values-gu/strings.xml
index b5c243b..e64f56a 100644
--- a/core/res/res/values-gu/strings.xml
+++ b/core/res/res/values-gu/strings.xml
@@ -278,8 +278,8 @@
     <string name="capability_desc_canControlMagnification" msgid="4791858203568383773">"પ્રદર્શનનું ઝૂમ સ્તર અને સ્થિતિનિર્ધારણ નિયંત્રિત કરો."</string>
     <string name="capability_title_canPerformGestures" msgid="7418984730362576862">"હાવભાવ કરો"</string>
     <string name="capability_desc_canPerformGestures" msgid="8296373021636981249">"ટૅપ, સ્વાઇપ, પિંચ કરી અને અન્ય હાવભાવ કરી શકે છે."</string>
-    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"ફિંગરપ્રિન્ટ હાવભાવો"</string>
-    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"ઉપકરણોનાં ફિંગરપ્રિન્ટ સેન્સર પર ભજવેલા હાવભાવ કૅપ્ચર કરી શકે છે."</string>
+    <string name="capability_title_canCaptureFingerprintGestures" msgid="6309568287512278670">"ફિંગરપ્રિન્ટ સંકેતો"</string>
+    <string name="capability_desc_canCaptureFingerprintGestures" msgid="7102111919385702482">"ઉપકરણોનાં ફિંગરપ્રિન્ટ સેન્સર પર ભજવેલા સંકેતો કૅપ્ચર કરી શકે છે."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"સ્થિતિ બાર અક્ષમ કરો અથવા સંશોધિત કરો"</string>
     <string name="permdesc_statusBar" msgid="8434669549504290975">"એપ્લિકેશનને સ્થિતિ બાર અક્ષમ કરવાની અથવા સિસ્ટમ આયકન્સ ઉમેરવા અને દૂર કરવાની મંજૂરી આપે છે."</string>
     <string name="permlab_statusBarService" msgid="4826835508226139688">"સ્થિતિ બાર થાઓ"</string>
@@ -1694,6 +1694,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"નકશા અને નેવિગેશન"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"ઉત્પાદકતા"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"ઉપકરણ સ્ટૉરેજ"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB ડિબગિંગ"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml
index f2c3d43..04a5e5e 100644
--- a/core/res/res/values-hi/strings.xml
+++ b/core/res/res/values-hi/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"मानचित्र और मार्गदर्शक"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"उत्पादकता"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"डिवाइस में जगह"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB डीबग करना"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index 11864c6..2a6696c 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -1724,6 +1724,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Karte i navigacija"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Produktivnost"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Pohrana na uređaju"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Otklanjanje pogrešaka putem USB-a"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml
index 4c6d440..64cec19 100644
--- a/core/res/res/values-hu/strings.xml
+++ b/core/res/res/values-hu/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Térképek és navigáció"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Irodai alkalmazások"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Eszköztárhely"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB-hibakeresés"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-hy/strings.xml b/core/res/res/values-hy/strings.xml
index 276a326..d645ee0 100644
--- a/core/res/res/values-hy/strings.xml
+++ b/core/res/res/values-hy/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Քարտեզներ և նավարկում"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Աշխատանք"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Սարքի հիշողություն"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB վրիպազերծում"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index 839fc04..2f4f501 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Peta &amp; Navigasi"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Produktivitas"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Penyimpanan perangkat"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Proses debug USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-is/strings.xml b/core/res/res/values-is/strings.xml
index 1e2beb0..997eb5f 100644
--- a/core/res/res/values-is/strings.xml
+++ b/core/res/res/values-is/strings.xml
@@ -1694,6 +1694,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Kort og leiðsögn"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Aðstoð"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Geymslurými tækis"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB-villuleit"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index 0b7820e..81006b0 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Maps e Navigatore"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Produttività"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Memoria dispositivo"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Debug USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index 4361ff2..3b3260a 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -1755,6 +1755,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"מפות וניווט"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"פרודוקטיביות"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"שטח האחסון במכשיר"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"‏ניקוי באגים ב-USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index f3a22ce..48c1fbc 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"地図&ナビ"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"仕事効率化"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"端末のストレージ"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB デバッグ"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-ka/strings.xml b/core/res/res/values-ka/strings.xml
index 9d3b288..0da158d 100644
--- a/core/res/res/values-ka/strings.xml
+++ b/core/res/res/values-ka/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"რუკები და ნავიგაცია"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"პროდუქტიულობა"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"მოწყობილობის მეხსიერება"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB გამართვა"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-kk/strings.xml b/core/res/res/values-kk/strings.xml
index b168b6f..370e42c 100644
--- a/core/res/res/values-kk/strings.xml
+++ b/core/res/res/values-kk/strings.xml
@@ -1694,6 +1694,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Карта және навигация"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Өнімділік"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Құрылғы жады"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB арқылы жөндеу"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-km/strings.xml b/core/res/res/values-km/strings.xml
index 0a57834..ea404bb 100644
--- a/core/res/res/values-km/strings.xml
+++ b/core/res/res/values-km/strings.xml
@@ -1695,6 +1695,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"ផែនទី និង​ការ​រុករក"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"ផលិត​ភាព"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"ទំហំផ្ទុកឧបករណ៍"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"ការ​កែកំហុស USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-kn/strings.xml b/core/res/res/values-kn/strings.xml
index 07400f5..1dc8a32 100644
--- a/core/res/res/values-kn/strings.xml
+++ b/core/res/res/values-kn/strings.xml
@@ -1694,6 +1694,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"ನಕ್ಷೆಗಳು ಮತ್ತು ನ್ಯಾವಿಗೇಶನ್"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"ಉತ್ಪಾದಕತೆ"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"ಸಾಧನ ಸಂಗ್ರಹಣೆ"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB ಡೀಬಗ್ ಮಾಡುವಿಕೆ"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index b74094e..605cff7 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"지도/내비게이션"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"생산성"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"기기 저장용량"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB 디버깅"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-ky/strings.xml b/core/res/res/values-ky/strings.xml
index 7b1d126..4b2f536 100644
--- a/core/res/res/values-ky/strings.xml
+++ b/core/res/res/values-ky/strings.xml
@@ -1694,6 +1694,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Карталар жана чабыттоо"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Өндүрүш категориясы"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Түзмөктүн сактагычы"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB аркылуу мүчүлүштүктөрдү оңдоо"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-lo/strings.xml b/core/res/res/values-lo/strings.xml
index 5d7b4c3..4c9a059 100644
--- a/core/res/res/values-lo/strings.xml
+++ b/core/res/res/values-lo/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Maps &amp; Navigation"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"ຜະລິດຕະພາບ"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"ບ່ອນຈັດເກັບຂໍ້ມູນອຸປະກອນ"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"ການດີບັ໊ກຜ່ານ USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml
index 89ac3f2..90c1618 100644
--- a/core/res/res/values-lt/strings.xml
+++ b/core/res/res/values-lt/strings.xml
@@ -1755,6 +1755,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Žemėlapiai ir navigacija"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Produktyvumas"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Įrenginio saugykla"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB derinimas"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml
index 5163334..ec664f2 100644
--- a/core/res/res/values-lv/strings.xml
+++ b/core/res/res/values-lv/strings.xml
@@ -1724,6 +1724,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Kartes un navigācija"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Produktivitāte"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Ierīces krātuve"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB atkļūdošana"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-mk/strings.xml b/core/res/res/values-mk/strings.xml
index 66d5387..4c9ea72 100644
--- a/core/res/res/values-mk/strings.xml
+++ b/core/res/res/values-mk/strings.xml
@@ -1696,6 +1696,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Карти и навигација"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Продуктивност"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Простор на уредот"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Отстранување грешки на USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-ml/strings.xml b/core/res/res/values-ml/strings.xml
index bb5455d..57a4a2d 100644
--- a/core/res/res/values-ml/strings.xml
+++ b/core/res/res/values-ml/strings.xml
@@ -1694,6 +1694,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"മാപ്സും നാവിഗേഷനും"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"ഉല്‍‌പ്പാദനക്ഷമത"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"ഉപകരണ സ്റ്റോറേജ്"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB ഡീബഗ്ഗിംഗ്"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-mn/strings.xml b/core/res/res/values-mn/strings.xml
index 0f7d43a..c154c65 100644
--- a/core/res/res/values-mn/strings.xml
+++ b/core/res/res/values-mn/strings.xml
@@ -1691,6 +1691,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Газрын зураг &amp; зүг чиг"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Бүтээмж"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Төхөөрөмжийн сан"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB дебаг хийлт"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-mr/strings.xml b/core/res/res/values-mr/strings.xml
index 69cf831..4a58c41 100644
--- a/core/res/res/values-mr/strings.xml
+++ b/core/res/res/values-mr/strings.xml
@@ -1696,4 +1696,18 @@
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"डिव्‍हाइस संचय"</string>
     <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
     <skip />
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-ms/strings.xml b/core/res/res/values-ms/strings.xml
index ad053b9..9fdad6e 100644
--- a/core/res/res/values-ms/strings.xml
+++ b/core/res/res/values-ms/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Peta &amp; Navigasi"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Produktiviti"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Storan peranti"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Penyahpepijatan USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-my/strings.xml b/core/res/res/values-my/strings.xml
index 4454c2b5..5a60b8e 100644
--- a/core/res/res/values-my/strings.xml
+++ b/core/res/res/values-my/strings.xml
@@ -1694,6 +1694,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"မြေပုံနှင့် ခရီးလမ်းညွှန်ချက်"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"ထုတ်လုပ်နိုင်မှု"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"စက်ပစ္စည်း သိုလှောင်ခန်း"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB အမှားရှာပြင်ခြင်း"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index d23441f..7c23db4 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Kart og navigering"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Produktivitet"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Lagring på enheten"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB-feilsøking"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-ne/strings.xml b/core/res/res/values-ne/strings.xml
index d513ff3..92190ef 100644
--- a/core/res/res/values-ne/strings.xml
+++ b/core/res/res/values-ne/strings.xml
@@ -1699,6 +1699,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"नक्सा तथा नेभिगेसन"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"उत्पादकत्व"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"यन्त्रको भण्डारण"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB डिबग प्रक्रिया"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index f3e0274..83b1c93 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Maps en navigatie"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Productiviteit"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Apparaatopslag"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB-foutopsporing"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-pa/strings.xml b/core/res/res/values-pa/strings.xml
index 788efb8..5ce692e 100644
--- a/core/res/res/values-pa/strings.xml
+++ b/core/res/res/values-pa/strings.xml
@@ -1694,6 +1694,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"ਨਕਸ਼ੇ ਅਤੇ ਆਵਾਗੌਣ"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"ਉਤਪਾਦਕਤਾ"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"ਡੀਵਾਈਸ ਸਟੋਰੇਜ"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB ਡੀਬੱਗਿੰਗ"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index 3814f80..180ae57 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -1755,6 +1755,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Mapy i nawigacja"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Produktywność"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Pamięć urządzenia"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Debugowanie USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-pt-rBR/strings.xml b/core/res/res/values-pt-rBR/strings.xml
index a7a763f..ecf2029 100644
--- a/core/res/res/values-pt-rBR/strings.xml
+++ b/core/res/res/values-pt-rBR/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Mapas e navegação"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Produtividade"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Armazenamento do dispositivo"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Depuração USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index b87fe9e..67246db 100644
--- a/core/res/res/values-pt-rPT/strings.xml
+++ b/core/res/res/values-pt-rPT/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Mapas e navegação"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Produtividade"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Armazenamento do dispositivo"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Depuração USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index a7a763f..ecf2029 100644
--- a/core/res/res/values-pt/strings.xml
+++ b/core/res/res/values-pt/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Mapas e navegação"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Produtividade"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Armazenamento do dispositivo"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Depuração USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index b407ae0..0819b39 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -1724,6 +1724,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Hărți și navigare"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Productivitate"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Stocare pe dispozitiv"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Remedierea erorilor prin USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index 2e2bd0b..f2c693e 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -1755,6 +1755,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Карты и навигация"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Работа"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Хранилище устройства"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Отладка по USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-si/strings.xml b/core/res/res/values-si/strings.xml
index 7440888..17f3b1e 100644
--- a/core/res/res/values-si/strings.xml
+++ b/core/res/res/values-si/strings.xml
@@ -1091,9 +1091,9 @@
     <string name="wifi_connect_alert_title" msgid="8455846016001810172">"සම්බන්ධතාවයට ඉඩ දෙන්නද?"</string>
     <string name="wifi_connect_alert_message" msgid="6451273376815958922">"යෙදුම් %1$s ක් WiFi ජාලය %2$s වෙත සම්බන්ධ කිරීමට කැමතියි"</string>
     <string name="wifi_connect_default_application" msgid="7143109390475484319">"යෙදුම"</string>
-    <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"ඍජු Wi-Fi"</string>
-    <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"ඍජු Wi-Fi ආරම්භ කරන්න. මෙය Wi-Fi සේවාදායක/හොට්ස්පොට් එක අක්‍රිය කරනු ඇත."</string>
-    <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"ඍජු Wi-Fi ආරම්භ කළ නොහැක."</string>
+    <string name="wifi_p2p_dialog_title" msgid="97611782659324517">"Wi-Fi Direct"</string>
+    <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Wi-Fi Direct ආරම්භ කරන්න. මෙය Wi-Fi සේවාදායක/හොට්ස්පොට් එක අක්‍රිය කරනු ඇත."</string>
+    <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Wi-Fi Direct ආරම්භ කළ නොහැක."</string>
     <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct ක්‍රියාත්මකයි"</string>
     <string name="wifi_p2p_enabled_notification_message" msgid="8064677407830620023">"සැකසීම් සඳහා තට්ටු කරන්න"</string>
     <string name="accept" msgid="1645267259272829559">"පිළිගන්න"</string>
@@ -1695,6 +1695,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"සිතියම් සහ සංචලනය"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"ඵලදායිතාව"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"උපාංග ගබඩාව"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB නිදොස්කරණය"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index 47716da..d04636f 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -1755,6 +1755,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Mapy a navigácia"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Produktivita"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Úložisko zariadenia"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Ladenie cez USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index 13102b5..d513862 100644
--- a/core/res/res/values-sl/strings.xml
+++ b/core/res/res/values-sl/strings.xml
@@ -1755,6 +1755,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Zemljevidi in navigacija"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Storilnost"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Shramba naprave"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Odpravljanje težav prek povezave USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-sq/strings.xml b/core/res/res/values-sq/strings.xml
index fd76f7d..7d5d277 100644
--- a/core/res/res/values-sq/strings.xml
+++ b/core/res/res/values-sq/strings.xml
@@ -1694,6 +1694,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Harta dhe navigim"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Produktivitet"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Hapësira ruajtëse e pajisjes"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Korrigjimi i USB-së"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index 54b0fae..962c6f8 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -1724,6 +1724,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Мапе и навигација"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Продуктивност"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Меморијски простор уређаја"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Отклањање грешака са USB-а"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index e010b96..6f3fbda 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Kartor och navigation"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Produktivitet"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Enhetens lagringsutrymme"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB-felsökning"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml
index c363a2216..fc48ab6 100644
--- a/core/res/res/values-sw/strings.xml
+++ b/core/res/res/values-sw/strings.xml
@@ -1691,6 +1691,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Ramani na Maelekezo"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Uzalishaji"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Hifadhi ya kifaa"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Utatuzi wa USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-ta/strings.xml b/core/res/res/values-ta/strings.xml
index 8a70c4e..638f7a4 100644
--- a/core/res/res/values-ta/strings.xml
+++ b/core/res/res/values-ta/strings.xml
@@ -1694,6 +1694,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"வரைபடங்களும் வழிசெலுத்தலும்"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"உற்பத்தித்திறன்"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"சாதனச் சேமிப்பகம்"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB பிழைத்திருத்தம்"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-te/strings.xml b/core/res/res/values-te/strings.xml
index 4d22092..d5f1433 100644
--- a/core/res/res/values-te/strings.xml
+++ b/core/res/res/values-te/strings.xml
@@ -1694,6 +1694,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"మ్యాప్స్ &amp; నావిగేషన్"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"ఉత్పాదకత"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"పరికర నిల్వ"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB డీబగ్గింగ్"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml
index 38dfd84..deec6f6 100644
--- a/core/res/res/values-th/strings.xml
+++ b/core/res/res/values-th/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"แผนที่และการนำทาง"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"ประสิทธิภาพการทำงาน"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"พื้นที่เก็บข้อมูลของอุปกรณ์"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"การแก้ไขข้อบกพร่อง USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml
index 06c6aa7..499fa64 100644
--- a/core/res/res/values-tl/strings.xml
+++ b/core/res/res/values-tl/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Mga Mapa at Navigation"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Productivity"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Storage ng device"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Pag-debug ng USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index c6dd402..b9dd30b 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Haritalar ve Navigasyon"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Verimlilik"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Cihazdaki depolama alanı"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB üzerinden hata ayıklama"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml
index 6b5070a..6ef561c 100644
--- a/core/res/res/values-uk/strings.xml
+++ b/core/res/res/values-uk/strings.xml
@@ -1362,7 +1362,7 @@
     <string name="keyboard_password_character_no_headset" msgid="2859873770886153678">"Крапка."</string>
     <string name="action_bar_home_description" msgid="5293600496601490216">"Перейти на головну"</string>
     <string name="action_bar_up_description" msgid="2237496562952152589">"Перейти вгору"</string>
-    <string name="action_menu_overflow_description" msgid="2295659037509008453">"Інші варіанти"</string>
+    <string name="action_menu_overflow_description" msgid="2295659037509008453">"Більше"</string>
     <string name="action_bar_home_description_format" msgid="7965984360903693903">"%1$s, %2$s"</string>
     <string name="action_bar_home_subtitle_description_format" msgid="6985546530471780727">"%1$s, %2$s, %3$s"</string>
     <string name="storage_internal" msgid="3570990907910199483">"Внутрішнє спільне сховище"</string>
@@ -1755,6 +1755,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Карти й навігація"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Продуктивність"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Пам’ять пристрою"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Налагодження USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-ur/strings.xml b/core/res/res/values-ur/strings.xml
index 9f77dbb..95b47cd 100644
--- a/core/res/res/values-ur/strings.xml
+++ b/core/res/res/values-ur/strings.xml
@@ -1696,4 +1696,18 @@
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"آلہ کی اسٹوریج"</string>
     <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
     <skip />
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
+    <skip />
 </resources>
diff --git a/core/res/res/values-uz/strings.xml b/core/res/res/values-uz/strings.xml
index 6f07869..8ed7b7a 100644
--- a/core/res/res/values-uz/strings.xml
+++ b/core/res/res/values-uz/strings.xml
@@ -1694,6 +1694,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Xaritalar va navigatsiya"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Ish va unumdorlik"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Qurilma xotirasi"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB orqali nosozliklarni tuzatish"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml
index f2d9c8f..40994cb 100644
--- a/core/res/res/values-vi/strings.xml
+++ b/core/res/res/values-vi/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Bản đồ và dẫn đường"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Sản xuất"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Bộ nhớ của thiết bị"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Gỡ lỗi USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index 96eba47..af155e2 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"地图和导航"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"办公"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"设备存储空间"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB 调试"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-zh-rHK/strings.xml b/core/res/res/values-zh-rHK/strings.xml
index 234d45b..02abba7 100644
--- a/core/res/res/values-zh-rHK/strings.xml
+++ b/core/res/res/values-zh-rHK/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"地圖和導航"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"生產力應用程式"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"裝置儲存空間"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB 偵錯"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index 0f0f176..1e45412 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"地圖和導航"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"生產應用"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"裝置儲存空間"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"USB 偵錯"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values-zu/strings.xml b/core/res/res/values-zu/strings.xml
index 938b332..8016ed8 100644
--- a/core/res/res/values-zu/strings.xml
+++ b/core/res/res/values-zu/strings.xml
@@ -1693,6 +1693,19 @@
     <string name="app_category_maps" msgid="5878491404538024367">"Amamephu nokuzula"</string>
     <string name="app_category_productivity" msgid="3742083261781538852">"Ukukhiqiza"</string>
     <string name="device_storage_monitor_notification_channel" msgid="3295871267414816228">"Isitoreji sedivayisi"</string>
-    <!-- no translation found for adb_debugging_notification_channel_tv (5537766997350092316) -->
+    <string name="adb_debugging_notification_channel_tv" msgid="5537766997350092316">"Ukulungisa iphutha le-USB"</string>
+    <!-- no translation found for time_picker_hour_label (2979075098868106450) -->
+    <skip />
+    <!-- no translation found for time_picker_minute_label (5168864173796598399) -->
+    <skip />
+    <!-- no translation found for time_picker_header_text (143536825321922567) -->
+    <skip />
+    <!-- no translation found for time_picker_input_error (7574999942502513765) -->
+    <skip />
+    <!-- no translation found for time_picker_prompt_label (7588093983899966783) -->
+    <skip />
+    <!-- no translation found for time_picker_text_input_mode_description (4148166758173708199) -->
+    <skip />
+    <!-- no translation found for time_picker_radial_mode_description (4953403779779557198) -->
     <skip />
 </resources>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 7f49f05..a3bad54 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -4714,16 +4714,16 @@
             <!-- No auto-sizing (default). -->
             <enum name="none" value="0" />
             <!-- Uniform horizontal and vertical scaling. -->
-            <enum name="xy" value="1" />
+            <enum name="uniform" value="1" />
         </attr>
         <!-- Specify the auto-size step size if <code>autoSizeText</code> is set to
         <code>xy</code>. The default is 1px. Overwrites
-        <code>autoSizeStepSizeSet</code> if set. -->
+        <code>autoSizePresetSizes</code> if set. -->
         <attr name="autoSizeStepGranularity" format="dimension" />
         <!-- Array of dimensions to be used in conjunction with
         <code>autoSizeText</code> set to <code>xy</code>. Overwrites
         <code>autoSizeStepGranularity</code> if set. -->
-        <attr name="autoSizeStepSizeSet"/>
+        <attr name="autoSizePresetSizes"/>
         <!-- The minimum text size constraint to be used when auto-sizing text -->
         <attr name="autoSizeMinTextSize" format="dimension" />
         <!-- The maximum text size constraint to be used when auto-sizing text -->
@@ -6975,10 +6975,32 @@
              with alphabetic keys. -->
         <attr name="alphabeticShortcut" format="string" />
 
+        <!-- The alphabetic modifier key. This is the modifier when using a keyboard
+             with alphabetic keys. The values should be kept in sync with KeyEvent -->
+        <attr name="alphabeticModifiers">
+            <flag name="META" value="0x10000" />
+            <flag name="CTRL" value="0x1000" />
+            <flag name="ALT" value="0x02" />
+            <flag name="SHIFT" value="0x1" />
+            <flag name="SYM" value="0x4" />
+            <flag name="FUNCTION" value="0x8" />
+        </attr>
+
         <!-- The numeric shortcut key.  This is the shortcut when using a numeric (e.g., 12-key)
              keyboard. -->
         <attr name="numericShortcut" format="string" />
 
+        <!-- The numeric modifier key. This is the modifier when using a numeric (e.g., 12-key)
+             keyboard. The values should be kept in sync with KeyEvent -->
+        <attr name="numericModifiers">
+            <flag name="META" value="0x10000" />
+            <flag name="CTRL" value="0x1000" />
+            <flag name="ALT" value="0x02" />
+            <flag name="SHIFT" value="0x1" />
+            <flag name="SYM" value="0x4" />
+            <flag name="FUNCTION" value="0x8" />
+        </attr>
+
         <!-- Whether the item is capable of displaying a check mark. -->
         <attr name="checkable" format="boolean" />
 
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 1b48469..34659aa 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2767,7 +2767,7 @@
         <public name="tooltipText" />
         <public name="autoSizeText" />
         <public name="autoSizeStepGranularity" />
-        <public name="autoSizeStepSizeSet" />
+        <public name="autoSizePresetSizes" />
         <public name="autoSizeMinTextSize" />
         <public name="min" />
         <public name="rotationAnimation" />
@@ -2792,6 +2792,8 @@
         <public name="isolatedSplits" />
         <public name="targetSandboxVersion" />
         <public name="canCaptureFingerprintGestures" />
+        <public name="alphabeticModifiers" />
+        <public name="numericModifiers" />
     </public-group>
 
     <public-group type="style" first-id="0x010302e0">
diff --git a/core/tests/coretests/src/android/provider/SettingsTest.java b/core/tests/coretests/src/android/provider/SettingsTest.java
index 1ff2056..019f837 100644
--- a/core/tests/coretests/src/android/provider/SettingsTest.java
+++ b/core/tests/coretests/src/android/provider/SettingsTest.java
@@ -384,7 +384,6 @@
                  Settings.Secure.AUTO_FILL_SERVICE,
                  Settings.Secure.AUTOMATIC_STORAGE_MANAGER_BYTES_CLEARED,
                  Settings.Secure.AUTOMATIC_STORAGE_MANAGER_DAYS_TO_RETAIN,
-                 Settings.Secure.AUTOMATIC_STORAGE_MANAGER_DOWNLOADS_DAYS_TO_RETAIN,
                  Settings.Secure.AUTOMATIC_STORAGE_MANAGER_ENABLED,
                  Settings.Secure.AUTOMATIC_STORAGE_MANAGER_LAST_RUN,
                  Settings.Secure.BACKUP_AUTO_RESTORE,
@@ -402,9 +401,6 @@
                  Settings.Secure.DISABLED_PRINT_SERVICES,
                  Settings.Secure.DISABLED_SYSTEM_INPUT_METHODS,
                  Settings.Secure.DISPLAY_DENSITY_FORCED,
-                 Settings.Secure.DOWNLOADS_BACKUP_ALLOW_METERED,  // Candidate?
-                 Settings.Secure.DOWNLOADS_BACKUP_CHARGING_ONLY, // Candidate?
-                 Settings.Secure.DOWNLOADS_BACKUP_ENABLED, // Candidate?
                  Settings.Secure.DOZE_ALWAYS_ON,
                  Settings.Secure.EMERGENCY_ASSISTANCE_APPLICATION,
                  Settings.Secure.ENABLED_NOTIFICATION_ASSISTANT,
diff --git a/core/tests/coretests/src/com/android/internal/inputmethod/InputMethodSubtypeSwitchingControllerTest.java b/core/tests/coretests/src/com/android/internal/inputmethod/InputMethodSubtypeSwitchingControllerTest.java
index dc75417..686f75b 100644
--- a/core/tests/coretests/src/com/android/internal/inputmethod/InputMethodSubtypeSwitchingControllerTest.java
+++ b/core/tests/coretests/src/com/android/internal/inputmethod/InputMethodSubtypeSwitchingControllerTest.java
@@ -364,39 +364,62 @@
     public void testImeSubtypeListComparator() throws Exception {
         {
             final List<ImeSubtypeListItem> items = Arrays.asList(
-                    createDummyItem("X", "A", "en_US", 0, "en_US"),
-                    createDummyItem("X", "A", "en", 1, "en_US"),
-                    createDummyItem("X", "A", "ja", 2, "en_US"),
+                    // Subtypes of IME "X".
+                    // Subtypes that has the same locale of the system's.
+                    createDummyItem("X", "E", "en_US", 0, "en_US"),
                     createDummyItem("X", "Z", "en_US", 3, "en_US"),
-                    createDummyItem("X", "Z", "en", 4, "en_US"),
-                    createDummyItem("X", "Z", "ja", 5, "en_US"),
                     createDummyItem("X", "", "en_US", 6, "en_US"),
+                    // Subtypes that has the same language of the system's.
+                    createDummyItem("X", "E", "en", 1, "en_US"),
+                    createDummyItem("X", "Z", "en", 4, "en_US"),
                     createDummyItem("X", "", "en", 7, "en_US"),
+                    // Subtypes that has different language than the system's.
+                    createDummyItem("X", "A", "hi_IN", 27, "en_US"),
+                    createDummyItem("X", "E", "ja", 2, "en_US"),
+                    createDummyItem("X", "Z", "ja", 5, "en_US"),
                     createDummyItem("X", "", "ja", 8, "en_US"),
-                    createDummyItem("Y", "A", "en_US", 9, "en_US"),
-                    createDummyItem("Y", "A", "en", 10, "en_US"),
-                    createDummyItem("Y", "A", "ja", 11, "en_US"),
+
+                    // Subtypes of IME "Y".
+                    // Subtypes that has the same locale of the system's.
+                    createDummyItem("Y", "E", "en_US", 9, "en_US"),
                     createDummyItem("Y", "Z", "en_US", 12, "en_US"),
-                    createDummyItem("Y", "Z", "en", 13, "en_US"),
-                    createDummyItem("Y", "Z", "ja", 14, "en_US"),
                     createDummyItem("Y", "", "en_US", 15, "en_US"),
+                    // Subtypes that has the same language of the system's.
+                    createDummyItem("Y", "E", "en", 10, "en_US"),
+                    createDummyItem("Y", "Z", "en", 13, "en_US"),
                     createDummyItem("Y", "", "en", 16, "en_US"),
+                    // Subtypes that has different language than the system's.
+                    createDummyItem("Y", "A", "hi_IN", 28, "en_US"),
+                    createDummyItem("Y", "E", "ja", 11, "en_US"),
+                    createDummyItem("Y", "Z", "ja", 14, "en_US"),
                     createDummyItem("Y", "", "ja", 17, "en_US"),
-                    createDummyItem("", "A", "en_US", 18, "en_US"),
-                    createDummyItem("", "A", "en", 19, "en_US"),
-                    createDummyItem("", "A", "ja", 20, "en_US"),
+
+                    // Subtypes of IME "".
+                    // Subtypes that has the same locale of the system's.
+                    createDummyItem("", "E", "en_US", 18, "en_US"),
                     createDummyItem("", "Z", "en_US", 21, "en_US"),
-                    createDummyItem("", "Z", "en", 22, "en_US"),
-                    createDummyItem("", "Z", "ja", 23, "en_US"),
                     createDummyItem("", "", "en_US", 24, "en_US"),
+                    // Subtypes that has the same language of the system's.
+                    createDummyItem("", "E", "en", 19, "en_US"),
+                    createDummyItem("", "Z", "en", 22, "en_US"),
                     createDummyItem("", "", "en", 25, "en_US"),
+                    // Subtypes that has different language than the system's.
+                    createDummyItem("", "A", "hi_IN", 29, "en_US"),
+                    createDummyItem("", "E", "ja", 20, "en_US"),
+                    createDummyItem("", "Z", "ja", 23, "en_US"),
                     createDummyItem("", "", "ja", 26, "en_US"));
 
+            // Ensure {@link java.lang.Comparable#compareTo} contracts are satisfied.
             for (int i = 0; i < items.size(); ++i) {
-                assertEquals(0, items.get(i).compareTo(items.get(i)));
+                final ImeSubtypeListItem item1 = items.get(i);
+                // Ensures sgn(x.compareTo(y)) == -sgn(y.compareTo(x)).
+                assertTrue(item1 + " has the same order of itself", item1.compareTo(item1) == 0);
+                // Ensures (x.compareTo(y) > 0 && y.compareTo(z) > 0) implies x.compareTo(z) > 0.
                 for (int j = i + 1; j < items.size(); ++j) {
-                    assertTrue(items.get(i).compareTo(items.get(j)) < 0);
-                    assertTrue(items.get(j).compareTo(items.get(i)) > 0);
+                    final ImeSubtypeListItem item2 = items.get(j);
+                    // Ensures sgn(x.compareTo(y)) == -sgn(y.compareTo(x)).
+                    assertTrue(item1 + " is less than " + item2, item1.compareTo(item2) < 0);
+                    assertTrue(item2 + " is greater than " + item1, item2.compareTo(item1) > 0);
                 }
             }
         }
@@ -404,11 +427,14 @@
         {
             // Following two items have the same priority.
             final ImeSubtypeListItem nonSystemLocale1 =
-                    createDummyItem("X", "A", "ja_JP", 0, "en_us");
+                    createDummyItem("X", "A", "ja_JP", 0, "en_US");
             final ImeSubtypeListItem nonSystemLocale2 =
-                    createDummyItem("X", "A", "hi_IN", 1, "en_us");
-            assertEquals(0, nonSystemLocale1.compareTo(nonSystemLocale2));
-            assertEquals(0, nonSystemLocale2.compareTo(nonSystemLocale1));
+                    createDummyItem("X", "A", "hi_IN", 1, "en_US");
+            assertTrue(nonSystemLocale1.compareTo(nonSystemLocale2) == 0);
+            assertTrue(nonSystemLocale2.compareTo(nonSystemLocale1) == 0);
+            // But those aren't equal to each other.
+            assertFalse(nonSystemLocale1.equals(nonSystemLocale2));
+            assertFalse(nonSystemLocale2.equals(nonSystemLocale1));
         }
     }
 }
diff --git a/graphics/java/android/graphics/BitmapFactory.java b/graphics/java/android/graphics/BitmapFactory.java
index 64a726b..a3c6c6e 100644
--- a/graphics/java/android/graphics/BitmapFactory.java
+++ b/graphics/java/android/graphics/BitmapFactory.java
@@ -350,11 +350,17 @@
 
         /**
          * If known, this string is set to the mimetype of the decoded image.
-         * If not know, or there is an error, it is set to null.
+         * If not known, or there is an error, it is set to null.
          */
         public String outMimeType;
 
         /**
+         * If known, the config the decoded bitmap will have.
+         * If not known, or there is an error, it is set to null.
+         */
+        public Bitmap.Config outConfig;
+
+        /**
          * Temp storage to use for decoding.  Suggest 16K or so.
          */
         public byte[] inTempStorage;
diff --git a/libs/androidfw/include/androidfw/StringPiece.h b/libs/androidfw/include/androidfw/StringPiece.h
index 8f6824b..a873d66 100644
--- a/libs/androidfw/include/androidfw/StringPiece.h
+++ b/libs/androidfw/include/androidfw/StringPiece.h
@@ -271,8 +271,36 @@
   return out.write(str.data(), str.size());
 }
 
+template <typename TChar>
+inline ::std::basic_string<TChar>& operator+=(::std::basic_string<TChar>& lhs,
+                                              const BasicStringPiece<TChar>& rhs) {
+  return lhs.append(rhs.data(), rhs.size());
+}
+
+template <typename TChar>
+inline bool operator==(const ::std::basic_string<TChar>& lhs, const BasicStringPiece<TChar>& rhs) {
+  return rhs == lhs;
+}
+
+template <typename TChar>
+inline bool operator!=(const ::std::basic_string<TChar>& lhs, const BasicStringPiece<TChar>& rhs) {
+  return rhs != lhs;
+}
+
 }  // namespace android
 
+inline ::std::ostream& operator<<(::std::ostream& out, const std::u16string& str) {
+  ssize_t utf8_len = utf16_to_utf8_length(str.data(), str.size());
+  if (utf8_len < 0) {
+    return out << "???";
+  }
+
+  std::string utf8;
+  utf8.resize(static_cast<size_t>(utf8_len));
+  utf16_to_utf8(str.data(), str.size(), &*utf8.begin(), utf8_len + 1);
+  return out << utf8;
+}
+
 namespace std {
 
 template <typename TChar>
diff --git a/libs/hwui/Android.mk b/libs/hwui/Android.mk
index 692199d..ff40c8a 100644
--- a/libs/hwui/Android.mk
+++ b/libs/hwui/Android.mk
@@ -189,13 +189,11 @@
     external/harfbuzz_ng/src \
     external/freetype/include
 
-ifneq (false,$(ANDROID_ENABLE_RENDERSCRIPT))
-    hwui_cflags += -DANDROID_ENABLE_RENDERSCRIPT
-    hwui_c_includes += \
-        $(call intermediates-dir-for,STATIC_LIBRARIES,TARGET,) \
-        frameworks/rs/cpp \
-        frameworks/rs
-endif
+# enable RENDERSCRIPT
+hwui_c_includes += \
+    $(call intermediates-dir-for,STATIC_LIBRARIES,TARGET,) \
+    frameworks/rs/cpp \
+    frameworks/rs
 
 # ------------------------
 # static library
diff --git a/libs/hwui/DisplayList.cpp b/libs/hwui/DisplayList.cpp
index 3853356..0ff101c 100644
--- a/libs/hwui/DisplayList.cpp
+++ b/libs/hwui/DisplayList.cpp
@@ -22,6 +22,7 @@
 #include "DamageAccumulator.h"
 #include "Debug.h"
 #include "DisplayList.h"
+#include "OpDumper.h"
 #include "RecordedOp.h"
 #include "RenderNode.h"
 #include "VectorDrawable.h"
@@ -127,5 +128,17 @@
     return isDirty;
 }
 
+void DisplayList::output(std::ostream& output, uint32_t level) {
+    for (auto&& op : getOps()) {
+        OpDumper::dump(*op, output, level + 1);
+        if (op->opId == RecordedOpId::RenderNodeOp) {
+            auto rnOp = reinterpret_cast<const RenderNodeOp*>(op);
+            rnOp->renderNode->output(output, level + 1);
+        } else {
+            output << std::endl;
+        }
+    }
+}
+
 }; // namespace uirenderer
 }; // namespace android
diff --git a/libs/hwui/DisplayList.h b/libs/hwui/DisplayList.h
index ef0fd31..d22a764 100644
--- a/libs/hwui/DisplayList.h
+++ b/libs/hwui/DisplayList.h
@@ -128,6 +128,8 @@
     virtual bool prepareListAndChildren(TreeObserver& observer, TreeInfo& info, bool functorsNeedLayer,
             std::function<void(RenderNode*, TreeObserver&, TreeInfo&, bool)> childFn);
 
+    virtual void output(std::ostream& output, uint32_t level);
+
 protected:
     // allocator into which all ops and LsaVector arrays allocated
     LinearAllocator allocator;
diff --git a/libs/hwui/FontRenderer.cpp b/libs/hwui/FontRenderer.cpp
index 4f9a3de..ee99018 100644
--- a/libs/hwui/FontRenderer.cpp
+++ b/libs/hwui/FontRenderer.cpp
@@ -33,14 +33,11 @@
 
 #include <algorithm>
 #include <cutils/properties.h>
+#include <RenderScript.h>
 #include <SkGlyph.h>
 #include <SkUtils.h>
 #include <utils/Log.h>
 
-#ifdef ANDROID_ENABLE_RENDERSCRIPT
-#include <RenderScript.h>
-#endif
-
 namespace android {
 namespace uirenderer {
 
@@ -591,17 +588,12 @@
         return image;
     }
 
-#ifdef ANDROID_ENABLE_RENDERSCRIPT
     // Align buffers for renderscript usage
     if (paddedWidth & (RS_CPU_ALLOCATION_ALIGNMENT - 1)) {
         paddedWidth += RS_CPU_ALLOCATION_ALIGNMENT - paddedWidth % RS_CPU_ALLOCATION_ALIGNMENT;
     }
     int size = paddedWidth * paddedHeight;
     uint8_t* dataBuffer = (uint8_t*) memalign(RS_CPU_ALLOCATION_ALIGNMENT, size);
-#else
-    int size = paddedWidth * paddedHeight;
-    uint8_t* dataBuffer = (uint8_t*) malloc(size);
-#endif
 
     memset(dataBuffer, 0, size);
 
@@ -691,7 +683,6 @@
 
 void FontRenderer::blurImage(uint8_t** image, int32_t width, int32_t height, float radius) {
     uint32_t intRadius = Blur::convertRadiusToInt(radius);
-#ifdef ANDROID_ENABLE_RENDERSCRIPT
     if (width * height * intRadius >= RS_MIN_INPUT_CUTOFF && radius <= 25.0f) {
         uint8_t* outImage = (uint8_t*) memalign(RS_CPU_ALLOCATION_ALIGNMENT, width * height);
 
@@ -729,7 +720,6 @@
             return;
         }
     }
-#endif
 
     std::unique_ptr<float[]> gaussian(new float[2 * intRadius + 1]);
     Blur::generateGaussianWeights(gaussian.get(), radius);
diff --git a/libs/hwui/FontRenderer.h b/libs/hwui/FontRenderer.h
index dd9c40f..329309c 100644
--- a/libs/hwui/FontRenderer.h
+++ b/libs/hwui/FontRenderer.h
@@ -34,7 +34,6 @@
 
 #include <vector>
 
-#ifdef ANDROID_ENABLE_RENDERSCRIPT
 #include "RenderScript.h"
 namespace RSC {
     class Element;
@@ -42,7 +41,6 @@
     class ScriptIntrinsicBlur;
     class sp;
 }
-#endif
 
 namespace android {
 namespace uirenderer {
@@ -201,12 +199,10 @@
     FontCacheHistoryTracker mHistoryTracker;
 #endif
 
-#ifdef ANDROID_ENABLE_RENDERSCRIPT
     // RS constructs
     RSC::sp<RSC::RS> mRs;
     RSC::sp<const RSC::Element> mRsElement;
     RSC::sp<RSC::ScriptIntrinsicBlur> mRsScript;
-#endif
 
     static void computeGaussianWeights(float* weights, int32_t radius);
     static void horizontalBlur(float* weights, int32_t radius, const uint8_t *source, uint8_t *dest,
diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp
index f1c8232..55eeb7f 100644
--- a/libs/hwui/RenderNode.cpp
+++ b/libs/hwui/RenderNode.cpp
@@ -19,7 +19,6 @@
 #include "BakedOpRenderer.h"
 #include "DamageAccumulator.h"
 #include "Debug.h"
-#include "OpDumper.h"
 #include "RecordedOp.h"
 #include "TreeInfo.h"
 #include "utils/FatVector.h"
@@ -99,15 +98,7 @@
     properties().debugOutputProperties(output, level + 1);
 
     if (mDisplayList) {
-        for (auto&& op : mDisplayList->getOps()) {
-            OpDumper::dump(*op, output, level + 1);
-            if (op->opId == RecordedOpId::RenderNodeOp) {
-                auto rnOp = reinterpret_cast<const RenderNodeOp*>(op);
-                rnOp->renderNode->output(output, level + 1);
-            } else {
-                output << std::endl;
-            }
-        }
+        mDisplayList->output(output, level);
     }
     output << std::string(level * 2, ' ') << "/RenderNode(" << getName() << " " << this << ")";
     output << std::endl;
diff --git a/libs/hwui/RenderNode.h b/libs/hwui/RenderNode.h
index a971e83..c4ae82a 100644
--- a/libs/hwui/RenderNode.h
+++ b/libs/hwui/RenderNode.h
@@ -248,6 +248,8 @@
     // Called by CanvasContext when it drops a RenderNode from being a root node
     void clearRoot();
 
+    void output(std::ostream& output, uint32_t level);
+
 private:
     void computeOrderingImpl(RenderNodeOp* opState,
             std::vector<RenderNodeOp*>* compositedChildrenOfProjectionSurface,
@@ -266,7 +268,6 @@
 
     void incParentRefCount() { mParentCount++; }
     void decParentRefCount(TreeObserver& observer, TreeInfo* info = nullptr);
-    void output(std::ostream& output, uint32_t level);
 
     String8 mName;
     sp<VirtualLightRefBase> mUserContext;
diff --git a/libs/hwui/SkiaCanvasProxy.cpp b/libs/hwui/SkiaCanvasProxy.cpp
index f32612d..20ca80b 100644
--- a/libs/hwui/SkiaCanvasProxy.cpp
+++ b/libs/hwui/SkiaCanvasProxy.cpp
@@ -103,6 +103,12 @@
     }
 }
 
+void SkiaCanvasProxy::onDrawArc(const SkRect& rect, SkScalar startAngle, SkScalar sweepAngle,
+                                bool useCenter, const SkPaint& paint) {
+    mCanvas->drawArc(rect.fLeft, rect.fTop, rect.fRight, rect.fBottom,
+                     startAngle, sweepAngle, useCenter, paint);
+}
+
 void SkiaCanvasProxy::onDrawPath(const SkPath& path, const SkPaint& paint) {
     mCanvas->drawPath(path, paint);
 }
diff --git a/libs/hwui/SkiaCanvasProxy.h b/libs/hwui/SkiaCanvasProxy.h
index b3f6c07..3b1dd73 100644
--- a/libs/hwui/SkiaCanvasProxy.h
+++ b/libs/hwui/SkiaCanvasProxy.h
@@ -60,6 +60,8 @@
     virtual void onDrawRect(const SkRect&, const SkPaint&) override;
     virtual void onDrawRRect(const SkRRect&, const SkPaint&) override;
     virtual void onDrawPath(const SkPath& path, const SkPaint&) override;
+    virtual void onDrawArc(const SkRect&, SkScalar startAngle, SkScalar sweepAngle, bool useCenter,
+                           const SkPaint&) override;
     virtual void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top,
                               const SkPaint*) override;
     virtual void onDrawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst,
diff --git a/libs/hwui/Texture.cpp b/libs/hwui/Texture.cpp
index 50af9c8..0dbd767 100644
--- a/libs/hwui/Texture.cpp
+++ b/libs/hwui/Texture.cpp
@@ -282,7 +282,7 @@
         setDefaultParams = true;
     }
 
-    sk_sp<SkColorSpace> sRGB = SkColorSpace::MakeNamed(SkColorSpace::kSRGB_Named);
+    sk_sp<SkColorSpace> sRGB = SkColorSpace::MakeSRGB();
     bool needSRGB = bitmap.info().colorSpace() == sRGB.get();
 
     GLint internalFormat, format, type;
diff --git a/libs/hwui/VectorDrawable.cpp b/libs/hwui/VectorDrawable.cpp
index 208107f..68d3dd5 100644
--- a/libs/hwui/VectorDrawable.cpp
+++ b/libs/hwui/VectorDrawable.cpp
@@ -564,7 +564,7 @@
 #ifndef ANDROID_ENABLE_LINEAR_BLENDING
         sk_sp<SkColorSpace> colorSpace = nullptr;
 #else
-        sk_sp<SkColorSpace> colorSpace = SkColorSpace::MakeNamed(SkColorSpace::kSRGB_Named);
+        sk_sp<SkColorSpace> colorSpace = SkColorSpace::MakeSRGB();
 #endif
         SkImageInfo info = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType, colorSpace);
         cache.bitmap = Bitmap::allocateHeapBitmap(info);
diff --git a/libs/hwui/hwui/Bitmap.cpp b/libs/hwui/hwui/Bitmap.cpp
index 3e10b36..f9730c9 100644
--- a/libs/hwui/hwui/Bitmap.cpp
+++ b/libs/hwui/hwui/Bitmap.cpp
@@ -232,7 +232,7 @@
         return nullptr;
     }
 
-    sk_sp<SkColorSpace> sRGB = SkColorSpace::MakeNamed(SkColorSpace::kSRGB_Named);
+    sk_sp<SkColorSpace> sRGB = SkColorSpace::MakeSRGB();
     bool needSRGB = skBitmap.info().colorSpace() == sRGB.get();
     bool hasSRGB = caches.extensions().hasSRGB();
     GLint format, type, internalFormat;
@@ -324,7 +324,7 @@
     }
     SkImageInfo info = SkImageInfo::Make(graphicBuffer->getWidth(), graphicBuffer->getHeight(),
             kRGBA_8888_SkColorType, kPremul_SkAlphaType,
-            SkColorSpace::MakeNamed(SkColorSpace::kSRGB_Named));
+            SkColorSpace::MakeSRGB());
     return sk_sp<Bitmap>(new Bitmap(graphicBuffer.get(), info));
 }
 
diff --git a/libs/hwui/hwui_static_deps.mk b/libs/hwui/hwui_static_deps.mk
index f69da48..a75fd6a 100644
--- a/libs/hwui/hwui_static_deps.mk
+++ b/libs/hwui/hwui_static_deps.mk
@@ -28,6 +28,5 @@
     libminikin \
     libandroidfw
 
-ifneq (false,$(ANDROID_ENABLE_RENDERSCRIPT))
-    LOCAL_SHARED_LIBRARIES += libRScpp
-endif
+# enable RENDERSCRIPT
+LOCAL_SHARED_LIBRARIES += libRScpp
diff --git a/libs/hwui/pipeline/skia/DumpOpsCanvas.h b/libs/hwui/pipeline/skia/DumpOpsCanvas.h
new file mode 100644
index 0000000..34fb04c
--- /dev/null
+++ b/libs/hwui/pipeline/skia/DumpOpsCanvas.h
@@ -0,0 +1,185 @@
+/*
+ * Copyright (C) 2017 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.
+ */
+
+#pragma once
+
+#include "SkiaDisplayList.h"
+
+namespace android {
+namespace uirenderer {
+namespace skiapipeline {
+
+/**
+ * DumpOpsCanvas prints drawing ops from a SkiaDisplayList into a std::ostream. Children render
+ * nodes are walked recursively and their drawing ops are printed as well.
+ */
+class DumpOpsCanvas : public SkCanvas {
+public:
+    DumpOpsCanvas(std::ostream& output, int level, SkiaDisplayList& displayList)
+            : mOutput(output)
+            , mLevel(level)
+            , mDisplayList(displayList)
+            , mIdent((level + 1) * 2, ' ') {
+    }
+
+protected:
+    void onClipRect(const SkRect& rect, SkClipOp, ClipEdgeStyle) override {
+        mOutput << mIdent << "clipRect" << std::endl;
+    }
+
+    void onClipRRect(const SkRRect& rrect, SkClipOp, ClipEdgeStyle) override {
+        mOutput << mIdent << "clipRRect" << std::endl;
+    }
+
+    void onClipPath(const SkPath& path, SkClipOp, ClipEdgeStyle) override {
+        mOutput << mIdent << "clipPath" << std::endl;
+    }
+
+    void onClipRegion(const SkRegion& deviceRgn, SkClipOp) override {
+        mOutput << mIdent << "clipRegion" << std::endl;
+    }
+
+    void onDrawPaint(const SkPaint&) override {
+        mOutput << mIdent << "drawPaint" << std::endl;
+    }
+
+    void onDrawPath(const SkPath&, const SkPaint&) override {
+        mOutput << mIdent << "drawPath" << std::endl;
+    }
+
+    void onDrawRect(const SkRect&, const SkPaint&) override {
+        mOutput << mIdent << "drawRect" << std::endl;
+    }
+
+    void onDrawRegion(const SkRegion&, const SkPaint&) override {
+        mOutput << mIdent << "drawRegion" << std::endl;
+    }
+
+    void onDrawOval(const SkRect&, const SkPaint&) override {
+        mOutput << mIdent << "drawOval" << std::endl;
+    }
+
+    void onDrawArc(const SkRect&, SkScalar, SkScalar, bool, const SkPaint&) override {
+        mOutput << mIdent << "drawArc" << std::endl;
+    }
+
+    void onDrawRRect(const SkRRect&, const SkPaint&) override {
+        mOutput << mIdent << "drawRRect" << std::endl;
+    }
+
+    void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) override {
+        mOutput << mIdent << "drawDRRect" << std::endl;
+    }
+
+    void onDrawText(const void*, size_t, SkScalar, SkScalar, const SkPaint&) override {
+        mOutput << mIdent << "drawText" << std::endl;
+    }
+
+    void onDrawPosText(const void*, size_t, const SkPoint[], const SkPaint&) override {
+        mOutput << mIdent << "drawPosText" << std::endl;
+    }
+
+    void onDrawPosTextH(const void*, size_t, const SkScalar[], SkScalar,
+            const SkPaint&) override {
+        mOutput << mIdent << "drawPosTextH" << std::endl;
+    }
+
+    void onDrawTextOnPath(const void*, size_t, const SkPath&, const SkMatrix*,
+            const SkPaint&) override {
+        mOutput << mIdent << "drawTextOnPath" << std::endl;
+    }
+
+    void onDrawTextRSXform(const void*, size_t, const SkRSXform[], const SkRect*,
+            const SkPaint&) override {
+        mOutput << mIdent << "drawTextRSXform" << std::endl;
+    }
+
+    void onDrawTextBlob(const SkTextBlob*, SkScalar,SkScalar, const SkPaint&) override {
+        mOutput << mIdent << "drawTextBlob" << std::endl;
+    }
+
+    void onDrawImage(const SkImage*, SkScalar dx, SkScalar dy, const SkPaint*) override {
+        mOutput << mIdent << "drawImage" << std::endl;
+    }
+
+    void onDrawImageNine(const SkImage*, const SkIRect& center, const SkRect& dst,
+            const SkPaint*) override {
+        mOutput << mIdent << "drawImageNine" << std::endl;
+    }
+
+    void onDrawImageRect(const SkImage*, const SkRect*, const SkRect&, const SkPaint*,
+            SrcRectConstraint) override {
+        mOutput << mIdent << "drawImageRect" << std::endl;
+    }
+
+    void onDrawImageLattice(const SkImage*, const Lattice& lattice, const SkRect& dst,
+            const SkPaint*) override {
+        mOutput << mIdent << "drawImageLattice" << std::endl;
+    }
+
+    void onDrawPoints(SkCanvas::PointMode, size_t, const SkPoint[], const SkPaint&) override {
+        mOutput << mIdent << "drawPoints" << std::endl;
+    }
+
+    void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) override {
+        mOutput << mIdent << "drawPicture" << std::endl;
+    }
+
+    void onDrawDrawable(SkDrawable* drawable, const SkMatrix*) override {
+        mOutput << mIdent;
+        auto renderNodeDrawable = getRenderNodeDrawable(drawable);
+        if (nullptr != renderNodeDrawable) {
+            mOutput << std::string(mLevel * 2, ' ') << "drawRenderNode";
+            renderNodeDrawable->getRenderNode()->output(mOutput, mLevel + 1);
+            return;
+        }
+        auto glFunctorDrawable = getGLFunctorDrawable(drawable);
+        if (nullptr != glFunctorDrawable) {
+            mOutput << std::string(mLevel * 2, ' ') << "drawGLFunctorDrawable" << std::endl;
+            return;
+        }
+
+        mOutput << std::string(mLevel * 2, ' ') << "drawDrawable" << std::endl;
+    }
+
+private:
+    RenderNodeDrawable* getRenderNodeDrawable(SkDrawable* drawable) {
+         for (auto& child : mDisplayList.mChildNodes) {
+            if (drawable == &child) {
+                return &child;
+            }
+         }
+         return nullptr;
+    }
+
+    GLFunctorDrawable* getGLFunctorDrawable(SkDrawable* drawable) {
+         for (auto& child : mDisplayList.mChildFunctors) {
+            if (drawable == &child) {
+                return &child;
+            }
+         }
+         return nullptr;
+    }
+
+    std::ostream& mOutput;
+    int mLevel;
+    SkiaDisplayList& mDisplayList;
+    std::string mIdent;
+};
+
+}; // namespace skiapipeline
+}; // namespace uirenderer
+}; // namespace android
diff --git a/libs/hwui/pipeline/skia/SkiaDisplayList.cpp b/libs/hwui/pipeline/skia/SkiaDisplayList.cpp
index 36d02ecb..b4babcb 100644
--- a/libs/hwui/pipeline/skia/SkiaDisplayList.cpp
+++ b/libs/hwui/pipeline/skia/SkiaDisplayList.cpp
@@ -18,6 +18,7 @@
 
 #include "renderthread/CanvasContext.h"
 #include "VectorDrawable.h"
+#include "DumpOpsCanvas.h"
 
 #include <SkImagePriv.h>
 
@@ -116,6 +117,11 @@
     new (&allocator) LinearAllocator();
 }
 
+void SkiaDisplayList::output(std::ostream& output, uint32_t level) {
+    DumpOpsCanvas canvas(output, level, *this);
+    mDrawable->draw(&canvas, nullptr);
+}
+
 }; // namespace skiapipeline
 }; // namespace uirenderer
 }; // namespace android
diff --git a/libs/hwui/pipeline/skia/SkiaDisplayList.h b/libs/hwui/pipeline/skia/SkiaDisplayList.h
index 2a01330..439b999 100644
--- a/libs/hwui/pipeline/skia/SkiaDisplayList.h
+++ b/libs/hwui/pipeline/skia/SkiaDisplayList.h
@@ -126,6 +126,8 @@
      */
     inline bool containsProjectionReceiver() const { return mProjectionReceiver; }
 
+    void output(std::ostream& output, uint32_t level) override;
+
     /**
      * We use std::deque here because (1) we need to iterate through these
      * elements and (2) mDrawable holds pointers to the elements, so they cannot
diff --git a/libs/hwui/tests/unit/SkiaBehaviorTests.cpp b/libs/hwui/tests/unit/SkiaBehaviorTests.cpp
index f32d97a..03e6b7f 100644
--- a/libs/hwui/tests/unit/SkiaBehaviorTests.cpp
+++ b/libs/hwui/tests/unit/SkiaBehaviorTests.cpp
@@ -93,7 +93,7 @@
 }
 
 TEST(SkiaBehavior, srgbColorSpaceIsSingleton) {
-    sk_sp<SkColorSpace> sRGB1 = SkColorSpace::MakeNamed(SkColorSpace::kSRGB_Named);
-    sk_sp<SkColorSpace> sRGB2 = SkColorSpace::MakeNamed(SkColorSpace::kSRGB_Named);
+    sk_sp<SkColorSpace> sRGB1 = SkColorSpace::MakeSRGB();
+    sk_sp<SkColorSpace> sRGB2 = SkColorSpace::MakeSRGB();
     ASSERT_EQ(sRGB1.get(), sRGB2.get());
 }
diff --git a/libs/hwui/utils/TestWindowContext.cpp b/libs/hwui/utils/TestWindowContext.cpp
index 79fc864..ecad7be 100644
--- a/libs/hwui/utils/TestWindowContext.cpp
+++ b/libs/hwui/utils/TestWindowContext.cpp
@@ -109,7 +109,7 @@
     }
 
     bool capturePixels(SkBitmap* bmp) {
-        sk_sp<SkColorSpace> colorSpace = SkColorSpace::MakeNamed(SkColorSpace::kSRGB_Named);
+        sk_sp<SkColorSpace> colorSpace = SkColorSpace::MakeSRGB();
         SkImageInfo destinationConfig =
             SkImageInfo::Make(mSize.width(), mSize.height(),
                               kRGBA_8888_SkColorType, kPremul_SkAlphaType, colorSpace);
diff --git a/media/java/android/media/MediaRecorder.java b/media/java/android/media/MediaRecorder.java
index 3e88450..7a6499d 100644
--- a/media/java/android/media/MediaRecorder.java
+++ b/media/java/android/media/MediaRecorder.java
@@ -910,7 +910,7 @@
      * not start another recording session during recording.
      *
      * @throws IllegalStateException if it is called before
-     * prepare().
+     * prepare() or when the camera is already in use by another app.
      */
     public native void start() throws IllegalStateException;
 
diff --git a/native/android/Android.mk b/native/android/Android.mk
index f510b48..f8405ef 100644
--- a/native/android/Android.mk
+++ b/native/android/Android.mk
@@ -12,10 +12,12 @@
     choreographer.cpp \
     configuration.cpp \
     hardware_buffer.cpp \
+    hardware_buffer_jni.cpp \
     input.cpp \
     looper.cpp \
     native_activity.cpp \
     native_window.cpp \
+    native_window_jni.cpp \
     net.c \
     obb.cpp \
     sensor.cpp \
diff --git a/native/android/hardware_buffer.cpp b/native/android/hardware_buffer.cpp
index e5e928d..77ebd52 100644
--- a/native/android/hardware_buffer.cpp
+++ b/native/android/hardware_buffer.cpp
@@ -16,24 +16,25 @@
 
 #define LOG_TAG "AHardwareBuffer"
 
-#include <android/hardware_buffer_jni.h>
+#include <android/hardware_buffer.h>
 
 #include <errno.h>
 #include <sys/socket.h>
 
 #include <memory>
 
-#include <android_runtime/android_hardware_HardwareBuffer.h>
-#include <binder/Binder.h>
-#include <binder/Parcel.h>
-#include <binder/IServiceManager.h>
 #include <cutils/native_handle.h>
+
+#include <utils/Log.h>
+
+#include <ui/GraphicBuffer.h>
+
+#include <binder/IServiceManager.h>
 #include <gui/ISurfaceComposer.h>
 #include <gui/IGraphicBufferAlloc.h>
-#include <hardware/gralloc1.h>
-#include <ui/GraphicBuffer.h>
-#include <utils/Flattenable.h>
-#include <utils/Log.h>
+
+#include <android_runtime/android_hardware_HardwareBuffer.h>
+
 
 static constexpr int kDataBufferSize = 64 * sizeof(int);  // 64 ints
 
@@ -299,19 +300,3 @@
     const GraphicBuffer* gbuffer = AHardwareBuffer_to_GraphicBuffer(buffer);
     return gbuffer->handle;
 }
-
-// ----------------------------------------------------------------------------
-// JNI functions
-// ----------------------------------------------------------------------------
-
-AHardwareBuffer* AHardwareBuffer_fromHardwareBuffer(JNIEnv* env,
-        jobject hardwareBufferObj) {
-    return android_hardware_HardwareBuffer_getNativeHardwareBuffer(env,
-            hardwareBufferObj);
-}
-
-jobject AHardwareBuffer_toHardwareBuffer(JNIEnv* env,
-        AHardwareBuffer* hardwareBuffer) {
-    return android_hardware_HardwareBuffer_createFromAHardwareBuffer(env,
-            hardwareBuffer);
-}
diff --git a/native/android/hardware_buffer_jni.cpp b/native/android/hardware_buffer_jni.cpp
new file mode 100644
index 0000000..06b0782
--- /dev/null
+++ b/native/android/hardware_buffer_jni.cpp
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2017 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.
+ */
+
+#define LOG_TAG "AHardwareBuffer"
+
+#include <android/hardware_buffer_jni.h>
+
+#include <android_runtime/android_hardware_HardwareBuffer.h>
+
+using namespace android;
+
+AHardwareBuffer* AHardwareBuffer_fromHardwareBuffer(JNIEnv* env, jobject hardwareBufferObj) {
+    return android_hardware_HardwareBuffer_getNativeHardwareBuffer(env, hardwareBufferObj);
+}
+
+jobject AHardwareBuffer_toHardwareBuffer(JNIEnv* env, AHardwareBuffer* hardwareBuffer) {
+    return android_hardware_HardwareBuffer_createFromAHardwareBuffer(env, hardwareBuffer);
+}
diff --git a/native/android/native_window.cpp b/native/android/native_window.cpp
index ca0c9028..8c080d7 100644
--- a/native/android/native_window.cpp
+++ b/native/android/native_window.cpp
@@ -15,22 +15,9 @@
  */
 
 #define LOG_TAG "Surface"
-#include <utils/Log.h>
 
-#include <android/native_window_jni.h>
-#include <gui/Surface.h>
-#include <android_runtime/android_view_Surface.h>
-#include <android_runtime/android_graphics_SurfaceTexture.h>
-
-using namespace android;
-
-ANativeWindow* ANativeWindow_fromSurface(JNIEnv* env, jobject surface) {
-    sp<ANativeWindow> win = android_view_Surface_getNativeWindow(env, surface);
-    if (win != NULL) {
-        win->incStrong((void*)ANativeWindow_acquire);
-    }
-    return win.get();
-}
+#include <android/native_window.h>
+#include <system/window.h>
 
 void ANativeWindow_acquire(ANativeWindow* window) {
     window->incStrong((void*)ANativeWindow_acquire);
diff --git a/native/android/native_window_jni.cpp b/native/android/native_window_jni.cpp
new file mode 100644
index 0000000..dc30405
--- /dev/null
+++ b/native/android/native_window_jni.cpp
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2017 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.
+ */
+
+#define LOG_TAG "Surface"
+
+#include <android/native_window_jni.h>
+#include <android/native_window.h>
+#include <system/window.h>
+
+#include <utils/StrongPointer.h>
+
+#include <android_runtime/android_view_Surface.h>
+
+using namespace android;
+
+ANativeWindow* ANativeWindow_fromSurface(JNIEnv* env, jobject surface) {
+    sp<ANativeWindow> win = android_view_Surface_getNativeWindow(env, surface);
+    if (win != NULL) {
+        win->incStrong((void*)ANativeWindow_fromSurface);
+    }
+    return win.get();
+}
diff --git a/packages/Keyguard/Android.mk b/packages/Keyguard/Android.mk
deleted file mode 100644
index 38cf559..0000000
--- a/packages/Keyguard/Android.mk
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright (C) 2013 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.
-#
-
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := SystemUI-tags
-
-LOCAL_SRC_FILES := src/com/android/systemui/EventLogTags.logtags
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-# ------------------
-
-include $(CLEAR_VARS)
-
-LOCAL_USE_AAPT2 := true
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-subdir-Iaidl-files)
-
-LOCAL_MODULE := Keyguard
-
-LOCAL_CERTIFICATE := platform
-
-LOCAL_JAVA_LIBRARIES := SettingsLib
-
-LOCAL_STATIC_JAVA_LIBRARIES = SystemUI-tags
-
-LOCAL_PRIVILEGED_MODULE := true
-
-LOCAL_PROGUARD_FLAG_FILES := proguard.flags
-
-LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-
-LOCAL_JAR_EXCLUDE_FILES := none
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-#include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/packages/Keyguard/test/Android.mk b/packages/Keyguard/test/Android.mk
deleted file mode 100644
index 54224b7..0000000
--- a/packages/Keyguard/test/Android.mk
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright (C) 2013 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.
-#
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_USE_AAPT2 := true
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_PACKAGE_NAME := KeyguardTest
-
-# Remove these to verify permission checks are working correctly
-LOCAL_CERTIFICATE := platform
-LOCAL_PRIVILEGED_MODULE := true
-
-# LOCAL_PROGUARD_FLAG_FILES := proguard.flags
-
-include $(BUILD_PACKAGE)
diff --git a/packages/Keyguard/test/AndroidManifest.xml b/packages/Keyguard/test/AndroidManifest.xml
deleted file mode 100644
index 1638127..0000000
--- a/packages/Keyguard/test/AndroidManifest.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2013, 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.
-*/
--->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.android.keyguard.test">
-    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="17"/>
-    <uses-permission android:name="android.permission.CONTROL_KEYGUARD" />
-    <application android:label="@string/app_name" android:icon="@drawable/app_icon">
-        <activity android:name=".KeyguardTestActivity"
-                android:label="@string/app_name"
-                android:theme="@android:style/Theme.DeviceDefault.Light">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-    </application>
-</manifest>
diff --git a/packages/Keyguard/test/SampleTrustAgent/Android.mk b/packages/Keyguard/test/SampleTrustAgent/Android.mk
deleted file mode 100644
index 6ffb018..0000000
--- a/packages/Keyguard/test/SampleTrustAgent/Android.mk
+++ /dev/null
@@ -1,34 +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.
-#
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_USE_AAPT2 := true
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_PACKAGE_NAME := SampleTrustAgent
-
-# Remove this to verify permission checks are working correctly
-LOCAL_CERTIFICATE := platform
-
-LOCAL_MODULE_TAGS := tests
-
-# LOCAL_PROGUARD_FLAG_FILES := proguard.flags
-
-LOCAL_STATIC_ANDROID_LIBRARIES := android-support-v4
-
-include $(BUILD_PACKAGE)
diff --git a/packages/Keyguard/test/SampleTrustAgent/AndroidManifest.xml b/packages/Keyguard/test/SampleTrustAgent/AndroidManifest.xml
deleted file mode 100644
index edcea0e..0000000
--- a/packages/Keyguard/test/SampleTrustAgent/AndroidManifest.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?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
-  -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.android.trustagent.test">
-    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="17"/>
-    <uses-permission android:name="android.permission.CONTROL_KEYGUARD" />
-    <uses-permission android:name="android.permission.PROVIDE_TRUST_AGENT" />
-    <application android:label="@string/app_name">
-      <service
-          android:name=".SampleTrustAgent"
-          android:label="@string/app_name"
-          android:permission="android.permission.BIND_TRUST_AGENT"
-          android:directBootAware="true"
-          android:exported="true">
-        <intent-filter>
-          <action android:name="android.service.trust.TrustAgentService" />
-          <category android:name="android.intent.category.DEFAULT" />
-        </intent-filter>
-        <meta-data android:name="android.service.trust.trustagent"
-                   android:resource="@xml/sample_trust_agent"/>
-      </service>
-
-      <activity
-          android:name=".SampleTrustAgentSettings"
-          android:label="@string/app_name"
-          android:exported="true"
-          android:launchMode="singleInstance" >
-          <intent-filter>
-              <action android:name="android.intent.action.MAIN" />
-              <category android:name="android.intent.category.LAUNCHER" />
-          </intent-filter>
-      </activity>
-    </application>
-</manifest>
diff --git a/packages/Keyguard/test/SampleTrustAgent/res/layout-v26/sample_trust_agent_settings.xml b/packages/Keyguard/test/SampleTrustAgent/res/layout-v26/sample_trust_agent_settings.xml
deleted file mode 100644
index 4669971..0000000
--- a/packages/Keyguard/test/SampleTrustAgent/res/layout-v26/sample_trust_agent_settings.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?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
-  -->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-        android:orientation="vertical"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent">
-    <Button android:id="@+id/enable_trust"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:text="Grant trust for 30 seconds" />
-    <Button android:id="@+id/revoke_trust"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:text="Revoke trust" />
-    <Button android:id="@+id/crash"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:text="Crash" />
-    <CheckBox android:id="@+id/managing_trust"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:paddingTop="8dp"
-            android:paddingBottom="8dp"
-            android:text="Managing trust" />
-    <CheckBox android:id="@+id/managing_trust_direct_boot"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:paddingTop="8dp"
-            android:paddingBottom="8dp"
-            android:text="Managing trust direct boot"/>
-
-    <CheckBox android:id="@+id/report_unlock_attempts"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:paddingTop="8dp"
-            android:paddingBottom="8dp"
-            android:text="Report unlock attempts" />
-    <CheckBox android:id="@+id/report_device_locked"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:paddingTop="8dp"
-            android:paddingBottom="8dp"
-            android:text="Report device locked or unlocked" />
-
-    <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content">
-        <Button android:id="@+id/check_device_locked"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="Device locked?" />
-        <TextView android:id="@+id/check_device_locked_result"
-                android:layout_width="0dp"
-                android:layout_height="wrap_content"
-                android:layout_weight="1" />
-    </LinearLayout>
-
-</LinearLayout>
\ No newline at end of file
diff --git a/packages/Keyguard/test/SampleTrustAgent/res/layout/sample_trust_agent_settings.xml b/packages/Keyguard/test/SampleTrustAgent/res/layout/sample_trust_agent_settings.xml
deleted file mode 100644
index 00193ed8..0000000
--- a/packages/Keyguard/test/SampleTrustAgent/res/layout/sample_trust_agent_settings.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?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
-  -->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-        android:orientation="vertical"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent">
-    <Button android:id="@+id/enable_trust"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:text="Grant trust for 30 seconds" />
-    <Button android:id="@+id/revoke_trust"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:text="Revoke trust" />
-    <Button android:id="@+id/crash"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:text="Crash" />
-    <CheckBox android:id="@+id/managing_trust"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:paddingTop="8dp"
-            android:paddingBottom="8dp"
-            android:text="Managing trust" />
-    <CheckBox android:id="@+id/report_unlock_attempts"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:paddingTop="8dp"
-            android:paddingBottom="8dp"
-            android:text="Report unlock attempts" />
-    <CheckBox android:id="@+id/report_device_locked"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:paddingTop="8dp"
-            android:paddingBottom="8dp"
-            android:text="Report device locked or unlocked" />
-
-    <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content">
-        <Button android:id="@+id/check_device_locked"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="Device locked?" />
-        <TextView android:id="@+id/check_device_locked_result"
-                android:layout_width="0dp"
-                android:layout_height="wrap_content"
-                android:layout_weight="1" />
-    </LinearLayout>
-
-</LinearLayout>
\ No newline at end of file
diff --git a/packages/Keyguard/test/SampleTrustAgent/res/values/strings.xml b/packages/Keyguard/test/SampleTrustAgent/res/values/strings.xml
deleted file mode 100644
index 0c6b502..0000000
--- a/packages/Keyguard/test/SampleTrustAgent/res/values/strings.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?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>
-    <string name="app_name">Sample Trust Agent</string>
-</resources>
\ No newline at end of file
diff --git a/packages/Keyguard/test/SampleTrustAgent/res/xml-v26/sample_trust_agent.xml b/packages/Keyguard/test/SampleTrustAgent/res/xml-v26/sample_trust_agent.xml
deleted file mode 100644
index 26d5aa0..0000000
--- a/packages/Keyguard/test/SampleTrustAgent/res/xml-v26/sample_trust_agent.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?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
-  -->
-<trust-agent xmlns:android="http://schemas.android.com/apk/res/android"
-             android:settingsActivity=".SampleTrustAgentSettings"
-             android:unlockProfile="true" />
diff --git a/packages/Keyguard/test/SampleTrustAgent/res/xml/sample_trust_agent.xml b/packages/Keyguard/test/SampleTrustAgent/res/xml/sample_trust_agent.xml
deleted file mode 100644
index 6cd34bb..0000000
--- a/packages/Keyguard/test/SampleTrustAgent/res/xml/sample_trust_agent.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?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
-  -->
-<trust-agent xmlns:android="http://schemas.android.com/apk/res/android"
-             android:settingsActivity=".SampleTrustAgentSettings" />
diff --git a/packages/Keyguard/test/SampleTrustAgent/src/com/android/trustagent/test/SampleTrustAgent.java b/packages/Keyguard/test/SampleTrustAgent/src/com/android/trustagent/test/SampleTrustAgent.java
deleted file mode 100644
index 4b50cf8..0000000
--- a/packages/Keyguard/test/SampleTrustAgent/src/com/android/trustagent/test/SampleTrustAgent.java
+++ /dev/null
@@ -1,268 +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.trustagent.test;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.SharedPreferences;
-import android.os.PersistableBundle;
-import android.os.UserManager;
-import android.preference.PreferenceManager;
-import android.service.trust.TrustAgentService;
-import android.support.v4.content.LocalBroadcastManager;
-import android.util.Log;
-import android.widget.Toast;
-
-import java.util.List;
-
-public class SampleTrustAgent extends TrustAgentService
-        implements SharedPreferences.OnSharedPreferenceChangeListener {
-
-    /**
-     * If true, allows anyone to control this trust agent, e.g. using adb:
-     * <pre>
-     * $ adb shell am broadcast -a action.sample_trust_agent.grant_trust\
-     *  -e extra.message SampleTrust\
-     *  --el extra.duration 1000 --ez extra.init_by_user false --ez extra.dismiss_keyguard false
-     * </pre>
-     */
-    private static final boolean ALLOW_EXTERNAL_BROADCASTS = false;
-
-    LocalBroadcastManager mLocalBroadcastManager;
-
-    private static final String ACTION_GRANT_TRUST = "action.sample_trust_agent.grant_trust";
-    private static final String ACTION_REVOKE_TRUST = "action.sample_trust_agent.revoke_trust";
-
-    private static final String EXTRA_MESSAGE = "extra.message";
-    private static final String EXTRA_DURATION = "extra.duration";
-    private static final String EXTRA_INITIATED_BY_USER = "extra.init_by_user";
-    private static final String EXTRA_DISMISS_KEYGUARD = "extra.dismiss_keyguard";
-
-    private static final String PREFERENCE_REPORT_UNLOCK_ATTEMPTS
-            = "preference.report_unlock_attempts";
-    private static final String PREFERENCE_MANAGING_TRUST
-            = "preference.managing_trust";
-    private static final String PREFERENCE_MANAGING_TRUST_DIRECT_BOOT
-            = "preference.managing_trust_direct_boot";
-    private static final String PREFERENCE_REPORT_DEVICE_LOCKED = "preference.report_device_locked";
-
-    private static final String TAG = "SampleTrustAgent";
-
-    private static final BroadcastReceiver mUnlockReceiver = new BroadcastReceiver() {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-
-        }
-    };
-
-    private boolean mIsUserUnlocked;
-
-    @Override
-    public void onCreate() {
-        super.onCreate();
-        UserManager um = (UserManager) getSystemService(Context.USER_SERVICE);
-        mIsUserUnlocked = um.isUserUnlocked();
-        Log.i(TAG,, "onCreate, is user unlocked=" + mIsUserUnlocked);
-        mLocalBroadcastManager = LocalBroadcastManager.getInstance(this);
-
-        IntentFilter filter = new IntentFilter();
-        filter.addAction(ACTION_GRANT_TRUST);
-        filter.addAction(ACTION_REVOKE_TRUST);
-        if (!mIsUserUnlocked) {
-            filter.addAction(Intent.ACTION_BOOT_COMPLETED);
-        }
-        mLocalBroadcastManager.registerReceiver(mReceiver, filter);
-        if (ALLOW_EXTERNAL_BROADCASTS) {
-            registerReceiver(mReceiver, filter);
-        }
-
-        if (!mIsUserUnlocked) {
-            boolean trustManaged = getIsManagingTrustDirectBoot(this);
-            Log.i(TAG, "in Direct boot." + (trustManaged ? "manage" : "cannot manage") + "trust");
-            setManagingTrust(getIsManagingTrustDirectBoot(this));
-        } else {
-            onBootCompleted();
-        }
-    }
-
-    @Override
-    public void onTrustTimeout() {
-        super.onTrustTimeout();
-        logAndShowToast("onTrustTimeout(): timeout expired");
-    }
-
-    @Override
-    public void onDeviceLocked() {
-        super.onDeviceLocked();
-        if (getReportDeviceLocked(this)) {
-            logAndShowToast("onDeviceLocked(): device is now locked");
-        }
-    }
-
-    @Override
-    public void onDeviceUnlocked() {
-        super.onDeviceUnlocked();
-        if (getReportDeviceLocked(this)) {
-            logAndShowToast("onDeviceUnlocked(): device is now unlocked");
-        }
-    }
-
-    @Override
-    public void onUnlockAttempt(boolean successful) {
-        if (getReportUnlockAttempts(this)) {
-            logAndShowToast("onUnlockAttempt(successful=" + successful + ")");
-        }
-    }
-
-    private void logAndShowToast(String text) {
-        Log.i(TAG, text);
-        Toast.makeText(this, text, Toast.LENGTH_SHORT).show();
-    }
-
-    @Override
-    public boolean onConfigure(List<PersistableBundle> options) {
-        if (options != null) {
-           for (int i = 0; i < options.size(); i++) {
-               Log.v(TAG, "Policy options received: " + options.get(i));
-           }
-        } else {
-            Log.w(TAG, "onConfigure() called with no options");
-        }
-        // TODO: Handle options
-        return true; // inform DPM that we support it
-    }
-
-    @Override
-    public void onDestroy() {
-        super.onDestroy();
-        mLocalBroadcastManager.unregisterReceiver(mReceiver);
-        if (ALLOW_EXTERNAL_BROADCASTS) {
-            unregisterReceiver(mReceiver);
-        }
-        PreferenceManager.getDefaultSharedPreferences(this)
-                .unregisterOnSharedPreferenceChangeListener(this);
-    }
-
-    private void onBootCompleted() {
-        PreferenceManager.getDefaultSharedPreferences(this)
-                .registerOnSharedPreferenceChangeListener(this);
-        setManagingTrust(getIsManagingTrust(this));
-    }
-
-    private BroadcastReceiver mReceiver = new BroadcastReceiver() {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            String action = intent.getAction();
-            if (ACTION_GRANT_TRUST.equals(action)) {
-                int flags = 0;
-                if (intent.getBooleanExtra(EXTRA_INITIATED_BY_USER, false)) {
-                    flags |= TrustAgentService.FLAG_GRANT_TRUST_INITIATED_BY_USER;
-                }
-                if (intent.getBooleanExtra(EXTRA_DISMISS_KEYGUARD, false)) {
-                    flags |= TrustAgentService.FLAG_GRANT_TRUST_DISMISS_KEYGUARD;
-                }
-
-                try {
-                    grantTrust(intent.getStringExtra(EXTRA_MESSAGE),
-                            intent.getLongExtra(EXTRA_DURATION, 0), flags);
-                } catch (IllegalStateException e) {
-                    logAndShowToast("IllegalStateException: " + e.getMessage());
-                }
-            } else if (ACTION_REVOKE_TRUST.equals(action)) {
-                revokeTrust();
-            } else if (intent.ACTION_BOOT_COMPLETED.equals(action)) {
-                Log.d(TAG, "User unlocked and boot completed.");
-                onBootCompleted();
-            }
-        }
-    };
-
-    public static void sendGrantTrust(Context context,
-            String message, long durationMs, boolean initiatedByUser) {
-        Intent intent = new Intent(ACTION_GRANT_TRUST);
-        intent.putExtra(EXTRA_MESSAGE, message);
-        intent.putExtra(EXTRA_DURATION, durationMs);
-        intent.putExtra(EXTRA_INITIATED_BY_USER, initiatedByUser);
-        LocalBroadcastManager.getInstance(context).sendBroadcast(intent);
-    }
-
-    public static void sendRevokeTrust(Context context) {
-        Intent intent = new Intent(ACTION_REVOKE_TRUST);
-        LocalBroadcastManager.getInstance(context).sendBroadcast(intent);
-    }
-
-    public static void setReportUnlockAttempts(Context context, boolean enabled) {
-        SharedPreferences sharedPreferences = PreferenceManager
-                .getDefaultSharedPreferences(context);
-        sharedPreferences.edit().putBoolean(PREFERENCE_REPORT_UNLOCK_ATTEMPTS, enabled).apply();
-    }
-
-    public static boolean getReportUnlockAttempts(Context context) {
-        SharedPreferences sharedPreferences = PreferenceManager
-                .getDefaultSharedPreferences(context);
-        return sharedPreferences.getBoolean(PREFERENCE_REPORT_UNLOCK_ATTEMPTS, false);
-    }
-
-    public static void setReportDeviceLocked(Context context, boolean enabled) {
-        SharedPreferences sharedPreferences = PreferenceManager
-                .getDefaultSharedPreferences(context);
-        sharedPreferences.edit().putBoolean(PREFERENCE_REPORT_DEVICE_LOCKED, enabled).apply();
-    }
-
-    public static boolean getReportDeviceLocked(Context context) {
-        SharedPreferences sharedPreferences = PreferenceManager
-                .getDefaultSharedPreferences(context);
-        return sharedPreferences.getBoolean(PREFERENCE_REPORT_DEVICE_LOCKED, false);
-    }
-
-    public static void setIsManagingTrust(Context context, boolean enabled) {
-        SharedPreferences sharedPreferences = PreferenceManager
-                .getDefaultSharedPreferences(context);
-        Log.d("AAAA", "save manage trust preference. Enabled=" + enabled);
-        sharedPreferences.edit().putBoolean(PREFERENCE_MANAGING_TRUST, enabled).apply();
-    }
-
-    public static boolean getIsManagingTrust(Context context) {
-        SharedPreferences sharedPreferences = PreferenceManager
-                .getDefaultSharedPreferences(context);
-        return sharedPreferences.getBoolean(PREFERENCE_MANAGING_TRUST, false);
-    }
-
-    public static void setIsManagingTrustDirectBoot(Context context, boolean enabled) {
-        Context directBootContext = context.createDeviceProtectedStorageContext();
-        SharedPreferences sharedPreferences = PreferenceManager
-                .getDefaultSharedPreferences(directBootContext);
-        Log.d("AAAA", "save to direct boot preference. Enabled=" + enabled);
-        sharedPreferences.edit().putBoolean(PREFERENCE_MANAGING_TRUST_DIRECT_BOOT, enabled).apply();
-    }
-
-    public static boolean getIsManagingTrustDirectBoot(Context context) {
-        Context directBootContext = context.createDeviceProtectedStorageContext();
-        SharedPreferences sharedPreferences = PreferenceManager
-                .getDefaultSharedPreferences(directBootContext);
-        return sharedPreferences.getBoolean(PREFERENCE_MANAGING_TRUST_DIRECT_BOOT, false);
-    }
-
-    @Override
-    public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
-        if (PREFERENCE_MANAGING_TRUST.equals(key)) {
-            setManagingTrust(getIsManagingTrust(this));
-        }
-    }
-}
diff --git a/packages/Keyguard/test/SampleTrustAgent/src/com/android/trustagent/test/SampleTrustAgentSettings.java b/packages/Keyguard/test/SampleTrustAgent/src/com/android/trustagent/test/SampleTrustAgentSettings.java
deleted file mode 100644
index 1b17169..0000000
--- a/packages/Keyguard/test/SampleTrustAgent/src/com/android/trustagent/test/SampleTrustAgentSettings.java
+++ /dev/null
@@ -1,111 +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.trustagent.test;
-
-import android.annotation.Nullable;
-import android.app.Activity;
-import android.app.KeyguardManager;
-import android.os.Bundle;
-import android.view.View;
-import android.widget.CheckBox;
-import android.widget.CompoundButton;
-import android.widget.TextView;
-
-public class SampleTrustAgentSettings extends Activity implements View.OnClickListener,
-        CompoundButton.OnCheckedChangeListener {
-
-    private static final int TRUST_DURATION_MS = 30 * 1000;
-
-    private CheckBox mReportUnlockAttempts;
-    private CheckBox mReportDeviceLocked;
-    private CheckBox mManagingTrust;
-    private CheckBox mManagingTrustDirectBoot;
-    private TextView mCheckDeviceLockedResult;
-
-    private KeyguardManager mKeyguardManager;
-
-
-    @Override
-    protected void onCreate(@Nullable Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        mKeyguardManager = (KeyguardManager) getSystemService(KEYGUARD_SERVICE);
-
-        setContentView(R.layout.sample_trust_agent_settings);
-
-        findViewById(R.id.enable_trust).setOnClickListener(this);
-        findViewById(R.id.revoke_trust).setOnClickListener(this);
-        findViewById(R.id.crash).setOnClickListener(this);
-        findViewById(R.id.check_device_locked).setOnClickListener(this);
-
-        mReportUnlockAttempts = (CheckBox) findViewById(R.id.report_unlock_attempts);
-        mReportUnlockAttempts.setOnCheckedChangeListener(this);
-
-        mReportDeviceLocked = (CheckBox) findViewById(R.id.report_device_locked);
-        mReportDeviceLocked.setOnCheckedChangeListener(this);
-
-        mManagingTrust = (CheckBox) findViewById(R.id.managing_trust);
-        mManagingTrust.setOnCheckedChangeListener(this);
-        mManagingTrustDirectBoot = (CheckBox) findViewById(R.id.managing_trust_direct_boot);
-        mManagingTrustDirectBoot.setOnCheckedChangeListener(this);
-
-        mCheckDeviceLockedResult = (TextView) findViewById(R.id.check_device_locked_result);
-    }
-
-    @Override
-    protected void onResume() {
-        super.onResume();
-        mReportUnlockAttempts.setChecked(SampleTrustAgent.getReportUnlockAttempts(this));
-        mManagingTrust.setChecked(SampleTrustAgent.getIsManagingTrust(this));
-        mManagingTrustDirectBoot.setChecked(
-            SampleTrustAgent.getIsManagingTrustDirectBoot(this));
-        updateTrustedState();
-    }
-
-    @Override
-    public void onClick(View v) {
-        int id = v.getId();
-        if (id == R.id.enable_trust) {
-            SampleTrustAgent.sendGrantTrust(this, "SampleTrustAgent", TRUST_DURATION_MS,
-                    false /* initiatedByUser */);
-        } else if (id == R.id.revoke_trust) {
-            SampleTrustAgent.sendRevokeTrust(this);
-        } else if (id == R.id.crash) {
-            throw new RuntimeException("crash");
-        } else if (id == R.id.check_device_locked) {
-            updateTrustedState();
-        }
-    }
-
-    @Override
-    public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
-        if (buttonView == mReportUnlockAttempts) {
-            SampleTrustAgent.setReportUnlockAttempts(this, isChecked);
-        } else if (buttonView == mManagingTrust) {
-            SampleTrustAgent.setIsManagingTrust(this, isChecked);
-        } else if (buttonView == mReportDeviceLocked) {
-            SampleTrustAgent.setReportDeviceLocked(this, isChecked);
-        } else if (buttonView == mManagingTrustDirectBoot) {
-            SampleTrustAgent.setIsManagingTrustDirectBoot(this, isChecked);
-        }
-    }
-
-    private void updateTrustedState() {
-        mCheckDeviceLockedResult.setText(Boolean.toString(
-                mKeyguardManager.isDeviceLocked()));
-    }
-}
diff --git a/packages/Keyguard/test/res/drawable-hdpi/app_icon.png b/packages/Keyguard/test/res/drawable-hdpi/app_icon.png
deleted file mode 100644
index 732133c..0000000
--- a/packages/Keyguard/test/res/drawable-hdpi/app_icon.png
+++ /dev/null
Binary files differ
diff --git a/packages/Keyguard/test/res/drawable-mdpi/app_icon.png b/packages/Keyguard/test/res/drawable-mdpi/app_icon.png
deleted file mode 100644
index 30eb9747..0000000
--- a/packages/Keyguard/test/res/drawable-mdpi/app_icon.png
+++ /dev/null
Binary files differ
diff --git a/packages/Keyguard/test/res/drawable-xhdpi/app_icon.png b/packages/Keyguard/test/res/drawable-xhdpi/app_icon.png
deleted file mode 100644
index c44a330..0000000
--- a/packages/Keyguard/test/res/drawable-xhdpi/app_icon.png
+++ /dev/null
Binary files differ
diff --git a/packages/Keyguard/test/res/layout/keyguard_test_activity.xml b/packages/Keyguard/test/res/layout/keyguard_test_activity.xml
deleted file mode 100644
index dab1088..0000000
--- a/packages/Keyguard/test/res/layout/keyguard_test_activity.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-**
-** Copyright 2013, 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.
-*/
--->
-
-<LinearLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:orientation="vertical"
-    android:gravity="center">
-
-    <Button android:id="@+id/do_keyguard"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:text="@string/do_keyguard" />
-
-    <Button android:id="@+id/on_screen_turned_off"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:text="@string/on_screen_turned_off" />
-
-    <Button android:id="@+id/on_screen_turned_on"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:text="@string/on_screen_turned_on" />
-
-    <Button android:id="@+id/verify_unlock"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:text="@string/verify_unlock" />
-
-</LinearLayout>
diff --git a/packages/Keyguard/test/res/menu/optionmenu.xml b/packages/Keyguard/test/res/menu/optionmenu.xml
deleted file mode 100644
index 22f300d..0000000
--- a/packages/Keyguard/test/res/menu/optionmenu.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:id="@+id/none_menu_item"
-          android:title="@string/none_menu_item" />
-    <item android:id="@+id/pin_menu_item"
-          android:title="@string/pin_menu_item" />
-    <item android:id="@+id/password_menu_item"
-        android:title="@string/password_menu_item" />
-    <item android:id="@+id/pattern_menu_item"
-          android:title="@string/pattern_menu_item" />
-    <item android:id="@+id/sim_pin_menu_item"
-          android:title="@string/sim_pin_menu_item" />
-    <item android:id="@+id/sim_puk_menu_item"
-          android:title="@string/sim_puk_menu_item" />
-    <item android:id="@+id/add_widget_item"
-          android:title="@string/add_widget_item" />
-</menu>
diff --git a/packages/Keyguard/test/res/values/strings.xml b/packages/Keyguard/test/res/values/strings.xml
deleted file mode 100644
index 129204b..0000000
--- a/packages/Keyguard/test/res/values/strings.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2013, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name">KeyguardTestActivity</string>
-    <string name="secure_app_name">UnifiedCamera</string>
-    <string name="none_menu_item">No security</string>
-    <string name="pin_menu_item">PIN</string>
-    <string name="password_menu_item">Password</string>
-    <string name="pattern_menu_item">Pattern</string>
-    <string name="sim_pin_menu_item">SIM PIN</string>
-    <string name="sim_puk_menu_item">SIM PUK</string>
-    <string name="add_widget_item">Choose widget...</string>
-    <string name="on_screen_turned_off">onScreenTurnedOff</string>
-    <string name="on_screen_turned_on">onScreenTurnedOn</string>
-    <string name="do_keyguard">doKeyguard</string>
-    <string name="verify_unlock">verifyUnlock</string>
-</resources>
diff --git a/packages/Keyguard/test/src/com/android/keyguard/test/KeyguardTestActivity.java b/packages/Keyguard/test/src/com/android/keyguard/test/KeyguardTestActivity.java
deleted file mode 100644
index e89c10e..0000000
--- a/packages/Keyguard/test/src/com/android/keyguard/test/KeyguardTestActivity.java
+++ /dev/null
@@ -1,373 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.keyguard.test;
-
-import com.android.internal.policy.IKeyguardShowCallback;
-import com.android.internal.policy.IKeyguardExitCallback;
-import com.android.internal.policy.IKeyguardService;
-
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.app.admin.DevicePolicyManager;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.ServiceConnection;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.IBinder;
-import android.os.RemoteException;
-import android.os.SystemClock;
-import android.provider.Settings;
-import android.util.Log;
-import android.view.Menu;
-import android.view.MenuInflater;
-import android.view.MenuItem;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.view.WindowManagerPolicy;
-
-import com.android.internal.widget.LockPatternUtils;
-import com.android.internal.widget.LockPatternView.Cell;
-
-import java.util.List;
-
-public class KeyguardTestActivity extends Activity implements OnClickListener {
-    private static final String KEYGUARD_PACKAGE = "com.android.keyguard";
-    private static final String KEYGUARD_CLASS = "com.android.keyguard.KeyguardService";
-    private static final String TAG = "LockScreenTestActivity";
-    private static final int MODE_NONE = 0;
-    private static final int MODE_PIN = 1;
-    private static final int MODE_PASSWORD = 2;
-    private static final int MODE_PATTERN = 3;
-    private static final int MODE_SIM_PIN = 4;
-    private static final int MODE_SIM_PUK = 5;
-    private static final String SECURITY_MODE = "security_mode";
-    Handler mHandler = new Handler();
-
-    IKeyguardService mService = null;
-
-    KeyguardShowCallback mKeyguardShowCallback = new KeyguardShowCallback();
-    KeyguardExitCallback mKeyguardExitCallback = new KeyguardExitCallback();
-
-    RemoteServiceConnection mConnection;
-    private boolean mSentSystemReady;
-
-    class KeyguardShowCallback extends IKeyguardShowCallback.Stub {
-
-        @Override
-        public void onShown(IBinder windowToken) throws RemoteException {
-            Log.v(TAG, "Keyguard is shown, windowToken = " + windowToken);
-        }
-    }
-
-    class KeyguardExitCallback extends IKeyguardExitCallback.Stub {
-
-        @Override
-        public void onKeyguardExitResult(final boolean success) throws RemoteException {
-            mHandler.post(new Runnable() {
-                @Override
-                public void run() {
-                    new AlertDialog.Builder(KeyguardTestActivity.this)
-                    .setMessage("Result: " + success)
-                    .setPositiveButton("OK", null)
-                    .show();
-                }
-            });
-        }
-    };
-
-    private class RemoteServiceConnection implements ServiceConnection {
-        public void onServiceConnected(ComponentName className, IBinder service) {
-            Log.v(TAG, "onServiceConnected()");
-            mService = IKeyguardService.Stub.asInterface(service);
-            try {
-                mService.asBinder().linkToDeath(new IBinder.DeathRecipient() {
-                    @Override
-                    public void binderDied() {
-                        new AlertDialog.Builder(KeyguardTestActivity.this)
-                            .setMessage("Oops! Keygued died")
-                            .setPositiveButton("OK", null)
-                            .show();
-                    }
-                }, 0);
-            } catch (RemoteException e) {
-                Log.w(TAG, "Couldn't linkToDeath");
-                e.printStackTrace();
-            }
-//            try {
-//                mService.onSystemReady();
-//            } catch (RemoteException e) {
-//                Log.v(TAG, "Remote service died trying to call onSystemReady");
-//                e.printStackTrace();
-//            }
-        }
-
-        public void onServiceDisconnected(ComponentName className) {
-            Log.v(TAG, "onServiceDisconnected()");
-            mService = null;
-        }
-    };
-
-    private void bindService() {
-        if (mConnection == null) {
-            mConnection = new RemoteServiceConnection();
-            Intent intent = new Intent();
-            intent.setClassName(KEYGUARD_PACKAGE, KEYGUARD_CLASS);
-            Log.v(TAG, "BINDING SERVICE: " + KEYGUARD_CLASS);
-            if (!bindService(intent, mConnection, Context.BIND_AUTO_CREATE)) {
-                Log.v(TAG, "FAILED TO BIND TO KEYGUARD!");
-            }
-        } else {
-            Log.v(TAG, "Service already bound");
-        }
-    }
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.keyguard_test_activity);
-        final int[] buttons = {
-                R.id.on_screen_turned_off, R.id.on_screen_turned_on,
-                R.id.do_keyguard, R.id.verify_unlock
-        };
-        for (int i = 0; i < buttons.length; i++) {
-            findViewById(buttons[i]).setOnClickListener(this);
-        }
-        Log.v(TAG, "Binding service...");
-        bindService();
-    }
-
-    @Override
-    protected void onSaveInstanceState(Bundle outState) {
-        super.onSaveInstanceState(outState);
-        outState.putInt(SECURITY_MODE, mSecurityMode);
-    }
-
-    @Override
-    protected void onRestoreInstanceState(Bundle savedInstanceState) {
-        super.onRestoreInstanceState(savedInstanceState);
-        setMode(savedInstanceState.getInt(SECURITY_MODE));
-    }
-
-// TODO: Find a secure way to inject mock into keyguard...
-//    @Override
-//    public boolean onCreateOptionsMenu(Menu menu) {
-//        MenuInflater inflater = getMenuInflater();
-//        inflater.inflate(R.menu.optionmenu, menu);
-//        return true;
-//    }
-
-    private void setMode(int mode) {
-        mTestSimPin = false;
-        mTestSimPuk = false;
-        mLockPasswordEnabled = false;
-        mLockPatternEnabled = false;
-        switch(mode) {
-            case MODE_NONE:
-                mSecurityModeMock = DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED;
-                break;
-            case MODE_PIN:
-                mSecurityModeMock = DevicePolicyManager.PASSWORD_QUALITY_NUMERIC;
-                mLockPasswordEnabled = true;
-                break;
-            case MODE_PASSWORD:
-                mSecurityModeMock = DevicePolicyManager.PASSWORD_QUALITY_ALPHABETIC;
-                mLockPasswordEnabled = true;
-                break;
-            case MODE_PATTERN:
-                mSecurityModeMock = DevicePolicyManager.PASSWORD_QUALITY_SOMETHING;
-                mLockPatternEnabled = true;
-                break;
-            case MODE_SIM_PIN:
-                mTestSimPin = true;
-                break;
-            case MODE_SIM_PUK:
-                mTestSimPuk = true;
-                break;
-        }
-        mSecurityMode = mode;
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        // Handle item selection
-        switch (item.getItemId()) {
-            case R.id.none_menu_item:
-                setMode(MODE_NONE);
-                break;
-            case R.id.pin_menu_item:
-                setMode(MODE_PIN);
-                break;
-            case R.id.password_menu_item:
-                setMode(MODE_PASSWORD);
-                break;
-            case R.id.pattern_menu_item:
-                setMode(MODE_PATTERN);
-                break;
-            case R.id.sim_pin_menu_item:
-                setMode(MODE_SIM_PIN);
-                break;
-            case R.id.sim_puk_menu_item:
-                setMode(MODE_SIM_PUK);
-                break;
-            case R.id.add_widget_item:
-                startWidgetPicker();
-                break;
-            default:
-                return super.onOptionsItemSelected(item);
-        }
-        try {
-            mService.doKeyguardTimeout(null);
-        } catch (RemoteException e) {
-            Log.e(TAG, "Remote service died");
-            e.printStackTrace();
-        }
-        return true;
-    }
-
-    private void startWidgetPicker() {
-        startActivity(new Intent(Settings.ACTION_SECURITY_SETTINGS));
-    }
-
-    @Override
-    public void onClick(View v) {
-        try {
-            switch (v.getId()) {
-            case R.id.on_screen_turned_on:
-                mService.onScreenTurnedOn(mKeyguardShowCallback);
-                break;
-            case R.id.on_screen_turned_off:
-                mService.onScreenTurnedOff(WindowManagerPolicy.OFF_BECAUSE_OF_USER);
-                break;
-            case R.id.do_keyguard:
-                if (!mSentSystemReady) {
-                    mSentSystemReady = true;
-                    mService.onSystemReady();
-                }
-                mService.doKeyguardTimeout(null);
-                break;
-            case R.id.verify_unlock:
-                mService.doKeyguardTimeout(null);
-                // Wait for keyguard to lock and then try this...
-                mHandler.postDelayed(new Runnable() {
-                    @Override
-                    public void run() {
-                        try {
-                            mService.verifyUnlock(mKeyguardExitCallback);
-                        } catch (RemoteException e) {
-                            Log.e(TAG, "Failed verifyUnlock()", e);
-                        }
-                    }
-                }, 5000);
-                break;
-            }
-        } catch (RemoteException e) {
-            Log.e(TAG, "onClick(): Failed due to remote exeption", e);
-        }
-    }
-
-    @Override
-    protected void onPause() {
-        super.onPause();
-        try {
-            if (mService != null) {
-                mService.setHidden(true);
-            }
-        } catch (RemoteException e) {
-            Log.e(TAG, "Remote service died");
-            e.printStackTrace();
-        }
-    }
-
-    protected void onResume() {
-        super.onResume();
-        try {
-            if (mService != null) {
-                mService.setHidden(false);
-            }
-        } catch (RemoteException e) {
-            Log.e(TAG, "Remote service died");
-            e.printStackTrace();
-        }
-    }
-
-    public int mSecurityModeMock;
-    private boolean mTestSimPin;
-    private boolean mTestSimPuk;
-    private boolean mLockPasswordEnabled;
-    public boolean mLockPatternEnabled;
-    private int mSecurityMode;
-
-    class LockPatternUtilsMock extends LockPatternUtils {
-        private long mDeadline;
-        public LockPatternUtilsMock(Context context) {
-            super(context);
-        }
-
-        @Override
-        public boolean checkPattern(List<Cell> pattern) {
-            return pattern.size() > 4;
-        }
-
-        @Override
-        public boolean checkPassword(String password) {
-            return password.length() > 4;
-        }
-        @Override
-        public long setLockoutAttemptDeadline() {
-            final long deadline = SystemClock.elapsedRealtime() + FAILED_ATTEMPT_TIMEOUT_MS;
-            mDeadline = deadline;
-            return deadline;
-        }
-        @Override
-        public boolean isLockScreenDisabled() {
-            return false;
-        }
-        @Override
-        public long getLockoutAttemptDeadline() {
-            return mDeadline;
-        }
-        @Override
-        public void reportFailedPasswordAttempt() {
-            // Ignored
-        }
-        @Override
-        public void reportSuccessfulPasswordAttempt() {
-            // Ignored
-        }
-        @Override
-        public boolean isLockPatternEnabled() {
-            return mLockPatternEnabled;
-        }
-
-        @Override
-        public boolean isLockPasswordEnabled() {
-            return mLockPasswordEnabled;
-        }
-
-        @Override
-        public int getKeyguardStoredPasswordQuality() {
-            return mSecurityModeMock;
-        }
-
-        public boolean isSecure() {
-            return mLockPatternEnabled || mLockPasswordEnabled || mTestSimPin || mTestSimPuk;
-        }
-
-    }
-}
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
index 136f17e..499b6ae 100644
--- a/packages/SettingsProvider/res/values/defaults.xml
+++ b/packages/SettingsProvider/res/values/defaults.xml
@@ -227,4 +227,7 @@
 
     <!--  default setting for Settings.System.END_BUTTON_BEHAVIOR : END_BUTTON_BEHAVIOR_SLEEP -->
     <integer name="def_end_button_behavior">0x2</integer>
+
+    <!--Default settings for network recommendations. -->
+    <string name="def_network_recommendations_package" translatable="false">com.android.networkrecommendation</string>
 </resources>
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
index 4ddafac..0676efd 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
@@ -495,6 +495,9 @@
                 Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED,
                 GlobalSettingsProto.NETWORK_RECOMMENDATIONS_ENABLED);
         dumpSetting(s, p,
+                Settings.Global.NETWORK_RECOMMENDATIONS_PACKAGE,
+                GlobalSettingsProto.NETWORK_RECOMMENDATIONS_PACKAGE);
+        dumpSetting(s, p,
                 Settings.Global.BLE_SCAN_ALWAYS_AVAILABLE,
                 GlobalSettingsProto.BLE_SCAN_ALWAYS_AVAILABLE);
         dumpSetting(s, p,
@@ -1426,18 +1429,6 @@
                 Settings.Secure.SYSTEM_NAVIGATION_KEYS_ENABLED,
                 SecureSettingsProto.SYSTEM_NAVIGATION_KEYS_ENABLED);
         dumpSetting(s, p,
-                Settings.Secure.DOWNLOADS_BACKUP_ENABLED,
-                SecureSettingsProto.DOWNLOADS_BACKUP_ENABLED);
-        dumpSetting(s, p,
-                Settings.Secure.DOWNLOADS_BACKUP_ALLOW_METERED,
-                SecureSettingsProto.DOWNLOADS_BACKUP_ALLOW_METERED);
-        dumpSetting(s, p,
-                Settings.Secure.DOWNLOADS_BACKUP_CHARGING_ONLY,
-                SecureSettingsProto.DOWNLOADS_BACKUP_CHARGING_ONLY);
-        dumpSetting(s, p,
-                Settings.Secure.AUTOMATIC_STORAGE_MANAGER_DOWNLOADS_DAYS_TO_RETAIN,
-                SecureSettingsProto.AUTOMATIC_STORAGE_MANAGER_DOWNLOADS_DAYS_TO_RETAIN);
-        dumpSetting(s, p,
                 Settings.Secure.QS_TILES,
                 SecureSettingsProto.QS_TILES);
         dumpSetting(s, p,
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
index 2299794..edcb9b5 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
@@ -2735,7 +2735,7 @@
         }
 
         private final class UpgradeController {
-            private static final int SETTINGS_VERSION = 138;
+            private static final int SETTINGS_VERSION = 139;
 
             private final int mUserId;
 
@@ -3118,26 +3118,7 @@
                 }
 
                 if (currentVersion == 135) {
-                    // Version 135: Migrating the NETWORK_SCORER_APP setting to the
-                    // NETWORK_RECOMMENDATIONS_ENABLED setting.
-                    if (userId == UserHandle.USER_SYSTEM) {
-                        final SettingsState globalSettings = getGlobalSettingsLocked();
-                        Setting currentSetting = globalSettings.getSettingLocked(
-                            Global.NETWORK_SCORER_APP);
-                        if (!currentSetting.isNull()) {
-                            // A scorer was set so enable recommendations.
-                            globalSettings.insertSettingLocked(
-                                Global.NETWORK_RECOMMENDATIONS_ENABLED,
-                                "1", null, true,
-                                SettingsState.SYSTEM_PACKAGE_NAME);
-
-                            // and clear the scorer setting since it's no longer needed.
-                            globalSettings.insertSettingLocked(
-                                Global.NETWORK_SCORER_APP,
-                                null, null, true,
-                                SettingsState.SYSTEM_PACKAGE_NAME);
-                        }
-                    }
+                    // Version 135 no longer used.
                     currentVersion = 136;
                 }
 
@@ -3200,6 +3181,28 @@
                     currentVersion = 138;
                 }
 
+                if (currentVersion == 138) {
+                    // Version 139: Applying the default to NETWORK_RECOMMENDATIONS_PACKAGE
+                    if (userId == UserHandle.USER_SYSTEM) {
+                        final SettingsState globalSettings = getGlobalSettingsLocked();
+                        final String defaultAppPackage = getContext().getResources()
+                                .getString(R.string.def_network_recommendations_package);
+
+                        // Set the network recommendations package name
+                        globalSettings.insertSettingLocked(
+                                Global.NETWORK_RECOMMENDATIONS_PACKAGE,
+                                defaultAppPackage, null, true,
+                                SettingsState.SYSTEM_PACKAGE_NAME);
+
+                        // Clear the scorer setting since it's no longer needed.
+                        globalSettings.insertSettingLocked(
+                                Global.NETWORK_SCORER_APP,
+                                null, null, true,
+                                SettingsState.SYSTEM_PACKAGE_NAME);
+                    }
+                    currentVersion = 139;
+                }
+
                 if (currentVersion != newVersion) {
                     Slog.wtf("SettingsProvider", "warning: upgrading settings database to version "
                             + newVersion + " left it at "
diff --git a/packages/Shell/src/com/android/shell/BugreportProgressService.java b/packages/Shell/src/com/android/shell/BugreportProgressService.java
index 26568cc..37ea537 100644
--- a/packages/Shell/src/com/android/shell/BugreportProgressService.java
+++ b/packages/Shell/src/com/android/shell/BugreportProgressService.java
@@ -92,6 +92,7 @@
 import android.util.Pair;
 import android.util.Patterns;
 import android.util.SparseArray;
+import android.view.IWindowManager;
 import android.view.View;
 import android.view.WindowManager;
 import android.view.View.OnFocusChangeListener;
@@ -579,6 +580,16 @@
         }
 
         collapseNotificationBar();
+
+        // Dissmiss keyguard first.
+        final IWindowManager wm = IWindowManager.Stub
+                .asInterface(ServiceManager.getService(Context.WINDOW_SERVICE));
+        try {
+            wm.dismissKeyguard(null);
+        } catch (Exception e) {
+            // ignore it
+        }
+
         mInfoDialog.initialize(mContext, info);
     }
 
diff --git a/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java b/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
index 4e3744a..823b9b1 100644
--- a/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
+++ b/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
@@ -695,6 +695,7 @@
 
     private void sendBugreportStarted(int id, int pid, String name, int max) throws Exception {
         Intent intent = new Intent(INTENT_BUGREPORT_STARTED);
+        intent.setPackage("com.android.shell");
         intent.setFlags(Intent.FLAG_RECEIVER_FOREGROUND);
         intent.putExtra(EXTRA_ID, id);
         intent.putExtra(EXTRA_PID, pid);
@@ -754,6 +755,7 @@
      */
     private void sendBugreportFinished(int id, String bugreportPath, String screenshotPath) {
         Intent intent = new Intent(INTENT_BUGREPORT_FINISHED);
+        intent.setPackage("com.android.shell");
         intent.setFlags(Intent.FLAG_RECEIVER_FOREGROUND);
         if (id != NO_ID) {
             intent.putExtra(EXTRA_ID, id);
diff --git a/packages/SystemUI/Android.mk b/packages/SystemUI/Android.mk
index d1e1060..1ebfbad 100644
--- a/packages/SystemUI/Android.mk
+++ b/packages/SystemUI/Android.mk
@@ -11,6 +11,14 @@
 
 include $(BUILD_STATIC_JAVA_LIBRARY)
 
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := SystemUI-tags
+
+LOCAL_SRC_FILES := src/com/android/systemui/EventLogTags.logtags
+
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
 # ------------------
 
 include $(CLEAR_VARS)
@@ -23,7 +31,6 @@
 
 LOCAL_STATIC_ANDROID_LIBRARIES := \
     SystemUIPluginLib \
-    Keyguard \
     android-support-v7-recyclerview \
     android-support-v7-preference \
     android-support-v7-appcompat \
@@ -32,6 +39,7 @@
 
 LOCAL_STATIC_JAVA_LIBRARIES := \
     framework-protos \
+    SystemUI-tags \
     SystemUI-proto
 
 LOCAL_JAVA_LIBRARIES := telephony-common
@@ -42,6 +50,7 @@
 LOCAL_PRIVILEGED_MODULE := true
 
 LOCAL_PROGUARD_FLAG_FILES := proguard.flags
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res-keyguard $(LOCAL_PATH)/res
 
 ifneq ($(INCREMENTAL_BUILDS),)
     LOCAL_PROGUARD_ENABLED := disabled
@@ -52,6 +61,8 @@
 
 include frameworks/base/packages/SettingsLib/common.mk
 
+LOCAL_AAPT_FLAGS := --extra-packages com.android.keyguard
+
 include $(BUILD_PACKAGE)
 
 include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/IntentButtonProvider.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/IntentButtonProvider.java
index 1b8efa7..9c173bd 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/IntentButtonProvider.java
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/IntentButtonProvider.java
@@ -32,6 +32,7 @@
             public boolean isVisible = true;
             public CharSequence contentDescription = null;
             public Drawable drawable;
+            public boolean tint = true;
         }
 
         public IconState getIcon();
diff --git a/packages/Keyguard/res/drawable-hdpi/ic_done_wht.png b/packages/SystemUI/res-keyguard/drawable-hdpi/ic_done_wht.png
similarity index 100%
rename from packages/Keyguard/res/drawable-hdpi/ic_done_wht.png
rename to packages/SystemUI/res-keyguard/drawable-hdpi/ic_done_wht.png
Binary files differ
diff --git a/packages/Keyguard/res/drawable-hdpi/ic_lockscreen_sim.png b/packages/SystemUI/res-keyguard/drawable-hdpi/ic_lockscreen_sim.png
similarity index 100%
rename from packages/Keyguard/res/drawable-hdpi/ic_lockscreen_sim.png
rename to packages/SystemUI/res-keyguard/drawable-hdpi/ic_lockscreen_sim.png
Binary files differ
diff --git a/packages/Keyguard/res/drawable-hdpi/kg_security_lock_normal.png b/packages/SystemUI/res-keyguard/drawable-hdpi/kg_security_lock_normal.png
similarity index 100%
rename from packages/Keyguard/res/drawable-hdpi/kg_security_lock_normal.png
rename to packages/SystemUI/res-keyguard/drawable-hdpi/kg_security_lock_normal.png
Binary files differ
diff --git a/packages/Keyguard/res/drawable-mdpi/ic_done_wht.png b/packages/SystemUI/res-keyguard/drawable-mdpi/ic_done_wht.png
similarity index 100%
rename from packages/Keyguard/res/drawable-mdpi/ic_done_wht.png
rename to packages/SystemUI/res-keyguard/drawable-mdpi/ic_done_wht.png
Binary files differ
diff --git a/packages/Keyguard/res/drawable-mdpi/ic_lockscreen_sim.png b/packages/SystemUI/res-keyguard/drawable-mdpi/ic_lockscreen_sim.png
similarity index 100%
rename from packages/Keyguard/res/drawable-mdpi/ic_lockscreen_sim.png
rename to packages/SystemUI/res-keyguard/drawable-mdpi/ic_lockscreen_sim.png
Binary files differ
diff --git a/packages/Keyguard/res/drawable-mdpi/kg_security_lock_normal.png b/packages/SystemUI/res-keyguard/drawable-mdpi/kg_security_lock_normal.png
similarity index 100%
rename from packages/Keyguard/res/drawable-mdpi/kg_security_lock_normal.png
rename to packages/SystemUI/res-keyguard/drawable-mdpi/kg_security_lock_normal.png
Binary files differ
diff --git a/packages/Keyguard/res/drawable-xhdpi/ic_done_wht.png b/packages/SystemUI/res-keyguard/drawable-xhdpi/ic_done_wht.png
similarity index 100%
rename from packages/Keyguard/res/drawable-xhdpi/ic_done_wht.png
rename to packages/SystemUI/res-keyguard/drawable-xhdpi/ic_done_wht.png
Binary files differ
diff --git a/packages/Keyguard/res/drawable-xhdpi/ic_lockscreen_sim.png b/packages/SystemUI/res-keyguard/drawable-xhdpi/ic_lockscreen_sim.png
similarity index 100%
rename from packages/Keyguard/res/drawable-xhdpi/ic_lockscreen_sim.png
rename to packages/SystemUI/res-keyguard/drawable-xhdpi/ic_lockscreen_sim.png
Binary files differ
diff --git a/packages/Keyguard/res/drawable-xhdpi/kg_security_lock_normal.png b/packages/SystemUI/res-keyguard/drawable-xhdpi/kg_security_lock_normal.png
similarity index 100%
rename from packages/Keyguard/res/drawable-xhdpi/kg_security_lock_normal.png
rename to packages/SystemUI/res-keyguard/drawable-xhdpi/kg_security_lock_normal.png
Binary files differ
diff --git a/packages/Keyguard/res/drawable-xxhdpi/ic_done_wht.png b/packages/SystemUI/res-keyguard/drawable-xxhdpi/ic_done_wht.png
similarity index 100%
rename from packages/Keyguard/res/drawable-xxhdpi/ic_done_wht.png
rename to packages/SystemUI/res-keyguard/drawable-xxhdpi/ic_done_wht.png
Binary files differ
diff --git a/packages/Keyguard/res/drawable-xxxhdpi/ic_done_wht.png b/packages/SystemUI/res-keyguard/drawable-xxxhdpi/ic_done_wht.png
similarity index 100%
rename from packages/Keyguard/res/drawable-xxxhdpi/ic_done_wht.png
rename to packages/SystemUI/res-keyguard/drawable-xxxhdpi/ic_done_wht.png
Binary files differ
diff --git a/packages/Keyguard/res/drawable/ic_access_alarms_big.xml b/packages/SystemUI/res-keyguard/drawable/ic_access_alarms_big.xml
similarity index 100%
rename from packages/Keyguard/res/drawable/ic_access_alarms_big.xml
rename to packages/SystemUI/res-keyguard/drawable/ic_access_alarms_big.xml
diff --git a/packages/Keyguard/res/drawable/ic_backspace_24dp.xml b/packages/SystemUI/res-keyguard/drawable/ic_backspace_24dp.xml
similarity index 100%
rename from packages/Keyguard/res/drawable/ic_backspace_24dp.xml
rename to packages/SystemUI/res-keyguard/drawable/ic_backspace_24dp.xml
diff --git a/packages/Keyguard/res/drawable/ic_lockscreen_ime.xml b/packages/SystemUI/res-keyguard/drawable/ic_lockscreen_ime.xml
similarity index 100%
rename from packages/Keyguard/res/drawable/ic_lockscreen_ime.xml
rename to packages/SystemUI/res-keyguard/drawable/ic_lockscreen_ime.xml
diff --git a/packages/Keyguard/res/drawable/ripple_drawable.xml b/packages/SystemUI/res-keyguard/drawable/ripple_drawable.xml
similarity index 100%
rename from packages/Keyguard/res/drawable/ripple_drawable.xml
rename to packages/SystemUI/res-keyguard/drawable/ripple_drawable.xml
diff --git a/packages/Keyguard/res/layout/keyguard_bouncer.xml b/packages/SystemUI/res-keyguard/layout/keyguard_bouncer.xml
similarity index 100%
rename from packages/Keyguard/res/layout/keyguard_bouncer.xml
rename to packages/SystemUI/res-keyguard/layout/keyguard_bouncer.xml
diff --git a/packages/Keyguard/res/layout/keyguard_emergency_carrier_area.xml b/packages/SystemUI/res-keyguard/layout/keyguard_emergency_carrier_area.xml
similarity index 100%
rename from packages/Keyguard/res/layout/keyguard_emergency_carrier_area.xml
rename to packages/SystemUI/res-keyguard/layout/keyguard_emergency_carrier_area.xml
diff --git a/packages/Keyguard/res/layout/keyguard_host_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_host_view.xml
similarity index 100%
rename from packages/Keyguard/res/layout/keyguard_host_view.xml
rename to packages/SystemUI/res-keyguard/layout/keyguard_host_view.xml
diff --git a/packages/Keyguard/res/layout/keyguard_message_area.xml b/packages/SystemUI/res-keyguard/layout/keyguard_message_area.xml
similarity index 100%
rename from packages/Keyguard/res/layout/keyguard_message_area.xml
rename to packages/SystemUI/res-keyguard/layout/keyguard_message_area.xml
diff --git a/packages/Keyguard/res/layout/keyguard_message_area_large.xml b/packages/SystemUI/res-keyguard/layout/keyguard_message_area_large.xml
similarity index 100%
rename from packages/Keyguard/res/layout/keyguard_message_area_large.xml
rename to packages/SystemUI/res-keyguard/layout/keyguard_message_area_large.xml
diff --git a/packages/Keyguard/res/layout/keyguard_num_pad_key.xml b/packages/SystemUI/res-keyguard/layout/keyguard_num_pad_key.xml
similarity index 100%
rename from packages/Keyguard/res/layout/keyguard_num_pad_key.xml
rename to packages/SystemUI/res-keyguard/layout/keyguard_num_pad_key.xml
diff --git a/packages/Keyguard/res/layout/keyguard_password_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_password_view.xml
similarity index 100%
rename from packages/Keyguard/res/layout/keyguard_password_view.xml
rename to packages/SystemUI/res-keyguard/layout/keyguard_password_view.xml
diff --git a/packages/Keyguard/res/layout/keyguard_pattern_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_pattern_view.xml
similarity index 100%
rename from packages/Keyguard/res/layout/keyguard_pattern_view.xml
rename to packages/SystemUI/res-keyguard/layout/keyguard_pattern_view.xml
diff --git a/packages/Keyguard/res/layout/keyguard_pin_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_pin_view.xml
similarity index 100%
rename from packages/Keyguard/res/layout/keyguard_pin_view.xml
rename to packages/SystemUI/res-keyguard/layout/keyguard_pin_view.xml
diff --git a/packages/Keyguard/res/layout/keyguard_presentation.xml b/packages/SystemUI/res-keyguard/layout/keyguard_presentation.xml
similarity index 100%
rename from packages/Keyguard/res/layout/keyguard_presentation.xml
rename to packages/SystemUI/res-keyguard/layout/keyguard_presentation.xml
diff --git a/packages/Keyguard/res/layout/keyguard_sim_pin_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_sim_pin_view.xml
similarity index 100%
rename from packages/Keyguard/res/layout/keyguard_sim_pin_view.xml
rename to packages/SystemUI/res-keyguard/layout/keyguard_sim_pin_view.xml
diff --git a/packages/Keyguard/res/layout/keyguard_sim_puk_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_sim_puk_view.xml
similarity index 100%
rename from packages/Keyguard/res/layout/keyguard_sim_puk_view.xml
rename to packages/SystemUI/res-keyguard/layout/keyguard_sim_puk_view.xml
diff --git a/packages/Keyguard/res/layout/keyguard_status_area.xml b/packages/SystemUI/res-keyguard/layout/keyguard_status_area.xml
similarity index 100%
rename from packages/Keyguard/res/layout/keyguard_status_area.xml
rename to packages/SystemUI/res-keyguard/layout/keyguard_status_area.xml
diff --git a/packages/Keyguard/res/layout/keyguard_status_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_status_view.xml
similarity index 100%
rename from packages/Keyguard/res/layout/keyguard_status_view.xml
rename to packages/SystemUI/res-keyguard/layout/keyguard_status_view.xml
diff --git a/packages/Keyguard/res/values-af/strings.xml b/packages/SystemUI/res-keyguard/values-af/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-af/strings.xml
rename to packages/SystemUI/res-keyguard/values-af/strings.xml
diff --git a/packages/Keyguard/res/values-am/strings.xml b/packages/SystemUI/res-keyguard/values-am/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-am/strings.xml
rename to packages/SystemUI/res-keyguard/values-am/strings.xml
diff --git a/packages/Keyguard/res/values-ar/strings.xml b/packages/SystemUI/res-keyguard/values-ar/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-ar/strings.xml
rename to packages/SystemUI/res-keyguard/values-ar/strings.xml
diff --git a/packages/Keyguard/res/values-az/strings.xml b/packages/SystemUI/res-keyguard/values-az/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-az/strings.xml
rename to packages/SystemUI/res-keyguard/values-az/strings.xml
diff --git a/packages/Keyguard/res/values-b+sr+Latn/strings.xml b/packages/SystemUI/res-keyguard/values-b+sr+Latn/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-b+sr+Latn/strings.xml
rename to packages/SystemUI/res-keyguard/values-b+sr+Latn/strings.xml
diff --git a/packages/Keyguard/res/values-be/strings.xml b/packages/SystemUI/res-keyguard/values-be/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-be/strings.xml
rename to packages/SystemUI/res-keyguard/values-be/strings.xml
diff --git a/packages/Keyguard/res/values-bg/strings.xml b/packages/SystemUI/res-keyguard/values-bg/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-bg/strings.xml
rename to packages/SystemUI/res-keyguard/values-bg/strings.xml
diff --git a/packages/Keyguard/res/values-bn/strings.xml b/packages/SystemUI/res-keyguard/values-bn/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-bn/strings.xml
rename to packages/SystemUI/res-keyguard/values-bn/strings.xml
diff --git a/packages/Keyguard/res/values-bs/strings.xml b/packages/SystemUI/res-keyguard/values-bs/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-bs/strings.xml
rename to packages/SystemUI/res-keyguard/values-bs/strings.xml
diff --git a/packages/Keyguard/res/values-ca/strings.xml b/packages/SystemUI/res-keyguard/values-ca/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-ca/strings.xml
rename to packages/SystemUI/res-keyguard/values-ca/strings.xml
diff --git a/packages/Keyguard/res/values-cs/strings.xml b/packages/SystemUI/res-keyguard/values-cs/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-cs/strings.xml
rename to packages/SystemUI/res-keyguard/values-cs/strings.xml
diff --git a/packages/Keyguard/res/values-da/strings.xml b/packages/SystemUI/res-keyguard/values-da/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-da/strings.xml
rename to packages/SystemUI/res-keyguard/values-da/strings.xml
diff --git a/packages/Keyguard/res/values-de/strings.xml b/packages/SystemUI/res-keyguard/values-de/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-de/strings.xml
rename to packages/SystemUI/res-keyguard/values-de/strings.xml
diff --git a/packages/Keyguard/res/values-el/strings.xml b/packages/SystemUI/res-keyguard/values-el/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-el/strings.xml
rename to packages/SystemUI/res-keyguard/values-el/strings.xml
diff --git a/packages/Keyguard/res/values-en-rAU/strings.xml b/packages/SystemUI/res-keyguard/values-en-rAU/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-en-rAU/strings.xml
rename to packages/SystemUI/res-keyguard/values-en-rAU/strings.xml
diff --git a/packages/Keyguard/res/values-en-rGB/strings.xml b/packages/SystemUI/res-keyguard/values-en-rGB/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-en-rGB/strings.xml
rename to packages/SystemUI/res-keyguard/values-en-rGB/strings.xml
diff --git a/packages/Keyguard/res/values-en-rIN/strings.xml b/packages/SystemUI/res-keyguard/values-en-rIN/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-en-rIN/strings.xml
rename to packages/SystemUI/res-keyguard/values-en-rIN/strings.xml
diff --git a/packages/Keyguard/res/values-es-rUS/strings.xml b/packages/SystemUI/res-keyguard/values-es-rUS/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-es-rUS/strings.xml
rename to packages/SystemUI/res-keyguard/values-es-rUS/strings.xml
diff --git a/packages/Keyguard/res/values-es/strings.xml b/packages/SystemUI/res-keyguard/values-es/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-es/strings.xml
rename to packages/SystemUI/res-keyguard/values-es/strings.xml
diff --git a/packages/Keyguard/res/values-et/strings.xml b/packages/SystemUI/res-keyguard/values-et/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-et/strings.xml
rename to packages/SystemUI/res-keyguard/values-et/strings.xml
diff --git a/packages/Keyguard/res/values-eu/strings.xml b/packages/SystemUI/res-keyguard/values-eu/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-eu/strings.xml
rename to packages/SystemUI/res-keyguard/values-eu/strings.xml
diff --git a/packages/Keyguard/res/values-fa/strings.xml b/packages/SystemUI/res-keyguard/values-fa/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-fa/strings.xml
rename to packages/SystemUI/res-keyguard/values-fa/strings.xml
diff --git a/packages/Keyguard/res/values-fi/strings.xml b/packages/SystemUI/res-keyguard/values-fi/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-fi/strings.xml
rename to packages/SystemUI/res-keyguard/values-fi/strings.xml
diff --git a/packages/Keyguard/res/values-fr-rCA/strings.xml b/packages/SystemUI/res-keyguard/values-fr-rCA/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-fr-rCA/strings.xml
rename to packages/SystemUI/res-keyguard/values-fr-rCA/strings.xml
diff --git a/packages/Keyguard/res/values-fr/strings.xml b/packages/SystemUI/res-keyguard/values-fr/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-fr/strings.xml
rename to packages/SystemUI/res-keyguard/values-fr/strings.xml
diff --git a/packages/Keyguard/res/values-gl/strings.xml b/packages/SystemUI/res-keyguard/values-gl/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-gl/strings.xml
rename to packages/SystemUI/res-keyguard/values-gl/strings.xml
diff --git a/packages/Keyguard/res/values-gu/strings.xml b/packages/SystemUI/res-keyguard/values-gu/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-gu/strings.xml
rename to packages/SystemUI/res-keyguard/values-gu/strings.xml
diff --git a/packages/Keyguard/res/values-h560dp/dimens.xml b/packages/SystemUI/res-keyguard/values-h560dp/dimens.xml
similarity index 100%
rename from packages/Keyguard/res/values-h560dp/dimens.xml
rename to packages/SystemUI/res-keyguard/values-h560dp/dimens.xml
diff --git a/packages/Keyguard/res/values-h650dp/dimens.xml b/packages/SystemUI/res-keyguard/values-h650dp/dimens.xml
similarity index 100%
rename from packages/Keyguard/res/values-h650dp/dimens.xml
rename to packages/SystemUI/res-keyguard/values-h650dp/dimens.xml
diff --git a/packages/Keyguard/res/values-hi/strings.xml b/packages/SystemUI/res-keyguard/values-hi/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-hi/strings.xml
rename to packages/SystemUI/res-keyguard/values-hi/strings.xml
diff --git a/packages/Keyguard/res/values-hr/strings.xml b/packages/SystemUI/res-keyguard/values-hr/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-hr/strings.xml
rename to packages/SystemUI/res-keyguard/values-hr/strings.xml
diff --git a/packages/Keyguard/res/values-hu/strings.xml b/packages/SystemUI/res-keyguard/values-hu/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-hu/strings.xml
rename to packages/SystemUI/res-keyguard/values-hu/strings.xml
diff --git a/packages/Keyguard/res/values-hy/strings.xml b/packages/SystemUI/res-keyguard/values-hy/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-hy/strings.xml
rename to packages/SystemUI/res-keyguard/values-hy/strings.xml
diff --git a/packages/Keyguard/res/values-in/strings.xml b/packages/SystemUI/res-keyguard/values-in/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-in/strings.xml
rename to packages/SystemUI/res-keyguard/values-in/strings.xml
diff --git a/packages/Keyguard/res/values-is/strings.xml b/packages/SystemUI/res-keyguard/values-is/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-is/strings.xml
rename to packages/SystemUI/res-keyguard/values-is/strings.xml
diff --git a/packages/Keyguard/res/values-it/strings.xml b/packages/SystemUI/res-keyguard/values-it/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-it/strings.xml
rename to packages/SystemUI/res-keyguard/values-it/strings.xml
diff --git a/packages/Keyguard/res/values-iw/strings.xml b/packages/SystemUI/res-keyguard/values-iw/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-iw/strings.xml
rename to packages/SystemUI/res-keyguard/values-iw/strings.xml
diff --git a/packages/Keyguard/res/values-ja/strings.xml b/packages/SystemUI/res-keyguard/values-ja/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-ja/strings.xml
rename to packages/SystemUI/res-keyguard/values-ja/strings.xml
diff --git a/packages/Keyguard/res/values-ka/strings.xml b/packages/SystemUI/res-keyguard/values-ka/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-ka/strings.xml
rename to packages/SystemUI/res-keyguard/values-ka/strings.xml
diff --git a/packages/Keyguard/res/values-kk/strings.xml b/packages/SystemUI/res-keyguard/values-kk/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-kk/strings.xml
rename to packages/SystemUI/res-keyguard/values-kk/strings.xml
diff --git a/packages/Keyguard/res/values-km/strings.xml b/packages/SystemUI/res-keyguard/values-km/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-km/strings.xml
rename to packages/SystemUI/res-keyguard/values-km/strings.xml
diff --git a/packages/Keyguard/res/values-kn/strings.xml b/packages/SystemUI/res-keyguard/values-kn/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-kn/strings.xml
rename to packages/SystemUI/res-keyguard/values-kn/strings.xml
diff --git a/packages/Keyguard/res/values-ko/strings.xml b/packages/SystemUI/res-keyguard/values-ko/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-ko/strings.xml
rename to packages/SystemUI/res-keyguard/values-ko/strings.xml
diff --git a/packages/Keyguard/res/values-ky/strings.xml b/packages/SystemUI/res-keyguard/values-ky/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-ky/strings.xml
rename to packages/SystemUI/res-keyguard/values-ky/strings.xml
diff --git a/packages/Keyguard/res/values-land/bools.xml b/packages/SystemUI/res-keyguard/values-land/bools.xml
similarity index 100%
rename from packages/Keyguard/res/values-land/bools.xml
rename to packages/SystemUI/res-keyguard/values-land/bools.xml
diff --git a/packages/Keyguard/res/values-land/integers.xml b/packages/SystemUI/res-keyguard/values-land/integers.xml
similarity index 100%
rename from packages/Keyguard/res/values-land/integers.xml
rename to packages/SystemUI/res-keyguard/values-land/integers.xml
diff --git a/packages/Keyguard/res/values-lo/strings.xml b/packages/SystemUI/res-keyguard/values-lo/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-lo/strings.xml
rename to packages/SystemUI/res-keyguard/values-lo/strings.xml
diff --git a/packages/Keyguard/res/values-lt/strings.xml b/packages/SystemUI/res-keyguard/values-lt/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-lt/strings.xml
rename to packages/SystemUI/res-keyguard/values-lt/strings.xml
diff --git a/packages/Keyguard/res/values-lv/strings.xml b/packages/SystemUI/res-keyguard/values-lv/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-lv/strings.xml
rename to packages/SystemUI/res-keyguard/values-lv/strings.xml
diff --git a/packages/Keyguard/res/values-mcc262-mnc07/bools.xml b/packages/SystemUI/res-keyguard/values-mcc262-mnc07/bools.xml
similarity index 100%
rename from packages/Keyguard/res/values-mcc262-mnc07/bools.xml
rename to packages/SystemUI/res-keyguard/values-mcc262-mnc07/bools.xml
diff --git a/packages/Keyguard/res/values-mcc262-mnc08/bools.xml b/packages/SystemUI/res-keyguard/values-mcc262-mnc08/bools.xml
similarity index 100%
rename from packages/Keyguard/res/values-mcc262-mnc08/bools.xml
rename to packages/SystemUI/res-keyguard/values-mcc262-mnc08/bools.xml
diff --git a/packages/Keyguard/res/values-mcc262-mnc11/bools.xml b/packages/SystemUI/res-keyguard/values-mcc262-mnc11/bools.xml
similarity index 100%
rename from packages/Keyguard/res/values-mcc262-mnc11/bools.xml
rename to packages/SystemUI/res-keyguard/values-mcc262-mnc11/bools.xml
diff --git a/packages/Keyguard/res/values-mk/strings.xml b/packages/SystemUI/res-keyguard/values-mk/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-mk/strings.xml
rename to packages/SystemUI/res-keyguard/values-mk/strings.xml
diff --git a/packages/Keyguard/res/values-ml/strings.xml b/packages/SystemUI/res-keyguard/values-ml/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-ml/strings.xml
rename to packages/SystemUI/res-keyguard/values-ml/strings.xml
diff --git a/packages/Keyguard/res/values-mn/strings.xml b/packages/SystemUI/res-keyguard/values-mn/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-mn/strings.xml
rename to packages/SystemUI/res-keyguard/values-mn/strings.xml
diff --git a/packages/Keyguard/res/values-mr/strings.xml b/packages/SystemUI/res-keyguard/values-mr/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-mr/strings.xml
rename to packages/SystemUI/res-keyguard/values-mr/strings.xml
diff --git a/packages/Keyguard/res/values-ms/strings.xml b/packages/SystemUI/res-keyguard/values-ms/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-ms/strings.xml
rename to packages/SystemUI/res-keyguard/values-ms/strings.xml
diff --git a/packages/Keyguard/res/values-my/dimens.xml b/packages/SystemUI/res-keyguard/values-my/dimens.xml
similarity index 100%
rename from packages/Keyguard/res/values-my/dimens.xml
rename to packages/SystemUI/res-keyguard/values-my/dimens.xml
diff --git a/packages/Keyguard/res/values-my/strings.xml b/packages/SystemUI/res-keyguard/values-my/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-my/strings.xml
rename to packages/SystemUI/res-keyguard/values-my/strings.xml
diff --git a/packages/Keyguard/res/values-nb/strings.xml b/packages/SystemUI/res-keyguard/values-nb/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-nb/strings.xml
rename to packages/SystemUI/res-keyguard/values-nb/strings.xml
diff --git a/packages/Keyguard/res/values-ne/strings.xml b/packages/SystemUI/res-keyguard/values-ne/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-ne/strings.xml
rename to packages/SystemUI/res-keyguard/values-ne/strings.xml
diff --git a/packages/Keyguard/res/values-nl/strings.xml b/packages/SystemUI/res-keyguard/values-nl/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-nl/strings.xml
rename to packages/SystemUI/res-keyguard/values-nl/strings.xml
diff --git a/packages/Keyguard/res/values-pa/strings.xml b/packages/SystemUI/res-keyguard/values-pa/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-pa/strings.xml
rename to packages/SystemUI/res-keyguard/values-pa/strings.xml
diff --git a/packages/Keyguard/res/values-pl/strings.xml b/packages/SystemUI/res-keyguard/values-pl/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-pl/strings.xml
rename to packages/SystemUI/res-keyguard/values-pl/strings.xml
diff --git a/packages/Keyguard/res/values-port/bools.xml b/packages/SystemUI/res-keyguard/values-port/bools.xml
similarity index 100%
rename from packages/Keyguard/res/values-port/bools.xml
rename to packages/SystemUI/res-keyguard/values-port/bools.xml
diff --git a/packages/Keyguard/res/values-port/integers.xml b/packages/SystemUI/res-keyguard/values-port/integers.xml
similarity index 100%
rename from packages/Keyguard/res/values-port/integers.xml
rename to packages/SystemUI/res-keyguard/values-port/integers.xml
diff --git a/packages/Keyguard/res/values-pt-rBR/strings.xml b/packages/SystemUI/res-keyguard/values-pt-rBR/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-pt-rBR/strings.xml
rename to packages/SystemUI/res-keyguard/values-pt-rBR/strings.xml
diff --git a/packages/Keyguard/res/values-pt-rPT/strings.xml b/packages/SystemUI/res-keyguard/values-pt-rPT/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-pt-rPT/strings.xml
rename to packages/SystemUI/res-keyguard/values-pt-rPT/strings.xml
diff --git a/packages/Keyguard/res/values-pt/strings.xml b/packages/SystemUI/res-keyguard/values-pt/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-pt/strings.xml
rename to packages/SystemUI/res-keyguard/values-pt/strings.xml
diff --git a/packages/Keyguard/res/values-ro/strings.xml b/packages/SystemUI/res-keyguard/values-ro/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-ro/strings.xml
rename to packages/SystemUI/res-keyguard/values-ro/strings.xml
diff --git a/packages/Keyguard/res/values-ru/strings.xml b/packages/SystemUI/res-keyguard/values-ru/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-ru/strings.xml
rename to packages/SystemUI/res-keyguard/values-ru/strings.xml
diff --git a/packages/Keyguard/res/values-si/strings.xml b/packages/SystemUI/res-keyguard/values-si/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-si/strings.xml
rename to packages/SystemUI/res-keyguard/values-si/strings.xml
diff --git a/packages/Keyguard/res/values-sk/strings.xml b/packages/SystemUI/res-keyguard/values-sk/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-sk/strings.xml
rename to packages/SystemUI/res-keyguard/values-sk/strings.xml
diff --git a/packages/Keyguard/res/values-sl/strings.xml b/packages/SystemUI/res-keyguard/values-sl/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-sl/strings.xml
rename to packages/SystemUI/res-keyguard/values-sl/strings.xml
diff --git a/packages/Keyguard/res/values-sq/strings.xml b/packages/SystemUI/res-keyguard/values-sq/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-sq/strings.xml
rename to packages/SystemUI/res-keyguard/values-sq/strings.xml
diff --git a/packages/Keyguard/res/values-sr/strings.xml b/packages/SystemUI/res-keyguard/values-sr/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-sr/strings.xml
rename to packages/SystemUI/res-keyguard/values-sr/strings.xml
diff --git a/packages/Keyguard/res/values-sv/strings.xml b/packages/SystemUI/res-keyguard/values-sv/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-sv/strings.xml
rename to packages/SystemUI/res-keyguard/values-sv/strings.xml
diff --git a/packages/Keyguard/res/values-sw/strings.xml b/packages/SystemUI/res-keyguard/values-sw/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-sw/strings.xml
rename to packages/SystemUI/res-keyguard/values-sw/strings.xml
diff --git a/packages/Keyguard/res/values-sw320dp/dimens.xml b/packages/SystemUI/res-keyguard/values-sw320dp/dimens.xml
similarity index 100%
rename from packages/Keyguard/res/values-sw320dp/dimens.xml
rename to packages/SystemUI/res-keyguard/values-sw320dp/dimens.xml
diff --git a/packages/Keyguard/res/values-sw360dp/dimens.xml b/packages/SystemUI/res-keyguard/values-sw360dp/dimens.xml
similarity index 100%
rename from packages/Keyguard/res/values-sw360dp/dimens.xml
rename to packages/SystemUI/res-keyguard/values-sw360dp/dimens.xml
diff --git a/packages/Keyguard/res/values-sw380dp/dimens.xml b/packages/SystemUI/res-keyguard/values-sw380dp/dimens.xml
similarity index 100%
rename from packages/Keyguard/res/values-sw380dp/dimens.xml
rename to packages/SystemUI/res-keyguard/values-sw380dp/dimens.xml
diff --git a/packages/Keyguard/res/values-sw540dp-port/dimens.xml b/packages/SystemUI/res-keyguard/values-sw540dp-port/dimens.xml
similarity index 100%
rename from packages/Keyguard/res/values-sw540dp-port/dimens.xml
rename to packages/SystemUI/res-keyguard/values-sw540dp-port/dimens.xml
diff --git a/packages/Keyguard/res/values-sw600dp-land/dimens.xml b/packages/SystemUI/res-keyguard/values-sw600dp-land/dimens.xml
similarity index 100%
rename from packages/Keyguard/res/values-sw600dp-land/dimens.xml
rename to packages/SystemUI/res-keyguard/values-sw600dp-land/dimens.xml
diff --git a/packages/Keyguard/res/values-sw600dp/alias.xml b/packages/SystemUI/res-keyguard/values-sw600dp/alias.xml
similarity index 100%
rename from packages/Keyguard/res/values-sw600dp/alias.xml
rename to packages/SystemUI/res-keyguard/values-sw600dp/alias.xml
diff --git a/packages/Keyguard/res/values-sw600dp/bools.xml b/packages/SystemUI/res-keyguard/values-sw600dp/bools.xml
similarity index 100%
rename from packages/Keyguard/res/values-sw600dp/bools.xml
rename to packages/SystemUI/res-keyguard/values-sw600dp/bools.xml
diff --git a/packages/Keyguard/res/values-sw600dp/dimens.xml b/packages/SystemUI/res-keyguard/values-sw600dp/dimens.xml
similarity index 100%
rename from packages/Keyguard/res/values-sw600dp/dimens.xml
rename to packages/SystemUI/res-keyguard/values-sw600dp/dimens.xml
diff --git a/packages/Keyguard/res/values-sw600dp/styles.xml b/packages/SystemUI/res-keyguard/values-sw600dp/styles.xml
similarity index 100%
rename from packages/Keyguard/res/values-sw600dp/styles.xml
rename to packages/SystemUI/res-keyguard/values-sw600dp/styles.xml
diff --git a/packages/Keyguard/res/values-sw720dp/dimens.xml b/packages/SystemUI/res-keyguard/values-sw720dp/dimens.xml
similarity index 100%
rename from packages/Keyguard/res/values-sw720dp/dimens.xml
rename to packages/SystemUI/res-keyguard/values-sw720dp/dimens.xml
diff --git a/packages/Keyguard/res/values-ta/strings.xml b/packages/SystemUI/res-keyguard/values-ta/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-ta/strings.xml
rename to packages/SystemUI/res-keyguard/values-ta/strings.xml
diff --git a/packages/Keyguard/res/values-te/strings.xml b/packages/SystemUI/res-keyguard/values-te/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-te/strings.xml
rename to packages/SystemUI/res-keyguard/values-te/strings.xml
diff --git a/packages/Keyguard/res/values-th/strings.xml b/packages/SystemUI/res-keyguard/values-th/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-th/strings.xml
rename to packages/SystemUI/res-keyguard/values-th/strings.xml
diff --git a/packages/Keyguard/res/values-tl/strings.xml b/packages/SystemUI/res-keyguard/values-tl/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-tl/strings.xml
rename to packages/SystemUI/res-keyguard/values-tl/strings.xml
diff --git a/packages/Keyguard/res/values-tr/strings.xml b/packages/SystemUI/res-keyguard/values-tr/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-tr/strings.xml
rename to packages/SystemUI/res-keyguard/values-tr/strings.xml
diff --git a/packages/Keyguard/res/values-uk/strings.xml b/packages/SystemUI/res-keyguard/values-uk/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-uk/strings.xml
rename to packages/SystemUI/res-keyguard/values-uk/strings.xml
diff --git a/packages/Keyguard/res/values-ur/strings.xml b/packages/SystemUI/res-keyguard/values-ur/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-ur/strings.xml
rename to packages/SystemUI/res-keyguard/values-ur/strings.xml
diff --git a/packages/Keyguard/res/values-uz/strings.xml b/packages/SystemUI/res-keyguard/values-uz/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-uz/strings.xml
rename to packages/SystemUI/res-keyguard/values-uz/strings.xml
diff --git a/packages/Keyguard/res/values-vi/strings.xml b/packages/SystemUI/res-keyguard/values-vi/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-vi/strings.xml
rename to packages/SystemUI/res-keyguard/values-vi/strings.xml
diff --git a/packages/Keyguard/res/values-zh-rCN/strings.xml b/packages/SystemUI/res-keyguard/values-zh-rCN/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-zh-rCN/strings.xml
rename to packages/SystemUI/res-keyguard/values-zh-rCN/strings.xml
diff --git a/packages/Keyguard/res/values-zh-rHK/strings.xml b/packages/SystemUI/res-keyguard/values-zh-rHK/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-zh-rHK/strings.xml
rename to packages/SystemUI/res-keyguard/values-zh-rHK/strings.xml
diff --git a/packages/Keyguard/res/values-zh-rTW/strings.xml b/packages/SystemUI/res-keyguard/values-zh-rTW/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-zh-rTW/strings.xml
rename to packages/SystemUI/res-keyguard/values-zh-rTW/strings.xml
diff --git a/packages/Keyguard/res/values-zu/strings.xml b/packages/SystemUI/res-keyguard/values-zu/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-zu/strings.xml
rename to packages/SystemUI/res-keyguard/values-zu/strings.xml
diff --git a/packages/Keyguard/res/values/alias.xml b/packages/SystemUI/res-keyguard/values/alias.xml
similarity index 100%
rename from packages/Keyguard/res/values/alias.xml
rename to packages/SystemUI/res-keyguard/values/alias.xml
diff --git a/packages/Keyguard/res/values/arrays.xml b/packages/SystemUI/res-keyguard/values/arrays.xml
similarity index 100%
rename from packages/Keyguard/res/values/arrays.xml
rename to packages/SystemUI/res-keyguard/values/arrays.xml
diff --git a/packages/Keyguard/res/values/attrs.xml b/packages/SystemUI/res-keyguard/values/attrs.xml
similarity index 100%
rename from packages/Keyguard/res/values/attrs.xml
rename to packages/SystemUI/res-keyguard/values/attrs.xml
diff --git a/packages/Keyguard/res/values/bools.xml b/packages/SystemUI/res-keyguard/values/bools.xml
similarity index 100%
rename from packages/Keyguard/res/values/bools.xml
rename to packages/SystemUI/res-keyguard/values/bools.xml
diff --git a/packages/Keyguard/res/values/colors.xml b/packages/SystemUI/res-keyguard/values/colors.xml
similarity index 100%
rename from packages/Keyguard/res/values/colors.xml
rename to packages/SystemUI/res-keyguard/values/colors.xml
diff --git a/packages/Keyguard/res/values/config.xml b/packages/SystemUI/res-keyguard/values/config.xml
similarity index 100%
rename from packages/Keyguard/res/values/config.xml
rename to packages/SystemUI/res-keyguard/values/config.xml
diff --git a/packages/Keyguard/res/values/dimens.xml b/packages/SystemUI/res-keyguard/values/dimens.xml
similarity index 100%
rename from packages/Keyguard/res/values/dimens.xml
rename to packages/SystemUI/res-keyguard/values/dimens.xml
diff --git a/packages/Keyguard/res/values/donottranslate.xml b/packages/SystemUI/res-keyguard/values/donottranslate.xml
similarity index 100%
rename from packages/Keyguard/res/values/donottranslate.xml
rename to packages/SystemUI/res-keyguard/values/donottranslate.xml
diff --git a/packages/Keyguard/res/values/strings.xml b/packages/SystemUI/res-keyguard/values/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values/strings.xml
rename to packages/SystemUI/res-keyguard/values/strings.xml
diff --git a/packages/Keyguard/res/values/styles.xml b/packages/SystemUI/res-keyguard/values/styles.xml
similarity index 100%
rename from packages/Keyguard/res/values/styles.xml
rename to packages/SystemUI/res-keyguard/values/styles.xml
diff --git a/packages/SystemUI/res/layout/keyguard_bottom_area.xml b/packages/SystemUI/res/layout/keyguard_bottom_area.xml
index 078f9d7..fc1271c 100644
--- a/packages/SystemUI/res/layout/keyguard_bottom_area.xml
+++ b/packages/SystemUI/res/layout/keyguard_bottom_area.xml
@@ -66,7 +66,6 @@
         android:layout_height="@dimen/keyguard_affordance_height"
         android:layout_width="@dimen/keyguard_affordance_width"
         android:layout_gravity="bottom|end"
-        android:tint="#ffffffff"
         android:src="@drawable/ic_camera_alt_24dp"
         android:scaleType="center"
         android:contentDescription="@string/accessibility_camera_button" />
@@ -76,7 +75,6 @@
         android:layout_height="@dimen/keyguard_affordance_height"
         android:layout_width="@dimen/keyguard_affordance_width"
         android:layout_gravity="bottom|start"
-        android:tint="#ffffffff"
         android:src="@drawable/ic_phone_24dp"
         android:scaleType="center"
         android:contentDescription="@string/accessibility_phone_button" />
diff --git a/packages/SystemUI/res/values-af/strings.xml b/packages/SystemUI/res/values-af/strings.xml
index e647ade..7e3a457 100644
--- a/packages/SystemUI/res/values-af/strings.xml
+++ b/packages/SystemUI/res/values-af/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Terug"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Tuis"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Kieslys"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Oorsig"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Deursoek"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Bladsy <xliff:g id="ID_1">%1$d</xliff:g> van <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Vou uit"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minimeer"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Maak toe"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Foon raak warm"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Sommige kenmerke is beperk terwyl foon afkoel"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Jou foon sal outomaties probeer om af te koel. Jy kan steeds jou foon gebruik, maar dit sal dalk stadiger wees.\n\nJou foon sal normaalweg werk nadat dit afgekoel het."</string>
diff --git a/packages/SystemUI/res/values-am/strings.xml b/packages/SystemUI/res/values-am/strings.xml
index 392cd01..a793996 100644
--- a/packages/SystemUI/res/values-am/strings.xml
+++ b/packages/SystemUI/res/values-am/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"ተመለስ"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"መነሻ"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"ምናሌ"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"አጠቃላይ ዕይታ"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"ፈልግ"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"ካሜራ"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"ገጽ <xliff:g id="ID_1">%1$d</xliff:g> ከ <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"ዘርጋ"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"አሳንስ"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"ዝጋ"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"ስልኩ እየሞቀ ነው"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"ስልኩ እየቀዘቀዘ ሳለ አንዳንድ ባህሪዎች ይገደባሉ"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"የእርስዎ ስልክ በራስ-ሰር ለመቀዝቀዝ ይሞክራል። አሁንም ስልክዎን መጠቀም ይችላሉ፣ ነገር ግን ሊንቀራፈፍ ይችላል።\n\nአንዴ ስልክዎ ከቀዘቀዘ በኋላ በመደበኝነት ያሄዳል።"</string>
diff --git a/packages/SystemUI/res/values-ar/strings.xml b/packages/SystemUI/res/values-ar/strings.xml
index f9073f5..ae26d83 100644
--- a/packages/SystemUI/res/values-ar/strings.xml
+++ b/packages/SystemUI/res/values-ar/strings.xml
@@ -87,6 +87,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"رجوع"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"الرئيسية"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"القائمة"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"النظرة عامة"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"بحث"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"الكاميرا"</string>
@@ -679,8 +681,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"الصفحة <xliff:g id="ID_1">%1$d</xliff:g> من <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"توسيع"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"تصغير"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"إغلاق"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"تزداد درجة حرارة الهاتف"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"يتم تقييد عمل بعض الميزات إلى أن تنخفض درجة حرارة الهاتف"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"سيحاول الهاتف تخفيض درجة حرارته تلقائيًا. سيظل بإمكانك استخدام هاتفك، ولكن قد يعمل بشكل أبطأ.\n\nبعد أن تنخفض درجة حرارة الهاتف، سيستعيد سرعته المعتادة."</string>
diff --git a/packages/SystemUI/res/values-az/strings.xml b/packages/SystemUI/res/values-az/strings.xml
index ba67b3a..6d5a321 100644
--- a/packages/SystemUI/res/values-az/strings.xml
+++ b/packages/SystemUI/res/values-az/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Geri"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Ana səhifə"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menyu"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"İcmal"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Axtar"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"<xliff:g id="ID_2">%2$d</xliff:g> səhifədən <xliff:g id="ID_1">%1$d</xliff:g> səhifə"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Genişləndirin"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Kiçildin"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Bağlayın"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Telefon qızmağa başlayır"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Telefon soyuyana kimi bəzi funksiyalar məhdudlaşdırılır"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Telefonunuz avtomatik olaraq soyumağa başlayacaq. Telefon istifadəsinə davam edə bilərsiniz, lakin sürəti yavaşlaya bilər.\n\nTelefonunuz soyuduqdan sonra normal işləyəcək."</string>
diff --git a/packages/SystemUI/res/values-b+sr+Latn/strings.xml b/packages/SystemUI/res/values-b+sr+Latn/strings.xml
index 2e01995..4769d98 100644
--- a/packages/SystemUI/res/values-b+sr+Latn/strings.xml
+++ b/packages/SystemUI/res/values-b+sr+Latn/strings.xml
@@ -84,6 +84,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Nazad"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Početna"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Meni"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Pregled"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Pretražite"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -673,8 +675,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"<xliff:g id="ID_1">%1$d</xliff:g>. strana od <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Proširi"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Umanji"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Zatvori"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Telefon se zagrejao"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Neke funkcije su ograničene dok se telefon ne ohladi"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Telefon će automatski pokušati da se ohladi. I dalje ćete moći da koristite telefon, ali će sporije reagovati.\n\nKada se telefon ohladi, normalno će raditi."</string>
diff --git a/packages/SystemUI/res/values-be/strings.xml b/packages/SystemUI/res/values-be/strings.xml
index 60f042e..09d305d 100644
--- a/packages/SystemUI/res/values-be/strings.xml
+++ b/packages/SystemUI/res/values-be/strings.xml
@@ -85,6 +85,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Назад"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"На Галоўную старонку"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Меню"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Агляд"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Пошук"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
@@ -677,8 +679,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Старонка <xliff:g id="ID_1">%1$d</xliff:g> з <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Разгарнуць"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Згарнуць"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Закрыць"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Тэлефон награваецца"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Некаторыя функцыі абмежаваны, пакуль тэлефон астывае"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Ваш тэлефон аўтаматычна паспрабуе астыць. Вы можаце па-ранейшаму карыстацца сваім тэлефонам, але ён можа працаваць больш павольна.\n\nПасля таго як ваш тэлефон астыне, ён будзе працаваць у звычайным рэжыме."</string>
diff --git a/packages/SystemUI/res/values-bg/strings.xml b/packages/SystemUI/res/values-bg/strings.xml
index 2ebac75..6dea2cf 100644
--- a/packages/SystemUI/res/values-bg/strings.xml
+++ b/packages/SystemUI/res/values-bg/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Назад"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Начало"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Меню"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Общ преглед"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Търсене"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Страница <xliff:g id="ID_1">%1$d</xliff:g> от <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Разгъване"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Намаляване"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Затваряне"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Телефонът загрява"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Някои функции са ограничени, докато телефонът се охлажда"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Телефонът ви автоматично ще направи опит за охлаждане. Пак можете да го използвате, но той може да работи по-бавно.\n\nСлед като се охлади, ще работи нормално."</string>
diff --git a/packages/SystemUI/res/values-bn/strings.xml b/packages/SystemUI/res/values-bn/strings.xml
index ed86d3d..e95f5ce 100644
--- a/packages/SystemUI/res/values-bn/strings.xml
+++ b/packages/SystemUI/res/values-bn/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"ফিরুন"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"হোম"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"মেনু"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"এক নজরে"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"অনুসন্ধান করুন"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"ক্যামেরা"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"<xliff:g id="ID_2">%2$d</xliff:g>টির মধ্যে <xliff:g id="ID_1">%1$d</xliff:g> নং পৃষ্ঠা"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"প্রসারিত করুন"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"ছোটো করুন"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"বন্ধ করুন"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"ফোনটি গরম হচ্ছে"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"ফোনটি ঠান্ডা হওয়ার সময় কিছু বৈশিষ্ট্য সীমিত হতে পারে"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"আপনার ফোনটি নিজে থেকেই ঠান্ডা হওয়ার চেষ্টা করবে৷ আপনি তবুও আপনার ফোন ব্যবহার করতে পারেন, কিন্তু এটি একটু ধীরে চলতে পারে৷\n\nআপনার ফোনটি পুরোপুরি ঠান্ডা হয়ে গেলে এটি স্বাভাবিকভাবে চলবে৷"</string>
diff --git a/packages/SystemUI/res/values-bs/strings.xml b/packages/SystemUI/res/values-bs/strings.xml
index d17775c..186d6f3 100644
--- a/packages/SystemUI/res/values-bs/strings.xml
+++ b/packages/SystemUI/res/values-bs/strings.xml
@@ -84,6 +84,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Nazad"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Dugme za početnu stranicu"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Dugme Meni"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Pregled"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Traži"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -675,8 +677,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Stranica <xliff:g id="ID_1">%1$d</xliff:g> od <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Proširi"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Umanji"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Zatvori"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Telefon se pregrijava"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Neke funkcije su ograničene dok se telefon hladi"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Vaš telefon će se automatski pokušati ohladiti. I dalje možete koristi telefon, ali će možda raditi sporije.\n\nNakon što se ohladi, telefon će normalno raditi."</string>
diff --git a/packages/SystemUI/res/values-ca/strings.xml b/packages/SystemUI/res/values-ca/strings.xml
index 009942c..0311231 100644
--- a/packages/SystemUI/res/values-ca/strings.xml
+++ b/packages/SystemUI/res/values-ca/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Enrere"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Pàgina d\'inici"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menú"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Visió general"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Cerca"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Càmera"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Pàgina <xliff:g id="ID_1">%1$d</xliff:g> (<xliff:g id="ID_2">%2$d</xliff:g> en total)"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Desplega"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minimitza"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Tanca"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"El telèfon s\'està escalfant"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Algunes funcions estaran limitades mentre el telèfon es refreda"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"El telèfon provarà de refredar-se automàticament. Podràs continuar utilitzant-lo, però és possible que funcioni més lentament.\n\nUn cop s\'hagi refredat, funcionarà amb normalitat."</string>
diff --git a/packages/SystemUI/res/values-cs/strings.xml b/packages/SystemUI/res/values-cs/strings.xml
index dc3df04..75b2a9a 100644
--- a/packages/SystemUI/res/values-cs/strings.xml
+++ b/packages/SystemUI/res/values-cs/strings.xml
@@ -85,6 +85,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Zpět"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Domů"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Přehled"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Hledat"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Fotoaparát"</string>
@@ -677,8 +679,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Stránka <xliff:g id="ID_1">%1$d</xliff:g> z <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Rozbalit"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minimalizovat"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Zavřít"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Telefon se zahřívá"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Některé funkce jsou při chladnutí omezeny"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Telefon se automaticky pokusí vychladnout. Lze jej nadále používat, ale může být pomalejší.\n\nAž telefon vychladne, bude fungovat normálně."</string>
diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml
index dda65e2..7c2f954 100644
--- a/packages/SystemUI/res/values-da/strings.xml
+++ b/packages/SystemUI/res/values-da/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Tilbage"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Startskærm"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Oversigt"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Søg"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Side <xliff:g id="ID_1">%1$d</xliff:g> af <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Udvid"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minimer"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Luk"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Telefonen er ved at blive varm"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Nogle funktioner er begrænsede, mens telefonen køler ned"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Din telefon forsøger automatisk at køle ned. Du kan stadig bruge telefonen, men den kører muligvis langsommere.\n\nNår din telefon er kølet ned, fungerer den normalt igen."</string>
diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml
index 5509a57..8916dbb 100644
--- a/packages/SystemUI/res/values-de/strings.xml
+++ b/packages/SystemUI/res/values-de/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Zurück"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Startbildschirm"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menü"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Übersicht"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Suchen"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -673,8 +675,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Seite <xliff:g id="ID_1">%1$d</xliff:g> von <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Maximieren"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minimieren"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Schließen"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Smartphone wird warm"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Einige Funktionen sind während der Abkühlphase des Smartphones eingeschränkt"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Dein Smartphone kühlt sich automatisch ab. Du kannst dein Smartphone weiterhin nutzen, aber es reagiert möglicherweise langsamer.\n\nSobald dein Smartphone abgekühlt ist, funktioniert es wieder normal."</string>
diff --git a/packages/SystemUI/res/values-el/strings.xml b/packages/SystemUI/res/values-el/strings.xml
index 1de2dae..baee007 100644
--- a/packages/SystemUI/res/values-el/strings.xml
+++ b/packages/SystemUI/res/values-el/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Πίσω"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Αρχική οθόνη"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Μενού"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Επισκόπηση"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Αναζήτηση"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Φωτογραφική μηχανή"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Σελίδα <xliff:g id="ID_1">%1$d</xliff:g> από <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Ανάπτυξη"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Ελαχιστοποίηση"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Κλείσιμο"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Αύξηση θερμοκρασίας τηλεφώνου"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Ορισμένες λειτουργίες περιορίζονται κατά τη μείωση της θερμοκρασίας"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Το τηλέφωνό σας θα προσπαθήσει να μειώσει αυτόματα τη θερμοκρασία. Μπορείτε να εξακολουθήσετε να το χρησιμοποιείτε, αλλά είναι πιθανό να λειτουργεί πιο αργά.\n\nΜόλις μειωθεί η θερμοκρασία του τηλεφώνου σας, θα λειτουργεί ξανά κανονικά."</string>
diff --git a/packages/SystemUI/res/values-en-rAU/strings.xml b/packages/SystemUI/res/values-en-rAU/strings.xml
index a79caad..e66cb04 100644
--- a/packages/SystemUI/res/values-en-rAU/strings.xml
+++ b/packages/SystemUI/res/values-en-rAU/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Back"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Home"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Overview"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Search"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Camera"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Page <xliff:g id="ID_1">%1$d</xliff:g> of <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Expand"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minimise"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Close"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Phone is getting warm"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Some features limited while phone cools down"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Your phone will automatically try to cool down. You can still use your phone, but it may run more slowly.\n\nOnce your phone has cooled down, it will run normally."</string>
diff --git a/packages/SystemUI/res/values-en-rGB/strings.xml b/packages/SystemUI/res/values-en-rGB/strings.xml
index a79caad..e66cb04 100644
--- a/packages/SystemUI/res/values-en-rGB/strings.xml
+++ b/packages/SystemUI/res/values-en-rGB/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Back"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Home"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Overview"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Search"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Camera"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Page <xliff:g id="ID_1">%1$d</xliff:g> of <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Expand"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minimise"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Close"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Phone is getting warm"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Some features limited while phone cools down"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Your phone will automatically try to cool down. You can still use your phone, but it may run more slowly.\n\nOnce your phone has cooled down, it will run normally."</string>
diff --git a/packages/SystemUI/res/values-en-rIN/strings.xml b/packages/SystemUI/res/values-en-rIN/strings.xml
index a79caad..e66cb04 100644
--- a/packages/SystemUI/res/values-en-rIN/strings.xml
+++ b/packages/SystemUI/res/values-en-rIN/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Back"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Home"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Overview"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Search"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Camera"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Page <xliff:g id="ID_1">%1$d</xliff:g> of <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Expand"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minimise"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Close"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Phone is getting warm"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Some features limited while phone cools down"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Your phone will automatically try to cool down. You can still use your phone, but it may run more slowly.\n\nOnce your phone has cooled down, it will run normally."</string>
diff --git a/packages/SystemUI/res/values-es-rUS/strings.xml b/packages/SystemUI/res/values-es-rUS/strings.xml
index 1c4d42a..a1fa331 100644
--- a/packages/SystemUI/res/values-es-rUS/strings.xml
+++ b/packages/SystemUI/res/values-es-rUS/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Atrás"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Página principal"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menú"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Recientes"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Buscar"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Cámara"</string>
@@ -673,8 +675,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Página <xliff:g id="ID_1">%1$d</xliff:g> de <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Expandir"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minimizar"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Cerrar"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"El teléfono se está calentando"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Se limitarán algunas funciones mientras se enfría el teléfono"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Tu teléfono intentará enfriarse automáticamente. Podrás usarlo, pero es posible que funcione más lento.\n\nUna vez que se haya enfriado, volverá a funcionar correctamente."</string>
diff --git a/packages/SystemUI/res/values-es/strings.xml b/packages/SystemUI/res/values-es/strings.xml
index 28299b7..50a1b1d 100644
--- a/packages/SystemUI/res/values-es/strings.xml
+++ b/packages/SystemUI/res/values-es/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Atrás"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Inicio"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menú"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Aplicaciones recientes"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Buscar"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Cámara"</string>
@@ -673,8 +675,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Página <xliff:g id="ID_1">%1$d</xliff:g> de <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Mostrar"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minimizar"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Cerrar"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"El teléfono se está calentando"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Se limitan algunas funciones mientras el teléfono se enfría"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"El teléfono intentará enfriarse. Puedes seguir utilizándolo, pero es posible que funcione con mayor lentitud.\n\nUna vez que se haya enfriado, funcionará con normalidad."</string>
diff --git a/packages/SystemUI/res/values-et/strings.xml b/packages/SystemUI/res/values-et/strings.xml
index 9a888c5..1c40495 100644
--- a/packages/SystemUI/res/values-et/strings.xml
+++ b/packages/SystemUI/res/values-et/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Tagasi"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Kodu"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menüü"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Ülevaade"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Otsing"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kaamera"</string>
@@ -673,8 +675,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Leht <xliff:g id="ID_1">%1$d</xliff:g>/<xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Laiendamine"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minimeeri"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Sule"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Telefon soojeneb"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Mõned funktsioonid on piiratud, kuni telefon jahtub"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Teie telefon proovib automaatselt maha jahtuda. Saate telefoni ikka kasutada, kuid see võib olla aeglasem.\n\nKui telefon on jahtunud, töötab see tavapäraselt."</string>
diff --git a/packages/SystemUI/res/values-eu/strings.xml b/packages/SystemUI/res/values-eu/strings.xml
index 45ec067..241c9aa 100644
--- a/packages/SystemUI/res/values-eu/strings.xml
+++ b/packages/SystemUI/res/values-eu/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Atzera"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Hasiera"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menua"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Ikuspegi orokorra"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Bilatu"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -673,8 +675,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"<xliff:g id="ID_1">%1$d</xliff:g>/<xliff:g id="ID_2">%2$d</xliff:g> orria"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Zabaldu"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minimizatu"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Itxi"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Berotzen ari da telefonoa"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Eginbide batzuk ezingo dira erabili telefonoa hoztu arte"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Telefonoa automatikoki saiatuko da hozten. Hoztu bitartean, telefonoa erabiltzen jarrai dezakezu, baina mantsoago funtziona lezake.\n\nTelefonoaren tenperatura jaitsi bezain laster, ohi bezala funtzionatzen jarraituko du."</string>
diff --git a/packages/SystemUI/res/values-fa/strings.xml b/packages/SystemUI/res/values-fa/strings.xml
index cd125b5..08ad029 100644
--- a/packages/SystemUI/res/values-fa/strings.xml
+++ b/packages/SystemUI/res/values-fa/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"برگشت"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"صفحهٔ اصلی"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"منو"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"نمای کلی"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"جستجو"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"دوربین"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"صفحه <xliff:g id="ID_1">%1$d</xliff:g> از <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"بزرگ کردن"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"کوچک کردن"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"بستن"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"تلفن درحال گرم شدن است"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"وقتی تلفن درحال خنک شدن است، بعضی از قابلیت‌ها محدود می‌شوند"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"تلفنتان به‌طور خودکار سعی می‌کند خنک شود. همچنان می‌توانید از تلفنتان استفاده کنید، اما ممکن است کندتر عمل کند.\n\nوقتی تلفن خنک شد، عملکرد عادی‌اش از سرگرفته می‌شود."</string>
diff --git a/packages/SystemUI/res/values-fi/strings.xml b/packages/SystemUI/res/values-fi/strings.xml
index 623ee51..36bf542 100644
--- a/packages/SystemUI/res/values-fi/strings.xml
+++ b/packages/SystemUI/res/values-fi/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Takaisin"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Aloituspainike"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Valikko"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Viimeisimmät"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Haku"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Sivu <xliff:g id="ID_1">%1$d</xliff:g>/<xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Laajenna"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Pienennä"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Sulje"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Puhelin lämpenee"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Joidenkin ominaisuuksien käyttöä on rajoitettu puhelimen jäähtymisen aikana."</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Puhelimesi yrittää automaattisesti jäähdyttää itsensä. Voit silti käyttää puhelinta, mutta se voi toimia hitaammin.\n\nKun puhelin on jäähtynyt, se toimii normaalisti."</string>
diff --git a/packages/SystemUI/res/values-fr-rCA/strings.xml b/packages/SystemUI/res/values-fr-rCA/strings.xml
index 5d4867c..3ffb1fa 100644
--- a/packages/SystemUI/res/values-fr-rCA/strings.xml
+++ b/packages/SystemUI/res/values-fr-rCA/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Précédent"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Domicile"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Aperçu"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Rechercher"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Appareil photo"</string>
@@ -673,8 +675,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Page <xliff:g id="ID_1">%1$d</xliff:g> sur <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Développer"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Réduire"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Fermer"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Le téléphone commence à chauffer"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Les fonctionnalités sont limitées pendant que le téléphone refroidit"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Votre téléphone va essayer de se refroidir automatiquement. Vous pouvez toujours l\'utiliser, mais il risque d\'être plus lent.\n\nUne fois refroidi, il fonctionnera normalement."</string>
@@ -685,7 +686,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"Demander le mot de passe"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"Alertes"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"Saisies d\'écran"</string>
-    <!-- no translation found for notification_channel_general (4525309436693914482) -->
-    <skip />
+    <string name="notification_channel_general" msgid="4525309436693914482">"Messages généraux"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"Stockage"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-fr/strings.xml b/packages/SystemUI/res/values-fr/strings.xml
index 97748a2..61c5a07 100644
--- a/packages/SystemUI/res/values-fr/strings.xml
+++ b/packages/SystemUI/res/values-fr/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Retour"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Accueil"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Aperçu"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Rechercher"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Appareil photo"</string>
@@ -673,8 +675,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Page <xliff:g id="ID_1">%1$d</xliff:g> sur <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Développer"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Réduire"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Fermer"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Le téléphone chauffe"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Fonctionnalités limitées pendant le refroidissement du téléphone"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Votre téléphone va essayer de se refroidir automatiquement. Vous pouvez toujours l\'utiliser, mais il risque d\'être plus lent.\n\nUne fois refroidi, il fonctionnera normalement."</string>
diff --git a/packages/SystemUI/res/values-gl/strings.xml b/packages/SystemUI/res/values-gl/strings.xml
index 5821bb9..14d00ef 100644
--- a/packages/SystemUI/res/values-gl/strings.xml
+++ b/packages/SystemUI/res/values-gl/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Volver"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Inicio"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menú"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Visión xeral"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Buscar"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Cámara"</string>
@@ -673,8 +675,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Páxina <xliff:g id="ID_1">%1$d</xliff:g> de <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Despregar"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minimizar"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Pechar"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"O teléfono está quentando"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"O uso dalgunhas funcións é limitado mentres o teléfono arrefría"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"O teléfono tentará arrefriar automaticamente. Podes utilizalo, pero é probable que funcione máis lento.\n\nUnha vez que arrefríe, funcionará con normalidade."</string>
diff --git a/packages/SystemUI/res/values-gu/strings.xml b/packages/SystemUI/res/values-gu/strings.xml
index 5fedb2d..979a2bb 100644
--- a/packages/SystemUI/res/values-gu/strings.xml
+++ b/packages/SystemUI/res/values-gu/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"પાછળ"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"હોમ"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"મેનુ"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"વિહંગાવલોકન"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"શોધો"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"કૅમેરો"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"<xliff:g id="ID_2">%2$d</xliff:g> માંથી <xliff:g id="ID_1">%1$d</xliff:g> પૃષ્ઠ"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"વિસ્તૃત કરો"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"નાનું કરો"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"બંધ કરો"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"ફોન ગરમ થઈ રહ્યો છે"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"ફોન ઠંડો થાય ત્યાં સુધી કેટલીક સુવિધાઓ મર્યાદિત હોય છે"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"તમારો ફોન આપમેળે ઠંડો થવાનો પ્રયાસ કરશે. તમે હજી પણ તમારા ફોનનો ઉપયોગ કરી શકો છો, પરંતુ તે કદાચ થોડો ધીમો ચાલે.\n\nતમારો ફોન ઠંડો થઈ જવા પર, તે સામાન્ય રીતે ચાલશે."</string>
diff --git a/packages/SystemUI/res/values-hi/strings.xml b/packages/SystemUI/res/values-hi/strings.xml
index b6cba3c..29dadd2 100644
--- a/packages/SystemUI/res/values-hi/strings.xml
+++ b/packages/SystemUI/res/values-hi/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"वापस जाएं"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"होम"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"मेनू"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"अवलोकन"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"खोजें"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"कैमरा"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"पेज <xliff:g id="ID_2">%2$d</xliff:g> में से <xliff:g id="ID_1">%1$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"विस्तृत करें"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"छोटा करें"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"बंद करें"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"फ़ोन गर्म हो रहा है"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"फ़ोन के ठंडा होने के दौरान कुछ सुविधाएं सीमित होती हैं"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"आपका फ़ोन अपने आप ठंडा होने की कोशिश करेगा. आप अभी भी अपने फ़ोन का उपयोग कर सकते हैं, लेकिन हो सकता है कि यह धीमी गति से चले.\n\nठंडा हो जाने पर आपका फ़ोन सामान्य रूप से चलेगा."</string>
diff --git a/packages/SystemUI/res/values-hr/strings.xml b/packages/SystemUI/res/values-hr/strings.xml
index 85a744d..b706706 100644
--- a/packages/SystemUI/res/values-hr/strings.xml
+++ b/packages/SystemUI/res/values-hr/strings.xml
@@ -84,6 +84,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Natrag"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Početna"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Izbornik"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Pregled"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Pretraži"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Fotoaparat"</string>
@@ -673,8 +675,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Stranica <xliff:g id="ID_1">%1$d</xliff:g> od <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Proširivanje"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minimiziraj"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Zatvori"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Telefon se zagrijava"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Neke su značajke ograničene dok se telefon hladi"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Telefon će se automatski pokušati ohladiti. Možete ga nastaviti koristiti, no mogao bi raditi sporije.\n\nKad se ohladi, radit će normalno."</string>
diff --git a/packages/SystemUI/res/values-hu/strings.xml b/packages/SystemUI/res/values-hu/strings.xml
index 81f3d5e..ef573cb 100644
--- a/packages/SystemUI/res/values-hu/strings.xml
+++ b/packages/SystemUI/res/values-hu/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Vissza"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Főoldal"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menü"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Áttekintés"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Keresés"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"<xliff:g id="ID_1">%1$d</xliff:g>. oldal, összesen: <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Kibontás"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Kis méret"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Bezárás"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"A telefon melegszik"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Bizonyos funkciók korlátozottan működnek a telefon hűlése közben"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"A telefon automatikusan megpróbál lehűlni. Továbbra is tudja használni a telefont, de elképzelhető, hogy működése lelassul.\n\nAmint a telefon lehűl, újra a szokásos módon működik majd."</string>
diff --git a/packages/SystemUI/res/values-hy/strings.xml b/packages/SystemUI/res/values-hy/strings.xml
index e5169f2..ddcbdfe 100644
--- a/packages/SystemUI/res/values-hy/strings.xml
+++ b/packages/SystemUI/res/values-hy/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Հետ"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Տուն"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Ցանկ"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Համատեսք"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Որոնել"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Ֆոտոխցիկ"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Էջ <xliff:g id="ID_1">%1$d</xliff:g> / <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Ընդարձակել"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Ծալել"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Փակել"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Հեռախոսը տաքանում է"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Հովանալու ընթացքում հեռախոսի որոշ գործառույթներ սահմանափակ են"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Ձեր հեռախոսն ավտոմատ կերպով կփորձի hովանալ: Կարող եք շարունակել օգտագործել հեռախոսը, սակայն հնարավոր է, որ այն ավելի դանդաղ աշխատի:\n\nՀովանալուց հետո հեռախոսը կաշխատի կանոնավոր կերպով:"</string>
diff --git a/packages/SystemUI/res/values-in/strings.xml b/packages/SystemUI/res/values-in/strings.xml
index a2d38e9..bbd7c90 100644
--- a/packages/SystemUI/res/values-in/strings.xml
+++ b/packages/SystemUI/res/values-in/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Kembali"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Utama"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Ringkasan"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Telusuri"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Halaman <xliff:g id="ID_1">%1$d</xliff:g> dari <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Luaskan"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minimalkan"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Tutup"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Ponsel menjadi hangat"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Beberapa fitur dibatasi saat ponsel mendingin"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Ponsel akan otomatis mencoba mendingin. Anda tetap dapat menggunakan ponsel, tetapi mungkin berjalan lebih lambat.\n\nSetelah dingin, ponsel akan berjalan seperti biasa."</string>
diff --git a/packages/SystemUI/res/values-is/strings.xml b/packages/SystemUI/res/values-is/strings.xml
index b0dacfc..d04af35 100644
--- a/packages/SystemUI/res/values-is/strings.xml
+++ b/packages/SystemUI/res/values-is/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Til baka"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Heim"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Valmynd"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Yfirlit"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Leita"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Myndavél"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Blaðsíða <xliff:g id="ID_1">%1$d</xliff:g> af <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Stækka"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minnka"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Loka"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Síminn er að hitna"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Sumir eiginleikar eru takmarkaðir þegar síminn kælir sig"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Síminn reynir sjálfkrafa að kæla sig. Þú getur enn notað símann en hann gæti verið hægvirkari.\n\nEftir að síminn hefur kælt sig niður virkar hann eðlilega."</string>
diff --git a/packages/SystemUI/res/values-it/strings.xml b/packages/SystemUI/res/values-it/strings.xml
index 8dacab2..7b1e117 100644
--- a/packages/SystemUI/res/values-it/strings.xml
+++ b/packages/SystemUI/res/values-it/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Indietro"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Home"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Panoramica"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Cerca"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Fotocamera"</string>
@@ -673,8 +675,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Pagina <xliff:g id="ID_1">%1$d</xliff:g> di <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Espandi"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Riduci a icona"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Chiudi"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Il telefono si sta scaldando"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Alcune funzioni limitate durante il raffreddamento del telefono"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Il telefono cercherà automaticamente di raffreddarsi. Puoi comunque usarlo, ma potrebbe essere più lento.\n\nUna volta raffreddato, il telefono funzionerà normalmente."</string>
diff --git a/packages/SystemUI/res/values-iw/strings.xml b/packages/SystemUI/res/values-iw/strings.xml
index d39a07a..c237fc6 100644
--- a/packages/SystemUI/res/values-iw/strings.xml
+++ b/packages/SystemUI/res/values-iw/strings.xml
@@ -85,6 +85,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"הקודם"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"בית"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"תפריט"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"סקירה"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"חפש"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"מצלמה"</string>
@@ -675,8 +677,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"דף <xliff:g id="ID_1">%1$d</xliff:g> מתוך <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"הרחב"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"מזער"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"סגור"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"הטלפון מתחמם"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"חלק מהתכונות מוגבלות כל עוד הטלפון מתקרר"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"קירור הטלפון ייעשה באופן אוטומטי. תוכל עדיין להשתמש בטלפון, אבל ייתכן שהוא יפעל לאט יותר.\n\nהטלפון יחזור לפעול כרגיל לאחר שיתקרר."</string>
diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml
index 9ea02b9..14d1c42 100644
--- a/packages/SystemUI/res/values-ja/strings.xml
+++ b/packages/SystemUI/res/values-ja/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"戻る"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"ホーム"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"メニュー"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"最近"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"検索"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"カメラ"</string>
@@ -673,8 +675,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"ページ <xliff:g id="ID_1">%1$d</xliff:g>/<xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"展開"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"最小化"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"閉じる"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"スマートフォンの温度が上昇中"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"スマートフォンのクールダウン中は一部の機能が制限されます"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"スマートフォンは自動的にクールダウンを行います。その間もスマートフォンを使用できますが、動作が遅くなる可能性があります。\n\nクールダウンが完了すると、通常どおり動作します。"</string>
diff --git a/packages/SystemUI/res/values-ka/strings.xml b/packages/SystemUI/res/values-ka/strings.xml
index 30b503e..38c52fc 100644
--- a/packages/SystemUI/res/values-ka/strings.xml
+++ b/packages/SystemUI/res/values-ka/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"უკან"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"საწყისი"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"მენიუ"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"მიმოხილვა"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"ძიება"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"კამერა"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"გვერდი <xliff:g id="ID_1">%1$d</xliff:g> / <xliff:g id="ID_2">%2$d</xliff:g>-დან"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"გაშლა"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"ჩაკეცვა"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"დახურვა"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"ტელეფონი ცხელდება"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"ზოგიერთი ფუნქცია შეზღუდული იქნება, სანამ ტელეფონი გაგრილდება"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"თქვენი ტელეფონი გაგრილებას ავტომატურად შეეცდება. შეგიძლიათ გააგრძელოთ მისით სარგებლობა, თუმცა ტელეფონმა შეიძლება უფრო ნელა იმუშაოს.\n\nგაგრილების შემდგომ ის ჩვეულებრივად იმუშავებს."</string>
diff --git a/packages/SystemUI/res/values-kk/strings.xml b/packages/SystemUI/res/values-kk/strings.xml
index cfcd2ec..0a8f3e7 100644
--- a/packages/SystemUI/res/values-kk/strings.xml
+++ b/packages/SystemUI/res/values-kk/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Артқа"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Үй"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Mәзір"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Шолу"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Іздеу"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"<xliff:g id="ID_2">%2$d</xliff:g> ішінен <xliff:g id="ID_1">%1$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Жаю"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Кішірейту"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Жабу"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Телефон қызуда"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Телефон толық суығанға дейін, кейбір функциялардың жұмысы шектеледі"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Телефон автоматты түрде суи бастайды. Оны пайдалана бере аласыз, бірақ ол баяуырақ жұмыс істеуі мүмкін.\n\nТелефон суығаннан кейін, оның жұмысы қалпына келеді."</string>
diff --git a/packages/SystemUI/res/values-km/strings.xml b/packages/SystemUI/res/values-km/strings.xml
index a958258..0621623 100644
--- a/packages/SystemUI/res/values-km/strings.xml
+++ b/packages/SystemUI/res/values-km/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"ថយក្រោយ"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"គេហ​ទំព័រ"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"ម៉ឺនុយ"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"ទិដ្ឋភាព"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"ស្វែងរក"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"ម៉ាស៊ីន​ថត"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"ទំព័រ <xliff:g id="ID_1">%1$d</xliff:g> នៃ <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"ពង្រីក"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"បង្រួម"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"បិទ"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"ទូរសព្ទ​នេះ​កំពុង​កើន​កម្តៅ"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"មុខងារ​មួយ​ចំនួន​នឹង​មិន​អាច​ប្រើ​បាន​ពេញលេញ​នោះ​ទេ ខណៈពេល​ដែល​ទូរសព្ទ​កំពុង​បញ្ចុះ​កម្តៅ"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"ទូរសព្ទ​របស់អ្នក​នឹង​ព្យាយាម​បញ្ចុះ​កម្តៅ​ដោយ​ស្វ័យប្រវត្តិ។ អ្នក​នៅតែ​អាច​ប្រើ​ទូរសព្ទ​របស់អ្នក​បាន​ដដែល​ ប៉ុន្តែ​វា​នឹង​ដំណើរ​ការ​យឺត​ជាង​មុន។\n\nបន្ទាប់​ពី​ទូរសព្ទ​របស់អ្នក​ត្រជាក់​ជាង​មុន​ហើយ វា​នឹង​ដំណើរការ​ដូច​ធម្មតា។"</string>
diff --git a/packages/SystemUI/res/values-kn/strings.xml b/packages/SystemUI/res/values-kn/strings.xml
index ba681db..79c5695 100644
--- a/packages/SystemUI/res/values-kn/strings.xml
+++ b/packages/SystemUI/res/values-kn/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"ಹಿಂದೆ"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"ಮುಖಪುಟ"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"ಮೆನು"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"ಸಮಗ್ರ ನೋಟ"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"ಹುಡುಕಿ"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"ಕ್ಯಾಮರಾ"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"<xliff:g id="ID_2">%2$d</xliff:g> ರಲ್ಲಿ <xliff:g id="ID_1">%1$d</xliff:g> ಪುಟ"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"ವಿಸ್ತೃತಗೊಳಿಸು"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"ಕುಗ್ಗಿಸಿ"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"ಮುಚ್ಚಿ"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"ಫೋನ್ ಬಿಸಿಯಾಗುತ್ತಿದೆ"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"ಫೋನ್ ತಣ್ಣಗಾಗುವವರೆಗೂ ಕೆಲವು ವೈಶಿಷ್ಟ್ಯಗಳನ್ನು ಸೀಮಿತಗೊಳಿಸುತ್ತದೆ"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"ನಿಮ್ಮ ಫೋನ್ ಸ್ವಯಂಚಾಲಿತವಾಗಿ ತಣ್ಣಗಾಗಲು ಪ್ರಯತ್ನಿಸುತ್ತದೆ. ನಿಮ್ಮ ಫೋನ್ ಅನ್ನು ನೀವು ಈಗಲೂ ಬಳಸಬಹುದಾಗಿರುತ್ತದೆ, ಆದರೆ ಇದು ನಿಧಾನವಾಗಿರಬಹುದು.\n\nಒಮ್ಮೆ ನಿಮ್ಮ ಫೋನ್ ತಣ್ಣಗಾದ ನಂತರ ಇದು ಸಾಮಾನ್ಯ ರೀತಿಯಲ್ಲಿ ಕಾರ್ಯನಿರ್ವಹಿಸುತ್ತದೆ."</string>
diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml
index c5faa18..f7071f8 100644
--- a/packages/SystemUI/res/values-ko/strings.xml
+++ b/packages/SystemUI/res/values-ko/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"뒤로"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"홈"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"메뉴"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"최근 사용"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"검색"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"카메라"</string>
@@ -673,8 +675,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"<xliff:g id="ID_2">%2$d</xliff:g>페이지 중 <xliff:g id="ID_1">%1$d</xliff:g>페이지"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"펼치기"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"최소화"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"닫기"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"휴대전화 온도가 높음"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"휴대전화 온도를 낮추는 동안 일부 기능이 제한됩니다."</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"휴대전화 온도를 자동으로 낮추려고 시도합니다. 휴대전화를 계속 사용할 수는 있지만 작동이 느려질 수도 있습니다.\n\n휴대전화 온도가 낮아지면 정상적으로 작동됩니다."</string>
diff --git a/packages/SystemUI/res/values-ky/strings.xml b/packages/SystemUI/res/values-ky/strings.xml
index 6f57a73..aca37b6 100644
--- a/packages/SystemUI/res/values-ky/strings.xml
+++ b/packages/SystemUI/res/values-ky/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Артка"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Үйгө"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Меню"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Көз жүгүртүү"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Издөө"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"<xliff:g id="ID_2">%2$d</xliff:g> ичинен <xliff:g id="ID_1">%1$d</xliff:g>-бет"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Жайып көрсөтүү"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Кичирейтүү"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Жабуу"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Телефонуңуз ысып баратат"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Телефон сууганча айрым элементтердин иши чектелген"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Телефонуңуз автоматтык түрдө сууйт. Аны колдоно берсеңиз болот, бирок ал жайыраак иштеп калат.\n\nТелефонуңуз суугандан кийин адаттагыдай эле иштеп баштайт."</string>
diff --git a/packages/SystemUI/res/values-lo/strings.xml b/packages/SystemUI/res/values-lo/strings.xml
index c7475bc..4c7aafa 100644
--- a/packages/SystemUI/res/values-lo/strings.xml
+++ b/packages/SystemUI/res/values-lo/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"ກັບຄືນ"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"ໜ້າທຳອິດ"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"ເມນູ"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"​ພາບ​ຮວມ"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"ຊອກຫາ"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"ກ້ອງ"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"<xliff:g id="ID_1">%1$d</xliff:g> ຈາກທັງໝົດ <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"ຂະຫຍາຍ"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"ຫຍໍ້"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"ປິດ"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"ໂທລະສັບກຳລັງຮ້ອນຂຶ້ນ"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"ຄຸນສົມບັດບາງຢ່າງຖືກຈຳກັດໄວ້ເນື່ອງໃນເວລາຫຼຸດອຸນຫະພູມຂອງໂທລະສັບ"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"ໂທລະສັບຂອງທ່ານຈະພະຍາຍາມລົດອຸນຫະພູມລົງ. ທ່ານຍັງຄົງສາມາດໃຊ້ໂທລະສັບຂອງທ່ານໄດ້ຢູ່, ແຕ່ມັນຈະເຮັດວຽກຊ້າລົງ.\n\nເມື່ອໂທລະສັບຂອງທ່ານບໍ່ຮ້ອນຫຼາຍແລ້ວ, ມັນຈະກັບມາເຮັດວຽກຕາມປົກກະຕິ."</string>
diff --git a/packages/SystemUI/res/values-lt/strings.xml b/packages/SystemUI/res/values-lt/strings.xml
index e6713f2..9438368 100644
--- a/packages/SystemUI/res/values-lt/strings.xml
+++ b/packages/SystemUI/res/values-lt/strings.xml
@@ -85,6 +85,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Atgal"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Pagrindinis"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Meniu"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Apžvalga"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Ieškoti"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Fotoaparatas"</string>
@@ -675,8 +677,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"<xliff:g id="ID_1">%1$d</xliff:g> psl. iš <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Išskleisti"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Sumažinti"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Uždaryti"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Telefonas kaista"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Kai kurios funkcijos gali neveikti, kol telefonas vėsta"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Telefonas automatiškai bandys atvėsti. Telefoną vis tiek galėsite naudoti, tačiau jis gali veikti lėčiau.\n\nKai telefonas atvės, jis veiks įprastai."</string>
diff --git a/packages/SystemUI/res/values-lv/strings.xml b/packages/SystemUI/res/values-lv/strings.xml
index ba6ce3c..29b227a 100644
--- a/packages/SystemUI/res/values-lv/strings.xml
+++ b/packages/SystemUI/res/values-lv/strings.xml
@@ -84,6 +84,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Atpakaļ"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Sākums"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Izvēlne"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Pārskats"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Meklēt"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -673,8 +675,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"<xliff:g id="ID_1">%1$d</xliff:g>. lpp. no <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Izvērst"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minimizēt"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Aizvērt"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Tālrunis kļūst silts"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Dažas funkcijas ir ierobežotas, kamēr tālrunis mēģina atdzist"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Jūsu tālrunis automātiski mēģinās atdzist. Jūs joprojām varat izmantot tālruni, taču tas, iespējams, darbosies lēnāk.\n\nTiklīdz tālrunis būs atdzisis, tas darbosies normāli."</string>
diff --git a/packages/SystemUI/res/values-mk/strings.xml b/packages/SystemUI/res/values-mk/strings.xml
index 5308d65..91bfd35 100644
--- a/packages/SystemUI/res/values-mk/strings.xml
+++ b/packages/SystemUI/res/values-mk/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Назад"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Почетна страница"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Мени"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Краток преглед"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Пребарај"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Страница <xliff:g id="ID_1">%1$d</xliff:g> од <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Проширете"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Минимизирај"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Затвори"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Телефонот се загрева"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Некои функции се ограничени додека телефонот се лади"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Телефонот автоматски ќе се обиде да се олади. Вие сепак ќе може да го користите, но тој може да работи побавно.\n\nОткако ќе се олади, ќе работи нормално."</string>
diff --git a/packages/SystemUI/res/values-ml/strings.xml b/packages/SystemUI/res/values-ml/strings.xml
index cf32631..5fd5022 100644
--- a/packages/SystemUI/res/values-ml/strings.xml
+++ b/packages/SystemUI/res/values-ml/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"മടങ്ങുക"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"ഹോം"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"മെനു"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"കാഴ്ച"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"തിരയൽ"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"ക്യാമറ"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"പേജ് <xliff:g id="ID_1">%1$d</xliff:g> / <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"വികസിപ്പിക്കുക"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"ചെറുതാക്കുക‍"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"അടയ്‌ക്കുക"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"ഫോൺ ചൂടായിക്കൊണ്ടിരിക്കുന്നു"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"ഫോൺ തണുത്തുകൊണ്ടിരിക്കുമ്പോൾ ചില ഫീച്ചറുകൾ പരിമിതപ്പെടുത്തപ്പെടും"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"നിങ്ങളുടെ ഫോൺ സ്വയമേവ തണുക്കാൻ ശ്രമിക്കും. നിങ്ങൾക്ക് അപ്പോഴും ഫോൺ ഉപയോഗിക്കാമെങ്കിലും പ്രവർത്തനം മന്ദഗതിയിലായിരിക്കും.\n\nതണുത്തുകഴിഞ്ഞാൽ, ഫോൺ സാധാരണ ഗതിയിൽ പ്രവർത്തിക്കും."</string>
@@ -683,7 +684,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"പാസ്‌വേഡ് ആവശ്യപ്പെടുക"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"അലേർട്ടുകൾ"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"സ്‌ക്രീൻഷോട്ടുകൾ"</string>
-    <!-- no translation found for notification_channel_general (4525309436693914482) -->
-    <skip />
+    <string name="notification_channel_general" msgid="4525309436693914482">"പൊതുവായ സന്ദേശങ്ങൾ"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"സ്റ്റോറേജ്"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-mn/strings.xml b/packages/SystemUI/res/values-mn/strings.xml
index 336429f..1c0d8ea 100644
--- a/packages/SystemUI/res/values-mn/strings.xml
+++ b/packages/SystemUI/res/values-mn/strings.xml
@@ -81,6 +81,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Буцах"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Гэрийн"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Цэс"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Тойм"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Хайх"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Камер"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"<xliff:g id="ID_2">%2$d</xliff:g>-н <xliff:g id="ID_1">%1$d</xliff:g>-р хуудас"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Дэлгэх"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Багасгах"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Хаах"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Утас халж эхэлж байна"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Таны утас хөрж байх зуур зарим онцлогийг хязгаарласан"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Таны утас автоматаар хөрөх болно. Та утсаа ашиглаж болох хэдий ч удаан ажиллаж болзошгүй.\n\nТаны утас хөрсний дараагаар хэвийн ажиллана."</string>
diff --git a/packages/SystemUI/res/values-mr/strings.xml b/packages/SystemUI/res/values-mr/strings.xml
index 7b09c9d..47679c7 100644
--- a/packages/SystemUI/res/values-mr/strings.xml
+++ b/packages/SystemUI/res/values-mr/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"परत"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"मुख्‍यपृष्‍ठ"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"मेनू"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"विहंगावलोकन"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"शोधा"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"कॅमेरा"</string>
@@ -683,7 +685,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"संकेतशब्दासाठी संकेत"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"सूचना"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"स्क्रीनशॉट"</string>
-    <!-- no translation found for notification_channel_general (4525309436693914482) -->
-    <skip />
+    <string name="notification_channel_general" msgid="4525309436693914482">"सर्वसाधारण संदेश"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"संचय"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ms/strings.xml b/packages/SystemUI/res/values-ms/strings.xml
index 9ba75b2..7ed12dc17 100644
--- a/packages/SystemUI/res/values-ms/strings.xml
+++ b/packages/SystemUI/res/values-ms/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Kembali"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Rumah"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Ikhtisar"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Cari"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Halaman <xliff:g id="ID_1">%1$d</xliff:g> daripada <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Kembangkan"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minimumkan"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Tutup"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Telefon semakin panas"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Sesetengah ciri adalah terhad semasa telefon menyejuk"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Telefon anda akan cuba menyejuk secara automatik. Anda masih dapat menggunakan telefon itu tetapi telefon tersebut mungkin berjalan lebih perlahan.\n\nSetelah telefon anda sejuk, telefon itu akan berjalan seperti biasa."</string>
diff --git a/packages/SystemUI/res/values-my/strings.xml b/packages/SystemUI/res/values-my/strings.xml
index 32ff25d..c2b1e59 100644
--- a/packages/SystemUI/res/values-my/strings.xml
+++ b/packages/SystemUI/res/values-my/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"နောက်သို့"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"ပင်မစာမျက်နှာ"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"မီနူး"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"ခြုံကြည့်မှု။"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"ရှာဖွေရန်"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"ကင်မရာ"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"စာမျက်နှာ <xliff:g id="ID_2">%2$d</xliff:g> အနက်မှ စာမျက်နှာ <xliff:g id="ID_1">%1$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"ချဲ့ရန်"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"ချုံ့ရန်"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"ပိတ်ရန်"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"ဖုန်း ပူနွေးလာပါပြီ"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"ဖုန်းကို အေးအောင်ပြုလုပ်နေစဉ်တွင် အချို့ဝန်ဆောင်မှုများကို ကန့်သတ်ထားပါသည်"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"သင့်ဖုန်းသည် အလိုအလျောက် ပြန်အေးသွားပါလိမ့်မည်။ ဖုန်းကို အသုံးပြုနိုင်ပါသေးသည် သို့သော် ပိုနှေးနိုင်ပါသည်။\n\nသင့်ဖုန်း အေးသွားသည်နှင့် ပုံမှန်အတိုင်း ပြန်အလုပ်လုပ်ပါလိမ့်မည်။"</string>
diff --git a/packages/SystemUI/res/values-nb/strings.xml b/packages/SystemUI/res/values-nb/strings.xml
index 6624583..60dcae8 100644
--- a/packages/SystemUI/res/values-nb/strings.xml
+++ b/packages/SystemUI/res/values-nb/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Tilbake"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Startside"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Meny"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Oversikt"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Søk"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Side <xliff:g id="ID_1">%1$d</xliff:g> av <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Vis"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minimer"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Lukk"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Telefonen begynner å bli varm"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Enkelte funksjoner er begrenset mens telefonen kjøles ned"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Telefonen din kommer til å prøve å kjøle seg ned automatisk. Du kan fremdeles bruke telefonen, men den kjører muligens saktere.\n\nTelefonen kommer til å kjøre som normalt, når den har kjølt seg ned."</string>
diff --git a/packages/SystemUI/res/values-ne/strings.xml b/packages/SystemUI/res/values-ne/strings.xml
index ee04992..ad450ba 100644
--- a/packages/SystemUI/res/values-ne/strings.xml
+++ b/packages/SystemUI/res/values-ne/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"पछाडि"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"गृह"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"मेनु"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"सारांश"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"खोज्नुहोस्"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"क्यामेरा"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"<xliff:g id="ID_2">%2$d</xliff:g> मध्ये पृष्ठ <xliff:g id="ID_1">%1$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"विस्तृत गर्नुहोस्"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"सानो बनाउनुहोस्"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"बन्द गर्नुहोस्"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"फोन तातो भइरहेको छ"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"फोन चिसो हुँदै गर्दा केही विशेषताहरूलाई सीमित गरिन्छ"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"तपाईंको फोन स्वतः चिसो हुने प्रयास गर्नेछ। तपाईं अझै पनि आफ्नो फोनको प्रयोग गर्न सक्नुहुन्छ तर त्यो अझ ढिलो चल्न सक्छ।\n\nचिसो भएपछि तपाईंको फोन सामान्य गतिमा चल्नेछ।"</string>
@@ -683,7 +684,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"पासवर्ड माग्ने"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"अलर्टहरू"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"स्क्रिनशटहरू"</string>
-    <!-- no translation found for notification_channel_general (4525309436693914482) -->
-    <skip />
+    <string name="notification_channel_general" msgid="4525309436693914482">"सामान्य सन्देशहरू"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"भण्डारण"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-nl/strings.xml b/packages/SystemUI/res/values-nl/strings.xml
index f4c306a..398f39d 100644
--- a/packages/SystemUI/res/values-nl/strings.xml
+++ b/packages/SystemUI/res/values-nl/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Terug"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Homepage"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Overzicht"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Zoeken"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Camera"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Pagina <xliff:g id="ID_1">%1$d</xliff:g> van <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Uitvouwen"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minimaliseren"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Sluiten"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"De telefoon wordt warm"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Bepaalde functies zijn beperkt terwijl de telefoon afkoelt"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Je telefoon probeert automatisch af te koelen. Je kunt je telefoon nog steeds gebruiken, maar deze kan langzamer werken.\n\nZodra de telefoon is afgekoeld, werkt deze weer normaal."</string>
diff --git a/packages/SystemUI/res/values-pa/strings.xml b/packages/SystemUI/res/values-pa/strings.xml
index 97ec2f1..c06dfde 100644
--- a/packages/SystemUI/res/values-pa/strings.xml
+++ b/packages/SystemUI/res/values-pa/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"ਪਿੱਛੇ"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"ਘਰ"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"ਮੀਨੂ"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"ਰੂਪ-ਰੇਖਾ"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"ਖੋਜੋ"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"ਕੈਮਰਾ"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"<xliff:g id="ID_2">%2$d</xliff:g> ਦਾ <xliff:g id="ID_1">%1$d</xliff:g> ਪੰਨਾ"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"ਵਿਸਤਾਰ ਕਰੋ"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"ਛੋਟਾ ਕਰੋ"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"ਬੰਦ ਕਰੋ"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"ਫ਼ੋਨ ਗਰਮ ਹੋ ਰਿਹਾ ਹੈ"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"ਫ਼ੋਨ ਦੇ ਠੰਡਾ ਹੋਣ ਦੇ ਦੌਰਾਨ ਕੁਝ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਸੀਮਿਤ ਹੁੰਦੀਆਂ ਹਨ"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"ਤੁਹਾਡਾ ਫ਼ੋਨ ਸਵੈਚਲਿਤ ਰੂਪ ਵਿੱਚ ਠੰਡਾ ਹੋਣ ਦੀ ਕੋਸ਼ਿਸ਼ ਕਰੇਗਾ। ਤੁਸੀਂ ਹਾਲੇ ਵੀ ਆਪਣੇ ਫ਼ੋਨ ਨੂੰ ਵਰਤ ਸਕਦੇ ਹੋ, ਪਰੰਤੂ ਹੋ ਸਕਦਾ ਹੈ ਕਿ ਇਹ ਵਧੇਰੇ ਹੌਲੀ ਚੱਲੇ।\n\nਇੱਕ ਵਾਰ ਠੰਡਾ ਹੋਣ ਤੋਂ ਬਾਅਦ ਤੁਹਾਡਾ ਫ਼ੋਨ ਸਧਾਰਨ ਤੌਰ \'ਤੇ ਚੱਲੇਗਾ।"</string>
diff --git a/packages/SystemUI/res/values-pl/strings.xml b/packages/SystemUI/res/values-pl/strings.xml
index 04efcd4..b93ef44 100644
--- a/packages/SystemUI/res/values-pl/strings.xml
+++ b/packages/SystemUI/res/values-pl/strings.xml
@@ -85,6 +85,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Wróć"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Ekran główny"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Przegląd"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Szukaj"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Aparat"</string>
@@ -675,8 +677,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Strona <xliff:g id="ID_1">%1$d</xliff:g> z <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Rozwiń"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minimalizuj"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Zamknij"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Telefon się nagrzewa"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Podczas obniżania temperatury telefonu niektóre funkcje są ograniczone"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Telefon automatycznie podejmie próbę obniżenia temperatury. Możesz go wciąż używać, ale telefon może działać wolniej.\n\nGdy temperatura się obniży, telefon będzie działał normalnie."</string>
diff --git a/packages/SystemUI/res/values-pt-rBR/strings.xml b/packages/SystemUI/res/values-pt-rBR/strings.xml
index e5a87547..9414a87 100644
--- a/packages/SystemUI/res/values-pt-rBR/strings.xml
+++ b/packages/SystemUI/res/values-pt-rBR/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Voltar"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Página inicial"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Visão geral"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Pesquisar"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Câmera"</string>
@@ -673,8 +675,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Página <xliff:g id="ID_1">%1$d</xliff:g> de <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Expandir"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minimizar"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Fechar"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"O smartphone está esquentando"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Alguns recursos ficam limitados enquanto o smartphone é resfriado"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Seu smartphone tentará se resfriar automaticamente. Você ainda poderá usá-lo, mas talvez ele fique mais lento.\n\nQuando o smartphone estiver resfriado, ele voltará ao normal."</string>
diff --git a/packages/SystemUI/res/values-pt-rPT/strings.xml b/packages/SystemUI/res/values-pt-rPT/strings.xml
index 4304d99..f4ff723 100644
--- a/packages/SystemUI/res/values-pt-rPT/strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Anterior"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Página inicial"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Visão geral"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Pesquisar"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Câmara"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Página <xliff:g id="ID_1">%1$d</xliff:g> de <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Expandir"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minimizar"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Fechar"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"O telemóvel está a aquecer"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Algumas funcionalidades são limitadas enquanto o telemóvel arrefece"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"O telemóvel tenta arrefecer automaticamente. Pode continuar a utilizá-lo, mas este poderá funcionar mais lentamente.\n\nAssim que o telemóvel tiver arrefecido, funcionará normalmente."</string>
diff --git a/packages/SystemUI/res/values-pt/strings.xml b/packages/SystemUI/res/values-pt/strings.xml
index e5a87547..9414a87 100644
--- a/packages/SystemUI/res/values-pt/strings.xml
+++ b/packages/SystemUI/res/values-pt/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Voltar"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Página inicial"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Visão geral"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Pesquisar"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Câmera"</string>
@@ -673,8 +675,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Página <xliff:g id="ID_1">%1$d</xliff:g> de <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Expandir"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minimizar"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Fechar"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"O smartphone está esquentando"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Alguns recursos ficam limitados enquanto o smartphone é resfriado"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Seu smartphone tentará se resfriar automaticamente. Você ainda poderá usá-lo, mas talvez ele fique mais lento.\n\nQuando o smartphone estiver resfriado, ele voltará ao normal."</string>
diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml
index 535b5c3..cf1304e 100644
--- a/packages/SystemUI/res/values-ro/strings.xml
+++ b/packages/SystemUI/res/values-ro/strings.xml
@@ -84,6 +84,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Înapoi"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Ecranul de pornire"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Meniu"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Vizualizare generală"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Căutați"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Cameră foto"</string>
@@ -675,8 +677,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Pagina <xliff:g id="ID_1">%1$d</xliff:g> din <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Extindeți"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minimizați"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Închideți"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Telefonul se încălzește"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Anumite funcții sunt limitate în timp ce telefonul se răcește"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Telefonul va încerca automat să se răcească. Puteți folosi telefonul în continuare, dar este posibil să funcționeze mai lent.\n\nDupă ce se răcește, telefonul va funcționa normal."</string>
diff --git a/packages/SystemUI/res/values-ru/strings.xml b/packages/SystemUI/res/values-ru/strings.xml
index 68d499d..e2a1f74 100644
--- a/packages/SystemUI/res/values-ru/strings.xml
+++ b/packages/SystemUI/res/values-ru/strings.xml
@@ -85,6 +85,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Назад"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Домой"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Меню"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Обзор."</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Поиск"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
@@ -677,8 +679,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Страница <xliff:g id="ID_1">%1$d</xliff:g> из <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Развернуть"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Свернуть"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Закрыть"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Телефон нагревается"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Пока телефон не остынет, некоторые функции могут быть недоступны."</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Ваш телефон остынет автоматически.\n\nОбратите внимание, что до тех пор он может работать медленнее, чем обычно."</string>
diff --git a/packages/SystemUI/res/values-si/strings.xml b/packages/SystemUI/res/values-si/strings.xml
index 9c58ba1..6ede3da 100644
--- a/packages/SystemUI/res/values-si/strings.xml
+++ b/packages/SystemUI/res/values-si/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"ආපසු"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"මුල් පිටුව"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"මෙනුව"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"දළ විශ්ලේෂණය"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"සොයන්න"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"කැමරාව"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"<xliff:g id="ID_2">%2$d</xliff:g> න් <xliff:g id="ID_1">%1$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"දිග හරින්න"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"කුඩා කරන්න"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"වසන්න"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"දුරකථනය උණුසුම් වෙමින්"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"දුරකථනය සිසිල් වන අතරතුර සමහර විශේෂාංග සීමිත විය හැකිය"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"ඔබගේ දුරකථනය ස්වයංක්‍රියව සිසිල් වීමට උත්සාහ කරනු ඇත. ඔබට තවම ඔබේ දුරකථනය භාවිත කළ හැකිය, නමුත් එය සෙමින් ධාවනය විය හැකිය.\n\nඔබේ දුරකථනය සිසිල් වූ පසු, එය සාමාන්‍ය ලෙස ධාවනය වනු ඇත."</string>
diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml
index cddcaf0..b81c191 100644
--- a/packages/SystemUI/res/values-sk/strings.xml
+++ b/packages/SystemUI/res/values-sk/strings.xml
@@ -85,6 +85,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Späť"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Plocha"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Prehľad"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Hľadať"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Fotoaparát"</string>
@@ -677,8 +679,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Strana <xliff:g id="ID_1">%1$d</xliff:g> z <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Rozbaliť"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minimalizovať"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Zavrieť"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Teplota telefónu stúpa"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Niektoré funkcie budú obmedzené, dokým neklesne teplota telefónu"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Váš telefón sa automaticky pokúsi schladiť. Môžete ho naďalej používať, ale môže fungovať pomalšie.\n\nPo poklese teploty bude telefón fungovať ako normálne."</string>
diff --git a/packages/SystemUI/res/values-sl/strings.xml b/packages/SystemUI/res/values-sl/strings.xml
index da993b4..e8ee37a 100644
--- a/packages/SystemUI/res/values-sl/strings.xml
+++ b/packages/SystemUI/res/values-sl/strings.xml
@@ -85,6 +85,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Nazaj"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Začetni zaslon"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Meni"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Pregled"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Iskanje"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Fotoaparat"</string>
@@ -677,8 +679,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"<xliff:g id="ID_1">%1$d</xliff:g>. stran od <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Razširi"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minimiraj"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Zapri"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Telefon se segreva"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Nekatere funkcije bodo med ohlajanjem omejene."</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Telefon se bo samodejno poskusil ohladiti. Še naprej ga lahko uporabljate, vendar bo morda deloval počasneje.\n\nKo se telefon ohladi, bo zopet deloval kot običajno."</string>
diff --git a/packages/SystemUI/res/values-sq/strings.xml b/packages/SystemUI/res/values-sq/strings.xml
index 6b8bb97..152ecef 100644
--- a/packages/SystemUI/res/values-sq/strings.xml
+++ b/packages/SystemUI/res/values-sq/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Prapa"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Faqja bazë"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menyja"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Përmbledhje"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Kërko"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Faqja <xliff:g id="ID_1">%1$d</xliff:g> nga <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Zgjero"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minimizo"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Mbyll"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Telefoni po bëhet i ngrohtë"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Disa funksione janë të kufizuara kur telefoni është duke u ftohur"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Telefoni yt do të përpiqet automatikisht që të ftohet. Mund ta përdorësh përsëri telefonin, por ai mund të punojë më ngadalë.\n\nPasi telefoni të jetë ftohur, ai do të punojë si normalisht."</string>
diff --git a/packages/SystemUI/res/values-sr/strings.xml b/packages/SystemUI/res/values-sr/strings.xml
index 0af49e4e..4a80a94 100644
--- a/packages/SystemUI/res/values-sr/strings.xml
+++ b/packages/SystemUI/res/values-sr/strings.xml
@@ -84,6 +84,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Назад"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Почетна"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Мени"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Преглед"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Претражите"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
@@ -673,8 +675,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"<xliff:g id="ID_1">%1$d</xliff:g>. страна од <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Прошири"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Умањи"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Затвори"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Телефон се загрејао"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Неке функције су ограничене док се телефон не охлади"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Телефон ће аутоматски покушати да се охлади. И даље ћете моћи да користите телефон, али ће спорије реаговати.\n\nКада се телефон охлади, нормално ће радити."</string>
diff --git a/packages/SystemUI/res/values-sv/strings.xml b/packages/SystemUI/res/values-sv/strings.xml
index 9700f0a..630225d 100644
--- a/packages/SystemUI/res/values-sv/strings.xml
+++ b/packages/SystemUI/res/values-sv/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Tillbaka"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Startsida"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Meny"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Översikt"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Sök"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Sida <xliff:g id="ID_1">%1$d</xliff:g> av <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Utöka"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Minimera"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Stäng"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Mobilen börjar bli varm"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Vissa funktioner är begränsade medan mobilen svalnar"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Mobilen försöker svalna automatiskt. Du kan fortfarande använda mobilen, men den kan vara långsammare än vanligt.\n\nMobilen fungerar som vanligt när den har svalnat."</string>
diff --git a/packages/SystemUI/res/values-sw/strings.xml b/packages/SystemUI/res/values-sw/strings.xml
index fc9439c..4bf4d90 100644
--- a/packages/SystemUI/res/values-sw/strings.xml
+++ b/packages/SystemUI/res/values-sw/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Nyuma"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Nyumbani"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menyu"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Muhtasari"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Tafuta"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Ukurasa wa <xliff:g id="ID_1">%1$d</xliff:g> kati ya <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Panua"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Punguza"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Funga"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Joto la simu linaongezeka"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Baadhi ya vipengele havitatumika kwenye simu wakati inapoa"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Simu yako itajaribu kupoa kiotomatiki. Bado unaweza kutumia simu yako, lakini huenda ikafanya kazi polepole. \n\nPindi simu yako itakapopoa, itaendelea kufanya kazi kama kawaida."</string>
diff --git a/packages/SystemUI/res/values-ta/strings.xml b/packages/SystemUI/res/values-ta/strings.xml
index b79e8a9..5dea611 100644
--- a/packages/SystemUI/res/values-ta/strings.xml
+++ b/packages/SystemUI/res/values-ta/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"பின்செல்"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"முகப்பு"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"மெனு"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"மேலோட்டப் பார்வை"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"தேடு"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"கேமரா"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"பக்கம் <xliff:g id="ID_1">%1$d</xliff:g> / <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"விரி"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"சிறிதாக்கு"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"மூடு"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"மொபைல் சூடாகிறது"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"மொபைலின் வெப்ப அளவு குறையும் போது, சில அம்சங்களைப் பயன்படுத்த முடியாது"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"உங்கள் மொபைலின் வெப்ப அளவு தானாகவே குறையும். தொடர்ந்து நீங்கள் மொபைலைப் பயன்படுத்தலாம், ஆனால் அதன் வேகம் குறைவாக இருக்கக்கூடும்.\n\nமொபைலின் வெப்ப அளவு குறைந்தவுடன், அது இயல்பு நிலையில் இயங்கும்."</string>
diff --git a/packages/SystemUI/res/values-te/strings.xml b/packages/SystemUI/res/values-te/strings.xml
index 2175c5a..eb5bc5e 100644
--- a/packages/SystemUI/res/values-te/strings.xml
+++ b/packages/SystemUI/res/values-te/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"వెనుకకు"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"హోమ్"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"మెను"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"అవలోకనం"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"శోధించు"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"కెమెరా"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"<xliff:g id="ID_2">%2$d</xliff:g>లో <xliff:g id="ID_1">%1$d</xliff:g>వ పేజీ"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"విస్తరింపజేయి"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"కనిష్టీకరించు"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"మూసివేయి"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"ఫోన్ వేడెక్కుతోంది"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"ఫోన్‌ను చల్లబరిచే క్రమంలో కొన్ని లక్షణాలు పరిమితం చేయబడ్డాయి"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"మీ ఫోన్ స్వయంచాలకంగా చల్లబడటానికి ప్రయత్నిస్తుంది. మీరు ఇప్పటికీ మీ ఫోన్‌ను ఉపయోగించవచ్చు, కానీ దాని పనితీరు నెమ్మదిగా ఉండవచ్చు.\n\nమీ ఫోన్ చల్లబడిన తర్వాత, అది సాధారణ రీతిలో పని చేస్తుంది."</string>
diff --git a/packages/SystemUI/res/values-th/strings.xml b/packages/SystemUI/res/values-th/strings.xml
index e4d489d2..d64e2b9 100644
--- a/packages/SystemUI/res/values-th/strings.xml
+++ b/packages/SystemUI/res/values-th/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"กลับ"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"หน้าแรก"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"เมนู"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"ภาพรวม"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"ค้นหา"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"กล้องถ่ายรูป"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"หน้า <xliff:g id="ID_1">%1$d</xliff:g> จาก <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"ขยาย"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"ย่อเล็กสุด"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"ปิด"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"โทรศัพท์เริ่มเครื่องร้อน"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"คุณลักษณะบางอย่างจะใช้งานได้จำกัดขณะโทรศัพท์ลดอุณหภูมิลง"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"โทรศัพท์จะพยายามลดอุณหภูมิลงโดยอัตโนมัติ คุณยังสามารถใช้โทรศัพท์ได้ แต่โทรศัพท์อาจทำงานช้าลง\n\nโทรศัพท์จะทำงานตามปกติเมื่อเย็นลงแล้ว"</string>
diff --git a/packages/SystemUI/res/values-tl/strings.xml b/packages/SystemUI/res/values-tl/strings.xml
index ac5aa92..042f66d 100644
--- a/packages/SystemUI/res/values-tl/strings.xml
+++ b/packages/SystemUI/res/values-tl/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Bumalik"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Home"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Overview"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Hanapin"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Camera"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Page <xliff:g id="ID_1">%1$d</xliff:g> ng <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Palawakin"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"I-minimize"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Isara"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Umiinit ang telepono"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Limitado ang ilang feature habang nagku-cool down ang telepono"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Awtomatikong susubukan ng iyong telepono na mag-cool down. Magagamit mo pa rin ang iyong telepono, ngunit maaaring mas mabagal ang paggana nito.\n\nKapag nakapag-cool down na ang iyong telepono, gagana na ito nang normal."</string>
diff --git a/packages/SystemUI/res/values-tr/strings.xml b/packages/SystemUI/res/values-tr/strings.xml
index 8cf0633..e46782a 100644
--- a/packages/SystemUI/res/values-tr/strings.xml
+++ b/packages/SystemUI/res/values-tr/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Geri"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Ana sayfa"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menü"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Genel Bakış"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Ara"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Sayfa <xliff:g id="ID_1">%1$d</xliff:g> / <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Genişlet"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Simge durumuna getir"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Kapat"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Telefon ısınıyor"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Telefon soğurken bazı özellikler sınırlı olarak kullanılabilir"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Telefonunuz otomatik olarak soğumaya çalışacak. Bu sırada telefonunuzu kullanmaya devam edebilirsiniz ancak uygulamalar daha yavaş çalışabilir.\n\nTelefonunuz soğuduktan sonra normal şekilde çalışacaktır."</string>
diff --git a/packages/SystemUI/res/values-uk/strings.xml b/packages/SystemUI/res/values-uk/strings.xml
index 62c0c8c0..591caa1 100644
--- a/packages/SystemUI/res/values-uk/strings.xml
+++ b/packages/SystemUI/res/values-uk/strings.xml
@@ -85,6 +85,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Назад"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Головна"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Меню"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Огляд"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Пошук"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
@@ -677,8 +679,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Сторінка <xliff:g id="ID_1">%1$d</xliff:g> з <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Розгорнути"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Згорнути"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Закрити"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Телефон нагрівається"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Під час охолодження деякі функції обмежуються"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Ваш телефон охолоджуватиметься автоматично. Ви можете далі користуватися телефоном, але він може працювати повільніше.\n\nКоли телефон охолоне, він працюватиме належним чином."</string>
diff --git a/packages/SystemUI/res/values-ur/strings.xml b/packages/SystemUI/res/values-ur/strings.xml
index 9a7629b..a4b0f87 100644
--- a/packages/SystemUI/res/values-ur/strings.xml
+++ b/packages/SystemUI/res/values-ur/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"واپس جائیں"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"ہوم"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"مینو"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"مجموعی جائزہ"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"تلاش کریں"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"کیمرا"</string>
@@ -683,7 +685,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"پاسورڈ کا اشارہ"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"الرٹس"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"اسکرین شاٹس"</string>
-    <!-- no translation found for notification_channel_general (4525309436693914482) -->
-    <skip />
+    <string name="notification_channel_general" msgid="4525309436693914482">"عمومی پیغامات"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"اسٹوریج"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-uz/strings.xml b/packages/SystemUI/res/values-uz/strings.xml
index f6df9068..a9c7b04 100644
--- a/packages/SystemUI/res/values-uz/strings.xml
+++ b/packages/SystemUI/res/values-uz/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Orqaga"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Uyga"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menyu"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Umumiy nazar"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Qidirish"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -673,8 +675,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"<xliff:g id="ID_1">%1$d</xliff:g>-sahifa, jami: <xliff:g id="ID_2">%2$d</xliff:g> ta sahifa"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Yoyish"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Yig‘ish"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Yopish"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Telefon qizib ketdi"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Telefon sovish paytida ayrim funksiyalar ishlamasligi mumkin"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Telefon avtomatik ravishda o‘zini sovitadi. Telefoningizdan foydalanishda davom etishingiz mumkin, lekin u sekinroq ishlashi mumkin.\n\nTelefon sovishi bilan normal holatda ishlashni boshlaydi."</string>
diff --git a/packages/SystemUI/res/values-vi/strings.xml b/packages/SystemUI/res/values-vi/strings.xml
index ce5d46f..e2a87a4 100644
--- a/packages/SystemUI/res/values-vi/strings.xml
+++ b/packages/SystemUI/res/values-vi/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Quay lại"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Trang chủ"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Tổng quan"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Tìm kiếm"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Máy ảnh"</string>
@@ -673,8 +675,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Trang <xliff:g id="ID_1">%1$d</xliff:g> / <xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Mở rộng"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Thu nhỏ"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Đóng"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Điện thoại đang nóng lên"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Một số tính năng bị hạn chế trong khi điện thoại nguội dần"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Điện thoại của bạn sẽ tự động nguội dần. Bạn vẫn có thể sử dụng điện thoại, nhưng điện thoại có thể chạy chậm hơn. \n\nSau khi đã nguội, điện thoại sẽ chạy bình thường."</string>
diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml
index d0c9e001..bfaba9e 100644
--- a/packages/SystemUI/res/values-zh-rCN/strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"返回"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"主屏幕"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"菜单"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"概览"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"搜索"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"相机"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"第 <xliff:g id="ID_1">%1$d</xliff:g> 页,共 <xliff:g id="ID_2">%2$d</xliff:g> 页"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"展开"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"最小化"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"关闭"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"手机温度上升中"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"手机降温时,部分功能的使用会受限制"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"您的手机将自动尝试降温。您依然可以使用您的手机,但是手机运行速度可能会更慢。\n\n手机降温后,就会恢复正常的运行速度。"</string>
@@ -683,7 +684,6 @@
     <string name="lockscreen_unlock" msgid="4934466194763269051">"提示输入密码"</string>
     <string name="notification_channel_alerts" msgid="4496839309318519037">"提醒"</string>
     <string name="notification_channel_screenshot" msgid="6314080179230000938">"屏幕截图"</string>
-    <!-- no translation found for notification_channel_general (4525309436693914482) -->
-    <skip />
+    <string name="notification_channel_general" msgid="4525309436693914482">"常规消息"</string>
     <string name="notification_channel_storage" msgid="3077205683020695313">"存储空间"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-zh-rHK/strings.xml b/packages/SystemUI/res/values-zh-rHK/strings.xml
index f7bf78e..4f299eb 100644
--- a/packages/SystemUI/res/values-zh-rHK/strings.xml
+++ b/packages/SystemUI/res/values-zh-rHK/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"返回"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"首頁"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"選單"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"概覽"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"搜尋"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"相機"</string>
@@ -673,8 +675,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"第 <xliff:g id="ID_1">%1$d</xliff:g> 頁 (共 <xliff:g id="ID_2">%2$d</xliff:g> 頁)"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"展開"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"最小化"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"關閉"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"手機溫度正在上升"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"手機降溫時,部分功能會受限制"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"手機會自動嘗試降溫。您仍可以使用手機,但手機的運作速度可能較慢。\n\n手機降溫後便會恢復正常。"</string>
diff --git a/packages/SystemUI/res/values-zh-rTW/strings.xml b/packages/SystemUI/res/values-zh-rTW/strings.xml
index 54ef0a64..1d28f14 100644
--- a/packages/SystemUI/res/values-zh-rTW/strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"返回"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"主螢幕"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"選單"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"總覽"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"搜尋"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"相機"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"第 <xliff:g id="ID_1">%1$d</xliff:g> 頁,共 <xliff:g id="ID_2">%2$d</xliff:g> 頁"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"展開"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"最小化"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"關閉"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"手機變熱"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"手機降溫時,部分功能會受限"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"手機會自動嘗試降溫。你仍可繼續使用手機,但是手機的運作速度可能會較慢。\n\n手機降溫完畢後,就會恢復正常的運作速度。"</string>
diff --git a/packages/SystemUI/res/values-zu/strings.xml b/packages/SystemUI/res/values-zu/strings.xml
index 7858962..da0f2de 100644
--- a/packages/SystemUI/res/values-zu/strings.xml
+++ b/packages/SystemUI/res/values-zu/strings.xml
@@ -83,6 +83,8 @@
     <string name="accessibility_back" msgid="567011538994429120">"Emuva"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"Ekhaya"</string>
     <string name="accessibility_menu" msgid="316839303324695949">"Imenyu"</string>
+    <!-- no translation found for accessibility_accessibility_button (7601252764577607915) -->
+    <skip />
     <string name="accessibility_recent" msgid="5208608566793607626">"Buka konke"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"Sesha"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Ikhamela"</string>
@@ -671,8 +673,7 @@
     <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Ikhasi <xliff:g id="ID_1">%1$d</xliff:g> kwangu-<xliff:g id="ID_2">%2$d</xliff:g>"</string>
     <string name="pip_phone_expand" msgid="5889780005575693909">"Nweba"</string>
     <string name="pip_phone_minimize" msgid="1079119422589131792">"Nciphisa"</string>
-    <!-- no translation found for pip_phone_close (8416647892889710330) -->
-    <skip />
+    <string name="pip_phone_close" msgid="8416647892889710330">"Vala"</string>
     <string name="high_temp_title" msgid="4589508026407318374">"Ifoni iyafudumala"</string>
     <string name="high_temp_notif_message" msgid="5642466103153429279">"Ezinye izici zikhawulelwe ngenkathi ifoni iphola"</string>
     <string name="high_temp_dialog_message" msgid="6840700639374113553">"Ifoni yakho izozama ngokuzenzakalela ukuphola. Ungasasebenzisa ifoni yakho, kodwa ingasebenza ngokungasheshi.\n\nUma ifoni yakho isipholile, izosebenza ngokuvamile."</string>
diff --git a/packages/Keyguard/scripts/copy_profile_icons.sh b/packages/SystemUI/scripts/copy_profile_icons.sh
similarity index 100%
rename from packages/Keyguard/scripts/copy_profile_icons.sh
rename to packages/SystemUI/scripts/copy_profile_icons.sh
diff --git a/packages/Keyguard/scripts/new_merge.py b/packages/SystemUI/scripts/new_merge.py
similarity index 100%
rename from packages/Keyguard/scripts/new_merge.py
rename to packages/SystemUI/scripts/new_merge.py
diff --git a/packages/Keyguard/src/com/android/keyguard/AlphaOptimizedImageButton.java b/packages/SystemUI/src/com/android/keyguard/AlphaOptimizedImageButton.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/AlphaOptimizedImageButton.java
rename to packages/SystemUI/src/com/android/keyguard/AlphaOptimizedImageButton.java
diff --git a/packages/Keyguard/src/com/android/keyguard/AlphaOptimizedLinearLayout.java b/packages/SystemUI/src/com/android/keyguard/AlphaOptimizedLinearLayout.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/AlphaOptimizedLinearLayout.java
rename to packages/SystemUI/src/com/android/keyguard/AlphaOptimizedLinearLayout.java
diff --git a/packages/Keyguard/src/com/android/keyguard/AlphaOptimizedRelativeLayout.java b/packages/SystemUI/src/com/android/keyguard/AlphaOptimizedRelativeLayout.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/AlphaOptimizedRelativeLayout.java
rename to packages/SystemUI/src/com/android/keyguard/AlphaOptimizedRelativeLayout.java
diff --git a/packages/Keyguard/src/com/android/keyguard/CarrierText.java b/packages/SystemUI/src/com/android/keyguard/CarrierText.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/CarrierText.java
rename to packages/SystemUI/src/com/android/keyguard/CarrierText.java
diff --git a/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java b/packages/SystemUI/src/com/android/keyguard/EmergencyButton.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
rename to packages/SystemUI/src/com/android/keyguard/EmergencyButton.java
diff --git a/packages/Keyguard/src/com/android/keyguard/EmergencyCarrierArea.java b/packages/SystemUI/src/com/android/keyguard/EmergencyCarrierArea.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/EmergencyCarrierArea.java
rename to packages/SystemUI/src/com/android/keyguard/EmergencyCarrierArea.java
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardAbsKeyInputView.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java
rename to packages/SystemUI/src/com/android/keyguard/KeyguardAbsKeyInputView.java
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardConstants.java b/packages/SystemUI/src/com/android/keyguard/KeyguardConstants.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/KeyguardConstants.java
rename to packages/SystemUI/src/com/android/keyguard/KeyguardConstants.java
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardDisplayManager.java b/packages/SystemUI/src/com/android/keyguard/KeyguardDisplayManager.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/KeyguardDisplayManager.java
rename to packages/SystemUI/src/com/android/keyguard/KeyguardDisplayManager.java
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardHostView.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java
rename to packages/SystemUI/src/com/android/keyguard/KeyguardHostView.java
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardMessageArea.java b/packages/SystemUI/src/com/android/keyguard/KeyguardMessageArea.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/KeyguardMessageArea.java
rename to packages/SystemUI/src/com/android/keyguard/KeyguardMessageArea.java
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPINView.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java
rename to packages/SystemUI/src/com/android/keyguard/KeyguardPINView.java
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java
rename to packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPatternView.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java
rename to packages/SystemUI/src/com/android/keyguard/KeyguardPatternView.java
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardPinBasedInputView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputView.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/KeyguardPinBasedInputView.java
rename to packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputView.java
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityCallback.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityCallback.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/KeyguardSecurityCallback.java
rename to packages/SystemUI/src/com/android/keyguard/KeyguardSecurityCallback.java
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java
rename to packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityModel.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityModel.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/KeyguardSecurityModel.java
rename to packages/SystemUI/src/com/android/keyguard/KeyguardSecurityModel.java
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityView.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/KeyguardSecurityView.java
rename to packages/SystemUI/src/com/android/keyguard/KeyguardSecurityView.java
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityViewFlipper.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewFlipper.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/KeyguardSecurityViewFlipper.java
rename to packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewFlipper.java
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinView.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java
rename to packages/SystemUI/src/com/android/keyguard/KeyguardSimPinView.java
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSimPukView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukView.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/KeyguardSimPukView.java
rename to packages/SystemUI/src/com/android/keyguard/KeyguardSimPukView.java
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java
rename to packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
rename to packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java
rename to packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java
diff --git a/packages/Keyguard/src/com/android/keyguard/LatencyTracker.java b/packages/SystemUI/src/com/android/keyguard/LatencyTracker.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/LatencyTracker.java
rename to packages/SystemUI/src/com/android/keyguard/LatencyTracker.java
diff --git a/packages/Keyguard/src/com/android/keyguard/LiftToActivateListener.java b/packages/SystemUI/src/com/android/keyguard/LiftToActivateListener.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/LiftToActivateListener.java
rename to packages/SystemUI/src/com/android/keyguard/LiftToActivateListener.java
diff --git a/packages/Keyguard/src/com/android/keyguard/NumPadKey.java b/packages/SystemUI/src/com/android/keyguard/NumPadKey.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/NumPadKey.java
rename to packages/SystemUI/src/com/android/keyguard/NumPadKey.java
diff --git a/packages/Keyguard/src/com/android/keyguard/ObscureSpeechDelegate.java b/packages/SystemUI/src/com/android/keyguard/ObscureSpeechDelegate.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/ObscureSpeechDelegate.java
rename to packages/SystemUI/src/com/android/keyguard/ObscureSpeechDelegate.java
diff --git a/packages/Keyguard/src/com/android/keyguard/PasswordTextView.java b/packages/SystemUI/src/com/android/keyguard/PasswordTextView.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/PasswordTextView.java
rename to packages/SystemUI/src/com/android/keyguard/PasswordTextView.java
diff --git a/packages/Keyguard/src/com/android/keyguard/SecurityMessageDisplay.java b/packages/SystemUI/src/com/android/keyguard/SecurityMessageDisplay.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/SecurityMessageDisplay.java
rename to packages/SystemUI/src/com/android/keyguard/SecurityMessageDisplay.java
diff --git a/packages/Keyguard/src/com/android/keyguard/ViewMediatorCallback.java b/packages/SystemUI/src/com/android/keyguard/ViewMediatorCallback.java
similarity index 100%
rename from packages/Keyguard/src/com/android/keyguard/ViewMediatorCallback.java
rename to packages/SystemUI/src/com/android/keyguard/ViewMediatorCallback.java
diff --git a/packages/SystemUI/src/com/android/systemui/Dependency.java b/packages/SystemUI/src/com/android/systemui/Dependency.java
index 1d4a093..8d46b43 100644
--- a/packages/SystemUI/src/com/android/systemui/Dependency.java
+++ b/packages/SystemUI/src/com/android/systemui/Dependency.java
@@ -23,6 +23,7 @@
 import android.util.ArrayMap;
 
 import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.util.Preconditions;
 import com.android.systemui.assist.AssistManager;
 import com.android.systemui.plugins.PluginManager;
 import com.android.systemui.statusbar.phone.ConfigurationControllerImpl;
@@ -66,6 +67,7 @@
 import com.android.systemui.statusbar.policy.ZenModeController;
 import com.android.systemui.statusbar.policy.ZenModeControllerImpl;
 import com.android.systemui.tuner.TunerService;
+import com.android.systemui.util.leak.LeakDetector;
 
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
@@ -91,18 +93,19 @@
     /**
      * Key for getting a background Looper for background work.
      */
-    public static final String BG_LOOPER = "background_loooper";
+    public static final DependencyKey<Looper> BG_LOOPER = new DependencyKey<>("background_looper");
     /**
      * Key for getting a Handler for receiving time tick broadcasts on.
      */
-    public static final String TIME_TICK_HANDLER = "time_tick_handler";
+    public static final DependencyKey<Handler> TIME_TICK_HANDLER =
+            new DependencyKey<>("time_tick_handler");
     /**
      * Generic handler on the main thread.
      */
-    public static final String MAIN_HANDLER = "main_handler";
+    public static final DependencyKey<Handler> MAIN_HANDLER = new DependencyKey<>("main_handler");
 
-    private final ArrayMap<String, Object> mDependencies = new ArrayMap<>();
-    private final ArrayMap<String, DependencyProvider> mProviders = new ArrayMap<>();
+    private final ArrayMap<Object, Object> mDependencies = new ArrayMap<>();
+    private final ArrayMap<Object, DependencyProvider> mProviders = new ArrayMap<>();
 
     @Override
     public void start() {
@@ -121,85 +124,87 @@
             return thread.getLooper();
         });
         mProviders.put(MAIN_HANDLER, () -> new Handler(Looper.getMainLooper()));
-        mProviders.put(ActivityStarter.class.getName(), () -> new ActivityStarterDelegate());
-        mProviders.put(ActivityStarterDelegate.class.getName(), () ->
+        mProviders.put(ActivityStarter.class, () -> new ActivityStarterDelegate());
+        mProviders.put(ActivityStarterDelegate.class, () ->
                 getDependency(ActivityStarter.class));
 
-        mProviders.put(BluetoothController.class.getName(), () ->
+        mProviders.put(BluetoothController.class, () ->
                 new BluetoothControllerImpl(mContext, getDependency(BG_LOOPER)));
 
-        mProviders.put(LocationController.class.getName(), () ->
+        mProviders.put(LocationController.class, () ->
                 new LocationControllerImpl(mContext, getDependency(BG_LOOPER)));
 
-        mProviders.put(RotationLockController.class.getName(), () ->
+        mProviders.put(RotationLockController.class, () ->
                 new RotationLockControllerImpl(mContext));
 
-        mProviders.put(NetworkController.class.getName(), () ->
+        mProviders.put(NetworkController.class, () ->
                 new NetworkControllerImpl(mContext, getDependency(BG_LOOPER),
                         getDependency(DeviceProvisionedController.class)));
 
-        mProviders.put(ZenModeController.class.getName(), () ->
+        mProviders.put(ZenModeController.class, () ->
                 new ZenModeControllerImpl(mContext, getDependency(MAIN_HANDLER)));
 
-        mProviders.put(HotspotController.class.getName(), () ->
+        mProviders.put(HotspotController.class, () ->
                 new HotspotControllerImpl(mContext));
 
-        mProviders.put(CastController.class.getName(), () ->
+        mProviders.put(CastController.class, () ->
                 new CastControllerImpl(mContext));
 
-        mProviders.put(FlashlightController.class.getName(), () ->
+        mProviders.put(FlashlightController.class, () ->
                 new FlashlightControllerImpl(mContext));
 
-        mProviders.put(KeyguardMonitor.class.getName(), () ->
+        mProviders.put(KeyguardMonitor.class, () ->
                 new KeyguardMonitorImpl(mContext));
 
-        mProviders.put(UserSwitcherController.class.getName(), () ->
+        mProviders.put(UserSwitcherController.class, () ->
                 new UserSwitcherController(mContext, getDependency(KeyguardMonitor.class),
                         getDependency(MAIN_HANDLER), getDependency(ActivityStarter.class)));
 
-        mProviders.put(UserInfoController.class.getName(), () ->
+        mProviders.put(UserInfoController.class, () ->
                 new UserInfoControllerImpl(mContext));
 
-        mProviders.put(BatteryController.class.getName(), () ->
+        mProviders.put(BatteryController.class, () ->
                 new BatteryControllerImpl(mContext));
 
-        mProviders.put(ManagedProfileController.class.getName(), () ->
+        mProviders.put(ManagedProfileController.class, () ->
                 new ManagedProfileControllerImpl(mContext));
 
-        mProviders.put(NextAlarmController.class.getName(), () ->
+        mProviders.put(NextAlarmController.class, () ->
                 new NextAlarmControllerImpl(mContext));
 
-        mProviders.put(DataSaverController.class.getName(), () ->
+        mProviders.put(DataSaverController.class, () ->
                 get(NetworkController.class).getDataSaverController());
 
-        mProviders.put(AccessibilityController.class.getName(), () ->
+        mProviders.put(AccessibilityController.class, () ->
                 new AccessibilityController(mContext));
 
-        mProviders.put(DeviceProvisionedController.class.getName(), () ->
+        mProviders.put(DeviceProvisionedController.class, () ->
                 new DeviceProvisionedControllerImpl(mContext));
 
-        mProviders.put(PluginManager.class.getName(), () ->
+        mProviders.put(PluginManager.class, () ->
                 new PluginManager(mContext));
 
-        mProviders.put(AssistManager.class.getName(), () ->
+        mProviders.put(AssistManager.class, () ->
                 new AssistManager(getDependency(DeviceProvisionedController.class), mContext));
 
-        mProviders.put(SecurityController.class.getName(), () ->
+        mProviders.put(SecurityController.class, () ->
                 new SecurityControllerImpl(mContext));
 
-        mProviders.put(TunerService.class.getName(), () ->
+        mProviders.put(LeakDetector.class, LeakDetector::create);
+
+        mProviders.put(TunerService.class, () ->
                 new TunerService(mContext));
 
-        mProviders.put(StatusBarWindowManager.class.getName(), () ->
+        mProviders.put(StatusBarWindowManager.class, () ->
                 new StatusBarWindowManager(mContext));
 
-        mProviders.put(DarkIconDispatcher.class.getName(), () ->
+        mProviders.put(DarkIconDispatcher.class, () ->
                 new DarkIconDispatcherImpl(mContext));
 
-        mProviders.put(ConfigurationController.class.getName(), () ->
+        mProviders.put(ConfigurationController.class, () ->
                 new ConfigurationControllerImpl(mContext));
 
-        mProviders.put(StatusBarIconController.class.getName(), () ->
+        mProviders.put(StatusBarIconController.class, () ->
                 new StatusBarIconControllerImpl(mContext));
 
         // Put all dependencies above here so the factory can override them if it wants.
@@ -222,20 +227,28 @@
     }
 
     protected final <T> T getDependency(Class<T> cls) {
-        return getDependency(cls.getName());
+        return getDependencyInner(cls);
     }
 
-    protected final <T> T getDependency(String cls) {
-        T obj = (T) mDependencies.get(cls);
+    protected final <T> T getDependency(DependencyKey<T> key) {
+        return getDependencyInner(key);
+    }
+
+    private <T> T getDependencyInner(Object key) {
+        @SuppressWarnings("unchecked")
+        T obj = (T) mDependencies.get(key);
         if (obj == null) {
-            obj = createDependency(cls);
-            mDependencies.put(cls, obj);
+            obj = createDependency(key);
+            mDependencies.put(key, obj);
         }
         return obj;
     }
 
     @VisibleForTesting
-    protected <T> T createDependency(String cls) {
+    protected <T> T createDependency(Object cls) {
+        Preconditions.checkArgument(cls instanceof DependencyKey<?> || cls instanceof Class<?>);
+
+        @SuppressWarnings("unchecked")
         DependencyProvider<T> provider = mProviders.get(cls);
         if (provider == null) {
             throw new IllegalArgumentException("Unsupported dependency " + cls);
@@ -261,10 +274,23 @@
     }
 
     public static <T> T get(Class<T> cls) {
-        return sDependency.getDependency(cls.getName());
+        return sDependency.getDependency(cls);
     }
 
-    public static <T> T get(String cls) {
+    public static <T> T get(DependencyKey<T> cls) {
         return sDependency.getDependency(cls);
     }
+
+    public static final class DependencyKey<V> {
+        private final String mDisplayName;
+
+        public DependencyKey(String displayName) {
+            mDisplayName = displayName;
+        }
+
+        @Override
+        public String toString() {
+            return mDisplayName;
+        }
+    }
 }
diff --git a/packages/Keyguard/src/com/android/systemui/EventLogTags.logtags b/packages/SystemUI/src/com/android/systemui/EventLogTags.logtags
similarity index 100%
rename from packages/Keyguard/src/com/android/systemui/EventLogTags.logtags
rename to packages/SystemUI/src/com/android/systemui/EventLogTags.logtags
diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIFactory.java b/packages/SystemUI/src/com/android/systemui/SystemUIFactory.java
index 1ff0701..411fd3d 100644
--- a/packages/SystemUI/src/com/android/systemui/SystemUIFactory.java
+++ b/packages/SystemUI/src/com/android/systemui/SystemUIFactory.java
@@ -113,6 +113,6 @@
         return null;
     }
 
-    public void injectDependencies(ArrayMap<String, DependencyProvider> providers,
+    public void injectDependencies(ArrayMap<Object, DependencyProvider> providers,
             Context context) { }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardAffordanceView.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardAffordanceView.java
index 8b4225a..b15f090 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardAffordanceView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardAffordanceView.java
@@ -21,6 +21,7 @@
 import android.animation.ArgbEvaluator;
 import android.animation.PropertyValuesHolder;
 import android.animation.ValueAnimator;
+import android.annotation.Nullable;
 import android.content.Context;
 import android.graphics.Canvas;
 import android.graphics.CanvasProperty;
@@ -78,6 +79,7 @@
     private boolean mSupportHardware;
     private boolean mFinishing;
     private boolean mLaunchingAffordance;
+    private boolean mShouldTint = true;
 
     private CanvasProperty<Float> mHwCircleRadius;
     private CanvasProperty<Float> mHwCenterX;
@@ -137,6 +139,12 @@
         mFlingAnimationUtils = new FlingAnimationUtils(mContext, 0.3f);
     }
 
+    public void setImageDrawable(@Nullable Drawable drawable, boolean tint) {
+        super.setImageDrawable(drawable);
+        mShouldTint = tint;
+        updateIconColor();
+    }
+
     @Override
     protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
         super.onLayout(changed, left, top, right, bottom);
@@ -165,6 +173,7 @@
     }
 
     private void updateIconColor() {
+        if (!mShouldTint) return;
         Drawable drawable = getDrawable().mutate();
         float alpha = mCircleRadius / mMinBackgroundRadius;
         alpha = Math.min(1.0f, alpha);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
index 14f9919..2836f41 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
@@ -324,7 +324,7 @@
     private void updateRightAffordanceIcon() {
         IconState state = mRightButton.getIcon();
         mRightAffordanceView.setVisibility(state.isVisible ? View.VISIBLE : View.GONE);
-        mRightAffordanceView.setImageDrawable(state.drawable);
+        mRightAffordanceView.setImageDrawable(state.drawable, state.tint);
         mRightAffordanceView.setContentDescription(state.contentDescription);
     }
 
@@ -376,7 +376,7 @@
     private void updateLeftAffordanceIcon() {
         IconState state = mLeftButton.getIcon();
         mLeftAffordanceView.setVisibility(state.isVisible ? View.VISIBLE : View.GONE);
-        mLeftAffordanceView.setImageDrawable(state.drawable);
+        mLeftAffordanceView.setImageDrawable(state.drawable, state.tint);
         mLeftAffordanceView.setContentDescription(state.contentDescription);
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
index 433dc3f..365d991 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
@@ -196,6 +196,8 @@
 import com.android.systemui.statusbar.stack.NotificationStackScrollLayout;
 import com.android.systemui.statusbar.stack.NotificationStackScrollLayout.OnChildLocationsChangedListener;
 
+
+import com.android.systemui.util.leak.LeakDetector;
 import com.android.systemui.volume.VolumeComponent;
 
 import java.io.FileDescriptor;
@@ -6596,6 +6598,7 @@
             return null;
         }
         updateNotifications();
+        Dependency.get(LeakDetector.class).trackGarbage(entry);
         return entry.notification;
     }
 
@@ -6604,6 +6607,7 @@
             Log.d(TAG, "createNotificationViews(notification=" + sbn);
         }
         NotificationData.Entry entry = new NotificationData.Entry(sbn);
+        Dependency.get(LeakDetector.class).trackInstance(entry);
         try {
             entry.createIcons(mContext, sbn);
         } catch (NotificationData.IconException exception) {
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/LockscreenFragment.java b/packages/SystemUI/src/com/android/systemui/tuner/LockscreenFragment.java
index 9d579f5..6f4a3a4 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/LockscreenFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/LockscreenFragment.java
@@ -26,6 +26,7 @@
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.pm.ShortcutInfo;
 import android.graphics.drawable.Drawable;
+import android.graphics.drawable.ScaleDrawable;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Process;
@@ -37,6 +38,9 @@
 import android.support.v7.widget.RecyclerView;
 import android.support.v7.widget.RecyclerView.ViewHolder;
 import android.text.TextUtils;
+import android.util.Log;
+import android.util.TypedValue;
+import android.view.Gravity;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
@@ -46,6 +50,7 @@
 import com.android.systemui.Dependency;
 import com.android.systemui.R;
 import com.android.systemui.plugins.IntentButtonProvider.IntentButton;
+import com.android.systemui.statusbar.ScalingDrawableWrapper;
 import com.android.systemui.statusbar.phone.ExpandableIndicator;
 import com.android.systemui.tuner.ShortcutParser.Shortcut;
 import com.android.systemui.tuner.TunerService.Tunable;
@@ -365,8 +370,13 @@
             mShortcut = shortcut;
             mIconState = new IconState();
             mIconState.isVisible = true;
-            mIconState.drawable = shortcut.icon.loadDrawable(context);
+            mIconState.drawable = shortcut.icon.loadDrawable(context).mutate();
             mIconState.contentDescription = mShortcut.label;
+            int size = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 32,
+                    context.getResources().getDisplayMetrics());
+            mIconState.drawable = new ScalingDrawableWrapper(mIconState.drawable,
+                    size / (float) mIconState.drawable.getIntrinsicWidth());
+            mIconState.tint = false;
         }
 
         @Override
@@ -388,8 +398,13 @@
             mIntent = new Intent().setComponent(new ComponentName(info.packageName, info.name));
             mIconState = new IconState();
             mIconState.isVisible = true;
-            mIconState.drawable = info.loadIcon(context.getPackageManager());
+            mIconState.drawable = info.loadIcon(context.getPackageManager()).mutate();
             mIconState.contentDescription = info.loadLabel(context.getPackageManager());
+            int size = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 32,
+                    context.getResources().getDisplayMetrics());
+            mIconState.drawable = new ScalingDrawableWrapper(mIconState.drawable,
+                    size / (float) mIconState.drawable.getIntrinsicWidth());
+            mIconState.tint = false;
         }
 
         @Override
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/TunerService.java b/packages/SystemUI/src/com/android/systemui/tuner/TunerService.java
index 0edff86..85be4d7 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/TunerService.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/TunerService.java
@@ -48,8 +48,10 @@
 import com.android.systemui.settings.CurrentUserTracker;
 import com.android.systemui.statusbar.phone.StatusBarIconController;
 import com.android.systemui.statusbar.phone.SystemUIDialog;
+import com.android.systemui.util.leak.LeakDetector;
 
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.Set;
 
 
@@ -66,6 +68,8 @@
     private final ArrayMap<Uri, String> mListeningUris = new ArrayMap<>();
     // Map of settings keys to the listener.
     private final HashMap<String, Set<Tunable>> mTunableLookup = new HashMap<>();
+    // Set of all tunables, used for leak detection.
+    private final HashSet<Tunable> mTunables = LeakDetector.ENABLED ? new HashSet<>() : null;
     private final Context mContext;
 
     private ContentResolver mContentResolver;
@@ -150,6 +154,10 @@
             mTunableLookup.put(key, new ArraySet<Tunable>());
         }
         mTunableLookup.get(key).add(tunable);
+        if (LeakDetector.ENABLED) {
+            mTunables.add(tunable);
+            Dependency.get(LeakDetector.class).trackCollection(mTunables, "TunerService.mTunables");
+        }
         Uri uri = Settings.Secure.getUriFor(key);
         if (!mListeningUris.containsKey(uri)) {
             mListeningUris.put(uri, key);
@@ -164,6 +172,9 @@
         for (Set<Tunable> list : mTunableLookup.values()) {
             list.remove(tunable);
         }
+        if (LeakDetector.ENABLED) {
+            mTunables.remove(tunable);
+        }
     }
 
     protected void reregisterAll() {
diff --git a/packages/SystemUI/src/com/android/systemui/util/leak/AbstractCollection.java b/packages/SystemUI/src/com/android/systemui/util/leak/AbstractCollection.java
new file mode 100644
index 0000000..1534def
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/util/leak/AbstractCollection.java
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2017 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.util.leak;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+abstract class AbstractCollection<T> implements Collection<T> {
+    @Override
+    public abstract int size();
+
+    @Override
+    public abstract boolean isEmpty();
+
+    @Override
+    public boolean contains(Object o) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public Iterator<T> iterator() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public Object[] toArray() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public <T1> T1[] toArray(T1[] t1s) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public boolean add(T t) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public boolean remove(Object o) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public boolean containsAll(Collection<?> collection) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public boolean addAll(Collection<? extends T> collection) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public boolean removeAll(Collection<?> collection) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public boolean retainAll(Collection<?> collection) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public void clear() {
+        throw new UnsupportedOperationException();
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/util/leak/LeakDetector.java b/packages/SystemUI/src/com/android/systemui/util/leak/LeakDetector.java
new file mode 100644
index 0000000..a0f8659
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/util/leak/LeakDetector.java
@@ -0,0 +1,139 @@
+/*
+ * Copyright (C) 2017 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.util.leak;
+
+import android.os.Build;
+
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.util.IndentingPrintWriter;
+import com.android.systemui.Dumpable;
+
+import java.io.FileDescriptor;
+import java.io.PrintWriter;
+import java.io.Writer;
+import java.util.Collection;
+
+/**
+ * Detects leaks.
+ */
+public class LeakDetector implements Dumpable {
+
+    public static final boolean ENABLED = Build.IS_DEBUGGABLE;
+
+    private final TrackedCollections mTrackedCollections;
+    private final TrackedGarbage mTrackedGarbage;
+    private final TrackedObjects mTrackedObjects;
+
+    @VisibleForTesting
+    public LeakDetector(TrackedCollections trackedCollections,
+            TrackedGarbage trackedGarbage,
+            TrackedObjects trackedObjects) {
+        mTrackedCollections = trackedCollections;
+        mTrackedGarbage = trackedGarbage;
+        mTrackedObjects = trackedObjects;
+    }
+
+    /**
+     * Tracks an instance that has a high leak risk (i.e. has complex ownership and references
+     * a large amount of memory).
+     *
+     * The LeakDetector will monitor and keep weak references to such instances, dump statistics
+     * about them in a bugreport, and in the future dump the heap if their count starts growing
+     * unreasonably.
+     *
+     * This should be called when the instance is first constructed.
+     */
+    public <T> void trackInstance(T object) {
+        if (mTrackedObjects != null) {
+            mTrackedObjects.track(object);
+        }
+    }
+
+    /**
+     * Tracks a collection that is at risk of leaking large objects, e.g. a collection of
+     * dynamically registered listeners.
+     *
+     * The LeakDetector will monitor and keep weak references to such collections, dump
+     * statistics about them in a bugreport, and in the future dump the heap if their size starts
+     * growing unreasonably.
+     *
+     * This should be called whenever the collection grows.
+     *
+     * @param tag A tag for labeling the collection in a bugreport
+     */
+    public <T> void trackCollection(Collection<T> collection, String tag) {
+        if (mTrackedCollections != null) {
+            mTrackedCollections.track(collection, tag);
+        }
+    }
+
+    /**
+     * Tracks an instance that should become garbage soon.
+     *
+     * The LeakDetector will monitor and keep weak references to such garbage, dump
+     * statistics about them in a bugreport, and in the future dump the heap if it is not
+     * collected reasonably soon.
+     *
+     * This should be called when the last strong reference to the instance is dropped.
+     */
+    public void trackGarbage(Object o) {
+        if (mTrackedGarbage != null) {
+            mTrackedGarbage.track(o);
+        }
+    }
+
+    @Override
+    public void dump(FileDescriptor df, PrintWriter w, String[] args) {
+        IndentingPrintWriter pw = new IndentingPrintWriter(w, "  ");
+
+        pw.println("SYSUI LEAK DETECTOR");
+        pw.increaseIndent();
+
+        if (mTrackedCollections != null && mTrackedGarbage != null) {
+            pw.println("TrackedCollections:");
+            pw.increaseIndent();
+            mTrackedCollections.dump(pw, (col) -> !TrackedObjects.isTrackedObject(col));
+            pw.decreaseIndent();
+            pw.println();
+
+            pw.println("TrackedObjects:");
+            pw.increaseIndent();
+            mTrackedCollections.dump(pw, TrackedObjects::isTrackedObject);
+            pw.decreaseIndent();
+            pw.println();
+
+            pw.print("TrackedGarbage:");
+            pw.increaseIndent();
+            mTrackedGarbage.dump(pw);
+            pw.decreaseIndent();
+        } else {
+            pw.println("disabled");
+        }
+        pw.decreaseIndent();
+        pw.println();
+    }
+
+    public static LeakDetector create() {
+        if (ENABLED) {
+            TrackedCollections collections = new TrackedCollections();
+            return new LeakDetector(collections, new TrackedGarbage(collections),
+                    new TrackedObjects(collections));
+        } else {
+            return new LeakDetector(null, null, null);
+        }
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/util/leak/TrackedCollections.java b/packages/SystemUI/src/com/android/systemui/util/leak/TrackedCollections.java
new file mode 100644
index 0000000..5577daf
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/util/leak/TrackedCollections.java
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 2017 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.util.leak;
+
+import android.os.SystemClock;
+
+import java.io.PrintWriter;
+import java.lang.ref.WeakReference;
+import java.util.Collection;
+import java.util.Map;
+import java.util.function.Predicate;
+
+/**
+ * Tracks the size of collections.
+ */
+public class TrackedCollections {
+    private static final long MILLIS_IN_MINUTE = 60 * 1000;
+    private static final long HALFWAY_DELAY = 30 * MILLIS_IN_MINUTE;
+
+    private final WeakIdentityHashMap<Collection<?>, CollectionState> mCollections
+            = new WeakIdentityHashMap<>();
+
+    /**
+     * @see LeakDetector#trackCollection(Collection, String)
+     */
+    public synchronized void track(Collection<?> collection, String tag) {
+        CollectionState collectionState = mCollections.get(collection);
+        if (collectionState == null) {
+            collectionState = new CollectionState();
+            collectionState.tag = tag;
+            collectionState.startUptime = SystemClock.uptimeMillis();
+            mCollections.put(collection, collectionState);
+        }
+        if (collectionState.halfwayCount == -1
+                && SystemClock.uptimeMillis() - collectionState.startUptime > HALFWAY_DELAY) {
+            collectionState.halfwayCount = collectionState.lastCount;
+        }
+        collectionState.lastCount = collection.size();
+        collectionState.lastUptime = SystemClock.uptimeMillis();
+    }
+
+    private static class CollectionState {
+        String tag;
+        long startUptime;
+        /** The number of elements in the collection at startUptime + HALFWAY_DELAY */
+        int halfwayCount = -1;
+        /** The number of elements in the collection at lastUptime */
+        int lastCount = -1;
+        long lastUptime;
+
+        /**
+         * Dump statistics about the tracked collection:
+         * - the tag
+         * - average elements inserted per hour during
+         *   - the first 30min of its existence
+         *   - after the first 30min
+         *   - overall
+         * - the current size of the collection
+         */
+        void dump(PrintWriter pw) {
+            long now = SystemClock.uptimeMillis();
+
+            pw.format("%s: %.2f (start-30min) / %.2f (30min-now) / %.2f (start-now)"
+                            + " (growth rate in #/hour); %d (current size)",
+                    tag,
+                    ratePerHour(startUptime, 0, startUptime + HALFWAY_DELAY, halfwayCount),
+                    ratePerHour(startUptime + HALFWAY_DELAY, halfwayCount, now, lastCount),
+                    ratePerHour(startUptime, 0, now, lastCount),
+                    lastCount);
+        }
+
+        private float ratePerHour(long uptime1, int count1, long uptime2, int count2) {
+            if (uptime1 >= uptime2 || count1 < 0 || count2 < 0) {
+                return Float.NaN;
+            }
+            return ((float) count2 - count1) / (uptime2 - uptime1) * 60 * MILLIS_IN_MINUTE;
+        }
+    }
+
+    public synchronized void dump(PrintWriter pw, Predicate<Collection<?>> filter) {
+        for (Map.Entry<WeakReference<Collection<?>>, CollectionState> entry
+                : mCollections.entrySet()) {
+            Collection<?> key = entry.getKey().get();
+            if (filter == null || key != null && filter.test(key)) {
+                entry.getValue().dump(pw);
+                pw.println();
+            }
+        }
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/util/leak/TrackedGarbage.java b/packages/SystemUI/src/com/android/systemui/util/leak/TrackedGarbage.java
new file mode 100644
index 0000000..fd59aee
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/util/leak/TrackedGarbage.java
@@ -0,0 +1,112 @@
+/*
+ * Copyright (C) 2017 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.util.leak;
+
+import android.os.SystemClock;
+import android.util.ArrayMap;
+
+import java.io.PrintWriter;
+import java.lang.ref.Reference;
+import java.lang.ref.ReferenceQueue;
+import java.lang.ref.WeakReference;
+import java.util.HashSet;
+import java.util.Map;
+
+/**
+ * Tracks objects that have been marked as garbage.
+ */
+public class TrackedGarbage {
+
+    /** Duration after which we consider garbage to be old. */
+    private static final long GARBAGE_COLLECTION_DEADLINE_MILLIS = 60000; // 1min
+
+    private final HashSet<LeakReference> mGarbage = new HashSet<>();
+    private final ReferenceQueue<Object> mRefQueue = new ReferenceQueue<>();
+    private final TrackedCollections mTrackedCollections;
+
+    public TrackedGarbage(TrackedCollections trackedCollections) {
+        mTrackedCollections = trackedCollections;
+    }
+
+    /**
+     * @see LeakDetector#trackGarbage(Object)
+     */
+    public synchronized void track(Object o) {
+        cleanUp();
+        mGarbage.add(new LeakReference(o, mRefQueue));
+        mTrackedCollections.track(mGarbage, "Garbage");
+    }
+
+    private void cleanUp() {
+        Reference<?> ref;
+        while ((ref = mRefQueue.poll()) != null) {
+            mGarbage.remove(ref);
+        }
+    }
+
+    /**
+     * A reference to something we consider leaked if it still has strong references.
+     *
+     * Helpful for finding potential leaks in a heapdump: Simply find an instance of
+     * LeakReference, find the object it refers to, then find a strong path to a GC root.
+     */
+    private static class LeakReference extends WeakReference<Object> {
+        private final Class<?> clazz;
+        private final long createdUptimeMillis;
+
+        LeakReference(Object t, ReferenceQueue<Object> queue) {
+            super(t, queue);
+            clazz = t.getClass();
+            createdUptimeMillis = SystemClock.uptimeMillis();
+        }
+    }
+
+    /**
+     * Dump statistics about the garbage.
+     *
+     * For each class, dumps the number of "garbage objects" that have not been collected yet.
+     * A large number of old instances indicates a probable leak.
+     */
+    public synchronized void dump(PrintWriter pw) {
+        cleanUp();
+
+        long now = SystemClock.uptimeMillis();
+
+        ArrayMap<Class<?>, Integer> acc = new ArrayMap<>();
+        ArrayMap<Class<?>, Integer> accOld = new ArrayMap<>();
+        for (LeakReference ref : mGarbage) {
+            acc.put(ref.clazz, acc.getOrDefault(ref.clazz, 0) + 1);
+            if (isOld(ref.createdUptimeMillis, now)) {
+                accOld.put(ref.clazz, accOld.getOrDefault(ref.clazz, 0) + 1);
+            }
+        }
+
+        for (Map.Entry<Class<?>, Integer> entry : acc.entrySet()) {
+            pw.print(entry.getKey().getName());
+            pw.print(": ");
+            pw.print(entry.getValue());
+            pw.print(" total, ");
+            pw.print(accOld.getOrDefault(entry.getKey(), 0));
+            pw.print(" old");
+            pw.println();
+        }
+    }
+
+    private boolean isOld(long createdUptimeMillis, long now) {
+        return createdUptimeMillis + GARBAGE_COLLECTION_DEADLINE_MILLIS < now;
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/util/leak/TrackedObjects.java b/packages/SystemUI/src/com/android/systemui/util/leak/TrackedObjects.java
new file mode 100644
index 0000000..88f8b4cc
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/util/leak/TrackedObjects.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2017 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.util.leak;
+
+import java.util.Collection;
+import java.util.WeakHashMap;
+
+/**
+ * Tracks instances of classes.
+ */
+public class TrackedObjects {
+
+    private final TrackedCollections mTrackedCollections;
+    private final WeakHashMap<Class<?>, TrackedClass<?>> mTrackedClasses = new WeakHashMap<>();
+
+    public TrackedObjects(TrackedCollections trackedCollections) {
+        mTrackedCollections = trackedCollections;
+    }
+
+    /**
+     * @see LeakDetector#trackInstance(Object)
+     */
+    public synchronized <T> void track(T object) {
+        Class<?> clazz = object.getClass();
+        @SuppressWarnings("unchecked")
+        TrackedClass<T> trackedClass = (TrackedClass<T>) mTrackedClasses.get(clazz);
+
+        if (trackedClass == null) {
+            trackedClass = new TrackedClass<T>();
+            mTrackedClasses.put(clazz, trackedClass);
+        }
+
+        trackedClass.track(object);
+        mTrackedCollections.track(trackedClass, clazz.getName());
+    }
+
+    public static boolean isTrackedObject(Collection<?> collection) {
+        return collection instanceof TrackedClass;
+    }
+
+    private static class TrackedClass<T> extends AbstractCollection<T> {
+        final WeakIdentityHashMap<T, Void> instances = new WeakIdentityHashMap<>();
+
+        void track(T object) {
+            instances.put(object, null);
+        }
+
+        @Override
+        public int size() {
+            return instances.size();
+        }
+
+        @Override
+        public boolean isEmpty() {
+            return instances.isEmpty();
+        }
+
+    }
+
+}
diff --git a/packages/SystemUI/src/com/android/systemui/util/leak/WeakIdentityHashMap.java b/packages/SystemUI/src/com/android/systemui/util/leak/WeakIdentityHashMap.java
new file mode 100644
index 0000000..d370ac1
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/util/leak/WeakIdentityHashMap.java
@@ -0,0 +1,101 @@
+/*
+ * Copyright (C) 2017 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.util.leak;
+
+import java.lang.ref.Reference;
+import java.lang.ref.ReferenceQueue;
+import java.lang.ref.WeakReference;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Like WeakHashMap, but uses identity instead of equality when comparing keys.
+ */
+public class WeakIdentityHashMap<K,V> {
+
+    private final HashMap<WeakReference<K>,V> mMap = new HashMap<>();
+    private final ReferenceQueue<Object> mRefQueue = new ReferenceQueue<>();
+
+    private void cleanUp() {
+        Reference<?> ref;
+        while ((ref = mRefQueue.poll()) != null) {
+            mMap.remove(ref);
+        }
+    }
+
+    public void put(K key, V value) {
+        cleanUp();
+        mMap.put(new CmpWeakReference<>(key, mRefQueue), value);
+    }
+
+    public V get(K key) {
+        cleanUp();
+        return mMap.get(new CmpWeakReference<>(key));
+    }
+
+    public Collection<V> values() {
+        cleanUp();
+        return mMap.values();
+    }
+
+    public Set<Map.Entry<WeakReference<K>, V>> entrySet() {
+        return mMap.entrySet();
+    }
+
+    public int size() {
+        cleanUp();
+        return mMap.size();
+    }
+
+    public boolean isEmpty() {
+        cleanUp();
+        return mMap.isEmpty();
+    }
+
+    private static class CmpWeakReference<K> extends WeakReference<K> {
+        private final int mHashCode;
+
+        public CmpWeakReference(K key) {
+            super(key);
+            mHashCode = System.identityHashCode(key);
+        }
+
+        public CmpWeakReference(K key, ReferenceQueue<Object> refQueue) {
+            super(key, refQueue);
+            mHashCode = System.identityHashCode(key);
+        }
+
+        @Override
+        public boolean equals(Object o) {
+            if (o == this) {
+                return true;
+            }
+            K k = get();
+            if (k != null && o instanceof CmpWeakReference) {
+                return ((CmpWeakReference) o).get() == k;
+            }
+            return false;
+        }
+
+        @Override
+        public int hashCode() {
+            return mHashCode;
+        }
+    }
+}
diff --git a/packages/SystemUI/tests/Android.mk b/packages/SystemUI/tests/Android.mk
index cefade0..8f5df7b 100644
--- a/packages/SystemUI/tests/Android.mk
+++ b/packages/SystemUI/tests/Android.mk
@@ -32,10 +32,10 @@
 
 LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res \
     frameworks/base/packages/SystemUI/res \
+    frameworks/base/packages/SystemUI/res-keyguard \
 
 LOCAL_STATIC_ANDROID_LIBRARIES := \
     SystemUIPluginLib \
-    Keyguard \
     android-support-v7-recyclerview \
     android-support-v7-preference \
     android-support-v7-appcompat \
@@ -52,7 +52,7 @@
 
 LOCAL_JAVA_LIBRARIES := android.test.runner telephony-common android.car
 
-LOCAL_AAPT_FLAGS := --extra-packages com.android.systemui
+LOCAL_AAPT_FLAGS := --extra-packages com.android.systemui:com.android.keyguard
 
 # sign this with platform cert, so this test is allowed to inject key events into
 # UI it doesn't own. This is necessary to allow screenshots to be taken
diff --git a/packages/SystemUI/tests/src/com/android/systemui/DependencyTest.java b/packages/SystemUI/tests/src/com/android/systemui/DependencyTest.java
index fb4b6bd..27955ec 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/DependencyTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/DependencyTest.java
@@ -22,19 +22,25 @@
 
 import android.os.Looper;
 
+import com.android.systemui.Dependency.DependencyKey;
 import com.android.systemui.statusbar.policy.FlashlightController;
 
+import org.junit.Assert;
 import org.junit.Test;
 
 import java.io.PrintWriter;
 
 public class DependencyTest extends SysuiTestCase {
 
+    public static final DependencyKey<Dumpable> DUMPABLE = new DependencyKey<>("dumpable");
+    public static final DependencyKey<ConfigurationChangedReceiver> CONFIGURATION_CHANGED_RECEIVER
+            = new DependencyKey<>("config_changed_receiver");
+
     @Test
     public void testClassDependency() {
         FlashlightController f = mock(FlashlightController.class);
         injectTestDependency(FlashlightController.class, f);
-        assertEquals(f, Dependency.get(FlashlightController.class));
+        Assert.assertEquals(f, Dependency.get(FlashlightController.class));
     }
 
     @Test
@@ -47,8 +53,8 @@
     @Test
     public void testDump() {
         Dumpable d = mock(Dumpable.class);
-        injectTestDependency("test", d);
-        Dependency.get("test");
+        injectTestDependency(DUMPABLE, d);
+        Dependency.get(DUMPABLE);
         mDependency.dump(null, mock(PrintWriter.class), null);
         verify(d).dump(eq(null), any(), eq(null));
     }
@@ -56,8 +62,8 @@
     @Test
     public void testConfigurationChanged() {
         ConfigurationChangedReceiver d = mock(ConfigurationChangedReceiver.class);
-        injectTestDependency("test", d);
-        Dependency.get("test");
+        injectTestDependency(CONFIGURATION_CHANGED_RECEIVER, d);
+        Dependency.get(CONFIGURATION_CHANGED_RECEIVER);
         mDependency.onConfigurationChanged(null);
         verify(d).onConfigurationChanged(eq(null));
     }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/FragmentTestCase.java b/packages/SystemUI/tests/src/com/android/systemui/FragmentTestCase.java
index f8f67bb..1678d92 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/FragmentTestCase.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/FragmentTestCase.java
@@ -29,6 +29,7 @@
 import android.view.WindowManager.LayoutParams;
 import android.widget.FrameLayout;
 
+import com.android.systemui.utils.TestableLooper;
 import com.android.systemui.utils.ViewUtils;
 import com.android.systemui.utils.leaks.LeakCheckedTest;
 
@@ -59,12 +60,14 @@
     }
 
     @Before
-    public void setupFragment() throws IllegalAccessException, InstantiationException {
+    public void setupFragment() throws Exception {
         mView = new FrameLayout(mContext);
         mView.setId(VIEW_ID);
-        mHandler = new Handler(Looper.getMainLooper());
-        mFragment = mCls.newInstance();
-        postAndWait(() -> {
+
+        TestableLooper.get(this).runWithLooper(() -> {
+            mHandler = new Handler();
+
+            mFragment = mCls.newInstance();
             mFragments = FragmentController.createController(new HostCallbacks());
             mFragments.attachHost(null);
             mFragments.getFragmentManager().beginTransaction()
@@ -73,30 +76,39 @@
         });
     }
 
+    private String hex(Looper looper) {
+        return Integer.toHexString(System.identityHashCode(looper));
+    }
+
     @After
-    public void tearDown() {
+    public void tearDown() throws Exception {
         if (mFragments != null) {
             // Set mFragments to null to let it know not to destroy.
-            postAndWait(() -> mFragments.dispatchDestroy());
+            TestableLooper.get(this).runWithLooper(() -> mFragments.dispatchDestroy());
         }
     }
 
     @Test
     public void testCreateDestroy() {
-        postAndWait(() -> mFragments.dispatchCreate());
+        mFragments.dispatchCreate();
+        processAllMessages();
         destroyFragments();
     }
 
     @Test
     public void testStartStop() {
-        postAndWait(() -> mFragments.dispatchStart());
-        postAndWait(() -> mFragments.dispatchStop());
+        mFragments.dispatchStart();
+        processAllMessages();
+        mFragments.dispatchStop();
+        processAllMessages();
     }
 
     @Test
     public void testResumePause() {
-        postAndWait(() -> mFragments.dispatchResume());
-        postAndWait(() -> mFragments.dispatchPause());
+        mFragments.dispatchResume();
+        processAllMessages();
+        mFragments.dispatchPause();
+        processAllMessages();
     }
 
     @Test
@@ -105,54 +117,57 @@
                 LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT,
                 LayoutParams.TYPE_SYSTEM_ALERT,
                 0, PixelFormat.TRANSLUCENT);
-        postAndWait(() -> mFragments.dispatchResume());
+        mFragments.dispatchResume();
+        processAllMessages();
         attachFragmentToWindow();
         detachFragmentToWindow();
-        postAndWait(() -> mFragments.dispatchPause());
-    }
-
-    protected void attachFragmentToWindow() {
-        ViewUtils.attachView(mView);
-    }
-
-    protected void detachFragmentToWindow() {
-        ViewUtils.detachView(mView);
+        mFragments.dispatchPause();
+        processAllMessages();
     }
 
     @Test
     public void testRecreate() {
-        postAndWait(() -> mFragments.dispatchResume());
-        postAndWait(() -> {
-            mFragments.dispatchPause();
-            Parcelable p = mFragments.saveAllState();
-            mFragments.dispatchDestroy();
+        mFragments.dispatchResume();
+        processAllMessages();
+        mFragments.dispatchPause();
+        Parcelable p = mFragments.saveAllState();
+        mFragments.dispatchDestroy();
 
-            mFragments = FragmentController.createController(new HostCallbacks());
-            mFragments.attachHost(null);
-            mFragments.restoreAllState(p, (FragmentManagerNonConfig) null);
-            mFragments.dispatchResume();
-        });
+        mFragments = FragmentController.createController(new HostCallbacks());
+        mFragments.attachHost(null);
+        mFragments.restoreAllState(p, (FragmentManagerNonConfig) null);
+        mFragments.dispatchResume();
+        processAllMessages();
     }
 
     @Test
     public void testMultipleResumes() {
-        postAndWait(() -> mFragments.dispatchResume());
-        postAndWait(() -> mFragments.dispatchStop());
-        postAndWait(() -> mFragments.dispatchResume());
+        mFragments.dispatchResume();
+        processAllMessages();
+        mFragments.dispatchStop();
+        processAllMessages();
+        mFragments.dispatchResume();
+        processAllMessages();
+    }
+
+    protected void attachFragmentToWindow() {
+        ViewUtils.attachView(mView);
+        TestableLooper.get(this).processMessages(1);
+    }
+
+    protected void detachFragmentToWindow() {
+        ViewUtils.detachView(mView);
+        TestableLooper.get(this).processMessages(1);
     }
 
     protected void destroyFragments() {
-        postAndWait(() -> mFragments.dispatchDestroy());
+        mFragments.dispatchDestroy();
+        processAllMessages();
         mFragments = null;
     }
 
-    protected void postAndWait(Runnable r) {
-        mHandler.post(r);
-        waitForFragments();
-    }
-
-    protected void waitForFragments() {
-        waitForIdleSync(mHandler);
+    protected void processAllMessages() {
+        TestableLooper.get(this).processAllMessages();
     }
 
     private View findViewById(int id) {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/SysUIRunner.java b/packages/SystemUI/tests/src/com/android/systemui/SysUIRunner.java
new file mode 100644
index 0000000..1607b70
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/SysUIRunner.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2017 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;
+
+import android.support.test.internal.runner.junit4.statement.RunAfters;
+import android.support.test.internal.runner.junit4.statement.RunBefores;
+import android.support.test.internal.runner.junit4.statement.UiThreadStatement;
+
+import com.android.systemui.utils.TestableLooper.LooperStatement;
+import com.android.systemui.utils.TestableLooper.RunWithLooper;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.internal.runners.statements.FailOnTimeout;
+import org.junit.runners.BlockJUnit4ClassRunner;
+import org.junit.runners.model.FrameworkMethod;
+import org.junit.runners.model.InitializationError;
+import org.junit.runners.model.Statement;
+
+import java.util.List;
+
+public class SysUIRunner extends BlockJUnit4ClassRunner {
+
+    private final long mTimeout;
+    private final Class<?> mKlass;
+
+    public SysUIRunner(Class<?> klass) throws InitializationError {
+        super(klass);
+        mKlass = klass;
+        // Can't seem to get reference to timeout parameter from here, so set default to 10 mins.
+        mTimeout = 10 * 60 * 1000;
+    }
+
+    @Override
+    protected Statement methodInvoker(FrameworkMethod method, Object test) {
+        return UiThreadStatement.shouldRunOnUiThread(method) ? new UiThreadStatement(
+                methodInvokerInt(method, test), true) : methodInvokerInt(method, test);
+    }
+
+    protected Statement methodInvokerInt(FrameworkMethod method, Object test) {
+        RunWithLooper annotation = method.getAnnotation(RunWithLooper.class);
+        if (annotation == null) annotation = mKlass.getAnnotation(RunWithLooper.class);
+        if (annotation != null) {
+            return new LooperStatement(super.methodInvoker(method, test),
+                    annotation.setAsMainLooper(), test);
+        }
+        return super.methodInvoker(method, test);
+    }
+
+    protected Statement withBefores(FrameworkMethod method, Object target, Statement statement) {
+        List befores = this.getTestClass().getAnnotatedMethods(Before.class);
+        return befores.isEmpty() ? statement : new RunBefores(method, statement,
+                befores, target);
+    }
+
+    protected Statement withAfters(FrameworkMethod method, Object target, Statement statement) {
+        List afters = this.getTestClass().getAnnotatedMethods(After.class);
+        return afters.isEmpty() ? statement : new RunAfters(method, statement, afters,
+                target);
+    }
+
+    protected Statement withPotentialTimeout(FrameworkMethod method, Object test, Statement next) {
+        long timeout = this.getTimeout(method.getAnnotation(Test.class));
+        if (timeout <= 0L && mTimeout > 0L) {
+            timeout = mTimeout;
+        }
+
+        return timeout <= 0L ? next : new FailOnTimeout(next, timeout);
+    }
+
+    private long getTimeout(Test annotation) {
+        return annotation == null ? 0L : annotation.timeout();
+    }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/SysuiTestCase.java b/packages/SystemUI/tests/src/com/android/systemui/SysuiTestCase.java
index 12a485e..6c454e1 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/SysuiTestCase.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/SysuiTestCase.java
@@ -25,6 +25,7 @@
 import android.util.ArrayMap;
 import android.util.Log;
 
+import com.android.systemui.Dependency.DependencyKey;
 import com.android.systemui.utils.TestableContext;
 import com.android.systemui.utils.leaks.Tracker;
 
@@ -91,15 +92,15 @@
         return null;
     }
 
-    public void injectMockDependency(Class<?> cls) {
-        mDependency.injectTestDependency(cls.getName(), mock(cls));
+    public <T> void injectMockDependency(Class<T> cls) {
+        injectTestDependency(cls, mock(cls));
     }
 
-    public void injectTestDependency(Class<?> cls, Object obj) {
-        mDependency.injectTestDependency(cls.getName(), obj);
+    public <T> void injectTestDependency(Class<T> cls, T obj) {
+        mDependency.injectTestDependency(cls, obj);
     }
 
-    public void injectTestDependency(String key, Object obj) {
+    public <T> void injectTestDependency(DependencyKey<T> key, T obj) {
         mDependency.injectTestDependency(key, obj);
     }
 
@@ -109,16 +110,20 @@
     }
 
     public static class TestDependency extends Dependency {
-        private final ArrayMap<String, Object> mObjs = new ArrayMap<>();
+        private final ArrayMap<Object, Object> mObjs = new ArrayMap<>();
 
-        private void injectTestDependency(String key, Object obj) {
+        private <T> void injectTestDependency(DependencyKey<T> key, T obj) {
+            mObjs.put(key, obj);
+        }
+
+        private <T> void injectTestDependency(Class<T> key, T obj) {
             mObjs.put(key, obj);
         }
 
         @Override
-        protected <T> T createDependency(String cls) {
-            if (mObjs.containsKey(cls)) return (T) mObjs.get(cls);
-            return super.createDependency(cls);
+        protected <T> T createDependency(Object key) {
+            if (mObjs.containsKey(key)) return (T) mObjs.get(key);
+            return super.createDependency(key);
         }
     }
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java
index 9eac0a0..e7fa799 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java
@@ -14,17 +14,23 @@
 
 package com.android.systemui.qs;
 
+import static org.junit.Assert.assertEquals;
 import static org.mockito.Mockito.mock;
 
+import android.os.Looper;
+
 import com.android.systemui.Dependency;
 import com.android.systemui.FragmentTestCase;
 import com.android.systemui.R;
+import com.android.systemui.SysUIRunner;
 import com.android.systemui.statusbar.phone.QSTileHost;
 import com.android.systemui.statusbar.phone.QuickStatusBarHeader;
 import com.android.systemui.statusbar.phone.StatusBarIconController;
 import com.android.systemui.statusbar.policy.UserSwitcherController;
 import com.android.systemui.tuner.TunerService;
 import com.android.systemui.util.LayoutInflaterBuilder;
+import com.android.systemui.utils.TestableLooper;
+import com.android.systemui.utils.TestableLooper.RunWithLooper;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -37,7 +43,8 @@
 import android.view.View;
 import android.widget.FrameLayout;
 
-@RunWith(AndroidJUnit4.class)
+@RunWith(SysUIRunner.class)
+@RunWithLooper(setAsMainLooper = true)
 public class QSFragmentTest extends FragmentTestCase {
 
     public QSFragmentTest() {
@@ -53,32 +60,31 @@
                         .replace("TextClock", View.class)
                         .build());
 
-        injectTestDependency(Dependency.BG_LOOPER, Looper.getMainLooper());
+        injectTestDependency(Dependency.BG_LOOPER, TestableLooper.get(this).getLooper());
         injectMockDependency(UserSwitcherController.class);
         injectLeakCheckedDependencies(ALL_SUPPORTED_CLASSES);
     }
 
     @Test
     public void testListening() {
+        assertEquals(Looper.myLooper(), Looper.getMainLooper());
         QSFragment qs = (QSFragment) mFragment;
-        postAndWait(() -> mFragments.dispatchResume());
-        QSTileHost host = new QSTileHost(mContext, null,
-                mock(StatusBarIconController.class));
+        mFragments.dispatchResume();
+        processAllMessages();
+        QSTileHost host = new QSTileHost(mContext, null, mock(StatusBarIconController.class));
         qs.setHost(host);
-        Handler h = new Handler((Looper) Dependency.get(Dependency.BG_LOOPER));
 
         qs.setListening(true);
-        waitForIdleSync(h);
+        processAllMessages();
 
         qs.setListening(false);
-        waitForIdleSync(h);
+        processAllMessages();
 
         // Manually push header through detach so it can handle standard cleanup it does on
         // removed from window.
         ((QuickStatusBarHeader) qs.getView().findViewById(R.id.header)).onDetachedFromWindow();
 
         host.destroy();
-        // Ensure the tuner cleans up its persistent listeners.
-        Dependency.get(TunerService.class).destroy();
+        processAllMessages();
     }
 }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationMenuRowTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationMenuRowTest.java
index 7141170..72f6ca8 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationMenuRowTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationMenuRowTest.java
@@ -14,12 +14,18 @@
 
 package com.android.systemui.statusbar;
 
+import com.android.systemui.SysUIRunner;
+import com.android.systemui.utils.TestableLooper;
+import com.android.systemui.utils.TestableLooper.RunWithLooper;
 import com.android.systemui.utils.ViewUtils;
 import com.android.systemui.utils.leaks.LeakCheckedTest;
 
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 
+@RunWith(SysUIRunner.class)
+@RunWithLooper
 public class NotificationMenuRowTest extends LeakCheckedTest {
 
     @Before
@@ -31,6 +37,8 @@
     public void testAttachDetach() {
         NotificationMenuRow row = new NotificationMenuRow(mContext);
         ViewUtils.attachView(row);
+        TestableLooper.get(this).processAllMessages();
         ViewUtils.detachView(row);
+        TestableLooper.get(this).processAllMessages();
     }
 }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragmentTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragmentTest.java
index cb30df4..f55115e0 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragmentTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragmentTest.java
@@ -25,16 +25,21 @@
 
 import com.android.systemui.FragmentTestCase;
 import com.android.systemui.R;
+import com.android.systemui.SysUIRunner;
 import com.android.systemui.statusbar.CommandQueue;
 import com.android.systemui.statusbar.policy.KeyguardMonitor;
 import com.android.systemui.statusbar.policy.NetworkController;
 import com.android.systemui.statusbar.policy.SecurityController;
 import com.android.systemui.tuner.TunerService;
+import com.android.systemui.utils.TestableLooper.RunWithLooper;
 
 import org.junit.Before;
+import org.junit.runner.RunWith;
 import org.junit.Test;
 import org.mockito.Mockito;
 
+@RunWith(SysUIRunner.class)
+@RunWithLooper(setAsMainLooper = true)
 public class CollapsedStatusBarFragmentTest extends FragmentTestCase {
 
     private NotificationIconAreaController mMockNotificiationAreaController;
@@ -59,7 +64,8 @@
 
     @Test
     public void testDisableNone() throws Exception {
-        postAndWait(() -> mFragments.dispatchResume());
+        mFragments.dispatchResume();
+        processAllMessages();
 
         CollapsedStatusBarFragment fragment = (CollapsedStatusBarFragment) mFragment;
         fragment.initNotificationIconArea(mMockNotificiationAreaController);
@@ -71,7 +77,8 @@
 
     @Test
     public void testDisableSystemInfo() throws Exception {
-        postAndWait(() -> mFragments.dispatchResume());
+        mFragments.dispatchResume();
+        processAllMessages();
 
         CollapsedStatusBarFragment fragment = (CollapsedStatusBarFragment) mFragment;
         fragment.initNotificationIconArea(mMockNotificiationAreaController);
@@ -88,7 +95,8 @@
 
     @Test
     public void testDisableNotifications() throws Exception {
-        postAndWait(() -> mFragments.dispatchResume());
+        mFragments.dispatchResume();
+        processAllMessages();
 
         CollapsedStatusBarFragment fragment = (CollapsedStatusBarFragment) mFragment;
         fragment.initNotificationIconArea(mMockNotificiationAreaController);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NavigationBarFragmentTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NavigationBarFragmentTest.java
index 3bce64f..1fa9846 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NavigationBarFragmentTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NavigationBarFragmentTest.java
@@ -24,13 +24,18 @@
 
 import com.android.systemui.Dependency;
 import com.android.systemui.FragmentTestCase;
+import com.android.systemui.SysUIRunner;
 import com.android.systemui.recents.Recents;
 import com.android.systemui.stackdivider.Divider;
 import com.android.systemui.statusbar.CommandQueue;
+import com.android.systemui.utils.TestableLooper.RunWithLooper;
 
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 
+@RunWith(SysUIRunner.class)
+@RunWithLooper(setAsMainLooper = true)
 public class NavigationBarFragmentTest extends FragmentTestCase {
 
     public NavigationBarFragmentTest() {
@@ -56,7 +61,8 @@
     public void testHomeLongPress() {
         NavigationBarFragment navigationBarFragment = (NavigationBarFragment) mFragment;
 
-        postAndWait(() -> mFragments.dispatchResume());
+        mFragments.dispatchResume();
+        processAllMessages();
         navigationBarFragment.onHomeLongClick(navigationBarFragment.getView());
     }
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
index 21c7fce..a208013 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
@@ -42,7 +42,9 @@
 import org.junit.runner.RunWith;
 
 @SmallTest
-@RunWith(AndroidJUnit4.class)
+// @RunWith(AndroidJUnit4.class)
+// TODO(gpitsch): We have seen some flakes in these tests, needs some investigation.
+// Q: How is mMetricsReader being used by the tested code?
 public class StatusBarTest extends SysuiTestCase {
 
     StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
@@ -54,7 +56,7 @@
     private MetricsReader mMetricsReader;
     private DisplayMetrics mDisplayMetrics = new DisplayMetrics();
 
-    @Before
+    // @Before
     public void setup() {
         mStatusBarKeyguardViewManager = mock(StatusBarKeyguardViewManager.class);
         mUnlockMethodCache = mock(UnlockMethodCache.class);
@@ -79,9 +81,15 @@
 
         mMetricsReader = new MetricsReader();
         mMetricsReader.checkpoint(); // clear out old logs
+        try {
+            // pause so that no new events arrive in the rest of this millisecond.
+            Thread.sleep(2);
+        } catch (InterruptedException e) {
+            // pass
+        }
     }
 
-    @Test
+    // @Test
     public void executeRunnableDismissingKeyguard_nullRunnable_showingAndOccluded() {
         when(mStatusBarKeyguardViewManager.isShowing()).thenReturn(true);
         when(mStatusBarKeyguardViewManager.isOccluded()).thenReturn(true);
@@ -89,7 +97,7 @@
         mStatusBar.executeRunnableDismissingKeyguard(null, null, false, false, false);
     }
 
-    @Test
+    // @Test
     public void executeRunnableDismissingKeyguard_nullRunnable_showing() {
         when(mStatusBarKeyguardViewManager.isShowing()).thenReturn(true);
         when(mStatusBarKeyguardViewManager.isOccluded()).thenReturn(false);
@@ -97,7 +105,7 @@
         mStatusBar.executeRunnableDismissingKeyguard(null, null, false, false, false);
     }
 
-    @Test
+    // @Test
     public void executeRunnableDismissingKeyguard_nullRunnable_notShowing() {
         when(mStatusBarKeyguardViewManager.isShowing()).thenReturn(false);
         when(mStatusBarKeyguardViewManager.isOccluded()).thenReturn(false);
@@ -105,7 +113,7 @@
         mStatusBar.executeRunnableDismissingKeyguard(null, null, false, false, false);
     }
 
-    @Test
+    // @Test
     public void lockscreenStateMetrics_notShowing() {
         // uninteresting state, except that fingerprint must be non-zero
         when(mStatusBarKeyguardViewManager.isOccluded()).thenReturn(false);
@@ -123,7 +131,7 @@
                         .setSubtype(0));
     }
 
-    @Test
+    // @Test
     public void lockscreenStateMetrics_notShowing_secure() {
         // uninteresting state, except that fingerprint must be non-zero
         when(mStatusBarKeyguardViewManager.isOccluded()).thenReturn(false);
@@ -141,7 +149,7 @@
                         .setSubtype(1));
     }
 
-    @Test
+    // @Test
     public void lockscreenStateMetrics_isShowing() {
         // uninteresting state, except that fingerprint must be non-zero
         when(mStatusBarKeyguardViewManager.isOccluded()).thenReturn(false);
@@ -159,7 +167,7 @@
                         .setSubtype(0));
     }
 
-    @Test
+    // @Test
     public void lockscreenStateMetrics_isShowing_secure() {
         // uninteresting state, except that fingerprint must be non-zero
         when(mStatusBarKeyguardViewManager.isOccluded()).thenReturn(false);
@@ -177,7 +185,7 @@
                         .setSubtype(1));
     }
 
-    @Test
+    // @Test
     public void lockscreenStateMetrics_isShowingBouncer() {
         // uninteresting state, except that fingerprint must be non-zero
         when(mStatusBarKeyguardViewManager.isOccluded()).thenReturn(false);
@@ -195,7 +203,7 @@
                         .setSubtype(1));
     }
 
-    @Test
+    // @Test
     public void onActivatedMetrics() {
         ActivatableNotificationView view =  mock(ActivatableNotificationView.class);
         mStatusBar.onActivated(view);
@@ -220,4 +228,4 @@
             return null;
         }
     }
-}
\ No newline at end of file
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/util/leak/LeakDetectorTest.java b/packages/SystemUI/tests/src/com/android/systemui/util/leak/LeakDetectorTest.java
new file mode 100644
index 0000000..11722fe
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/util/leak/LeakDetectorTest.java
@@ -0,0 +1,110 @@
+/*
+ * Copyright (C) 2017 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.util.leak;
+
+
+import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
+
+import com.android.systemui.util.leak.ReferenceTestUtils.CollectionWaiter;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.io.FileDescriptor;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Collection;
+
+@SmallTest
+@RunWith(AndroidJUnit4.class)
+public class LeakDetectorTest {
+
+    private LeakDetector mLeakDetector;
+
+    @Before
+    public void setup() {
+        mLeakDetector = LeakDetector.create();
+
+        // Note: Do not try to factor out object / collection waiter creation. The optimizer will
+        // try and cache accesses to fields and thus create a GC root for the duration of the test
+        // method, thus breaking the test.
+    }
+
+    @Test
+    public void trackInstance_doesNotLeakTrackedObject() {
+        Object object = new Object();
+        CollectionWaiter collectionWaiter = ReferenceTestUtils.createCollectionWaiter(object);
+
+        mLeakDetector.trackInstance(object);
+        object = null;
+        collectionWaiter.waitForCollection();
+    }
+
+    @Test
+    public void trackCollection_doesNotLeakTrackedObject() {
+        Collection<?> object = new ArrayList<>();
+        CollectionWaiter collectionWaiter = ReferenceTestUtils.createCollectionWaiter(object);
+
+        mLeakDetector.trackCollection(object, "tag");
+        object = null;
+        collectionWaiter.waitForCollection();
+    }
+
+    @Test
+    public void trackGarbage_doesNotLeakTrackedObject() {
+        Object object = new Object();
+        CollectionWaiter collectionWaiter = ReferenceTestUtils.createCollectionWaiter(object);
+
+        mLeakDetector.trackGarbage(object);
+        object = null;
+        collectionWaiter.waitForCollection();
+    }
+
+    @Test
+    public void testDump() throws Exception {
+        Object o1 = new Object();
+        Object o2 = new Object();
+        Collection<Object> col1 = new ArrayList<>();
+
+        mLeakDetector.trackInstance(o1);
+        mLeakDetector.trackCollection(col1, "tag");
+        mLeakDetector.trackGarbage(o2);
+
+        FileOutputStream fos = new FileOutputStream("/dev/null");
+        mLeakDetector.dump(fos.getFD(), new PrintWriter(fos), new String[0]);
+    }
+
+    @Test
+    public void testDisabled() throws Exception {
+        mLeakDetector = new LeakDetector(null, null, null);
+
+        Object o1 = new Object();
+        Object o2 = new Object();
+        Collection<Object> col1 = new ArrayList<>();
+
+        mLeakDetector.trackInstance(o1);
+        mLeakDetector.trackCollection(col1, "tag");
+        mLeakDetector.trackGarbage(o2);
+
+        FileOutputStream fos = new FileOutputStream("/dev/null");
+        mLeakDetector.dump(fos.getFD(), new PrintWriter(fos), new String[0]);
+    }
+}
\ No newline at end of file
diff --git a/packages/SystemUI/tests/src/com/android/systemui/util/leak/ReferenceTestUtils.java b/packages/SystemUI/tests/src/com/android/systemui/util/leak/ReferenceTestUtils.java
new file mode 100644
index 0000000..b433e7a
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/util/leak/ReferenceTestUtils.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2017 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.util.leak;
+
+import android.os.SystemClock;
+
+import java.lang.ref.Reference;
+import java.lang.ref.ReferenceQueue;
+import java.lang.ref.WeakReference;
+
+/**
+ * Utilities for writing tests that manipulate weak or other references.
+ */
+public class ReferenceTestUtils {
+
+    /** Returns a runnable that blocks until {@code o} has been collected. */
+    public static CollectionWaiter createCollectionWaiter(Object o) {
+        ReferenceQueue<Object> q = new ReferenceQueue<>();
+        Reference<?> ref = new WeakReference<>(o, q);
+        o = null; // Ensure this variable can't be referenced from the lambda.
+
+        return () -> {
+            Runtime.getRuntime().gc();
+            while (true) {
+                try {
+                    if (q.remove(5_000) == ref) {
+                        return;
+                    } else {
+                        throw new RuntimeException("timeout while waiting for object collection");
+                    }
+                } catch (InterruptedException e) {
+                    Thread.currentThread().interrupt();
+                }
+            }
+        };
+    }
+
+    public static void waitForCondition(Condition p) {
+        long deadline = SystemClock.uptimeMillis() + 5_000;
+        while (!p.apply()) {
+            if (SystemClock.uptimeMillis() > deadline) {
+                throw new RuntimeException("timeout while waiting for condition");
+            }
+            SystemClock.sleep(100);
+        }
+    }
+
+    public interface Condition {
+        boolean apply();
+    }
+
+    public interface CollectionWaiter {
+        void waitForCollection();
+    }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/util/leak/ReferenceTestUtilsTest.java b/packages/SystemUI/tests/src/com/android/systemui/util/leak/ReferenceTestUtilsTest.java
new file mode 100644
index 0000000..9da67b7
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/util/leak/ReferenceTestUtilsTest.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2017 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.util.leak;
+
+import static org.junit.Assert.assertEquals;
+
+import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@SmallTest
+@RunWith(AndroidJUnit4.class)
+public class ReferenceTestUtilsTest {
+
+    @Test
+    public void testCollectionWaiter_doesntBlockIndefinitely() {
+        ReferenceTestUtils.createCollectionWaiter(new Object()).waitForCollection();
+    }
+
+    @Test
+    public void testConditionWaiter_doesntBlockIndefinitely() {
+        ReferenceTestUtils.waitForCondition(() -> true);
+    }
+
+    @Test
+    public void testConditionWaiter_waitsUntilConditionIsTrue() {
+        int[] countHolder = new int[]{0};
+
+        ReferenceTestUtils.waitForCondition(() -> {
+            countHolder[0] += 1;
+            return countHolder[0] >= 5;
+        });
+
+        assertEquals(5, countHolder[0]);
+    }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/util/leak/WeakIdentityHashMapTest.java b/packages/SystemUI/tests/src/com/android/systemui/util/leak/WeakIdentityHashMapTest.java
new file mode 100644
index 0000000..fb1c1aa
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/util/leak/WeakIdentityHashMapTest.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2017 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.util.leak;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertTrue;
+
+import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
+
+import com.android.systemui.util.leak.ReferenceTestUtils.CollectionWaiter;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@SmallTest
+@RunWith(AndroidJUnit4.class)
+public class WeakIdentityHashMapTest {
+
+    WeakIdentityHashMap<Object, Object> mMap;
+
+    @Before
+    public void setup() {
+        mMap = new WeakIdentityHashMap<>();
+    }
+
+    @Test
+    public void testUsesIdentity() {
+        String a1 = new String("a");
+        String a2 = new String("a");
+        assertNotSame(a1, a2);
+
+        mMap.put(a1, "value1");
+        mMap.put(a2, "value2");
+
+        assertEquals("value1", mMap.get(a1));
+        assertEquals("value2", mMap.get(a2));
+    }
+
+    @Test
+    public void testWeaklyReferences() {
+        Object object = new Object();
+        CollectionWaiter collectionWaiter = ReferenceTestUtils.createCollectionWaiter(object);
+
+        mMap.put(object, "value");
+        object = null;
+
+        // Wait until object has been collected. We'll also need to wait for mMap to become empty,
+        // because our collection waiter may be told about the collection earlier than mMap.
+        collectionWaiter.waitForCollection();
+        ReferenceTestUtils.waitForCondition(mMap::isEmpty);
+
+        assertEquals(0, mMap.size());
+        assertTrue(mMap.isEmpty());
+    }
+}
\ No newline at end of file
diff --git a/packages/SystemUI/tests/src/com/android/systemui/utils/TestableLooper.java b/packages/SystemUI/tests/src/com/android/systemui/utils/TestableLooper.java
new file mode 100644
index 0000000..d275973
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/utils/TestableLooper.java
@@ -0,0 +1,260 @@
+/*
+ * Copyright (C) 2017 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.utils;
+
+import android.os.Handler;
+import android.os.Looper;
+import android.os.Message;
+import android.os.MessageQueue;
+import android.util.ArrayMap;
+
+import org.junit.runners.model.Statement;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.Map;
+
+/**
+ * Creates a looper on the current thread with control over if/when messages are
+ * executed. Warning: This class works through some reflection and may break/need
+ * to be updated from time to time.
+ */
+public class TestableLooper {
+
+    private final Method mNext;
+    private final Method mRecycleUnchecked;
+
+    private Looper mLooper;
+    private MessageQueue mQueue;
+    private boolean mMain;
+    private Object mOriginalMain;
+    private MessageHandler mMessageHandler;
+
+    private int mParsedCount;
+    private Handler mHandler;
+    private Message mEmptyMessage;
+
+    public TestableLooper() throws Exception {
+        this(true);
+    }
+
+    public TestableLooper(boolean setMyLooper) throws Exception {
+        setupQueue(setMyLooper);
+        mNext = mQueue.getClass().getDeclaredMethod("next");
+        mNext.setAccessible(true);
+        mRecycleUnchecked = Message.class.getDeclaredMethod("recycleUnchecked");
+        mRecycleUnchecked.setAccessible(true);
+    }
+
+    public Looper getLooper() {
+        return mLooper;
+    }
+
+    private void clearLooper() throws NoSuchFieldException, IllegalAccessException {
+        Field field = Looper.class.getDeclaredField("sThreadLocal");
+        field.setAccessible(true);
+        ThreadLocal<Looper> sThreadLocal = (ThreadLocal<Looper>) field.get(null);
+        sThreadLocal.set(null);
+    }
+
+    private boolean setForCurrentThread() throws NoSuchFieldException, IllegalAccessException {
+        if (Looper.myLooper() != mLooper) {
+            Field field = Looper.class.getDeclaredField("sThreadLocal");
+            field.setAccessible(true);
+            ThreadLocal<Looper> sThreadLocal = (ThreadLocal<Looper>) field.get(null);
+            sThreadLocal.set(mLooper);
+            return true;
+        }
+        return false;
+    }
+
+    private void setupQueue(boolean setMyLooper) throws Exception {
+        if (setMyLooper) {
+            clearLooper();
+            Looper.prepare();
+            mLooper = Looper.myLooper();
+        } else {
+            Constructor<Looper> constructor = Looper.class.getDeclaredConstructor(
+                    boolean.class);
+            constructor.setAccessible(true);
+            mLooper = constructor.newInstance(true);
+        }
+
+        mQueue = mLooper.getQueue();
+        mHandler = new Handler(mLooper);
+    }
+
+    public void setAsMainLooper() throws NoSuchFieldException, IllegalAccessException {
+        mMain = true;
+        setAsMainInt();
+    }
+
+    private void setAsMainInt() throws NoSuchFieldException, IllegalAccessException {
+        Field field = mLooper.getClass().getDeclaredField("sMainLooper");
+        field.setAccessible(true);
+        if (mOriginalMain == null) {
+            mOriginalMain = field.get(null);
+        }
+        field.set(null, mLooper);
+    }
+
+    /**
+     * Must be called if setAsMainLooper is called to restore the main looper when the
+     * test is complete, otherwise the main looper will not be available for any subsequent
+     * tests.
+     */
+    public void destroy() throws NoSuchFieldException, IllegalAccessException {
+        if (Looper.myLooper() == mLooper) {
+            clearLooper();
+        }
+        if (mMain && mOriginalMain != null) {
+            Field field = mLooper.getClass().getDeclaredField("sMainLooper");
+            field.setAccessible(true);
+            field.set(null, mOriginalMain);
+            mOriginalMain = null;
+        }
+    }
+
+    public void setMessageHandler(MessageHandler handler) {
+        mMessageHandler = handler;
+    }
+
+    /**
+     * Parse num messages from the message queue.
+     *
+     * @param num Number of messages to parse
+     */
+    public int processMessages(int num) {
+        for (int i = 0; i < num; i++) {
+            if (!parseMessageInt()) {
+                return i + 1;
+            }
+        }
+        return num;
+    }
+
+    public void processAllMessages() {
+        while (processQueuedMessages() != 0) ;
+    }
+
+    private int processQueuedMessages() {
+        int count = 0;
+        mEmptyMessage = mHandler.obtainMessage(1);
+        mHandler.sendMessageDelayed(mEmptyMessage, 1);
+        while (parseMessageInt()) count++;
+        return count;
+    }
+
+    private boolean parseMessageInt() {
+        try {
+            Message result = (Message) mNext.invoke(mQueue);
+            if (result != null) {
+                // This is a break message.
+                if (result == mEmptyMessage) {
+                    mRecycleUnchecked.invoke(result);
+                    return false;
+                }
+
+                if (mMessageHandler != null) {
+                    if (mMessageHandler.onMessageHandled(result)) {
+                        result.getTarget().dispatchMessage(result);
+                        mRecycleUnchecked.invoke(result);
+                    } else {
+                        mRecycleUnchecked.invoke(result);
+                        // Message handler indicated it doesn't want us to continue.
+                        return false;
+                    }
+                } else {
+                    result.getTarget().dispatchMessage(result);
+                    mRecycleUnchecked.invoke(result);
+                }
+            } else {
+                // No messages, don't continue parsing
+                return false;
+            }
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+        return true;
+    }
+
+    /**
+     * Runs an executable with myLooper set and processes all messages added.
+     */
+    public void runWithLooper(RunnableWithException runnable) throws Exception {
+        boolean set = setForCurrentThread();
+        runnable.run();
+        processAllMessages();
+        if (set) clearLooper();
+    }
+
+    public interface RunnableWithException {
+        void run() throws Exception;
+    }
+
+    @Retention(RetentionPolicy.RUNTIME)
+    @Target({ElementType.METHOD, ElementType.TYPE})
+    public @interface RunWithLooper {
+        boolean setAsMainLooper() default false;
+    }
+
+    private static final Map<Object, TestableLooper> sLoopers = new ArrayMap<>();
+
+    public static TestableLooper get(Object test) {
+        return sLoopers.get(test);
+    }
+
+    public static class LooperStatement extends Statement {
+        private final boolean mSetAsMain;
+        private final Statement mBase;
+        private final TestableLooper mLooper;
+
+        public LooperStatement(Statement base, boolean setAsMain, Object test) {
+            mBase = base;
+            try {
+                mLooper = new TestableLooper(false);
+                sLoopers.put(test, mLooper);
+                mSetAsMain = setAsMain;
+            } catch (Exception e) {
+                throw new RuntimeException(e);
+            }
+        }
+
+        @Override
+        public void evaluate() throws Throwable {
+            mLooper.setForCurrentThread();
+            if (mSetAsMain) {
+                mLooper.setAsMainLooper();
+            }
+
+            mBase.evaluate();
+
+            mLooper.destroy();
+        }
+    }
+
+    public interface MessageHandler {
+        /**
+         * Return true to have the message executed and delivered to target.
+         * Return false to not execute the message and stop executing messages.
+         */
+        boolean onMessageHandled(Message m);
+    }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/utils/TestableLooperTest.java b/packages/SystemUI/tests/src/com/android/systemui/utils/TestableLooperTest.java
new file mode 100644
index 0000000..2416e1d
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/utils/TestableLooperTest.java
@@ -0,0 +1,184 @@
+/*
+ * Copyright (C) 2017 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.utils;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import android.os.Handler;
+import android.os.Looper;
+import android.os.Message;
+
+import com.android.systemui.SysUIRunner;
+import com.android.systemui.SysuiTestCase;
+import com.android.systemui.utils.TestableLooper.MessageHandler;
+import com.android.systemui.utils.TestableLooper.RunWithLooper;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(SysUIRunner.class)
+@RunWithLooper
+public class TestableLooperTest extends SysuiTestCase {
+
+    private TestableLooper mTestableLooper;
+
+    @Before
+    public void setup() throws Exception {
+        mTestableLooper = TestableLooper.get(this);
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        mTestableLooper.destroy();
+    }
+
+    @Test
+    public void testMessageExecuted() throws Exception {
+        Handler h = new Handler();
+        Runnable r = mock(Runnable.class);
+        h.post(r);
+        verify(r, never()).run();
+        mTestableLooper.processAllMessages();
+        verify(r).run();
+    }
+
+    @Test
+    public void testMessageCallback() throws Exception {
+        Handler h = new Handler();
+        Message m = h.obtainMessage(3);
+        Runnable r = mock(Runnable.class);
+        MessageHandler messageHandler = mock(MessageHandler.class);
+        when(messageHandler.onMessageHandled(any())).thenReturn(false);
+        mTestableLooper.setMessageHandler(messageHandler);
+
+        m.sendToTarget();
+        h.post(r);
+
+        mTestableLooper.processAllMessages();
+
+        verify(messageHandler).onMessageHandled(eq(m));
+        // This should never be run becaus the mock returns false on the first message, and
+        // the second will get skipped.
+        verify(r, never()).run();
+    }
+
+    @Test
+    public void testProcessNumberOfMessages() throws Exception {
+        Handler h = new Handler();
+        Runnable r = mock(Runnable.class);
+        h.post(r);
+        h.post(r);
+        h.post(r);
+
+        mTestableLooper.processMessages(2);
+
+        verify(r, times(2)).run();
+    }
+
+    @Test
+    public void testProcessAllMessages() throws Exception {
+        Handler h = new Handler();
+        Runnable r = mock(Runnable.class);
+        Runnable poster = () -> h.post(r);
+        h.post(poster);
+
+        mTestableLooper.processAllMessages();
+        verify(r).run();
+    }
+
+    @Test
+    public void test3Chain() throws Exception {
+        Handler h = new Handler();
+        Runnable r = mock(Runnable.class);
+        Runnable poster = () -> h.post(r);
+        Runnable poster2 = () -> h.post(poster);
+        h.post(poster2);
+
+        mTestableLooper.processAllMessages();
+        verify(r).run();
+    }
+
+    @Test
+    public void testProcessAllMessages_2Messages() throws Exception {
+        Handler h = new Handler();
+        Runnable r = mock(Runnable.class);
+        Runnable r2 = mock(Runnable.class);
+        h.post(r);
+        h.post(r2);
+
+        mTestableLooper.processAllMessages();
+        verify(r).run();
+        verify(r2).run();
+    }
+
+    @Test
+    public void testMainLooper() throws Exception {
+        assertNotEquals(Looper.myLooper(), Looper.getMainLooper());
+
+        Looper originalMain = Looper.getMainLooper();
+        mTestableLooper.setAsMainLooper();
+        assertEquals(Looper.myLooper(), Looper.getMainLooper());
+        Runnable r = mock(Runnable.class);
+
+        new Handler(Looper.getMainLooper()).post(r);
+        mTestableLooper.processAllMessages();
+
+        verify(r).run();
+        mTestableLooper.destroy();
+
+        assertEquals(originalMain, Looper.getMainLooper());
+    }
+
+    @Test
+    public void testNotMyLooper() throws Exception {
+        TestableLooper looper = new TestableLooper(false);
+
+        assertEquals(Looper.myLooper(), mTestableLooper.getLooper());
+        assertNotEquals(Looper.myLooper(), looper.getLooper());
+
+        Runnable r = mock(Runnable.class);
+        Runnable r2 = mock(Runnable.class);
+        new Handler().post(r);
+        new Handler(looper.getLooper()).post(r2);
+
+        looper.processAllMessages();
+        verify(r2).run();
+        verify(r, never()).run();
+
+        mTestableLooper.processAllMessages();
+        verify(r).run();
+    }
+
+    @Test
+    public void testNonMainLooperAnnotation() {
+        assertNotEquals(Looper.myLooper(), Looper.getMainLooper());
+    }
+
+    @Test
+    @RunWithLooper(setAsMainLooper = true)
+    public void testMainLooperAnnotation() {
+        assertEquals(Looper.myLooper(), Looper.getMainLooper());
+    }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/utils/ViewUtils.java b/packages/SystemUI/tests/src/com/android/systemui/utils/ViewUtils.java
index 202c4cf..07e5f66 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/utils/ViewUtils.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/utils/ViewUtils.java
@@ -34,13 +34,11 @@
         Handler handler = new Handler(Looper.getMainLooper());
         handler.post(() -> InstrumentationRegistry.getContext()
                 .getSystemService(WindowManager.class).addView(view, lp));
-        SysuiTestCase.waitForIdleSync(handler);
     }
 
     public static void detachView(View view) {
         Handler handler = new Handler(Looper.getMainLooper());
         handler.post(() -> InstrumentationRegistry.getContext()
                 .getSystemService(WindowManager.class).removeView(view));
-        SysuiTestCase.waitForIdleSync(handler);
     }
 }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/LeakCheckedTest.java b/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/LeakCheckedTest.java
index 6ff8098..6c51524 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/LeakCheckedTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/LeakCheckedTest.java
@@ -149,10 +149,14 @@
 
     public void injectLeakCheckedDependencies(Class<?>... cls) {
         for (Class<?> c : cls) {
-            injectTestDependency(c, getLeakChecker(c));
+            injectLeakCheckedDependency(c);
         }
     }
 
+    public <T> void injectLeakCheckedDependency(Class<T> c) {
+        injectTestDependency(c, getLeakChecker(c));
+    }
+
     public <T extends CallbackController> T addListening(T mock, Class<T> cls, String tag) {
         doAnswer(new Answer<Void>() {
             @Override
diff --git a/services/autofill/java/com/android/server/autofill/AutoFillManagerService.java b/services/autofill/java/com/android/server/autofill/AutoFillManagerService.java
index 9347350..c16a51c 100644
--- a/services/autofill/java/com/android/server/autofill/AutoFillManagerService.java
+++ b/services/autofill/java/com/android/server/autofill/AutoFillManagerService.java
@@ -34,6 +34,7 @@
 import android.graphics.Rect;
 import android.net.Uri;
 import android.os.Binder;
+import android.os.Bundle;
 import android.os.Handler;
 import android.os.IBinder;
 import android.os.Looper;
@@ -54,12 +55,14 @@
 import com.android.internal.annotations.GuardedBy;
 import com.android.internal.os.BackgroundThread;
 import com.android.internal.os.HandlerCaller;
+import com.android.internal.os.IResultReceiver;
 import com.android.internal.os.SomeArgs;
 import com.android.server.LocalServices;
 import com.android.server.SystemService;
 
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -77,6 +80,10 @@
     private static final int MSG_UPDATE_SESSION = 2;
     private static final int MSG_FINISH_SESSION = 3;
     private static final int MSG_REQUEST_SAVE_FOR_USER = 4;
+    private static final int MSG_LIST_SESSIONS = 5;
+    private static final int MSG_RESET = 6;
+
+    static final String RECEIVER_BUNDLE_EXTRA_SESSIONS = "sessions";
 
     private final Context mContext;
     private final AutoFillUI mUi;
@@ -111,6 +118,12 @@
                 final int flags = args.argi6;
                 handleUpdateSession(userId, activityToken, autoFillId, bounds, value, flags);
                 return;
+            } case MSG_LIST_SESSIONS: {
+                handleListForUser(msg.arg1, (IResultReceiver) msg.obj);
+                return;
+            } case MSG_RESET: {
+                handleReset();
+                return;
             } default: {
                 Slog.w(TAG, "Invalid message: " + msg);
             }
@@ -203,6 +216,29 @@
         return service;
     }
 
+    // Called by Shell command.
+    void requestSaveForUser(int userId) {
+        Slog.i(TAG, "requestSaveForUser(): " + userId);
+        mContext.enforceCallingPermission(MANAGE_AUTO_FILL, TAG);
+        mHandlerCaller.sendMessage(mHandlerCaller.obtainMessageI(
+                MSG_REQUEST_SAVE_FOR_USER, userId));
+    }
+
+    // Called by Shell command.
+    void listSessions(int userId, IResultReceiver receiver) {
+        Slog.i(TAG, "listSessions() for userId " + userId);
+        mContext.enforceCallingPermission(MANAGE_AUTO_FILL, TAG);
+        mHandlerCaller.sendMessage(
+                mHandlerCaller.obtainMessageIO(MSG_LIST_SESSIONS, userId, receiver));
+    }
+
+    // Called by Shell command.
+    void reset() {
+        Slog.i(TAG, "reset()");
+        mContext.enforceCallingPermission(MANAGE_AUTO_FILL, TAG);
+        mHandlerCaller.sendMessage(mHandlerCaller.obtainMessage(MSG_RESET));
+    }
+
     /**
      * Removes a cached service for a given user.
      */
@@ -273,6 +309,39 @@
         }
     }
 
+    private void handleListForUser(int userId, IResultReceiver receiver) {
+        final Bundle resultData = new Bundle();
+        final ArrayList<String> sessions = new ArrayList<>();
+
+        synchronized (mLock) {
+            if (userId != UserHandle.USER_ALL) {
+                mServicesCache.get(userId).listSessionsLocked(sessions);
+            } else {
+                final int size = mServicesCache.size();
+                for (int i = 0; i < size; i++) {
+                    mServicesCache.valueAt(i).listSessionsLocked(sessions);
+                }
+            }
+        }
+
+        resultData.putStringArrayList(RECEIVER_BUNDLE_EXTRA_SESSIONS, sessions);
+        try {
+            receiver.send(0, resultData);
+        } catch (RemoteException e) {
+            // Just ignore it...
+        }
+    }
+
+    private void handleReset() {
+        synchronized (mLock) {
+            final int size = mServicesCache.size();
+            for (int i = 0; i < size; i++) {
+                mServicesCache.valueAt(i).destroyLocked();
+            }
+            mServicesCache.clear();
+        }
+    }
+
     final class AutoFillManagerServiceStub extends IAutoFillManagerService.Stub {
 
         @Override
@@ -318,13 +387,6 @@
         }
 
         @Override
-        public void requestSaveForUser(int userId) {
-            mContext.enforceCallingPermission(MANAGE_AUTO_FILL, TAG);
-            mHandlerCaller.sendMessage(mHandlerCaller.obtainMessageI(MSG_REQUEST_SAVE_FOR_USER,
-                    userId));
-        }
-
-        @Override
         public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
             if (mContext.checkCallingPermission(
                     Manifest.permission.DUMP) != PackageManager.PERMISSION_GRANTED) {
@@ -355,7 +417,7 @@
         @Override
         public void onShellCommand(FileDescriptor in, FileDescriptor out, FileDescriptor err,
                 String[] args, ShellCallback callback, ResultReceiver resultReceiver) {
-            (new AutoFillManagerServiceShellCommand(this)).exec(
+            (new AutoFillManagerServiceShellCommand(AutoFillManagerService.this)).exec(
                     this, in, out, err, args, callback, resultReceiver);
         }
     }
diff --git a/services/autofill/java/com/android/server/autofill/AutoFillManagerServiceImpl.java b/services/autofill/java/com/android/server/autofill/AutoFillManagerServiceImpl.java
index 859e1a1..2891518 100644
--- a/services/autofill/java/com/android/server/autofill/AutoFillManagerServiceImpl.java
+++ b/services/autofill/java/com/android/server/autofill/AutoFillManagerServiceImpl.java
@@ -70,6 +70,7 @@
 import com.android.server.FgThread;
 
 import java.io.PrintWriter;
+import java.util.ArrayList;
 import java.util.Map;
 import java.util.Map.Entry;
 
@@ -330,6 +331,12 @@
         }
     }
 
+    void listSessionsLocked(ArrayList<String> output) {
+        for (IBinder activityToken : mSessions.keySet()) {
+            output.add(mComponentName + ":" + activityToken);
+        }
+    }
+
     @Override
     public String toString() {
         return "AutoFillManagerServiceImpl: [userId=" + mUserId
@@ -886,8 +893,10 @@
         }
 
         private AutoFillUI getUiForShowing() {
-            mUi.setCallback(this, mActivityToken);
-            return mUi;
+            synchronized (mLock) {
+                mUi.setCallbackLocked(this, mActivityToken);
+                return mUi;
+            }
         }
 
         private ViewNode findViewNodeByIdLocked(AutoFillId id) {
@@ -926,7 +935,7 @@
         private void destroyLocked() {
             mRemoteFillService.destroy();
             mUi.hideAll();
-            mUi.setCallback(null, null);
+            mUi.setCallbackLocked(null, null);
         }
 
         private void removeSelf() {
diff --git a/services/autofill/java/com/android/server/autofill/AutoFillManagerServiceShellCommand.java b/services/autofill/java/com/android/server/autofill/AutoFillManagerServiceShellCommand.java
index 201a889..cfa4a1d 100644
--- a/services/autofill/java/com/android/server/autofill/AutoFillManagerServiceShellCommand.java
+++ b/services/autofill/java/com/android/server/autofill/AutoFillManagerServiceShellCommand.java
@@ -16,19 +16,26 @@
 
 package com.android.server.autofill;
 
+import static com.android.server.autofill.AutoFillManagerService.RECEIVER_BUNDLE_EXTRA_SESSIONS;
+
 import android.app.ActivityManager;
+import android.os.Bundle;
 import android.os.RemoteException;
 import android.os.ShellCommand;
 import android.os.UserHandle;
-import android.service.autofill.IAutoFillManagerService;
+
+import com.android.internal.os.IResultReceiver;
 
 import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
 
 public final class AutoFillManagerServiceShellCommand extends ShellCommand {
 
-    private final IAutoFillManagerService.Stub mService;
+    private final AutoFillManagerService mService;
 
-    public AutoFillManagerServiceShellCommand(IAutoFillManagerService.Stub service) {
+    public AutoFillManagerServiceShellCommand(AutoFillManagerService service) {
         mService = service;
     }
 
@@ -38,17 +45,16 @@
             return handleDefaultCommands(cmd);
         }
         final PrintWriter pw = getOutPrintWriter();
-        try {
-            switch (cmd) {
-                case "save":
-                    return requestSave();
-                default:
-                    return handleDefaultCommands(cmd);
-            }
-        } catch (RemoteException e) {
-            pw.println("error: " + e);
+        switch (cmd) {
+            case "save":
+                return requestSave();
+            case "list":
+                return requestList(pw);
+            case "reset":
+                return requestReset();
+            default:
+                return handleDefaultCommands(cmd);
         }
-        return -1;
     }
 
     @Override
@@ -58,22 +64,79 @@
             pw.println("  help");
             pw.println("    Prints this help text.");
             pw.println("");
+            pw.println("  list sessions [--user USER_ID]");
+            pw.println("    List all pending sessions.");
+            pw.println("");
             pw.println("  save [--user USER_ID]");
             pw.println("    Request provider to save contents of the top activity. ");
             pw.println("");
+            pw.println("  reset");
+            pw.println("    Reset all pending sessions and cached service connections.");
+            pw.println("");
         }
     }
 
-    private int requestSave() throws RemoteException {
-        final int userId = getUserIdFromArgs();
+    private int requestSave() {
+        final int userId = getUserIdFromArgsOrCurrentUser();
         mService.requestSaveForUser(userId);
         return 0;
     }
 
-    private int getUserIdFromArgs() {
+    private int requestList(PrintWriter pw) {
+        final String type = getNextArgRequired();
+        if (!type.equals("sessions")) {
+            pw.println("Error: invalid list type");
+            return -1;
+
+        }
+        final int userId = getUserIdFromArgsOrAllUsers();
+        final CountDownLatch latch = new CountDownLatch(1);
+        final IResultReceiver receiver = new IResultReceiver.Stub() {
+
+            @Override
+            public void send(int resultCode, Bundle resultData) throws RemoteException {
+                final ArrayList<String> sessions = resultData
+                        .getStringArrayList(RECEIVER_BUNDLE_EXTRA_SESSIONS);
+
+                for (String session : sessions) {
+                    pw.println(session);
+                }
+                latch.countDown();
+            }
+        };
+
+        mService.listSessions(userId, receiver);
+
+        try {
+            final boolean received = latch.await(5, TimeUnit.SECONDS);
+            if (!received) {
+                pw.println("Timed out after 5 seconds");
+                return -1;
+            }
+        } catch (InterruptedException e) {
+            pw.println("System call interrupted");
+            Thread.currentThread().interrupt();
+            return -1;
+        }
+        return 0;
+    }
+
+    private int requestReset() {
+        mService.reset();
+        return 0;
+    }
+
+    private int getUserIdFromArgsOrCurrentUser() {
         if ("--user".equals(getNextArg())) {
             return UserHandle.parseUserArg(getNextArgRequired());
         }
         return ActivityManager.getCurrentUser();
     }
+
+    private int getUserIdFromArgsOrAllUsers() {
+        if ("--user".equals(getNextArg())) {
+            return UserHandle.parseUserArg(getNextArgRequired());
+        }
+        return UserHandle.USER_ALL;
+    }
 }
diff --git a/services/autofill/java/com/android/server/autofill/AutoFillUI.java b/services/autofill/java/com/android/server/autofill/AutoFillUI.java
index e9fc044..0763c74 100644
--- a/services/autofill/java/com/android/server/autofill/AutoFillUI.java
+++ b/services/autofill/java/com/android/server/autofill/AutoFillUI.java
@@ -100,7 +100,7 @@
         mWm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
     }
 
-    void setCallback(AutoFillUiCallback callback, IBinder activityToken) {
+    void setCallbackLocked(AutoFillUiCallback callback, IBinder activityToken) {
         hideAll();
         mCallback = callback;
         mActivityToken = activityToken;
@@ -180,7 +180,11 @@
                             synchronized (mLock) {
                                 callback = mCallback;
                             }
-                            callback.fill(dataset);
+                            if (callback != null) {
+                                callback.fill(dataset);
+                            } else {
+                                Slog.w(TAG, "null callback on showFillUi() for " + viewState.mId);
+                            }
                             hideFillUi();
                         });
 
diff --git a/services/autofill/java/com/android/server/autofill/Helper.java b/services/autofill/java/com/android/server/autofill/Helper.java
index 7400a64..0f2bb60 100644
--- a/services/autofill/java/com/android/server/autofill/Helper.java
+++ b/services/autofill/java/com/android/server/autofill/Helper.java
@@ -38,7 +38,7 @@
     static void append(StringBuilder builder, Bundle bundle) {
         if (bundle == null) {
             builder.append("N/A");
-        } else if (!DEBUG) {
+        } else if (!VERBOSE) {
             builder.append(REDACTED);
         } else {
             final Set<String> keySet = bundle.keySet();
diff --git a/services/backup/java/com/android/server/backup/BackupManagerService.java b/services/backup/java/com/android/server/backup/BackupManagerService.java
index 88c05b5..c4e2a53 100644
--- a/services/backup/java/com/android/server/backup/BackupManagerService.java
+++ b/services/backup/java/com/android/server/backup/BackupManagerService.java
@@ -30,18 +30,20 @@
 import android.app.backup.BackupDataInput;
 import android.app.backup.BackupDataOutput;
 import android.app.backup.BackupManager;
+import android.app.backup.BackupManagerMonitor;
 import android.app.backup.BackupProgress;
 import android.app.backup.BackupTransport;
 import android.app.backup.FullBackup;
 import android.app.backup.FullBackupDataOutput;
-import android.app.backup.IBackupManager;
 import android.app.backup.IBackupObserver;
+import android.app.backup.IBackupManagerMonitor;
+import android.app.backup.RestoreDescription;
+import android.app.backup.RestoreSet;
+import android.app.backup.IBackupManager;
 import android.app.backup.IFullBackupRestoreObserver;
 import android.app.backup.IRestoreObserver;
 import android.app.backup.IRestoreSession;
 import android.app.backup.ISelectBackupTransportCallback;
-import android.app.backup.RestoreDescription;
-import android.app.backup.RestoreSet;
 import android.app.backup.SelectBackupTransportCallback;
 import android.content.ActivityNotFoundException;
 import android.content.BroadcastReceiver;
@@ -414,12 +416,14 @@
         public IBackupTransport transport;
         public ActiveRestoreSession session;
         public IRestoreObserver observer;
+        public IBackupManagerMonitor monitor;
 
         RestoreGetSetsParams(IBackupTransport _transport, ActiveRestoreSession _session,
-                IRestoreObserver _observer) {
+                IRestoreObserver _observer, IBackupManagerMonitor _monitor) {
             transport = _transport;
             session = _session;
             observer = _observer;
+            monitor = _monitor;
         }
     }
 
@@ -427,6 +431,7 @@
         public IBackupTransport transport;
         public String dirName;
         public IRestoreObserver observer;
+        public IBackupManagerMonitor monitor;
         public long token;
         public PackageInfo pkgInfo;
         public int pmToken; // in post-install restore, the PM's token for this transaction
@@ -437,10 +442,11 @@
          * Restore a single package; no kill after restore
          */
         RestoreParams(IBackupTransport _transport, String _dirName, IRestoreObserver _obs,
-                long _token, PackageInfo _pkg) {
+                IBackupManagerMonitor _monitor, long _token, PackageInfo _pkg) {
             transport = _transport;
             dirName = _dirName;
             observer = _obs;
+            monitor = _monitor;
             token = _token;
             pkgInfo = _pkg;
             pmToken = 0;
@@ -452,10 +458,11 @@
          * Restore at install: PM token needed, kill after restore
          */
         RestoreParams(IBackupTransport _transport, String _dirName, IRestoreObserver _obs,
-                long _token, String _pkgName, int _pmToken) {
+                IBackupManagerMonitor _monitor, long _token, String _pkgName, int _pmToken) {
             transport = _transport;
             dirName = _dirName;
             observer = _obs;
+            monitor = _monitor;
             token = _token;
             pkgInfo = null;
             pmToken = _pmToken;
@@ -468,10 +475,11 @@
          * restore UXes use.
          */
         RestoreParams(IBackupTransport _transport, String _dirName, IRestoreObserver _obs,
-                long _token) {
+                IBackupManagerMonitor _monitor, long _token) {
             transport = _transport;
             dirName = _dirName;
             observer = _obs;
+            monitor = _monitor;
             token = _token;
             pkgInfo = null;
             pmToken = 0;
@@ -484,10 +492,12 @@
          * whether it's to be considered a system-level restore.
          */
         RestoreParams(IBackupTransport _transport, String _dirName, IRestoreObserver _obs,
-                long _token, String[] _filterSet, boolean _isSystemRestore) {
+                IBackupManagerMonitor _monitor, long _token,
+                String[] _filterSet, boolean _isSystemRestore) {
             transport = _transport;
             dirName = _dirName;
             observer = _obs;
+            monitor = _monitor;
             token = _token;
             pkgInfo = null;
             pmToken = 0;
@@ -565,17 +575,19 @@
         public ArrayList<String> kvPackages;
         public ArrayList<String> fullPackages;
         public IBackupObserver observer;
+        public IBackupManagerMonitor monitor;
         public boolean userInitiated;
         public boolean nonIncrementalBackup;
 
         BackupParams(IBackupTransport transport, String dirName, ArrayList<String> kvPackages,
-                ArrayList<String> fullPackages, IBackupObserver observer, boolean userInitiated,
-                boolean nonIncrementalBackup) {
+                ArrayList<String> fullPackages, IBackupObserver observer,
+                IBackupManagerMonitor monitor,boolean userInitiated, boolean nonIncrementalBackup) {
             this.transport = transport;
             this.dirName = dirName;
             this.kvPackages = kvPackages;
             this.fullPackages = fullPackages;
             this.observer = observer;
+            this.monitor = monitor;
             this.userInitiated = userInitiated;
             this.nonIncrementalBackup = nonIncrementalBackup;
         }
@@ -785,8 +797,8 @@
                     // Spin up a backup state sequence and set it running
                     try {
                         String dirName = transport.transportDirName();
-                        PerformBackupTask pbt = new PerformBackupTask(transport, dirName,
-                                queue, oldJournal, null, null, false, false /* nonIncremental */);
+                        PerformBackupTask pbt = new PerformBackupTask(transport, dirName, queue,
+                                oldJournal, null, null, null, false, false /* nonIncremental */);
                         Message pbtMessage = obtainMessage(MSG_BACKUP_RESTORE_STEP, pbt);
                         sendMessage(pbtMessage);
                     } catch (Exception e) {
@@ -861,8 +873,8 @@
                 RestoreParams params = (RestoreParams)msg.obj;
                 Slog.d(TAG, "MSG_RUN_RESTORE observer=" + params.observer);
                 BackupRestoreTask task = new PerformUnifiedRestoreTask(params.transport,
-                        params.observer, params.token, params.pkgInfo, params.pmToken,
-                        params.isSystemRestore, params.filterSet);
+                        params.observer, params.monitor, params.token, params.pkgInfo,
+                        params.pmToken, params.isSystemRestore, params.filterSet);
                 Message restoreMsg = obtainMessage(MSG_BACKUP_RESTORE_STEP, task);
                 sendMessage(restoreMsg);
                 break;
@@ -1025,7 +1037,7 @@
                 mWakelock.acquire();
 
                 PerformBackupTask pbt = new PerformBackupTask(params.transport, params.dirName,
-                        kvQueue, null, params.observer, params.fullPackages, true,
+                        kvQueue, null, params.observer, params.monitor, params.fullPackages, true,
                         params.nonIncrementalBackup);
                 Message pbtMessage = obtainMessage(MSG_BACKUP_RESTORE_STEP, pbt);
                 sendMessage(pbtMessage);
@@ -1515,10 +1527,14 @@
                 // This isn't the current journal, so it must be a leftover.  Read
                 // out the package names mentioned there and schedule them for
                 // backup.
-                RandomAccessFile in = null;
+                DataInputStream in = null;
                 try {
                     Slog.i(TAG, "Found stale backup journal, scheduling");
-                    in = new RandomAccessFile(f, "r");
+                    // Journals will tend to be on the order of a few kilobytes(around 4k), hence,
+                    // setting the buffer size to 8192.
+                    InputStream bufferedInputStream = new BufferedInputStream(
+                            new FileInputStream(f), 8192);
+                    in = new DataInputStream(bufferedInputStream);
                     while (true) {
                         String packageName = in.readUTF();
                         if (MORE_DEBUG) Slog.i(TAG, "  " + packageName);
@@ -2277,11 +2293,18 @@
     }
 
     public int requestBackup(String[] packages, IBackupObserver observer, int flags) {
+        return requestBackup(packages, observer, null, flags);
+    }
+
+    public int requestBackup(String[] packages, IBackupObserver observer,
+            IBackupManagerMonitor monitor, int flags) {
         mContext.enforceCallingPermission(android.Manifest.permission.BACKUP, "requestBackup");
 
         if (packages == null || packages.length < 1) {
             Slog.e(TAG, "No packages named for backup request");
             sendBackupFinished(observer, BackupManager.ERROR_TRANSPORT_ABORTED);
+            monitor = monitorEvent(monitor, BackupManagerMonitor.LOG_EVENT_ID_NO_PACKAGES,
+                    null, BackupManagerMonitor.LOG_EVENT_CATEGORY_TRANSPORT);
             throw new IllegalArgumentException("No packages are provided for backup");
         }
 
@@ -2336,7 +2359,7 @@
 
         Message msg = mBackupHandler.obtainMessage(MSG_REQUEST_BACKUP);
         msg.obj = new BackupParams(transport, dirName, kvBackupList, fullBackupList, observer,
-                true, nonIncrementalBackup);
+                monitor, true, nonIncrementalBackup);
         mBackupHandler.sendMessage(msg);
         return BackupManager.SUCCESS;
     }
@@ -2452,6 +2475,7 @@
         BackupState mCurrentState;
         ArrayList<String> mPendingFullBackups;
         IBackupObserver mObserver;
+        IBackupManagerMonitor mMonitor;
 
         // carried information about the current in-flight operation
         IBackupAgent mAgentBinder;
@@ -2469,12 +2493,13 @@
 
         public PerformBackupTask(IBackupTransport transport, String dirName,
                 ArrayList<BackupRequest> queue, File journal, IBackupObserver observer,
-                ArrayList<String> pendingFullBackups, boolean userInitiated,
-                boolean nonIncremental) {
+                IBackupManagerMonitor monitor, ArrayList<String> pendingFullBackups,
+                boolean userInitiated, boolean nonIncremental) {
             mTransport = transport;
             mOriginalQueue = queue;
             mJournal = journal;
             mObserver = observer;
+            mMonitor = monitor;
             mPendingFullBackups = pendingFullBackups;
             mUserInitiated = userInitiated;
             mNonIncremental = nonIncremental;
@@ -2834,7 +2859,7 @@
                 PerformFullTransportBackupTask task =
                         new PerformFullTransportBackupTask(/*fullBackupRestoreObserver*/ null,
                                 fullBackups, /*updateSchedule*/ false, /*runningJob*/ null, latch,
-                                mObserver, mUserInitiated);
+                                mObserver, mMonitor, mUserInitiated);
                 // Acquiring wakelock for PerformFullTransportBackupTask before its start.
                 mWakelock.acquire();
                 (new Thread(task, "full-transport-requested")).start();
@@ -3211,6 +3236,9 @@
             Slog.e(TAG, "Timeout backing up " + mCurrentPackage.packageName);
             EventLog.writeEvent(EventLogTags.BACKUP_AGENT_FAILURE, mCurrentPackage.packageName,
                     "timeout");
+            mMonitor = monitorEvent(mMonitor,
+                    BackupManagerMonitor.LOG_EVENT_ID_KEY_VALUE_BACKUP_TIMEOUT,
+                    mCurrentPackage, BackupManagerMonitor.LOG_EVENT_CATEGORY_AGENT);
             addBackupTrace("timeout of " + mCurrentPackage.packageName);
             agentErrorCleanup();
             dataChangedImpl(mCurrentPackage.packageName);
@@ -3371,7 +3399,7 @@
                 this.notifyAll();
             }
         }
-        
+
     }
 
     private void routeSocketDataToOutput(ParcelFileDescriptor inPipe, OutputStream out)
@@ -3829,7 +3857,7 @@
         String mCurrentPassword;
         String mEncryptPassword;
 
-        PerformAdbBackupTask(ParcelFileDescriptor fd, IFullBackupRestoreObserver observer, 
+        PerformAdbBackupTask(ParcelFileDescriptor fd, IFullBackupRestoreObserver observer,
                 boolean includeApks, boolean includeObbs, boolean includeShared,
                 boolean doWidgets, String curPassword, String encryptPassword, boolean doAllApps,
                 boolean doSystem, boolean doCompress, String[] packages, AtomicBoolean latch) {
@@ -4193,17 +4221,19 @@
     class PerformFullTransportBackupTask extends FullBackupTask {
         static final String TAG = "PFTBT";
         ArrayList<PackageInfo> mPackages;
+        PackageInfo mCurrentPackage;
         boolean mUpdateSchedule;
         CountDownLatch mLatch;
         AtomicBoolean mKeepRunning;     // signal from job scheduler
         FullBackupJob mJob;             // if a scheduled job needs to be finished afterwards
         IBackupObserver mBackupObserver;
+        IBackupManagerMonitor mMonitor;
         boolean mUserInitiated;
 
-        PerformFullTransportBackupTask(IFullBackupRestoreObserver observer, 
+        PerformFullTransportBackupTask(IFullBackupRestoreObserver observer,
                 String[] whichPackages, boolean updateSchedule,
                 FullBackupJob runningJob, CountDownLatch latch, IBackupObserver backupObserver,
-                boolean userInitiated) {
+                IBackupManagerMonitor monitor, boolean userInitiated) {
             super(observer);
             mUpdateSchedule = updateSchedule;
             mLatch = latch;
@@ -4211,12 +4241,14 @@
             mJob = runningJob;
             mPackages = new ArrayList<PackageInfo>(whichPackages.length);
             mBackupObserver = backupObserver;
+            mMonitor = monitor;
             mUserInitiated = userInitiated;
 
             for (String pkg : whichPackages) {
                 try {
                     PackageInfo info = mPackageManager.getPackageInfo(pkg,
                             PackageManager.GET_SIGNATURES);
+                    mCurrentPackage = info;
                     if (!appIsEligibleForBackup(info.applicationInfo)) {
                         // Cull any packages that have indicated that backups are not permitted,
                         // that run as system-domain uids but do not define their own backup agents,
@@ -4728,6 +4760,9 @@
                 if (DEBUG) {
                     Slog.w(TAG, "Full backup timeout of " + mTarget.packageName);
                 }
+                mMonitor = monitorEvent(mMonitor,
+                        BackupManagerMonitor.LOG_EVENT_ID_FULL_BACKUP_TIMEOUT,
+                        mCurrentPackage, BackupManagerMonitor.LOG_EVENT_CATEGORY_AGENT);
                 tearDownAgentAndKill(mTarget.applicationInfo);
             }
         }
@@ -4989,7 +5024,7 @@
             CountDownLatch latch = new CountDownLatch(1);
             String[] pkg = new String[] {entry.packageName};
             mRunningFullBackupTask = new PerformFullTransportBackupTask(null, pkg, true,
-                    scheduledJob, latch, null, false /* userInitiated */);
+                    scheduledJob, latch, null, null, false /* userInitiated */);
             // Acquiring wakelock for PerformFullTransportBackupTask before its start.
             mWakelock.acquire();
             (new Thread(mRunningFullBackupTask)).start();
@@ -7757,6 +7792,9 @@
         // Restore observer; may be null
         private IRestoreObserver mObserver;
 
+        // BackuoManagerMonitor; may be null
+        private IBackupManagerMonitor mMonitor;
+
         // Token identifying the dataset to the transport
         private long mToken;
 
@@ -7821,13 +7859,14 @@
         // Invariant: mWakelock is already held, and this task is responsible for
         // releasing it at the end of the restore operation.
         PerformUnifiedRestoreTask(IBackupTransport transport, IRestoreObserver observer,
-                long restoreSetToken, PackageInfo targetPackage, int pmToken,
-                boolean isFullSystemRestore, String[] filterSet) {
+                IBackupManagerMonitor monitor, long restoreSetToken, PackageInfo targetPackage,
+                int pmToken, boolean isFullSystemRestore, String[] filterSet) {
             mState = UnifiedRestoreState.INITIAL;
             mStartRealtime = SystemClock.elapsedRealtime();
 
             mTransport = transport;
             mObserver = observer;
+            mMonitor = monitor;
             mToken = restoreSetToken;
             mPmToken = pmToken;
             mTargetPackage = targetPackage;
@@ -7947,20 +7986,20 @@
 
         /*
          * SKETCH OF OPERATION
-         * 
+         *
          * create one of these PerformUnifiedRestoreTask objects, telling it which
          * dataset & transport to address, and then parameters within the restore
          * operation: single target package vs many, etc.
          *
          * 1. transport.startRestore(token, list-of-packages).  If we need @pm@  it is
          * always placed first and the settings provider always placed last [for now].
-         * 
+         *
          * 1a [if we needed @pm@ then nextRestorePackage() and restore the PMBA inline]
-         * 
+         *
          *   [ state change => RUNNING_QUEUE ]
-         * 
+         *
          * NOW ITERATE:
-         * 
+         *
          * { 3. t.nextRestorePackage()
          *   4. does the metadata for this package allow us to restore it?
          *      does the on-disk app permit us to restore it? [re-check allowBackup etc]
@@ -7971,7 +8010,7 @@
          *       5c. call into agent to perform restore
          *       5d. tear down agent
          *       [ state change => RUNNING_QUEUE ]
-         * 
+         *
          *   6. else it's a stream dataset:
          *       [ state change => RESTORE_FULL ]
          *       6a. instantiate the engine for a stream restore: engine handles agent lifecycles
@@ -7979,12 +8018,12 @@
          *       6c. ITERATE getNextFullRestoreDataChunk() and copy data to engine runner socket
          *       [ state change => RUNNING_QUEUE ]
          * }
-         * 
+         *
          *   [ state change => FINAL ]
-         * 
+         *
          * 7. t.finishRestore(), release wakelock, etc.
-         * 
-         * 
+         *
+         *
          */
 
         // state INITIAL : set up for the restore and read the metadata if necessary
@@ -8554,6 +8593,8 @@
                 if (DEBUG) {
                     Slog.w(TAG, "Full-data restore target timed out; shutting down");
                 }
+                mMonitor = monitorEvent(mMonitor, BackupManagerMonitor.LOG_EVENT_ID_FULL_RESTORE_TIMEOUT,
+                        mCurrentPackage, BackupManagerMonitor.LOG_EVENT_CATEGORY_AGENT);
                 mEngineThread.handleTimeout();
 
                 IoUtils.closeQuietly(mEnginePipes[1]);
@@ -8797,6 +8838,8 @@
         @Override
         public void handleTimeout() {
             Slog.e(TAG, "Timeout restoring application " + mCurrentPackage.packageName);
+            mMonitor = monitorEvent(mMonitor, BackupManagerMonitor.LOG_EVENT_ID_KEY_VALUE_RESTORE_TIMEOUT,
+                    mCurrentPackage, BackupManagerMonitor.LOG_EVENT_CATEGORY_AGENT);
             EventLog.writeEvent(EventLogTags.RESTORE_AGENT_FAILURE,
                     mCurrentPackage.packageName, "restore timeout");
             // Handle like an agent that threw on invocation: wipe it and go on to the next
@@ -9243,7 +9286,7 @@
             try {
                 CountDownLatch latch = new CountDownLatch(1);
                 PerformFullTransportBackupTask task = new PerformFullTransportBackupTask(null,
-                        pkgNames, false, null, latch, null, false /* userInitiated */);
+                        pkgNames, false, null, latch, null, null, false /* userInitiated */);
                 // Acquiring wakelock for PerformFullTransportBackupTask before its start.
                 mWakelock.acquire();
                 (new Thread(task, "full-transport-master")).start();
@@ -9573,7 +9616,14 @@
 
     public String[] getTransportWhitelist() {
         // No permission check, intentionally.
-        return mTransportManager.getTransportWhitelist().toArray(new String[0]);
+        Set<ComponentName> whitelistedComponents = mTransportManager.getTransportWhitelist();
+        String[] whitelistedTransports = new String[whitelistedComponents.size()];
+        int i = 0;
+        for (ComponentName component : whitelistedComponents) {
+            whitelistedTransports[i] = component.flattenToShortString();
+            i++;
+        }
+        return whitelistedTransports;
     }
 
     // Select which transport to use for the next backup operation.
@@ -9804,7 +9854,7 @@
                     Slog.d(TAG, "Restore at install of " + packageName);
                 }
                 Message msg = mBackupHandler.obtainMessage(MSG_RUN_RESTORE);
-                msg.obj = new RestoreParams(transport, dirName, null,
+                msg.obj = new RestoreParams(transport, dirName, null, null,
                         restoreSet, packageName, token);
                 mBackupHandler.sendMessage(msg);
             } catch (Exception e) {
@@ -9962,7 +10012,8 @@
         }
 
         // --- Binder interface ---
-        public synchronized int getAvailableRestoreSets(IRestoreObserver observer) {
+        public synchronized int getAvailableRestoreSets(IRestoreObserver observer,
+                IBackupManagerMonitor monitor) {
             mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP,
                     "getAvailableRestoreSets");
             if (observer == null) {
@@ -9993,7 +10044,8 @@
                 // spin off the transport request to our service thread
                 mWakelock.acquire();
                 Message msg = mBackupHandler.obtainMessage(MSG_RUN_GET_RESTORE_SETS,
-                        new RestoreGetSetsParams(mRestoreTransport, this, observer));
+                        new RestoreGetSetsParams(mRestoreTransport, this, observer,
+                                monitor));
                 mBackupHandler.sendMessage(msg);
                 return 0;
             } catch (Exception e) {
@@ -10004,7 +10056,8 @@
             }
         }
 
-        public synchronized int restoreAll(long token, IRestoreObserver observer) {
+        public synchronized int restoreAll(long token, IRestoreObserver observer,
+                IBackupManagerMonitor monitor) {
             mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP,
                     "performRestore");
 
@@ -10052,7 +10105,7 @@
                         }
                         Message msg = mBackupHandler.obtainMessage(MSG_RUN_RESTORE);
                         msg.obj = new RestoreParams(mRestoreTransport, dirName,
-                                observer, token);
+                                observer, monitor, token);
                         mBackupHandler.sendMessage(msg);
                         Binder.restoreCallingIdentity(oldId);
                         return 0;
@@ -10066,7 +10119,7 @@
 
         // Restores of more than a single package are treated as 'system' restores
         public synchronized int restoreSome(long token, IRestoreObserver observer,
-                String[] packages) {
+                IBackupManagerMonitor monitor, String[] packages) {
             mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP,
                     "performRestore");
 
@@ -10076,6 +10129,12 @@
                 b.append(Long.toHexString(token));
                 b.append(" observer=");
                 b.append(observer.toString());
+                b.append(" monitor=");
+                if (monitor == null) {
+                    b.append("null");
+                } else {
+                    b.append(monitor.toString());
+                }
                 b.append(" packages=");
                 if (packages == null) {
                     b.append("null");
@@ -10133,8 +10192,8 @@
                             Slog.d(TAG, "restoreSome() of " + packages.length + " packages");
                         }
                         Message msg = mBackupHandler.obtainMessage(MSG_RUN_RESTORE);
-                        msg.obj = new RestoreParams(mRestoreTransport, dirName, observer, token,
-                                packages, packages.length > 1);
+                        msg.obj = new RestoreParams(mRestoreTransport, dirName, observer, monitor,
+                                token, packages, packages.length > 1);
                         mBackupHandler.sendMessage(msg);
                         Binder.restoreCallingIdentity(oldId);
                         return 0;
@@ -10146,8 +10205,10 @@
             return -1;
         }
 
-        public synchronized int restorePackage(String packageName, IRestoreObserver observer) {
-            if (DEBUG) Slog.v(TAG, "restorePackage pkg=" + packageName + " obs=" + observer);
+        public synchronized int restorePackage(String packageName, IRestoreObserver observer,
+                IBackupManagerMonitor monitor) {
+            if (DEBUG) Slog.v(TAG, "restorePackage pkg=" + packageName + " obs=" + observer
+                    + "monitor=" + monitor);
 
             if (mEnded) {
                 throw new IllegalStateException("Restore session already ended");
@@ -10220,7 +10281,8 @@
                     Slog.d(TAG, "restorePackage() : " + packageName);
                 }
                 Message msg = mBackupHandler.obtainMessage(MSG_RUN_RESTORE);
-                msg.obj = new RestoreParams(mRestoreTransport, dirName, observer, token, app);
+                msg.obj = new RestoreParams(mRestoreTransport, dirName, observer, monitor,
+                        token, app);
                 mBackupHandler.sendMessage(msg);
             } finally {
                 Binder.restoreCallingIdentity(oldId);
@@ -10432,4 +10494,28 @@
             }
         }
     }
+
+    private static IBackupManagerMonitor monitorEvent(IBackupManagerMonitor monitor, int id,
+            PackageInfo pkg, int category) {
+        if (monitor != null) {
+            try {
+                Bundle bundle = new Bundle();
+                bundle.putInt(BackupManagerMonitor.EXTRA_LOG_EVENT_ID, id);
+                bundle.putInt(BackupManagerMonitor.EXTRA_LOG_EVENT_CATEGORY, category);
+                if (pkg != null) {
+                    bundle.putString(BackupManagerMonitor.EXTRA_LOG_EVENT_PACKAGE_NAME,
+                            pkg.packageName);
+                    bundle.putInt(BackupManagerMonitor.EXTRA_LOG_EVENT_PACKAGE_VERSION,
+                            pkg.versionCode);
+                }
+                monitor.onEvent(bundle);
+                return monitor;
+            } catch(RemoteException e) {
+                if (DEBUG) {
+                    Slog.w(TAG, "backup manager monitor went away");
+                }
+            }
+        }
+        return null;
+    }
 }
diff --git a/services/backup/java/com/android/server/backup/Trampoline.java b/services/backup/java/com/android/server/backup/Trampoline.java
index a1a2c95..da0cee5 100644
--- a/services/backup/java/com/android/server/backup/Trampoline.java
+++ b/services/backup/java/com/android/server/backup/Trampoline.java
@@ -18,6 +18,7 @@
 
 import android.app.backup.IBackupManager;
 import android.app.backup.IBackupObserver;
+import android.app.backup.IBackupManagerMonitor;
 import android.app.backup.IFullBackupRestoreObserver;
 import android.app.backup.IRestoreSession;
 import android.app.backup.ISelectBackupTransportCallback;
@@ -355,10 +356,10 @@
     }
 
     @Override
-    public int requestBackup(String[] packages, IBackupObserver observer, int flags)
-            throws RemoteException {
+    public int requestBackup(String[] packages, IBackupObserver observer,
+            IBackupManagerMonitor monitor, int flags) throws RemoteException {
         BackupManagerService svc = mService;
-        return (svc != null) ? svc.requestBackup(packages, observer, flags) : null;
+        return (svc != null) ? svc.requestBackup(packages, observer, monitor, flags) : null;
     }
 
     @Override
diff --git a/services/backup/java/com/android/server/backup/TransportManager.java b/services/backup/java/com/android/server/backup/TransportManager.java
index 93d5a1e..b9dbe13 100644
--- a/services/backup/java/com/android/server/backup/TransportManager.java
+++ b/services/backup/java/com/android/server/backup/TransportManager.java
@@ -31,6 +31,7 @@
 import android.os.RemoteException;
 import android.os.UserHandle;
 import android.util.ArrayMap;
+import android.util.ArraySet;
 import android.util.EventLog;
 import android.util.Log;
 import android.util.Slog;
@@ -84,7 +85,7 @@
             TransportBoundListener listener) {
         mContext = context;
         mPackageManager = context.getPackageManager();
-        mTransportWhitelist = whitelist;
+        mTransportWhitelist = (whitelist != null) ? whitelist : new ArraySet<>();
         mCurrentTransportName = defaultTransport;
         mTransportBoundListener = listener;
     }
diff --git a/services/core/java/com/android/server/DeviceIdleController.java b/services/core/java/com/android/server/DeviceIdleController.java
index 97edb15..44ca6a9 100644
--- a/services/core/java/com/android/server/DeviceIdleController.java
+++ b/services/core/java/com/android/server/DeviceIdleController.java
@@ -1252,11 +1252,20 @@
     }
 
     public class LocalService {
+        // duration in milliseconds
+        public void addPowerSaveTempWhitelistApp(int callingUid, String packageName,
+                long duration, int userId, boolean sync, String reason) {
+            addPowerSaveTempWhitelistAppInternal(callingUid, packageName, duration,
+                    userId, sync, reason);
+        }
+
+        // duration in milliseconds
         public void addPowerSaveTempWhitelistAppDirect(int appId, long duration, boolean sync,
                 String reason) {
             addPowerSaveTempWhitelistAppDirectInternal(0, appId, duration, sync, reason);
         }
 
+        // duration in milliseconds
         public long getNotificationWhitelistDuration() {
             return mConstants.NOTIFICATION_WHITELIST_DURATION;
         }
diff --git a/services/core/java/com/android/server/InputMethodManagerService.java b/services/core/java/com/android/server/InputMethodManagerService.java
index 08cb109..b7a1f8b 100644
--- a/services/core/java/com/android/server/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/InputMethodManagerService.java
@@ -21,6 +21,7 @@
 import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD_DIALOG;
 import static java.lang.annotation.RetentionPolicy.SOURCE;
 
+import com.android.internal.annotations.GuardedBy;
 import com.android.internal.content.PackageMonitor;
 import com.android.internal.inputmethod.IInputContentUriToken;
 import com.android.internal.inputmethod.InputMethodSubtypeSwitchingController;
@@ -174,13 +175,13 @@
     static final int MSG_CREATE_SESSION = 1050;
 
     static final int MSG_START_INPUT = 2000;
-    static final int MSG_RESTART_INPUT = 2010;
 
     static final int MSG_UNBIND_CLIENT = 3000;
     static final int MSG_BIND_CLIENT = 3010;
     static final int MSG_SET_ACTIVE = 3020;
     static final int MSG_SET_INTERACTIVE = 3030;
     static final int MSG_SET_USER_ACTION_NOTIFICATION_SEQUENCE_NUMBER = 3040;
+    static final int MSG_REPORT_FULLSCREEN_MODE = 3045;
     static final int MSG_SWITCH_IME = 3050;
 
     static final int MSG_HARD_KEYBOARD_SWITCH_CHANGED = 4000;
@@ -225,6 +226,12 @@
             new LruCache<>(SECURE_SUGGESTION_SPANS_MAX_SIZE);
     private final InputMethodSubtypeSwitchingController mSwitchingController;
 
+    /**
+     * Tracks how many times {@link #mMethodMap} was updated.
+     */
+    @GuardedBy("mMethodMap")
+    private int mMethodMapUpdateCount = 0;
+
     // Used to bring IME service up to visible adjustment while it is being shown.
     final ServiceConnection mVisibleConnection = new ServiceConnection() {
         @Override public void onServiceConnected(ComponentName name, IBinder service) {
@@ -340,6 +347,13 @@
     IBinder mCurFocusedWindow;
 
     /**
+     * {@link WindowManager.LayoutParams#softInputMode} of {@link #mCurFocusedWindow}.
+     *
+     * @see #mCurFocusedWindow
+     */
+    int mCurFocusedWindowSoftInputMode;
+
+    /**
      * The client by which {@link #mCurFocusedWindow} was reported.  Used only for debugging.
      */
     ClientState mCurFocusedWindowClient;
@@ -411,6 +425,11 @@
     boolean mInputShown;
 
     /**
+     * {@code true} if the current input method is in fullscreen mode.
+     */
+    boolean mInFullscreenMode;
+
+    /**
      * The Intent used to connect to the current input method.
      */
     Intent mCurIntent;
@@ -587,15 +606,35 @@
                     restoreEnabledInputMethods(mContext, prevValue, newValue);
                 }
             } else if (Intent.ACTION_LOCALE_CHANGED.equals(action)) {
-                synchronized (mMethodMap) {
-                    resetStateIfCurrentLocaleChangedLocked();
-                }
+                onActionLocaleChanged();
             } else {
                 Slog.w(TAG, "Unexpected intent " + intent);
             }
         }
     }
 
+    /**
+     * Handles {@link Intent#ACTION_LOCALE_CHANGED}.
+     *
+     * <p>Note: For historical reasons, {@link Intent#ACTION_LOCALE_CHANGED} has been sent to all
+     * the users. We should ignore this event if this is about any background user's locale.</p>
+     *
+     * <p>Caution: This method must not be called when system is not ready.</p>
+     */
+    void onActionLocaleChanged() {
+        synchronized (mMethodMap) {
+            final LocaleList possibleNewLocale = mRes.getConfiguration().getLocales();
+            if (possibleNewLocale != null && possibleNewLocale.equals(mLastSystemLocales)) {
+                return;
+            }
+            buildInputMethodListLocked(true);
+            // If the locale is changed, needs to reset the default ime
+            resetDefaultImeLocked(mContext);
+            updateFromSettingsLocked(true);
+            mLastSystemLocales = possibleNewLocale;
+        }
+    }
+
     // Apply the results of a restore operation to the set of enabled IMEs.  Note that this
     // does not attempt to validate on the fly with any installed device policy, so must only
     // be run in the context of initial device setup.
@@ -634,7 +673,28 @@
                 Settings.Secure.ENABLED_INPUT_METHODS, mergedImesAndSubtypesString);
     }
 
-    class MyPackageMonitor extends PackageMonitor {
+    final class MyPackageMonitor extends PackageMonitor {
+        /**
+         * Set of packages to be monitored.
+         *
+         * <p>No need to include packages because of direct-boot unaware IMEs since we always rescan
+         * all the packages when the user is unlocked, and direct-boot awareness will not be changed
+         * dynamically unless the entire package is updated, which also always triggers package
+         * rescanning.</p>
+         */
+        @GuardedBy("mMethodMap")
+        private ArraySet<String> mPackagesToMonitorComponentChange = new ArraySet<>();
+
+        @GuardedBy("mMethodMap")
+        void clearPackagesToMonitorComponentChangeLocked() {
+            mPackagesToMonitorComponentChange.clear();
+        }
+
+        @GuardedBy("mMethodMap")
+        final void addPackageToMonitorComponentChangeLocked(@NonNull String packageName) {
+            mPackagesToMonitorComponentChange.add(packageName);
+        }
+
         private boolean isChangingPackagesOfCurrentUser() {
             final int userId = getChangingUserId();
             final boolean retval = userId == mSettings.getCurrentUserId();
@@ -676,6 +736,14 @@
         }
 
         @Override
+        public boolean onPackageChanged(String packageName, int uid, String[] components) {
+            // If this package is in the watch list, we want to check it.
+            synchronized (mMethodMap) {
+                return mPackagesToMonitorComponentChange.contains(packageName);
+            }
+        }
+
+        @Override
         public void onSomePackagesChanged() {
             if (!isChangingPackagesOfCurrentUser()) {
                 return;
@@ -938,51 +1006,6 @@
         setSelectedInputMethodAndSubtypeLocked(defIm, NOT_A_SUBTYPE_ID, false);
     }
 
-    private void resetAllInternalStateLocked(final boolean updateOnlyWhenLocaleChanged,
-            final boolean resetDefaultEnabledIme) {
-        if (!mSystemReady) {
-            // not system ready
-            return;
-        }
-        final LocaleList newLocales = mRes.getConfiguration().getLocales();
-        if (!updateOnlyWhenLocaleChanged
-                || (newLocales != null && !newLocales.equals(mLastSystemLocales))) {
-            if (!updateOnlyWhenLocaleChanged) {
-                hideCurrentInputLocked(0, null);
-                resetCurrentMethodAndClient(InputMethodClient.UNBIND_REASON_RESET_IME);
-            }
-            if (DEBUG) {
-                Slog.i(TAG, "LocaleList has been changed to " + newLocales);
-            }
-            buildInputMethodListLocked(resetDefaultEnabledIme);
-            if (!updateOnlyWhenLocaleChanged) {
-                final String selectedImiId = mSettings.getSelectedInputMethod();
-                if (TextUtils.isEmpty(selectedImiId)) {
-                    // This is the first time of the user switch and
-                    // set the current ime to the proper one.
-                    resetDefaultImeLocked(mContext);
-                }
-            } else {
-                // If the locale is changed, needs to reset the default ime
-                resetDefaultImeLocked(mContext);
-            }
-            updateFromSettingsLocked(true);
-            mLastSystemLocales = newLocales;
-            if (!updateOnlyWhenLocaleChanged) {
-                try {
-                    startInputInnerLocked();
-                } catch (RuntimeException e) {
-                    Slog.w(TAG, "Unexpected exception", e);
-                }
-            }
-        }
-    }
-
-    private void resetStateIfCurrentLocaleChangedLocked() {
-        resetAllInternalStateLocked(true /* updateOnlyWhenLocaleChanged */,
-                true /* resetDefaultImeLocked */);
-    }
-
     private void switchUserLocked(int newUserId) {
         if (DEBUG) Slog.d(TAG, "Switching user stage 1/3. newUserId=" + newUserId
                 + " currentUserId=" + mSettings.getCurrentUserId());
@@ -1009,8 +1032,26 @@
         // Even in such cases, IMMS works fine because it will find the most applicable
         // IME for that user.
         final boolean initialUserSwitch = TextUtils.isEmpty(defaultImiId);
-        resetAllInternalStateLocked(false  /* updateOnlyWhenLocaleChanged */,
-                initialUserSwitch /* needsToResetDefaultIme */);
+        mLastSystemLocales = mRes.getConfiguration().getLocales();
+
+        // TODO: Is it really possible that switchUserLocked() happens before system ready?
+        if (mSystemReady) {
+            hideCurrentInputLocked(0, null);
+            resetCurrentMethodAndClient(InputMethodClient.UNBIND_REASON_SWITCH_USER);
+            buildInputMethodListLocked(initialUserSwitch);
+            if (TextUtils.isEmpty(mSettings.getSelectedInputMethod())) {
+                // This is the first time of the user switch and
+                // set the current ime to the proper one.
+                resetDefaultImeLocked(mContext);
+            }
+            updateFromSettingsLocked(true);
+            try {
+                startInputInnerLocked();
+            } catch (RuntimeException e) {
+                Slog.w(TAG, "Unexpected exception", e);
+            }
+        }
+
         if (initialUserSwitch) {
             InputMethodUtils.setNonSelectedSystemImesDisabledUntilUsed(mIPackageManager,
                     mSettings.getEnabledInputMethodListLocked(), newUserId,
@@ -1265,8 +1306,8 @@
                 }
             }
 
-            executeOrSendMessage(mCurClient.client, mCaller.obtainMessageIO(
-                    MSG_SET_ACTIVE, 0, mCurClient));
+            executeOrSendMessage(mCurClient.client, mCaller.obtainMessageIIO(
+                    MSG_SET_ACTIVE, 0, 0, mCurClient));
             executeOrSendMessage(mCurClient.client, mCaller.obtainMessageIIO(
                     MSG_UNBIND_CLIENT, mCurSeq, unbindClientReason, mCurClient.client));
             mCurClient.sessionRequested = false;
@@ -1305,15 +1346,9 @@
             mBoundToMethod = true;
         }
         final SessionState session = mCurClient.curSession;
-        if (initial) {
-            executeOrSendMessage(session.method, mCaller.obtainMessageIOOO(
-                    MSG_START_INPUT, mCurInputContextMissingMethods, session, mCurInputContext,
-                    mCurAttribute));
-        } else {
-            executeOrSendMessage(session.method, mCaller.obtainMessageIOOO(
-                    MSG_RESTART_INPUT, mCurInputContextMissingMethods, session, mCurInputContext,
-                    mCurAttribute));
-        }
+        executeOrSendMessage(session.method, mCaller.obtainMessageIIOOO(
+                MSG_START_INPUT, mCurInputContextMissingMethods, initial ? 0 : 1 /* restarting */,
+                session, mCurInputContext, mCurAttribute));
         if (mShowRequested) {
             if (DEBUG) Slog.v(TAG, "Attach new input asks to show input");
             showCurrentInputLocked(getAppShowFlags(), null);
@@ -1649,6 +1684,7 @@
         if (mStatusBar != null) {
             mStatusBar.setIconVisibility(mSlotIme, false);
         }
+        mInFullscreenMode = false;
     }
 
     @Override
@@ -2235,7 +2271,8 @@
 
     private InputBindResult windowGainedFocus(
             /* @InputMethodClient.StartInputReason */ final int startInputReason,
-            IInputMethodClient client, IBinder windowToken, int controlFlags, int softInputMode,
+            IInputMethodClient client, IBinder windowToken, int controlFlags,
+            /* @android.view.WindowManager.LayoutParams.SoftInputModeFlags */ int softInputMode,
             int windowFlags, EditorInfo attribute, IInputContext inputContext,
             /* @InputConnectionInspector.missingMethods */  final int missingMethods) {
         // Needs to check the validity before clearing calling identity
@@ -2252,7 +2289,7 @@
                         + InputConnectionInspector.getMissingMethodFlagsAsString(missingMethods)
                         + " attribute=" + attribute
                         + " controlFlags=#" + Integer.toHexString(controlFlags)
-                        + " softInputMode=#" + Integer.toHexString(softInputMode)
+                        + " softInputMode=" + InputMethodClient.softInputModeToString(softInputMode)
                         + " windowFlags=#" + Integer.toHexString(windowFlags));
 
                 ClientState cs = mClients.get(client.asBinder());
@@ -2297,6 +2334,7 @@
                     return null;
                 }
                 mCurFocusedWindow = windowToken;
+                mCurFocusedWindowSoftInputMode = softInputMode;
                 mCurFocusedWindowClient = cs;
 
                 // Should we auto-show the IME even if the caller has not
@@ -2860,26 +2898,15 @@
             // ---------------------------------------------------------
 
             case MSG_START_INPUT: {
-                int missingMethods = msg.arg1;
+                final int missingMethods = msg.arg1;
+                final boolean restarting = msg.arg2 != 0;
                 args = (SomeArgs) msg.obj;
+                final SessionState session = (SessionState) args.arg1;
+                final IInputContext inputContext = (IInputContext) args.arg2;
+                final EditorInfo editorInfo = (EditorInfo) args.arg3;
                 try {
-                    SessionState session = (SessionState) args.arg1;
                     setEnabledSessionInMainThread(session);
-                    session.method.startInput((IInputContext) args.arg2, missingMethods,
-                            (EditorInfo) args.arg3);
-                } catch (RemoteException e) {
-                }
-                args.recycle();
-                return true;
-            }
-            case MSG_RESTART_INPUT: {
-                int missingMethods = msg.arg1;
-                args = (SomeArgs) msg.obj;
-                try {
-                    SessionState session = (SessionState) args.arg1;
-                    setEnabledSessionInMainThread(session);
-                    session.method.restartInput((IInputContext) args.arg2, missingMethods,
-                            (EditorInfo) args.arg3);
+                    session.method.startInput(inputContext, missingMethods, editorInfo, restarting);
                 } catch (RemoteException e) {
                 }
                 args.recycle();
@@ -2915,7 +2942,7 @@
             }
             case MSG_SET_ACTIVE:
                 try {
-                    ((ClientState)msg.obj).client.setActive(msg.arg1 != 0);
+                    ((ClientState)msg.obj).client.setActive(msg.arg1 != 0, msg.arg2 != 0);
                 } catch (RemoteException e) {
                     Slog.w(TAG, "Got RemoteException sending setActive(false) notification to pid "
                             + ((ClientState)msg.obj).pid + " uid "
@@ -2942,6 +2969,18 @@
                 }
                 return true;
             }
+            case MSG_REPORT_FULLSCREEN_MODE: {
+                final boolean fullscreen = msg.arg1 != 0;
+                final ClientState clientState = (ClientState)msg.obj;
+                try {
+                    clientState.client.reportFullscreenMode(fullscreen);
+                } catch (RemoteException e) {
+                    Slog.w(TAG, "Got RemoteException sending "
+                            + "reportFullscreen(" + fullscreen + ") notification to pid="
+                            + clientState.pid + " uid=" + clientState.uid);
+                }
+                return true;
+            }
 
             // --------------------------------------------------------------
             case MSG_HARD_KEYBOARD_SWITCH_CHANGED:
@@ -2962,8 +3001,9 @@
 
             // Inform the current client of the change in active status
             if (mCurClient != null && mCurClient.client != null) {
-                executeOrSendMessage(mCurClient.client, mCaller.obtainMessageIO(
-                        MSG_SET_ACTIVE, mIsInteractive ? 1 : 0, mCurClient));
+                executeOrSendMessage(mCurClient.client, mCaller.obtainMessageIIO(
+                        MSG_SET_ACTIVE, mIsInteractive ? 1 : 0, mInFullscreenMode ? 1 : 0,
+                        mCurClient));
             }
         }
     }
@@ -3019,6 +3059,8 @@
         }
         mMethodList.clear();
         mMethodMap.clear();
+        mMethodMapUpdateCount++;
+        mMyPackageMonitor.clearPackagesToMonitorComponentChangeLocked();
 
         // Use for queryIntentServicesAsUser
         final PackageManager pm = mContext.getPackageManager();
@@ -3061,6 +3103,26 @@
             }
         }
 
+        // Construct the set of possible IME packages for onPackageChanged() to avoid false
+        // negatives when the package state remains to be the same but only the component state is
+        // changed.
+        {
+            // Here we intentionally use PackageManager.MATCH_DISABLED_COMPONENTS since the purpose
+            // of this query is to avoid false negatives.  PackageManager.MATCH_ALL could be more
+            // conservative, but it seems we cannot use it for now (Issue 35176630).
+            final List<ResolveInfo> allInputMethodServices = pm.queryIntentServicesAsUser(
+                    new Intent(InputMethod.SERVICE_INTERFACE),
+                    PackageManager.MATCH_DISABLED_COMPONENTS, mSettings.getCurrentUserId());
+            final int N = allInputMethodServices.size();
+            for (int i = 0; i < N; ++i) {
+                final ServiceInfo si = allInputMethodServices.get(i).serviceInfo;
+                if (!android.Manifest.permission.BIND_INPUT_METHOD.equals(si.permission)) {
+                    continue;
+                }
+                mMyPackageMonitor.addPackageToMonitorComponentChangeLocked(si.packageName);
+            }
+        }
+
         // TODO: The following code should find better place to live.
         if (!resetDefaultEnabledIme) {
             boolean enabledImeFound = false;
@@ -3963,6 +4025,23 @@
     }
 
     @Override
+    public void reportFullscreenMode(IBinder token, boolean fullscreen) {
+        if (!calledFromValidUser()) {
+            return;
+        }
+        synchronized (mMethodMap) {
+            if (!calledWithValidToken(token)) {
+                return;
+            }
+            if (mCurClient != null && mCurClient.client != null) {
+                mInFullscreenMode = fullscreen;
+                executeOrSendMessage(mCurClient.client, mCaller.obtainMessageIO(
+                        MSG_REPORT_FULLSCREEN_MODE, fullscreen ? 1 : 0, mCurClient));
+            }
+        }
+    }
+
+    @Override
     protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
         if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.DUMP)
                 != PackageManager.PERMISSION_GRANTED) {
@@ -3982,7 +4061,7 @@
         synchronized (mMethodMap) {
             p.println("Current Input Method Manager state:");
             int N = mMethodList.size();
-            p.println("  Input Methods:");
+            p.println("  Input Methods: mMethodMapUpdateCount=" + mMethodMapUpdateCount);
             for (int i=0; i<N; i++) {
                 InputMethodInfo info = mMethodList.get(i);
                 p.println("  InputMethod #" + i + ":");
@@ -3999,9 +4078,11 @@
             p.println("  mCurMethodId=" + mCurMethodId);
             client = mCurClient;
             p.println("  mCurClient=" + client + " mCurSeq=" + mCurSeq);
-            p.println("  mCurFocusedWindow=" + mCurFocusedWindow);
+            p.println("  mCurFocusedWindow=" + mCurFocusedWindow
+                    + " softInputMode=" +
+                    InputMethodClient.softInputModeToString(mCurFocusedWindowSoftInputMode)
+                    + " client=" + mCurFocusedWindowClient);
             focusedWindowClient = mCurFocusedWindowClient;
-            p.println("  mCurFocusedWindowClient=" + focusedWindowClient);
             p.println("  mCurId=" + mCurId + " mHaveConnect=" + mHaveConnection
                     + " mBoundToMethod=" + mBoundToMethod);
             p.println("  mCurToken=" + mCurToken);
@@ -4014,6 +4095,7 @@
                     + " mShowExplicitlyRequested=" + mShowExplicitlyRequested
                     + " mShowForced=" + mShowForced
                     + " mInputShown=" + mInputShown);
+            p.println("  mInFullscreenMode=" + mInFullscreenMode);
             p.println("  mCurUserActionNotificationSequenceNumber="
                     + mCurUserActionNotificationSequenceNumber);
             p.println("  mSystemReady=" + mSystemReady + " mInteractive=" + mIsInteractive);
diff --git a/services/core/java/com/android/server/NetworkScoreService.java b/services/core/java/com/android/server/NetworkScoreService.java
index 0ac51b9..f9b5db6 100644
--- a/services/core/java/com/android/server/NetworkScoreService.java
+++ b/services/core/java/com/android/server/NetworkScoreService.java
@@ -718,6 +718,15 @@
         return null;
     }
 
+    /**
+     * Returns the list of available scorer apps. The list will be empty if there are
+     * no valid scorers.
+     */
+    @Override
+    public List<NetworkScorerAppData> getAllValidScorers() {
+        return mNetworkScorerAppManager.getAllValidScorers();
+    }
+
     @Override
     public void disableScoring() {
         // Only the active scorer or the system should be allowed to disable scoring.
diff --git a/services/core/java/com/android/server/StorageManagerService.java b/services/core/java/com/android/server/StorageManagerService.java
index c07add0..32b7e4d 100644
--- a/services/core/java/com/android/server/StorageManagerService.java
+++ b/services/core/java/com/android/server/StorageManagerService.java
@@ -59,6 +59,7 @@
 import android.os.Looper;
 import android.os.Message;
 import android.os.ParcelFileDescriptor;
+import android.os.ParcelableException;
 import android.os.PowerManager;
 import android.os.Process;
 import android.os.RemoteCallbackList;
@@ -3291,6 +3292,18 @@
         }
     }
 
+    @Override
+    public long getAllocatableBytes(String path, int flags) {
+        return new File(path).getUsableSpace();
+    }
+
+    @Override
+    public void allocateBytes(String path, long bytes, int flags) {
+        if (bytes > new File(path).getUsableSpace()) {
+            throw new ParcelableException(new IOException("Not enough usable space"));
+        }
+    }
+
     private void addObbStateLocked(ObbState obbState) throws RemoteException {
         final IBinder binder = obbState.getBinder();
         List<ObbState> obbStates = mObbMounts.get(binder);
diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java
index 041fee2..2bc131f 100644
--- a/services/core/java/com/android/server/am/ActiveServices.java
+++ b/services/core/java/com/android/server/am/ActiveServices.java
@@ -462,7 +462,7 @@
 
         ComponentName cmp = startServiceInnerLocked(smap, service, r, callerFg, addToStarting);
         if (notification != null) {
-            setServiceForegroundInnerLocked(r, callingUid, notification, 0);
+            setServiceForegroundInnerLocked(r, id, notification, 0);
         }
         return cmp;
     }
@@ -723,6 +723,39 @@
             if (notification == null) {
                 throw new IllegalArgumentException("null notification");
             }
+            // Instant apps need permission to create foreground services.
+            if (r.appInfo.isInstantApp()) {
+                final int mode = mAm.mAppOpsService.checkOperation(
+                        AppOpsManager.OP_INSTANT_APP_START_FOREGROUND,
+                        r.appInfo.uid,
+                        r.appInfo.packageName);
+                switch (mode) {
+                    case AppOpsManager.MODE_ALLOWED:
+                        break;
+                    case AppOpsManager.MODE_IGNORED:
+                        Slog.w(TAG, "Instant app " + r.appInfo.packageName
+                                + " does not have permission to create foreground services"
+                                + ", ignoring.");
+                        return;
+                    case AppOpsManager.MODE_ERRORED:
+                        throw new SecurityException("Instant app " + r.appInfo.packageName
+                                + " does not have permission to create foreground services");
+                    default:
+                        try {
+                            if (AppGlobals.getPackageManager().checkPermission(
+                                    android.Manifest.permission.INSTANT_APP_FOREGROUND_SERVICE,
+                                    r.appInfo.packageName,
+                                    r.appInfo.uid) != PackageManager.PERMISSION_GRANTED) {
+                                throw new SecurityException("Instant app " + r.appInfo.packageName
+                                        + " does not have permission to create foreground"
+                                        + "services");
+                            }
+                        } catch (RemoteException e) {
+                            throw new SecurityException("Failed to check instant app permission." ,
+                                    e);
+                        }
+                }
+            }
             if (r.foregroundId != id) {
                 cancelForegroudNotificationLocked(r);
                 r.foregroundId = id;
diff --git a/services/core/java/com/android/server/am/ActivityManagerConstants.java b/services/core/java/com/android/server/am/ActivityManagerConstants.java
index 3c90f93..100d821 100644
--- a/services/core/java/com/android/server/am/ActivityManagerConstants.java
+++ b/services/core/java/com/android/server/am/ActivityManagerConstants.java
@@ -36,7 +36,7 @@
     private static final String KEY_MAX_CACHED_PROCESSES = "max_cached_processes";
 
     private static final boolean DEFAULT_ENFORCE_BG_CHECK = SystemProperties.getBoolean(
-            "debug.bgcheck", false);
+            "debug.bgcheck", true);
     private static final int DEFAULT_MAX_CACHED_PROCESSES = 32;
 
     // Enforce background check on apps targeting O?
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 69a3a26..3b9426d 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -2328,7 +2328,8 @@
                     }
                 }
                 vrService.setVrMode(vrMode, requestedPackage, userId, callingPackage);
-            } case NOTIFY_VR_SLEEPING_MSG: {
+            } break;
+            case NOTIFY_VR_SLEEPING_MSG: {
                 notifyVrManagerOfSleepState(msg.arg1 != 0);
             } break;
             case HANDLE_TRUST_STORAGE_UPDATE_MSG: {
@@ -9916,7 +9917,7 @@
             try {
                 if (DEBUG_STACK) Slog.d(TAG_STACK, "moveStackToDisplay: moving stackId=" + stackId
                         + " to displayId=" + displayId);
-                mStackSupervisor.moveStackToDisplayLocked(stackId, displayId);
+                mStackSupervisor.moveStackToDisplayLocked(stackId, displayId, ON_TOP);
             } finally {
                 Binder.restoreCallingIdentity(ident);
             }
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index 104fc6a..cf0ebaf 100644
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -477,6 +477,8 @@
         mTmpRect2.setEmpty();
         mWindowContainerController.reparent(activityDisplay.mDisplayId, mTmpRect2);
         postAddToDisplay(activityDisplay, mTmpRect2.isEmpty() ? null : mTmpRect2, onTop);
+        adjustFocusToNextFocusableStackLocked("reparent", true /* allowFocusSelf */);
+        mStackSupervisor.resumeFocusedStackTopActivityLocked();
     }
 
     /**
@@ -3179,8 +3181,18 @@
                 mStackSupervisor.topRunningActivityLocked(), myReason);
     }
 
+    /** Find next proper focusable stack and make it focused. */
     private boolean adjustFocusToNextFocusableStackLocked(String reason) {
-        final ActivityStack stack = mStackSupervisor.getNextFocusableStackLocked(this);
+        return adjustFocusToNextFocusableStackLocked(reason, false /* allowFocusSelf */);
+    }
+
+    /**
+     * Find next proper focusable stack and make it focused.
+     * @param allowFocusSelf Is the focus allowed to remain on the same stack.
+     */
+    private boolean adjustFocusToNextFocusableStackLocked(String reason, boolean allowFocusSelf) {
+        final ActivityStack stack = mStackSupervisor.getNextFocusableStackLocked(
+                allowFocusSelf ? null : this);
         final String myReason = reason + " adjustFocusToNextFocusableStack";
         if (stack == null) {
             return false;
@@ -3190,7 +3202,8 @@
 
         if (stack.isHomeOrRecentsStack() && (top == null || !top.visible)) {
             // If we will be focusing on the home stack next and its current top activity isn't
-            // visible, then use the task return to value to determine the home task to display next.
+            // visible, then use the task return to value to determine the home task to display
+            // next.
             return mStackSupervisor.moveHomeStackTaskToTop(reason);
         }
 
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index e954363..95734a4 100644
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -40,6 +40,7 @@
 import static android.view.Display.DEFAULT_DISPLAY;
 import static android.view.Display.FLAG_PRIVATE;
 import static android.view.Display.INVALID_DISPLAY;
+import static android.view.Display.REMOVE_MODE_DESTROY_CONTENT;
 
 import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_ALL;
 import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_CONTAINERS;
@@ -2616,8 +2617,9 @@
      * Move stack with all its existing content to specified display.
      * @param stackId Id of stack to move.
      * @param displayId Id of display to move stack to.
+     * @param onTop Indicates whether container should be place on top or on bottom.
      */
-    void moveStackToDisplayLocked(int stackId, int displayId) {
+    void moveStackToDisplayLocked(int stackId, int displayId, boolean onTop) {
         final ActivityDisplay activityDisplay = mActivityDisplays.get(displayId);
         if (activityDisplay == null) {
             throw new IllegalArgumentException("moveStackToDisplayLocked: Unknown displayId="
@@ -2631,7 +2633,7 @@
                             + " to its current displayId=" + displayId);
                 }
 
-                activityContainer.moveToDisplayLocked(activityDisplay);
+                activityContainer.moveToDisplayLocked(activityDisplay, onTop);
             } else {
                 throw new IllegalStateException("moveStackToDisplayLocked: Stack with stackId="
                         + stackId + " is not attached to any display.");
@@ -3777,12 +3779,16 @@
         synchronized (mService) {
             ActivityDisplay activityDisplay = mActivityDisplays.get(displayId);
             if (activityDisplay != null) {
+                final boolean destroyContentOnRemoval
+                        = activityDisplay.shouldDestroyContentOnRemove();
                 ArrayList<ActivityStack> stacks = activityDisplay.mStacks;
                 for (int stackNdx = stacks.size() - 1; stackNdx >= 0; --stackNdx) {
                     final ActivityStack stack = stacks.get(stackNdx);
-                    // TODO: Implement proper stack removal and ability to choose the behavior -
-                    // remove stack completely or move it to other display.
-                    moveStackToDisplayLocked(stack.mStackId, DEFAULT_DISPLAY);
+                    moveStackToDisplayLocked(stack.mStackId, DEFAULT_DISPLAY,
+                            !destroyContentOnRemoval /* onTop */);
+                    if (destroyContentOnRemoval) {
+                        stack.finishAllActivitiesLocked(true /* immediately */);
+                    }
                 }
                 mActivityDisplays.remove(displayId);
             }
@@ -4451,8 +4457,9 @@
         /**
          * Move the stack to specified display.
          * @param activityDisplay Target display to move the stack to.
+         * @param onTop Indicates whether container should be place on top or on bottom.
          */
-        void moveToDisplayLocked(ActivityDisplay activityDisplay) {
+        void moveToDisplayLocked(ActivityDisplay activityDisplay, boolean onTop) {
             if (DEBUG_STACK) Slog.d(TAG_STACK, "moveToDisplayLocked: " + this + " from display="
                     + mActivityDisplay + " to display=" + activityDisplay
                     + " Callers=" + Debug.getCallers(2));
@@ -4460,7 +4467,7 @@
             removeFromDisplayLocked();
 
             mActivityDisplay = activityDisplay;
-            mStack.reparent(activityDisplay, ON_TOP);
+            mStack.reparent(activityDisplay, onTop);
         }
 
         @Override
@@ -4642,8 +4649,6 @@
         /** Actual Display this object tracks. */
         int mDisplayId;
         Display mDisplay;
-        private final DisplayMetrics mRealMetrics = new DisplayMetrics();
-        private final Point mRealSize = new Point();
 
         /** All of the stacks on this display. Order matters, topmost stack is in front of all other
          * stacks, bottommost behind. Accessed directly by ActivityManager package classes */
@@ -4737,6 +4742,10 @@
             }
             return mDisplayAccessUIDs;
         }
+
+        boolean shouldDestroyContentOnRemove() {
+            return mDisplay.getRemoveMode() == REMOVE_MODE_DESTROY_CONTENT;
+        }
     }
 
     class VirtualActivityDisplay extends ActivityDisplay {
diff --git a/services/core/java/com/android/server/am/TaskRecord.java b/services/core/java/com/android/server/am/TaskRecord.java
index e237e41..80ed833 100644
--- a/services/core/java/com/android/server/am/TaskRecord.java
+++ b/services/core/java/com/android/server/am/TaskRecord.java
@@ -969,18 +969,9 @@
                 || topRunningActivityLocked() != null;
     }
 
-    void setFrontOfTask() {
-        setFrontOfTask(null);
-    }
-
     /** Call after activity movement or finish to make sure that frontOfTask is set correctly */
-    void setFrontOfTask(ActivityRecord newTop) {
-        // If a top candidate is suggested by the caller, go ahead and use it and mark all others
-        // as not front. This is needed in situations where the current front activity in the
-        // task isn't finished yet and we want to set the front to the activity moved to the front
-        // of the task.
-        boolean foundFront = newTop != null ? true : false;
-
+    final void setFrontOfTask() {
+        boolean foundFront = false;
         final int numActivities = mActivities.size();
         for (int activityNdx = 0; activityNdx < numActivities; ++activityNdx) {
             final ActivityRecord r = mActivities.get(activityNdx);
@@ -997,9 +988,6 @@
             // activity, make the bottom activity front.
             mActivities.get(0).frontOfTask = true;
         }
-        if (newTop != null) {
-            newTop.frontOfTask = true;
-        }
     }
 
     /**
@@ -1014,7 +1002,7 @@
         mActivities.add(newTop);
         updateEffectiveIntent();
 
-        setFrontOfTask(newTop);
+        setFrontOfTask();
     }
 
     void addActivityAtBottom(ActivityRecord r) {
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java
index 1d60946..0860e5b 100644
--- a/services/core/java/com/android/server/audio/AudioService.java
+++ b/services/core/java/com/android/server/audio/AudioService.java
@@ -778,7 +778,8 @@
                 0,
                 0,
                 TAG,
-                SAFE_VOLUME_CONFIGURE_TIMEOUT_MS);
+                SystemProperties.getBoolean("audio.safemedia.bypass", false) ?
+                        0 : SAFE_VOLUME_CONFIGURE_TIMEOUT_MS);
 
         initA11yMonitoring();
         onIndicateSystemReady();
diff --git a/services/core/java/com/android/server/clipboard/ClipboardService.java b/services/core/java/com/android/server/clipboard/ClipboardService.java
index 4487d5b..94417b5 100644
--- a/services/core/java/com/android/server/clipboard/ClipboardService.java
+++ b/services/core/java/com/android/server/clipboard/ClipboardService.java
@@ -404,9 +404,11 @@
             return;
         }
         clipboard.primaryClip = clip;
-        final ClipDescription description = clipboard.primaryClip.getDescription();
-        if (description != null) {
-            description.setTimestamp(SystemClock.elapsedRealtime());
+        if (clip != null) {
+            final ClipDescription description = clip.getDescription();
+            if (description != null) {
+                description.setTimestamp(SystemClock.elapsedRealtime());
+            }
         }
         final long ident = Binder.clearCallingIdentity();
         final int n = clipboard.primaryClipListeners.beginBroadcast();
diff --git a/services/core/java/com/android/server/connectivity/Vpn.java b/services/core/java/com/android/server/connectivity/Vpn.java
index a5876dd..b963555 100644
--- a/services/core/java/com/android/server/connectivity/Vpn.java
+++ b/services/core/java/com/android/server/connectivity/Vpn.java
@@ -85,6 +85,8 @@
 import com.android.internal.net.VpnConfig;
 import com.android.internal.net.VpnInfo;
 import com.android.internal.net.VpnProfile;
+import com.android.server.DeviceIdleController;
+import com.android.server.LocalServices;
 import com.android.server.net.BaseNetworkObserver;
 
 import libcore.io.IoUtils;
@@ -115,6 +117,10 @@
     private static final String TAG = "Vpn";
     private static final boolean LOGD = true;
 
+    // Length of time (in milliseconds) that an app hosting an always-on VPN is placed on
+    // the device idle whitelist during service launch and VPN bootstrap.
+    private static final long VPN_LAUNCH_IDLE_WHITELIST_DURATION = 60 * 1000;
+
     // TODO: create separate trackers for each unique VPN to support
     // automated reconnection
 
@@ -389,14 +395,26 @@
             }
         }
 
-        // Start the VPN service declared in the app's manifest.
-        Intent serviceIntent = new Intent(VpnConfig.SERVICE_INTERFACE);
-        serviceIntent.setPackage(alwaysOnPackage);
+        // Tell the OS that background services in this app need to be allowed for
+        // a short time, so we can bootstrap the VPN service.
+        final long oldId = Binder.clearCallingIdentity();
         try {
-            return mContext.startServiceAsUser(serviceIntent, UserHandle.of(mUserHandle)) != null;
-        } catch (RuntimeException e) {
-            Log.e(TAG, "VpnService " + serviceIntent + " failed to start", e);
-            return false;
+            DeviceIdleController.LocalService idleController =
+                    LocalServices.getService(DeviceIdleController.LocalService.class);
+            idleController.addPowerSaveTempWhitelistApp(Process.myUid(), alwaysOnPackage,
+                    VPN_LAUNCH_IDLE_WHITELIST_DURATION, mUserHandle, false, "vpn");
+
+            // Start the VPN service declared in the app's manifest.
+            Intent serviceIntent = new Intent(VpnConfig.SERVICE_INTERFACE);
+            serviceIntent.setPackage(alwaysOnPackage);
+            try {
+                return mContext.startServiceAsUser(serviceIntent, UserHandle.of(mUserHandle)) != null;
+            } catch (RuntimeException e) {
+                Log.e(TAG, "VpnService " + serviceIntent + " failed to start", e);
+                return false;
+            }
+        } finally {
+            Binder.restoreCallingIdentity(oldId);
         }
     }
 
diff --git a/services/core/java/com/android/server/display/LogicalDisplay.java b/services/core/java/com/android/server/display/LogicalDisplay.java
index 40a8952..a947b41 100644
--- a/services/core/java/com/android/server/display/LogicalDisplay.java
+++ b/services/core/java/com/android/server/display/LogicalDisplay.java
@@ -216,6 +216,8 @@
             }
             if ((deviceInfo.flags & DisplayDeviceInfo.FLAG_PRIVATE) != 0) {
                 mBaseDisplayInfo.flags |= Display.FLAG_PRIVATE;
+                // For private displays by default content is destroyed on removal.
+                mBaseDisplayInfo.removeMode = Display.REMOVE_MODE_DESTROY_CONTENT;
             }
             if ((deviceInfo.flags & DisplayDeviceInfo.FLAG_PRESENTATION) != 0) {
                 mBaseDisplayInfo.flags |= Display.FLAG_PRESENTATION;
diff --git a/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java b/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java
index 353f450..98771df 100644
--- a/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java
+++ b/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java
@@ -245,23 +245,25 @@
                 }
             }
         }
-        if (neededNow != neededBefore) {
-            setSimNeedsEmergencyAffordance(neededNow);
-        }
+        setSimNeedsEmergencyAffordance(neededNow);
         return neededNow;
     }
 
     private void setSimNeedsEmergencyAffordance(boolean simNeedsEmergencyAffordance) {
-        mSimNeedsEmergencyAffordance = simNeedsEmergencyAffordance;
-        Settings.Global.putInt(mContext.getContentResolver(),
-                EMERGENCY_SIM_INSERTED_SETTING,
-                simNeedsEmergencyAffordance ? 1 : 0);
-        updateEmergencyAffordanceNeeded();
+        if (simNeededAffordanceBefore() != simNeedsEmergencyAffordance) {
+            Settings.Global.putInt(mContext.getContentResolver(),
+                    EMERGENCY_SIM_INSERTED_SETTING,
+                    simNeedsEmergencyAffordance ? 1 : 0);
+        }
+        if (simNeedsEmergencyAffordance != mSimNeedsEmergencyAffordance) {
+            mSimNeedsEmergencyAffordance = simNeedsEmergencyAffordance;
+            updateEmergencyAffordanceNeeded();
+        }
     }
 
     private boolean simNeededAffordanceBefore() {
         return Settings.Global.getInt(mContext.getContentResolver(),
-                "emergency_sim_inserted_before", 0) != 0;
+                EMERGENCY_SIM_INSERTED_SETTING, 0) != 0;
     }
 
     private boolean handleUpdateCellInfo() {
diff --git a/services/core/java/com/android/server/os/SchedulingPolicyService.java b/services/core/java/com/android/server/os/SchedulingPolicyService.java
index 62c9f4c..5d72d50 100644
--- a/services/core/java/com/android/server/os/SchedulingPolicyService.java
+++ b/services/core/java/com/android/server/os/SchedulingPolicyService.java
@@ -37,7 +37,9 @@
     public SchedulingPolicyService() {
     }
 
-    public int requestPriority(int pid, int tid, int prio) {
+    // TODO(b/35196900) We should pass the period in time units, rather
+    // than a fixed priority number.
+    public int requestPriority(int pid, int tid, int prio, boolean isForApp) {
         //Log.i(TAG, "requestPriority(pid=" + pid + ", tid=" + tid + ", prio=" + prio + ")");
 
         // Verify that the caller uid is permitted, priority is in range,
@@ -52,7 +54,7 @@
         }
         try {
             // make good use of our CAP_SYS_NICE capability
-            Process.setThreadGroup(tid, Binder.getCallingPid() == pid ?
+            Process.setThreadGroup(tid, !isForApp ?
                     Process.THREAD_GROUP_AUDIO_SYS : Process.THREAD_GROUP_AUDIO_APP);
             // must be in this order or it fails the schedulability constraint
             Process.setThreadScheduler(tid, Process.SCHED_FIFO | Process.SCHED_RESET_ON_FORK,
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 4207998..8345491 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -836,6 +836,8 @@
 
     private File mCacheDir;
 
+    private ArraySet<String> mPrivappPermissionsViolations;
+
     private static class IFVerificationParams {
         PackageParser.Package pkg;
         boolean replacing;
@@ -11543,6 +11545,12 @@
             if (!whitelisted) {
                 Slog.w(TAG, "Privileged permission " + perm + " for package "
                         + pkg.packageName + " - not in privapp-permissions whitelist");
+                if (!mSystemReady) {
+                    if (mPrivappPermissionsViolations == null) {
+                        mPrivappPermissionsViolations = new ArraySet<>();
+                    }
+                    mPrivappPermissionsViolations.add(pkg.packageName + ": " + perm);
+                }
                 if (RoSystemProperties.CONTROL_PRIVAPP_PERMISSIONS_ENFORCE) {
                     return false;
                 }
@@ -19972,6 +19980,12 @@
         // Now that we're mostly running, clean up stale users and apps
         sUserManager.reconcileUsers(StorageManager.UUID_PRIVATE_INTERNAL);
         reconcileApps(StorageManager.UUID_PRIVATE_INTERNAL);
+
+        if (mPrivappPermissionsViolations != null) {
+            Slog.wtf(TAG,"Signature|privileged permissions not in "
+                    + "privapp-permissions whitelist: " + mPrivappPermissionsViolations);
+            mPrivappPermissionsViolations = null;
+        }
     }
 
     @Override
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 597e8b6..be0771a 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -22,8 +22,11 @@
 import static android.app.ActivityManager.DOCKED_STACK_CREATE_MODE_TOP_OR_LEFT;
 import static android.app.ActivityManager.StackId.PINNED_STACK_ID;
 import static android.app.StatusBarManager.DISABLE_MASK;
+import static android.content.Intent.ACTION_USER_REMOVED;
+import static android.content.Intent.EXTRA_USER_HANDLE;
 import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
 import static android.content.pm.PackageManager.PERMISSION_GRANTED;
+import static android.os.UserHandle.USER_NULL;
 import static android.view.Display.DEFAULT_DISPLAY;
 import static android.view.WindowManager.DOCKED_INVALID;
 import static android.view.WindowManager.LayoutParams.FIRST_APPLICATION_WINDOW;
@@ -346,6 +349,13 @@
             if (DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED.equals(action)) {
                 mKeyguardDisableHandler.sendEmptyMessage(
                     KeyguardDisableHandler.KEYGUARD_POLICY_CHANGED);
+            } else if (ACTION_USER_REMOVED.equals(action)) {
+                final int userId = intent.getIntExtra(EXTRA_USER_HANDLE, USER_NULL);
+                if (userId != USER_NULL) {
+                    synchronized (mWindowMap) {
+                        mScreenCaptureDisabled.remove(userId);
+                    }
+                }
             }
         }
     };
@@ -1021,9 +1031,11 @@
         setAnimatorDurationScale(Settings.Global.getFloat(context.getContentResolver(),
                 Settings.Global.ANIMATOR_DURATION_SCALE, mAnimatorDurationScaleSetting));
 
-        // Track changes to DevicePolicyManager state so we can enable/disable keyguard.
         IntentFilter filter = new IntentFilter();
+        // Track changes to DevicePolicyManager state so we can enable/disable keyguard.
         filter.addAction(DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED);
+        // Listen to user removal broadcasts so that we can remove the user-specific data.
+        filter.addAction(Intent.ACTION_USER_REMOVED);
         mContext.registerReceiver(mBroadcastReceiver, filter);
 
         mSettingsObserver = new SettingsObserver();
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index 5075a41..5bd2e93 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -1886,11 +1886,14 @@
     }
 
     private void setDeviceOwnerSystemPropertyLocked() {
-        // Device owner may still be provisioned, do not set the read-only system property yet.
-        // Wear devices don't set device_provisioned until the device is paired, so allow
-        // device_owner property to be set without that.
-        if (!mIsWatch
-                && mInjector.settingsGlobalGetInt(Settings.Global.DEVICE_PROVISIONED, 0) == 0) {
+        final boolean deviceProvisioned =
+                mInjector.settingsGlobalGetInt(Settings.Global.DEVICE_PROVISIONED, 0) != 0;
+        // If the device is not provisioned and there is currently no device owner, do not set the
+        // read-only system property yet, since Device owner may still be provisioned. For Wear
+        // devices, if there is already a device owner then it's OK to set the property to true now,
+        // regardless the provision state.
+        final boolean isWatchWithDeviceOwner = mIsWatch && mOwners.hasDeviceOwner();
+        if (!isWatchWithDeviceOwner && !deviceProvisioned) {
             return;
         }
         // Still at the first stage of CryptKeeper double bounce, mOwners.hasDeviceOwner is
diff --git a/services/tests/servicestests/src/com/android/server/MockStorageManager.java b/services/tests/servicestests/src/com/android/server/MockStorageManager.java
index 031a3b3..17c8ec2 100644
--- a/services/tests/servicestests/src/com/android/server/MockStorageManager.java
+++ b/services/tests/servicestests/src/com/android/server/MockStorageManager.java
@@ -490,4 +490,14 @@
         throw new UnsupportedOperationException();
     }
 
+    @Override
+    public long getAllocatableBytes(String path, int flags) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public void allocateBytes(String path, long bytes, int flags) {
+        throw new UnsupportedOperationException();
+    }
+
 }
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java b/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
index 98ff0e2..28b6e45 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
@@ -338,9 +338,12 @@
 
         w.mDockedResizingForTest = true;
         w.calculatePolicyCrop(policyCrop);
-        // But if we are docked resizing it won't be.
+        // But if we are docked resizing it won't be, however we will still be
+        // shrunk to the decor frame and the display.
         final DisplayInfo displayInfo = w.getDisplayContent().getDisplayInfo();
-        assertRect(policyCrop, 0, 0, 1000, 1000);
+        assertRect(policyCrop, 0, 0,
+                Math.min(pf.width(), displayInfo.logicalWidth),
+                Math.min(pf.height(), displayInfo.logicalHeight));
     }
 
     private WindowStateWithTask createWindow(Task task, int width, int height) {
diff --git a/tools/aapt2/Main.cpp b/tools/aapt2/Main.cpp
index 227ffa3..ba378d7 100644
--- a/tools/aapt2/Main.cpp
+++ b/tools/aapt2/Main.cpp
@@ -25,7 +25,7 @@
 static const char* sMajorVersion = "2";
 
 // Update minor version whenever a feature or flag is added.
-static const char* sMinorVersion = "6";
+static const char* sMinorVersion = "7";
 
 int PrintVersion() {
   std::cerr << "Android Asset Packaging Tool (aapt) " << sMajorVersion << "."
diff --git a/tools/aapt2/ResourceParser.cpp b/tools/aapt2/ResourceParser.cpp
index 1c750c6..47ca266 100644
--- a/tools/aapt2/ResourceParser.cpp
+++ b/tools/aapt2/ResourceParser.cpp
@@ -26,6 +26,7 @@
 #include "ResourceValues.h"
 #include "ValueVisitor.h"
 #include "util/ImmutableMap.h"
+#include "util/Maybe.h"
 #include "util/Util.h"
 #include "xml/XmlPullParser.h"
 
@@ -150,82 +151,108 @@
 /**
  * Build a string from XML that converts nested elements into Span objects.
  */
-bool ResourceParser::FlattenXmlSubtree(xml::XmlPullParser* parser,
-                                       std::string* out_raw_string,
-                                       StyleString* out_style_string) {
+bool ResourceParser::FlattenXmlSubtree(
+    xml::XmlPullParser* parser, std::string* out_raw_string, StyleString* out_style_string,
+    std::vector<UntranslatableSection>* out_untranslatable_sections) {
+  // Keeps track of formatting tags (<b>, <i>) and the range of characters for which they apply.
   std::vector<Span> span_stack;
 
-  bool error = false;
+  // Clear the output variables.
   out_raw_string->clear();
   out_style_string->spans.clear();
+  out_untranslatable_sections->clear();
+
+  // The StringBuilder will concatenate the various segments of text which are initially
+  // separated by tags. It also handles unicode escape codes and quotations.
   util::StringBuilder builder;
+
+  // The first occurrence of a <xliff:g> tag. Nested <xliff:g> tags are illegal.
+  Maybe<size_t> untranslatable_start_depth;
+
   size_t depth = 1;
   while (xml::XmlPullParser::IsGoodEvent(parser->Next())) {
     const xml::XmlPullParser::Event event = parser->event();
-    if (event == xml::XmlPullParser::Event::kEndElement) {
-      if (!parser->element_namespace().empty()) {
-        // We already warned and skipped the start element, so just skip here
-        // too
-        continue;
+
+    if (event == xml::XmlPullParser::Event::kStartElement) {
+      if (parser->element_namespace().empty()) {
+        // This is an HTML tag which we encode as a span. Add it to the span stack.
+        std::string span_name = parser->element_name();
+        const auto end_attr_iter = parser->end_attributes();
+        for (auto attr_iter = parser->begin_attributes(); attr_iter != end_attr_iter; ++attr_iter) {
+          span_name += ";";
+          span_name += attr_iter->name;
+          span_name += "=";
+          span_name += attr_iter->value;
+        }
+
+        // Make sure the string is representable in our binary format.
+        if (builder.Utf16Len() > std::numeric_limits<uint32_t>::max()) {
+          diag_->Error(DiagMessage(source_.WithLine(parser->line_number()))
+                       << "style string '" << builder.ToString() << "' is too long");
+          return false;
+        }
+
+        span_stack.push_back(Span{std::move(span_name), static_cast<uint32_t>(builder.Utf16Len())});
+      } else if (parser->element_namespace() == sXliffNamespaceUri) {
+        if (parser->element_name() == "g") {
+          if (untranslatable_start_depth) {
+            // We've already encountered an <xliff:g> tag, and nested <xliff:g> tags are illegal.
+            diag_->Error(DiagMessage(source_.WithLine(parser->line_number()))
+                         << "illegal nested XLIFF 'g' tag");
+            return false;
+          } else {
+            // Mark the start of an untranslatable section. Use UTF8 indices/lengths.
+            untranslatable_start_depth = depth;
+            const size_t current_idx = builder.ToString().size();
+            out_untranslatable_sections->push_back(UntranslatableSection{current_idx, current_idx});
+          }
+        }
+        // Ignore other xliff tags, they get handled by other tools.
+
+      } else {
+        // Besides XLIFF, any other namespaced tag is unsupported and ignored.
+        diag_->Warn(DiagMessage(source_.WithLine(parser->line_number()))
+                    << "ignoring element '" << parser->element_name()
+                    << "' with unknown namespace '" << parser->element_namespace() << "'");
       }
 
+      // Enter one level inside the element.
+      depth++;
+    } else if (event == xml::XmlPullParser::Event::kText) {
+      // Record both the raw text and append to the builder to deal with escape sequences
+      // and quotations.
+      out_raw_string->append(parser->text());
+      builder.Append(parser->text());
+    } else if (event == xml::XmlPullParser::Event::kEndElement) {
+      // Return one level from within the element.
       depth--;
       if (depth == 0) {
         break;
       }
 
-      span_stack.back().last_char = builder.Utf16Len() - 1;
-      out_style_string->spans.push_back(span_stack.back());
-      span_stack.pop_back();
-
-    } else if (event == xml::XmlPullParser::Event::kText) {
-      out_raw_string->append(parser->text());
-      builder.Append(parser->text());
-
-    } else if (event == xml::XmlPullParser::Event::kStartElement) {
-      if (!parser->element_namespace().empty()) {
-        if (parser->element_namespace() != sXliffNamespaceUri) {
-          // Only warn if this isn't an xliff namespace.
-          diag_->Warn(DiagMessage(source_.WithLine(parser->line_number()))
-                      << "skipping element '" << parser->element_name()
-                      << "' with unknown namespace '"
-                      << parser->element_namespace() << "'");
-        }
-        continue;
+      if (parser->element_namespace().empty()) {
+        // This is an HTML tag which we encode as a span. Update the span
+        // stack and pop the top entry.
+        Span& top_span = span_stack.back();
+        top_span.last_char = builder.Utf16Len() - 1;
+        out_style_string->spans.push_back(std::move(top_span));
+        span_stack.pop_back();
+      } else if (untranslatable_start_depth == make_value(depth)) {
+        // This is the end of an untranslatable section. Use UTF8 indices/lengths.
+        UntranslatableSection& untranslatable_section = out_untranslatable_sections->back();
+        untranslatable_section.end = builder.ToString().size();
+        untranslatable_start_depth = {};
       }
-      depth++;
-
-      // Build a span object out of the nested element.
-      std::string span_name = parser->element_name();
-      const auto end_attr_iter = parser->end_attributes();
-      for (auto attr_iter = parser->begin_attributes();
-           attr_iter != end_attr_iter; ++attr_iter) {
-        span_name += ";";
-        span_name += attr_iter->name;
-        span_name += "=";
-        span_name += attr_iter->value;
-      }
-
-      if (builder.Utf16Len() > std::numeric_limits<uint32_t>::max()) {
-        diag_->Error(DiagMessage(source_.WithLine(parser->line_number()))
-                     << "style string '" << builder.ToString()
-                     << "' is too long");
-        error = true;
-      } else {
-        span_stack.push_back(
-            Span{span_name, static_cast<uint32_t>(builder.Utf16Len())});
-      }
-
     } else if (event == xml::XmlPullParser::Event::kComment) {
-      // Skip
+      // Ignore.
     } else {
       LOG(FATAL) << "unhandled XML event";
     }
   }
-  CHECK(span_stack.empty()) << "spans haven't been fully processed";
 
+  CHECK(span_stack.empty()) << "spans haven't been fully processed";
   out_style_string->str = builder.ToString();
-  return !error;
+  return true;
 }
 
 bool ResourceParser::Parse(xml::XmlPullParser* parser) {
@@ -548,15 +575,18 @@
 
   std::string raw_value;
   StyleString style_string;
-  if (!FlattenXmlSubtree(parser, &raw_value, &style_string)) {
+  std::vector<UntranslatableSection> untranslatable_sections;
+  if (!FlattenXmlSubtree(parser, &raw_value, &style_string, &untranslatable_sections)) {
     return {};
   }
 
   if (!style_string.spans.empty()) {
     // This can only be a StyledString.
-    return util::make_unique<StyledString>(table_->string_pool.MakeRef(
-        style_string,
-        StringPool::Context(StringPool::Context::kStylePriority, config_)));
+    std::unique_ptr<StyledString> styled_string =
+        util::make_unique<StyledString>(table_->string_pool.MakeRef(
+            style_string, StringPool::Context(StringPool::Context::kStylePriority, config_)));
+    styled_string->untranslatable_sections = std::move(untranslatable_sections);
+    return std::move(styled_string);
   }
 
   auto on_create_reference = [&](const ResourceName& name) {
@@ -582,8 +612,10 @@
   // Try making a regular string.
   if (type_mask & android::ResTable_map::TYPE_STRING) {
     // Use the trimmed, escaped string.
-    return util::make_unique<String>(table_->string_pool.MakeRef(
-        style_string.str, StringPool::Context(config_)));
+    std::unique_ptr<String> string = util::make_unique<String>(
+        table_->string_pool.MakeRef(style_string.str, StringPool::Context(config_)));
+    string->untranslatable_sections = std::move(untranslatable_sections);
+    return std::move(string);
   }
 
   if (allow_raw_value) {
@@ -609,17 +641,15 @@
     formatted = maybe_formatted.value();
   }
 
-  bool translateable = options_.translatable;
-  if (Maybe<StringPiece> translateable_attr =
-          xml::FindAttribute(parser, "translatable")) {
-    Maybe<bool> maybe_translateable =
-        ResourceUtils::ParseBool(translateable_attr.value());
-    if (!maybe_translateable) {
+  bool translatable = options_.translatable;
+  if (Maybe<StringPiece> translatable_attr = xml::FindAttribute(parser, "translatable")) {
+    Maybe<bool> maybe_translatable = ResourceUtils::ParseBool(translatable_attr.value());
+    if (!maybe_translatable) {
       diag_->Error(DiagMessage(out_resource->source)
                    << "invalid value for 'translatable'. Must be a boolean");
       return false;
     }
-    translateable = maybe_translateable.value();
+    translatable = maybe_translatable.value();
   }
 
   out_resource->value =
@@ -630,9 +660,9 @@
   }
 
   if (String* string_value = ValueCast<String>(out_resource->value.get())) {
-    string_value->SetTranslateable(translateable);
+    string_value->SetTranslatable(translatable);
 
-    if (formatted && translateable) {
+    if (formatted && translatable) {
       if (!util::VerifyJavaStringFormat(*string_value->value)) {
         DiagMessage msg(out_resource->source);
         msg << "multiple substitutions specified in non-positional format; "
@@ -646,9 +676,8 @@
       }
     }
 
-  } else if (StyledString* string_value =
-                 ValueCast<StyledString>(out_resource->value.get())) {
-    string_value->SetTranslateable(translateable);
+  } else if (StyledString* string_value = ValueCast<StyledString>(out_resource->value.get())) {
+    string_value->SetTranslatable(translatable);
   }
   return true;
 }
@@ -1151,19 +1180,17 @@
 
   std::unique_ptr<Array> array = util::make_unique<Array>();
 
-  bool translateable = options_.translatable;
-  if (Maybe<StringPiece> translateable_attr =
-          xml::FindAttribute(parser, "translatable")) {
-    Maybe<bool> maybe_translateable =
-        ResourceUtils::ParseBool(translateable_attr.value());
-    if (!maybe_translateable) {
+  bool translatable = options_.translatable;
+  if (Maybe<StringPiece> translatable_attr = xml::FindAttribute(parser, "translatable")) {
+    Maybe<bool> maybe_translatable = ResourceUtils::ParseBool(translatable_attr.value());
+    if (!maybe_translatable) {
       diag_->Error(DiagMessage(out_resource->source)
                    << "invalid value for 'translatable'. Must be a boolean");
       return false;
     }
-    translateable = maybe_translateable.value();
+    translatable = maybe_translatable.value();
   }
-  array->SetTranslateable(translateable);
+  array->SetTranslatable(translatable);
 
   bool error = false;
   const size_t depth = parser->depth();
diff --git a/tools/aapt2/ResourceParser.h b/tools/aapt2/ResourceParser.h
index cc0fa26..8258019 100644
--- a/tools/aapt2/ResourceParser.h
+++ b/tools/aapt2/ResourceParser.h
@@ -60,16 +60,16 @@
  private:
   DISALLOW_COPY_AND_ASSIGN(ResourceParser);
 
-  /*
-   * Parses the XML subtree as a StyleString (flattened XML representation for
-   * strings
-   * with formatting). If successful, `out_style_string`
-   * contains the escaped and whitespace trimmed text, while `out_raw_string`
-   * contains the unescaped text. Returns true on success.
-   */
-  bool FlattenXmlSubtree(xml::XmlPullParser* parser,
-                         std::string* out_raw_string,
-                         StyleString* out_style_string);
+  // Parses the XML subtree as a StyleString (flattened XML representation for strings with
+  // formatting). If parsing fails, false is returned and the out parameters are left in an
+  // unspecified state. Otherwise,
+  // `out_style_string` contains the escaped and whitespace trimmed text.
+  // `out_raw_string` contains the un-escaped text.
+  // `out_untranslatable_sections` contains the sections of the string that should not be
+  // translated.
+  bool FlattenXmlSubtree(xml::XmlPullParser* parser, std::string* out_raw_string,
+                         StyleString* out_style_string,
+                         std::vector<UntranslatableSection>* out_untranslatable_sections);
 
   /*
    * Parses the XML subtree and returns an Item.
diff --git a/tools/aapt2/ResourceParser_test.cpp b/tools/aapt2/ResourceParser_test.cpp
index cf901da..67ed476 100644
--- a/tools/aapt2/ResourceParser_test.cpp
+++ b/tools/aapt2/ResourceParser_test.cpp
@@ -76,6 +76,7 @@
   String* str = test::GetValue<String>(&table_, "string/foo");
   ASSERT_NE(nullptr, str);
   EXPECT_EQ(std::string("  hey there "), *str->value);
+  EXPECT_TRUE(str->untranslatable_sections.empty());
 }
 
 TEST_F(ResourceParserTest, ParseEscapedString) {
@@ -85,6 +86,7 @@
   String* str = test::GetValue<String>(&table_, "string/foo");
   ASSERT_NE(nullptr, str);
   EXPECT_EQ(std::string("?123"), *str->value);
+  EXPECT_TRUE(str->untranslatable_sections.empty());
 }
 
 TEST_F(ResourceParserTest, ParseFormattedString) {
@@ -97,8 +99,7 @@
 
 TEST_F(ResourceParserTest, ParseStyledString) {
   // Use a surrogate pair unicode point so that we can verify that the span
-  // indices
-  // use UTF-16 length and not UTF-18 length.
+  // indices use UTF-16 length and not UTF-8 length.
   std::string input =
       "<string name=\"foo\">This is my aunt\u2019s <b>string</b></string>";
   ASSERT_TRUE(TestParse(input));
@@ -109,6 +110,7 @@
   const std::string expected_str = "This is my aunt\u2019s string";
   EXPECT_EQ(expected_str, *str->value->str);
   EXPECT_EQ(1u, str->value->spans.size());
+  EXPECT_TRUE(str->untranslatable_sections.empty());
 
   EXPECT_EQ(std::string("b"), *str->value->spans[0].name);
   EXPECT_EQ(17u, str->value->spans[0].first_char);
@@ -122,6 +124,7 @@
   String* str = test::GetValue<String>(&table_, "string/foo");
   ASSERT_NE(nullptr, str);
   EXPECT_EQ(std::string("This is what I think"), *str->value);
+  EXPECT_TRUE(str->untranslatable_sections.empty());
 
   input = "<string name=\"foo2\">\"  This is what  I think  \"</string>";
   ASSERT_TRUE(TestParse(input));
@@ -131,16 +134,61 @@
   EXPECT_EQ(std::string("  This is what  I think  "), *str->value);
 }
 
-TEST_F(ResourceParserTest, IgnoreXliffTags) {
-  std::string input =
-      "<string name=\"foo\" \n"
-      "        xmlns:xliff=\"urn:oasis:names:tc:xliff:document:1.2\">\n"
-      "  There are <xliff:g id=\"count\">%1$d</xliff:g> apples</string>";
+TEST_F(ResourceParserTest, IgnoreXliffTagsOtherThanG) {
+  std::string input = R"EOF(
+      <string name="foo" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+          There are <xliff:source>no</xliff:source> apples</string>)EOF";
+  ASSERT_TRUE(TestParse(input));
+
+  String* str = test::GetValue<String>(&table_, "string/foo");
+  ASSERT_NE(nullptr, str);
+  EXPECT_EQ(StringPiece("There are no apples"), StringPiece(*str->value));
+  EXPECT_TRUE(str->untranslatable_sections.empty());
+}
+
+TEST_F(ResourceParserTest, NestedXliffGTagsAreIllegal) {
+  std::string input = R"EOF(
+      <string name="foo" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+          Do not <xliff:g>translate <xliff:g>this</xliff:g></xliff:g></string>)EOF";
+  EXPECT_FALSE(TestParse(input));
+}
+
+TEST_F(ResourceParserTest, RecordUntranslateableXliffSectionsInString) {
+  std::string input = R"EOF(
+      <string name="foo" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+          There are <xliff:g id="count">%1$d</xliff:g> apples</string>)EOF";
   ASSERT_TRUE(TestParse(input));
 
   String* str = test::GetValue<String>(&table_, "string/foo");
   ASSERT_NE(nullptr, str);
   EXPECT_EQ(StringPiece("There are %1$d apples"), StringPiece(*str->value));
+
+  ASSERT_EQ(1u, str->untranslatable_sections.size());
+
+  // We expect indices and lengths that span to include the whitespace
+  // before %1$d. This is due to how the StringBuilder withholds whitespace unless
+  // needed (to deal with line breaks, etc.).
+  EXPECT_EQ(9u, str->untranslatable_sections[0].start);
+  EXPECT_EQ(14u, str->untranslatable_sections[0].end);
+}
+
+TEST_F(ResourceParserTest, RecordUntranslateableXliffSectionsInStyledString) {
+  std::string input = R"EOF(
+      <string name="foo" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+          There are <b><xliff:g id="count">%1$d</xliff:g></b> apples</string>)EOF";
+  ASSERT_TRUE(TestParse(input));
+
+  StyledString* str = test::GetValue<StyledString>(&table_, "string/foo");
+  ASSERT_NE(nullptr, str);
+  EXPECT_EQ(StringPiece("There are %1$d apples"), StringPiece(*str->value->str));
+
+  ASSERT_EQ(1u, str->untranslatable_sections.size());
+
+  // We expect indices and lengths that span to include the whitespace
+  // before %1$d. This is due to how the StringBuilder withholds whitespace unless
+  // needed (to deal with line breaks, etc.).
+  EXPECT_EQ(9u, str->untranslatable_sections[0].start);
+  EXPECT_EQ(14u, str->untranslatable_sections[0].end);
 }
 
 TEST_F(ResourceParserTest, ParseNull) {
@@ -149,15 +197,11 @@
 
   // The Android runtime treats a value of android::Res_value::TYPE_NULL as
   // a non-existing value, and this causes problems in styles when trying to
-  // resolve
-  // an attribute. Null values must be encoded as
-  // android::Res_value::TYPE_REFERENCE
+  // resolve an attribute. Null values must be encoded as android::Res_value::TYPE_REFERENCE
   // with a data value of 0.
-  BinaryPrimitive* integer =
-      test::GetValue<BinaryPrimitive>(&table_, "integer/foo");
+  BinaryPrimitive* integer = test::GetValue<BinaryPrimitive>(&table_, "integer/foo");
   ASSERT_NE(nullptr, integer);
-  EXPECT_EQ(uint16_t(android::Res_value::TYPE_REFERENCE),
-            integer->value.dataType);
+  EXPECT_EQ(uint16_t(android::Res_value::TYPE_REFERENCE), integer->value.dataType);
   EXPECT_EQ(0u, integer->value.data);
 }
 
diff --git a/tools/aapt2/ResourceValues.cpp b/tools/aapt2/ResourceValues.cpp
index 7956ad8..f75ed7a 100644
--- a/tools/aapt2/ResourceValues.cpp
+++ b/tools/aapt2/ResourceValues.cpp
@@ -140,7 +140,23 @@
   if (!other) {
     return false;
   }
-  return *this->value == *other->value;
+
+  if (this->value != other->value) {
+    return false;
+  }
+
+  if (untranslatable_sections.size() != other->untranslatable_sections.size()) {
+    return false;
+  }
+
+  auto other_iter = other->untranslatable_sections.begin();
+  for (const UntranslatableSection& this_section : untranslatable_sections) {
+    if (this_section != *other_iter) {
+      return false;
+    }
+    ++other_iter;
+  }
+  return true;
 }
 
 bool String::Flatten(android::Res_value* out_value) const {
@@ -158,6 +174,7 @@
   String* str = new String(new_pool->MakeRef(*value));
   str->comment_ = comment_;
   str->source_ = source_;
+  str->untranslatable_sections = untranslatable_sections;
   return str;
 }
 
@@ -173,17 +190,22 @@
     return false;
   }
 
-  if (*this->value->str == *other->value->str) {
-    const std::vector<StringPool::Span>& spans_a = this->value->spans;
-    const std::vector<StringPool::Span>& spans_b = other->value->spans;
-    return std::equal(
-        spans_a.begin(), spans_a.end(), spans_b.begin(),
-        [](const StringPool::Span& a, const StringPool::Span& b) -> bool {
-          return *a.name == *b.name && a.first_char == b.first_char &&
-                 a.last_char == b.last_char;
-        });
+  if (this->value != other->value) {
+    return false;
   }
-  return false;
+
+  if (untranslatable_sections.size() != other->untranslatable_sections.size()) {
+    return false;
+  }
+
+  auto other_iter = other->untranslatable_sections.begin();
+  for (const UntranslatableSection& this_section : untranslatable_sections) {
+    if (this_section != *other_iter) {
+      return false;
+    }
+    ++other_iter;
+  }
+  return true;
 }
 
 bool StyledString::Flatten(android::Res_value* out_value) const {
@@ -200,6 +222,7 @@
   StyledString* str = new StyledString(new_pool->MakeRef(value));
   str->comment_ = comment_;
   str->source_ = source_;
+  str->untranslatable_sections = untranslatable_sections;
   return str;
 }
 
@@ -218,7 +241,7 @@
   if (!other) {
     return false;
   }
-  return *path == *other->path;
+  return path == other->path;
 }
 
 bool FileReference::Flatten(android::Res_value* out_value) const {
diff --git a/tools/aapt2/ResourceValues.h b/tools/aapt2/ResourceValues.h
index d380f8d..c71c738 100644
--- a/tools/aapt2/ResourceValues.h
+++ b/tools/aapt2/ResourceValues.h
@@ -34,44 +34,35 @@
 
 struct RawValueVisitor;
 
-/**
- * A resource value. This is an all-encompassing representation
- * of Item and Map and their subclasses. The way to do
- * type specific operations is to check the Value's type() and
- * cast it to the appropriate subclass. This isn't super clean,
- * but it is the simplest strategy.
- */
+// A resource value. This is an all-encompassing representation
+// of Item and Map and their subclasses. The way to do
+// type specific operations is to check the Value's type() and
+// cast it to the appropriate subclass. This isn't super clean,
+// but it is the simplest strategy.
 struct Value {
   virtual ~Value() = default;
 
-  /**
-   * Whether this value is weak and can be overridden without
-   * warning or error. Default is false.
-   */
+  // Whether this value is weak and can be overridden without warning or error. Default is false.
   bool IsWeak() const { return weak_; }
 
   void SetWeak(bool val) { weak_ = val; }
 
-  // Whether the value is marked as translateable.
+  // Whether the value is marked as translatable.
   // This does not persist when flattened.
   // It is only used during compilation phase.
-  void SetTranslateable(bool val) { translateable_ = val; }
+  void SetTranslatable(bool val) { translatable_ = val; }
 
   // Default true.
-  bool IsTranslateable() const { return translateable_; }
+  bool IsTranslatable() const { return translatable_; }
 
-  /**
-   * Returns the source where this value was defined.
-   */
+  // Returns the source where this value was defined.
   const Source& GetSource() const { return source_; }
 
   void SetSource(const Source& source) { source_ = source; }
 
   void SetSource(Source&& source) { source_ = std::move(source); }
 
-  /**
-   * Returns the comment that was associated with this resource.
-   */
+  // Returns the comment that was associated with this resource.
   const std::string& GetComment() const { return comment_; }
 
   void SetComment(const android::StringPiece& str) { comment_ = str.to_string(); }
@@ -80,70 +71,48 @@
 
   virtual bool Equals(const Value* value) const = 0;
 
-  /**
-   * Calls the appropriate overload of ValueVisitor.
-   */
+  // Calls the appropriate overload of ValueVisitor.
   virtual void Accept(RawValueVisitor* visitor) = 0;
 
-  /**
-   * Clone the value. new_pool is the new StringPool that
-   * any resources with strings should use when copying their string.
-   */
+  // Clone the value. `new_pool` is the new StringPool that
+  // any resources with strings should use when copying their string.
   virtual Value* Clone(StringPool* new_pool) const = 0;
 
-  /**
-   * Human readable printout of this value.
-   */
+  // Human readable printout of this value.
   virtual void Print(std::ostream* out) const = 0;
 
  protected:
   Source source_;
   std::string comment_;
   bool weak_ = false;
-  bool translateable_ = true;
+  bool translatable_ = true;
 };
 
-/**
- * Inherit from this to get visitor accepting implementations for free.
- */
+// Inherit from this to get visitor accepting implementations for free.
 template <typename Derived>
 struct BaseValue : public Value {
   void Accept(RawValueVisitor* visitor) override;
 };
 
-/**
- * A resource item with a single value. This maps to android::ResTable_entry.
- */
+// A resource item with a single value. This maps to android::ResTable_entry.
 struct Item : public Value {
-  /**
-   * Clone the Item.
-   */
+  // Clone the Item.
   virtual Item* Clone(StringPool* new_pool) const override = 0;
 
-  /**
-   * Fills in an android::Res_value structure with this Item's binary
-   * representation.
-   * Returns false if an error occurred.
-   */
+  // Fills in an android::Res_value structure with this Item's binary representation.
+  // Returns false if an error occurred.
   virtual bool Flatten(android::Res_value* out_value) const = 0;
 };
 
-/**
- * Inherit from this to get visitor accepting implementations for free.
- */
+// Inherit from this to get visitor accepting implementations for free.
 template <typename Derived>
 struct BaseItem : public Item {
   void Accept(RawValueVisitor* visitor) override;
 };
 
-/**
- * A reference to another resource. This maps to
- * android::Res_value::TYPE_REFERENCE.
- *
- * A reference can be symbolic (with the name set to a valid resource name) or
- * be
- * numeric (the id is set to a valid resource ID).
- */
+// A reference to another resource. This maps to android::Res_value::TYPE_REFERENCE.
+// A reference can be symbolic (with the name set to a valid resource name) or be
+// numeric (the id is set to a valid resource ID).
 struct Reference : public BaseItem<Reference> {
   enum class Type {
     kResource,
@@ -169,9 +138,7 @@
 bool operator<(const Reference&, const Reference&);
 bool operator==(const Reference&, const Reference&);
 
-/**
- * An ID resource. Has no real value, just a place holder.
- */
+// An ID resource. Has no real value, just a place holder.
 struct Id : public BaseItem<Id> {
   Id() { weak_ = true; }
   bool Equals(const Value* value) const override;
@@ -180,11 +147,8 @@
   void Print(std::ostream* out) const override;
 };
 
-/**
- * A raw, unprocessed string. This may contain quotations,
- * escape sequences, and whitespace. This shall *NOT*
- * end up in the final resource table.
- */
+// A raw, unprocessed string. This may contain quotations, escape sequences, and whitespace.
+// This shall *NOT* end up in the final resource table.
 struct RawString : public BaseItem<RawString> {
   StringPool::Ref value;
 
@@ -196,9 +160,32 @@
   void Print(std::ostream* out) const override;
 };
 
+// Identifies a range of characters in a string that are untranslatable.
+// These should not be pseudolocalized. The start and end indices are measured in bytes.
+struct UntranslatableSection {
+  // Start offset inclusive.
+  size_t start;
+
+  // End offset exclusive.
+  size_t end;
+};
+
+inline bool operator==(const UntranslatableSection& a, const UntranslatableSection& b) {
+  return a.start == b.start && a.end == b.end;
+}
+
+inline bool operator!=(const UntranslatableSection& a, const UntranslatableSection& b) {
+  return a.start != b.start || a.end != b.end;
+}
+
 struct String : public BaseItem<String> {
   StringPool::Ref value;
 
+  // Sections of the string to NOT translate. Mainly used
+  // for pseudolocalization. This data is NOT persisted
+  // in any format.
+  std::vector<UntranslatableSection> untranslatable_sections;
+
   explicit String(const StringPool::Ref& ref);
 
   bool Equals(const Value* value) const override;
@@ -210,6 +197,11 @@
 struct StyledString : public BaseItem<StyledString> {
   StringPool::StyleRef value;
 
+  // Sections of the string to NOT translate. Mainly used
+  // for pseudolocalization. This data is NOT persisted
+  // in any format.
+  std::vector<UntranslatableSection> untranslatable_sections;
+
   explicit StyledString(const StringPool::StyleRef& ref);
 
   bool Equals(const Value* value) const override;
@@ -221,9 +213,8 @@
 struct FileReference : public BaseItem<FileReference> {
   StringPool::Ref path;
 
-  /**
-   * A handle to the file object from which this file can be read.
-   */
+  // A handle to the file object from which this file can be read.
+  // This field is NOT persisted in any format. It is transient.
   io::IFile* file = nullptr;
 
   FileReference() = default;
@@ -235,9 +226,7 @@
   void Print(std::ostream* out) const override;
 };
 
-/**
- * Represents any other android::Res_value.
- */
+// Represents any other android::Res_value.
 struct BinaryPrimitive : public BaseItem<BinaryPrimitive> {
   android::Res_value value;
 
@@ -279,10 +268,7 @@
 
   Maybe<Reference> parent;
 
-  /**
-   * If set to true, the parent was auto inferred from the
-   * style's name.
-   */
+  // If set to true, the parent was auto inferred from the style's name.
   bool parent_inferred = false;
 
   std::vector<Entry> entries;
@@ -319,9 +305,7 @@
   void MergeWith(Styleable* styleable);
 };
 
-/**
- * Stream operator for printing Value objects.
- */
+// Stream operator for printing Value objects.
 inline ::std::ostream& operator<<(::std::ostream& out, const Value& value) {
   value.Print(&out);
   return out;
diff --git a/tools/aapt2/StringPool.cpp b/tools/aapt2/StringPool.cpp
index d968d73..57da5f0 100644
--- a/tools/aapt2/StringPool.cpp
+++ b/tools/aapt2/StringPool.cpp
@@ -63,6 +63,14 @@
   return *this;
 }
 
+bool StringPool::Ref::operator==(const Ref& rhs) const {
+  return entry_->value == rhs.entry_->value;
+}
+
+bool StringPool::Ref::operator!=(const Ref& rhs) const {
+  return entry_->value != rhs.entry_->value;
+}
+
 const std::string* StringPool::Ref::operator->() const {
   return &entry_->value;
 }
@@ -109,6 +117,28 @@
   return *this;
 }
 
+bool StringPool::StyleRef::operator==(const StyleRef& rhs) const {
+  if (entry_->str != rhs.entry_->str) {
+    return false;
+  }
+
+  if (entry_->spans.size() != rhs.entry_->spans.size()) {
+    return false;
+  }
+
+  auto rhs_iter = rhs.entry_->spans.begin();
+  for (const Span& span : entry_->spans) {
+    const Span& rhs_span = *rhs_iter;
+    if (span.first_char != rhs_span.first_char || span.last_char != rhs_span.last_char ||
+        span.name != rhs_span.name) {
+      return false;
+    }
+  }
+  return true;
+}
+
+bool StringPool::StyleRef::operator!=(const StyleRef& rhs) const { return !operator==(rhs); }
+
 const StringPool::StyleEntry* StringPool::StyleRef::operator->() const {
   return entry_;
 }
diff --git a/tools/aapt2/StringPool.h b/tools/aapt2/StringPool.h
index d0ce489..a626d37 100644
--- a/tools/aapt2/StringPool.h
+++ b/tools/aapt2/StringPool.h
@@ -70,6 +70,8 @@
     ~Ref();
 
     Ref& operator=(const Ref& rhs);
+    bool operator==(const Ref& rhs) const;
+    bool operator!=(const Ref& rhs) const;
     const std::string* operator->() const;
     const std::string& operator*() const;
 
@@ -93,6 +95,8 @@
     ~StyleRef();
 
     StyleRef& operator=(const StyleRef& rhs);
+    bool operator==(const StyleRef& rhs) const;
+    bool operator!=(const StyleRef& rhs) const;
     const StyleEntry* operator->() const;
     const StyleEntry& operator*() const;
 
diff --git a/tools/aapt2/compile/PseudolocaleGenerator.cpp b/tools/aapt2/compile/PseudolocaleGenerator.cpp
index 5035f81..fad9edd 100644
--- a/tools/aapt2/compile/PseudolocaleGenerator.cpp
+++ b/tools/aapt2/compile/PseudolocaleGenerator.cpp
@@ -43,16 +43,16 @@
   }
 
   // The ranges are all represented with a single value. This is the start of
-  // one range and
-  // end of another.
+  // one range and end of another.
   struct Range {
     size_t start;
 
-    // Once the new string is localized, these are the pointers to the spans to
-    // adjust.
+    // If set to true, toggles the state of translatability.
+    bool toggle_translatability;
+
+    // Once the new string is localized, these are the pointers to the spans to adjust.
     // Since this struct represents the start of one range and end of another,
-    // we have
-    // the two pointers respectively.
+    // we have the two pointers respectively.
     uint32_t* update_start;
     uint32_t* update_end;
   };
@@ -63,12 +63,11 @@
 
   // Construct the ranges. The ranges are represented like so: [0, 2, 5, 7]
   // The ranges are the spaces in between. In this example, with a total string
-  // length of 9,
-  // the vector represents: (0,1], (2,4], (5,6], (7,9]
+  // length of 9, the vector represents: (0,1], (2,4], (5,6], (7,9]
   //
   std::vector<Range> ranges;
-  ranges.push_back(Range{0});
-  ranges.push_back(Range{original_text.size() - 1});
+  ranges.push_back(Range{0, false, nullptr, nullptr});
+  ranges.push_back(Range{original_text.size() - 1, false, nullptr, nullptr});
   for (size_t i = 0; i < string->value->spans.size(); i++) {
     const StringPool::Span& span = string->value->spans[i];
 
@@ -78,8 +77,7 @@
     if (iter != ranges.end() && iter->start == span.first_char) {
       iter->update_start = &localized.spans[i].first_char;
     } else {
-      ranges.insert(iter, Range{span.first_char, &localized.spans[i].first_char,
-                                nullptr});
+      ranges.insert(iter, Range{span.first_char, false, &localized.spans[i].first_char, nullptr});
     }
 
     // Insert or update the Range marker for the end of this span.
@@ -87,14 +85,45 @@
     if (iter != ranges.end() && iter->start == span.last_char) {
       iter->update_end = &localized.spans[i].last_char;
     } else {
-      ranges.insert(
-          iter, Range{span.last_char, nullptr, &localized.spans[i].last_char});
+      ranges.insert(iter, Range{span.last_char, false, nullptr, &localized.spans[i].last_char});
+    }
+  }
+
+  // Parts of the string may be untranslatable. Merge those ranges
+  // in as well, so that we have continuous sections of text to
+  // feed into the pseudolocalizer.
+  // We do this by marking the beginning of a range as either toggling
+  // the translatability state or not.
+  for (const UntranslatableSection& section : string->untranslatable_sections) {
+    auto iter = std::lower_bound(ranges.begin(), ranges.end(), section.start, cmp);
+    if (iter != ranges.end() && iter->start == section.start) {
+      // An existing span starts (or ends) here. We just need to mark that
+      // the translatability should toggle here. If translatability was
+      // already being toggled, then that means we have two adjacent ranges of untranslatable
+      // text, so remove the toggle and only toggle at the end of this range,
+      // effectively merging these ranges.
+      iter->toggle_translatability = !iter->toggle_translatability;
+    } else {
+      // Insert a new range that specifies to toggle the translatability.
+      iter = ranges.insert(iter, Range{section.start, true, nullptr, nullptr});
+    }
+
+    // Update/create an end to the untranslatable section.
+    iter = std::lower_bound(iter, ranges.end(), section.end, cmp);
+    if (iter != ranges.end() && iter->start == section.end) {
+      iter->toggle_translatability = true;
+    } else {
+      iter = ranges.insert(iter, Range{section.end, true, nullptr, nullptr});
     }
   }
 
   localized.str += localizer.Start();
 
   // Iterate over the ranges and localize each section.
+  // The text starts as translatable, and each time a range has toggle_translatability
+  // set to true, we toggle whether to translate or not.
+  // This assumes no untranslatable ranges overlap.
+  bool translatable = true;
   for (size_t i = 0; i < ranges.size(); i++) {
     const size_t start = ranges[i].start;
     size_t len = original_text.size() - start;
@@ -110,15 +139,20 @@
       *ranges[i].update_end = localized.str.size();
     }
 
-    localized.str += localizer.Text(original_text.substr(start, len));
+    if (ranges[i].toggle_translatability) {
+      translatable = !translatable;
+    }
+
+    if (translatable) {
+      localized.str += localizer.Text(original_text.substr(start, len));
+    } else {
+      localized.str += original_text.substr(start, len);
+    }
   }
 
   localized.str += localizer.End();
 
-  std::unique_ptr<StyledString> localized_string =
-      util::make_unique<StyledString>(pool->MakeRef(localized));
-  localized_string->SetSource(string->GetSource());
-  return localized_string;
+  return util::make_unique<StyledString>(pool->MakeRef(localized));
 }
 
 namespace {
@@ -152,8 +186,30 @@
   }
 
   void Visit(String* string) override {
-    std::string result =
-        localizer_.Start() + localizer_.Text(*string->value) + localizer_.End();
+    const StringPiece original_string = *string->value;
+    std::string result = localizer_.Start();
+
+    // Pseudolocalize only the translatable sections.
+    size_t start = 0u;
+    for (const UntranslatableSection& section : string->untranslatable_sections) {
+      // Pseudolocalize the content before the untranslatable section.
+      const size_t len = section.start - start;
+      if (len > 0u) {
+        result += localizer_.Text(original_string.substr(start, len));
+      }
+
+      // Copy the untranslatable content.
+      result += original_string.substr(section.start, section.end - section.start);
+      start = section.end;
+    }
+
+    // Pseudolocalize the content after the last untranslatable section.
+    if (start != original_string.size()) {
+      const size_t len = original_string.size() - start;
+      result += localizer_.Text(original_string.substr(start, len));
+    }
+    result += localizer_.End();
+
     std::unique_ptr<String> localized =
         util::make_unique<String>(pool_->MakeRef(result));
     localized->SetSource(string->GetSource());
@@ -163,6 +219,7 @@
 
   void Visit(StyledString* string) override {
     item = PseudolocalizeStyledString(string, method_, pool_);
+    item->SetSource(string->GetSource());
     item->SetWeak(true);
   }
 
@@ -228,7 +285,7 @@
 /**
  * A value is pseudolocalizable if it does not define a locale (or is the
  * default locale)
- * and is translateable.
+ * and is translatable.
  */
 static bool IsPseudolocalizable(ResourceConfigValue* config_value) {
   const int diff =
@@ -236,7 +293,7 @@
   if (diff & ConfigDescription::CONFIG_LOCALE) {
     return false;
   }
-  return config_value->value->IsTranslateable();
+  return config_value->value->IsTranslatable();
 }
 
 }  // namespace
diff --git a/tools/aapt2/compile/PseudolocaleGenerator_test.cpp b/tools/aapt2/compile/PseudolocaleGenerator_test.cpp
index 5a9884d..4db37db 100644
--- a/tools/aapt2/compile/PseudolocaleGenerator_test.cpp
+++ b/tools/aapt2/compile/PseudolocaleGenerator_test.cpp
@@ -89,7 +89,7 @@
 
   String* val = test::GetValue<String>(table.get(), "android:string/four");
   ASSERT_NE(nullptr, val);
-  val->SetTranslateable(false);
+  val->SetTranslatable(false);
 
   std::unique_ptr<IAaptContext> context = test::ContextBuilder().Build();
   PseudolocaleGenerator generator;
@@ -130,4 +130,47 @@
                                             test::ParseConfigOrDie("ar-rXB")));
 }
 
+TEST(PseudolocaleGeneratorTest, RespectUntranslateableSections) {
+  std::unique_ptr<IAaptContext> context =
+      test::ContextBuilder().SetCompilationPackage("android").Build();
+  std::unique_ptr<ResourceTable> table = util::make_unique<ResourceTable>();
+
+  {
+    StyleString original_style;
+    original_style.str = "Hello world!";
+    original_style.spans = {Span{"b", 2, 3}, Span{"b", 6, 7}, Span{"i", 1, 10}};
+
+    auto styled_string =
+        util::make_unique<StyledString>(table->string_pool.MakeRef(original_style));
+    styled_string->untranslatable_sections.push_back(UntranslatableSection{6u, 8u});
+    styled_string->untranslatable_sections.push_back(UntranslatableSection{8u, 11u});
+
+    auto string = util::make_unique<String>(table->string_pool.MakeRef(original_style.str));
+    string->untranslatable_sections.push_back(UntranslatableSection{6u, 11u});
+
+    ASSERT_TRUE(table->AddResource(test::ParseNameOrDie("android:string/foo"), ConfigDescription{},
+                                   {} /* product */, std::move(styled_string),
+                                   context->GetDiagnostics()));
+    ASSERT_TRUE(table->AddResource(test::ParseNameOrDie("android:string/bar"), ConfigDescription{},
+                                   {} /* product */, std::move(string), context->GetDiagnostics()));
+  }
+
+  PseudolocaleGenerator generator;
+  ASSERT_TRUE(generator.Consume(context.get(), table.get()));
+
+  StyledString* new_styled_string = test::GetValueForConfig<StyledString>(
+      table.get(), "android:string/foo", test::ParseConfigOrDie("en-rXA"));
+  ASSERT_NE(nullptr, new_styled_string);
+
+  // "world" should be untranslated.
+  EXPECT_NE(std::string::npos, new_styled_string->value->str->find("world"));
+
+  String* new_string = test::GetValueForConfig<String>(table.get(), "android:string/bar",
+                                                       test::ParseConfigOrDie("en-rXA"));
+  ASSERT_NE(nullptr, new_string);
+
+  // "world" should be untranslated.
+  EXPECT_NE(std::string::npos, new_string->value->find("world"));
+}
+
 }  // namespace aapt
diff --git a/tools/aapt2/link/Link.cpp b/tools/aapt2/link/Link.cpp
index f7e0f8f..0501a3b 100644
--- a/tools/aapt2/link/Link.cpp
+++ b/tools/aapt2/link/Link.cpp
@@ -1634,7 +1634,7 @@
 
     if (options_.static_lib) {
       if (options_.table_splitter_options.config_filter != nullptr ||
-          options_.table_splitter_options.preferred_density) {
+          !options_.table_splitter_options.preferred_densities.empty()) {
         context_->GetDiagnostics()
             ->Warn(DiagMessage()
                    << "can't strip resources when building static library");
@@ -2107,8 +2107,7 @@
                         << "Preferred density must only be a density value");
       return 1;
     }
-    options.table_splitter_options.preferred_density =
-        preferred_density_config.density;
+    options.table_splitter_options.preferred_densities.push_back(preferred_density_config.density);
   }
 
   if (!options.static_lib && stable_id_file_path) {
diff --git a/tools/aapt2/readme.md b/tools/aapt2/readme.md
index 44d22c4..8bc4e8c 100644
--- a/tools/aapt2/readme.md
+++ b/tools/aapt2/readme.md
@@ -1,5 +1,9 @@
 # Android Asset Packaging Tool 2.0 (AAPT2) release notes
 
+## Version 2.7
+### `aapt2 compile`
+- Fixes bug where psuedolocalization auto-translated strings marked 'translateable="false"'.
+
 ## Version 2.6
 ### `aapt2`
 - Support legacy `configVarying` resource type.
diff --git a/tools/aapt2/split/TableSplitter.cpp b/tools/aapt2/split/TableSplitter.cpp
index 38cfd2e..27e13d8 100644
--- a/tools/aapt2/split/TableSplitter.cpp
+++ b/tools/aapt2/split/TableSplitter.cpp
@@ -19,6 +19,7 @@
 #include <algorithm>
 #include <map>
 #include <set>
+#include <unordered_set>
 #include <unordered_map>
 #include <vector>
 
@@ -124,29 +125,35 @@
  * leaving only the preferred density behind.
  */
 static void MarkNonPreferredDensitiesAsClaimed(
-    uint16_t preferred_density, const ConfigDensityGroups& density_groups,
+    const std::vector<uint16_t>& preferred_densities, const ConfigDensityGroups& density_groups,
     ConfigClaimedMap* config_claimed_map) {
   for (auto& entry : density_groups) {
     const ConfigDescription& config = entry.first;
     const std::vector<ResourceConfigValue*>& related_values = entry.second;
 
-    ConfigDescription target_density = config;
-    target_density.density = preferred_density;
-    ResourceConfigValue* best_value = nullptr;
+    // There can be multiple best values if there are multiple preferred densities.
+    std::unordered_set<ResourceConfigValue*> best_values;
+
+    // For each preferred density, find the value that is the best.
+    for (uint16_t preferred_density : preferred_densities) {
+      ConfigDescription target_density = config;
+      target_density.density = preferred_density;
+      ResourceConfigValue* best_value = nullptr;
+      for (ResourceConfigValue* this_value : related_values) {
+        if (!best_value || this_value->config.isBetterThan(best_value->config, &target_density)) {
+          best_value = this_value;
+        }
+      }
+      CHECK(best_value != nullptr);
+      best_values.insert(best_value);
+    }
+
+    // Claim all the values that aren't the best so that they will be removed from the base.
     for (ResourceConfigValue* this_value : related_values) {
-      if (!best_value) {
-        best_value = this_value;
-      } else if (this_value->config.isBetterThan(best_value->config,
-                                                 &target_density)) {
-        // Claim the previous value so that it is not included in the base.
-        (*config_claimed_map)[best_value] = true;
-        best_value = this_value;
-      } else {
-        // Claim this value so that it is not included in the base.
+      if (best_values.find(this_value) == best_values.end()) {
         (*config_claimed_map)[this_value] = true;
       }
     }
-    CHECK(best_value != nullptr);
   }
 }
 bool TableSplitter::VerifySplitConstraints(IAaptContext* context) {
@@ -263,8 +270,8 @@
           }
         }
 
-        if (options_.preferred_density) {
-          MarkNonPreferredDensitiesAsClaimed(options_.preferred_density.value(),
+        if (!options_.preferred_densities.empty()) {
+          MarkNonPreferredDensitiesAsClaimed(options_.preferred_densities,
                                              density_groups,
                                              &config_claimed_map);
         }
diff --git a/tools/aapt2/split/TableSplitter.h b/tools/aapt2/split/TableSplitter.h
index 1ae3271..6aec257 100644
--- a/tools/aapt2/split/TableSplitter.h
+++ b/tools/aapt2/split/TableSplitter.h
@@ -34,14 +34,14 @@
 
 struct TableSplitterOptions {
   /**
-   * The preferred density to keep in the table, stripping out all others.
+   * The preferred densities to keep in the table, stripping out all others.
+   * If empty, no stripping is done.
    */
-  Maybe<uint16_t> preferred_density;
+  std::vector<uint16_t> preferred_densities;
 
   /**
    * Configuration filter that determines which resource configuration values
-   * end up in
-   * the final table.
+   * end up in the final table.
    */
   IConfigFilter* config_filter = nullptr;
 };
diff --git a/tools/aapt2/split/TableSplitter_test.cpp b/tools/aapt2/split/TableSplitter_test.cpp
index 088dac3..d52f4b44 100644
--- a/tools/aapt2/split/TableSplitter_test.cpp
+++ b/tools/aapt2/split/TableSplitter_test.cpp
@@ -39,7 +39,7 @@
           .Build();
 
   TableSplitterOptions options;
-  options.preferred_density = ConfigDescription::DENSITY_XHIGH;
+  options.preferred_densities.push_back(ConfigDescription::DENSITY_XHIGH);
   TableSplitter splitter({}, options);
   splitter.SplitTable(table.get());
 
@@ -58,6 +58,51 @@
   EXPECT_NE(nullptr, test::GetValue<Id>(table.get(), "android:string/one"));
 }
 
+TEST(TableSplitterTest, NoSplitMultiplePreferredDensities) {
+  std::unique_ptr<ResourceTable> table =
+      test::ResourceTableBuilder()
+          .AddFileReference("android:drawable/icon",
+                            "res/drawable-mdpi/icon.png",
+                            test::ParseConfigOrDie("mdpi"))
+          .AddFileReference("android:drawable/icon",
+                            "res/drawable-hdpi/icon.png",
+                            test::ParseConfigOrDie("hdpi"))
+          .AddFileReference("android:drawable/icon",
+                            "res/drawable-xhdpi/icon.png",
+                            test::ParseConfigOrDie("xhdpi"))
+          .AddFileReference("android:drawable/icon",
+                            "res/drawable-xxhdpi/icon.png",
+                            test::ParseConfigOrDie("xxhdpi"))
+          .AddSimple("android:string/one")
+          .Build();
+
+  TableSplitterOptions options;
+  options.preferred_densities.push_back(ConfigDescription::DENSITY_LOW);
+  options.preferred_densities.push_back(ConfigDescription::DENSITY_XXXHIGH);
+  TableSplitter splitter({}, options);
+  splitter.SplitTable(table.get());
+
+  // Densities remaining:
+  // "mdpi" is the closest available density for the requested "ldpi" density.
+  EXPECT_NE(nullptr, test::GetValueForConfig<FileReference>(
+                         table.get(), "android:drawable/icon",
+                         test::ParseConfigOrDie("mdpi")));
+  // "xxhdpi" is the closest available density for the requested "xxxhdpi" density.
+  EXPECT_NE(nullptr, test::GetValueForConfig<FileReference>(
+                         table.get(), "android:drawable/icon",
+                         test::ParseConfigOrDie("xxhdpi")));
+  EXPECT_NE(nullptr, test::GetValue<Id>(table.get(), "android:string/one"));
+
+  // Removed densities:
+  EXPECT_EQ(nullptr, test::GetValueForConfig<FileReference>(
+                         table.get(), "android:drawable/icon",
+                         test::ParseConfigOrDie("hdpi")));
+  EXPECT_EQ(nullptr, test::GetValueForConfig<FileReference>(
+                         table.get(), "android:drawable/icon",
+                         test::ParseConfigOrDie("xhdpi")));
+}
+
+
 TEST(TableSplitterTest, SplitTableByDensity) {
   std::unique_ptr<ResourceTable> table =
       test::ResourceTableBuilder()
diff --git a/tools/aapt2/strip/Strip.cpp b/tools/aapt2/strip/Strip.cpp
index c34cfbf3..7260649 100644
--- a/tools/aapt2/strip/Strip.cpp
+++ b/tools/aapt2/strip/Strip.cpp
@@ -79,18 +79,13 @@
       context_->GetDiagnostics()->Note(DiagMessage() << "Stripping APK...");
     }
 
-    // TODO(lecesne): Add support for more than one density.
-    if (options_.target_configs.size() > 1) {
-      context_->GetDiagnostics()->Error(DiagMessage()
-                                        << "Multiple densities not supported at the moment");
-      return 1;
-    }
-
     // Stripping the APK using the TableSplitter with no splits and the target
-    // density as the preferred density. The resource table is modified in
+    // densities as the preferred densities. The resource table is modified in
     // place in the LoadedApk.
     TableSplitterOptions splitter_options;
-    splitter_options.preferred_density = options_.target_configs[0].density;
+    for (auto& config : options_.target_configs) {
+      splitter_options.preferred_densities.push_back(config.density);
+    }
     std::vector<SplitConstraints> splits;
     TableSplitter splitter(splits, splitter_options);
     splitter.SplitTable(apk->GetResourceTable());
diff --git a/tools/bit/main.cpp b/tools/bit/main.cpp
index 868d90a1..d056ba5 100644
--- a/tools/bit/main.cpp
+++ b/tools/bit/main.cpp
@@ -455,6 +455,7 @@
                 fprintf(stderr, "Test / activity supplied without a module to build: %s\n",
                         arg.c_str());
                 print_usage(stderr);
+                delete target;
                 exit(1);
             } else if (colonPos == string::npos) {
                 target->name = arg;
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeIInputMethodManager.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeIInputMethodManager.java
index ab73a8b..4338ca0 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeIInputMethodManager.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeIInputMethodManager.java
@@ -228,7 +228,8 @@
     @Override
     public InputBindResult startInputOrWindowGainedFocus(
             /* @InputMethodClient.StartInputReason */ int startInputReason,
-            IInputMethodClient client, IBinder windowToken, int controlFlags, int softInputMode,
+            IInputMethodClient client, IBinder windowToken, int controlFlags,
+            /* @android.view.WindowManager.LayoutParams.SoftInputModeFlags */ int softInputMode,
             int windowFlags, EditorInfo attribute, IInputContext inputContext,
             /* @InputConnectionInspector.MissingMethodFlags */ int missingMethodFlags)
             throws RemoteException {
@@ -248,4 +249,9 @@
         // TODO Auto-generated method stub
         return null;
     }
+
+    @Override
+    public void reportFullscreenMode(IBinder token, boolean fullscreen) {
+        // TODO Auto-generated method stub
+    }
 }
diff --git a/wifi/java/android/net/wifi/WifiNetworkScoreCache.java b/wifi/java/android/net/wifi/WifiNetworkScoreCache.java
index 04dea1b..f61dfdc 100755
--- a/wifi/java/android/net/wifi/WifiNetworkScoreCache.java
+++ b/wifi/java/android/net/wifi/WifiNetworkScoreCache.java
@@ -145,7 +145,7 @@
         if (network != null && network.rssiCurve != null) {
             score = network.rssiCurve.lookupScore(result.level);
             if (DBG) {
-                Log.e(TAG, "getNetworkScore found scored network " + network.networkKey
+                Log.d(TAG, "getNetworkScore found scored network " + network.networkKey
                         + " score " + Integer.toString(score)
                         + " RSSI " + result.level);
             }
@@ -171,7 +171,7 @@
         if (network != null && network.rssiCurve != null) {
             score = network.rssiCurve.lookupScore(result.level, isActiveNetwork);
             if (DBG) {
-                Log.e(TAG, "getNetworkScore found scored network " + network.networkKey
+                Log.d(TAG, "getNetworkScore found scored network " + network.networkKey
                         + " score " + Integer.toString(score)
                         + " RSSI " + result.level
                         + " isActiveNetwork " + isActiveNetwork);